Skip to content

Commit

Permalink
chore(sdk): define FullSignedTx trait (#12327)
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane authored Nov 6, 2024
1 parent d8edf9c commit 660ca38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/primitives-traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ pub mod receipt;
pub use receipt::Receipt;

pub mod transaction;
pub use transaction::{signed::SignedTransaction, FullTransaction, Transaction};
pub use transaction::{
signed::{FullSignedTx, SignedTransaction},
FullTransaction, Transaction,
};

mod integer_list;
pub use integer_list::{IntegerList, IntegerListError};
Expand Down
6 changes: 6 additions & 0 deletions crates/primitives-traits/src/transaction/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

use alloc::fmt;
use core::hash::Hash;
use reth_codecs::Compact;

use alloy_consensus::Transaction;
use alloy_eips::eip2718::{Decodable2718, Encodable2718};
use alloy_primitives::{keccak256, Address, Signature, TxHash, B256};
use revm_primitives::TxEnv;

/// Helper trait that unifies all behaviour required by block to support full node operations.
pub trait FullSignedTx: SignedTransaction<Transaction: Compact> + Compact {}

impl<T> FullSignedTx for T where T: SignedTransaction<Transaction: Compact> + Compact {}

/// A signed transaction.
pub trait SignedTransaction:
fmt::Debug
Expand Down

0 comments on commit 660ca38

Please sign in to comment.