pub trait EvmBlockHeader: Sealable {
type SpecId: Copy;
// Required methods
fn parent_hash(&self) -> &B256;
fn number(&self) -> BlockNumber;
fn timestamp(&self) -> u64;
fn state_root(&self) -> &B256;
fn receipts_root(&self) -> &B256;
fn logs_bloom(&self) -> &Bloom;
fn to_block_env(&self, spec_id: Self::SpecId) -> BlockEnv;
}Expand description
An EVM abstraction of a block header.
Required Associated Types§
Required Methods§
Sourcefn parent_hash(&self) -> &B256
fn parent_hash(&self) -> &B256
Returns the hash of the parent block’s header.
Sourcefn state_root(&self) -> &B256
fn state_root(&self) -> &B256
Returns the state root hash.
Sourcefn receipts_root(&self) -> &B256
fn receipts_root(&self) -> &B256
Returns the receipts root hash of the block.
Sourcefn logs_bloom(&self) -> &Bloom
fn logs_bloom(&self) -> &Bloom
Returns the logs bloom filter of the block
Sourcefn to_block_env(&self, spec_id: Self::SpecId) -> BlockEnv
fn to_block_env(&self, spec_id: Self::SpecId) -> BlockEnv
Returns the EVM block environment equivalent to this block header.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".