Skip to content

Commit

Permalink
Add blanket impl of Transaction, TxReceipt and BlockHeader references (
Browse files Browse the repository at this point in the history
…alloy-rs#1657)

Add blanket impl of Transaction and BlockHeader references
  • Loading branch information
emhane authored Nov 18, 2024
1 parent 2d047ad commit d771192
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/consensus/src/block/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Header {
}

/// Trait for extracting specific Ethereum block data from a header
#[auto_impl::auto_impl(&, Arc)]
pub trait BlockHeader {
/// Retrieves the parent hash of the block
fn parent_hash(&self) -> B256;
Expand Down
1 change: 1 addition & 0 deletions crates/consensus/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub mod serde_bincode_compat {

/// Represents a minimal EVM transaction.
#[doc(alias = "Tx")]
#[auto_impl::auto_impl(&, Arc)]
pub trait Transaction: fmt::Debug + any::Any + Send + Sync + 'static {
/// Get `chain_id`.
fn chain_id(&self) -> Option<ChainId>;
Expand Down

0 comments on commit d771192

Please sign in to comment.