Trait EvmBlockHeader

Source
pub trait EvmBlockHeader: Sealable {
    type Spec: 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: Self::Spec) -> BlockEnv;
}
Expand description

An EVM abstraction of a block header.

Required Associated Types§

Source

type Spec: Copy

Associated type for the EVM specification (e.g., London, Shanghai)

Required Methods§

Source

fn parent_hash(&self) -> &B256

Returns the hash of the parent block’s header.

Source

fn number(&self) -> BlockNumber

Returns the block number.

Source

fn timestamp(&self) -> u64

Returns the block timestamp.

Source

fn state_root(&self) -> &B256

Returns the state root hash.

Source

fn receipts_root(&self) -> &B256

Returns the receipts root hash of the block.

Source

fn logs_bloom(&self) -> &Bloom

Returns the logs bloom filter of the block

Source

fn to_block_env(&self, spec: Self::Spec) -> 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", so this trait is not object safe.

Implementors§