Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blanket impl of Transaction, TxReceipt and BlockHeader references #1657

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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