reth_primitives_traits::header

Trait BlockHeader

source
pub trait BlockHeader {
    // Required methods
    fn beneficiary(&self) -> Address;
    fn difficulty(&self) -> U256;
    fn number(&self) -> BlockNumber;
    fn gas_limit(&self) -> u64;
    fn timestamp(&self) -> u64;
    fn mix_hash(&self) -> B256;
    fn base_fee_per_gas(&self) -> Option<u64>;
    fn excess_blob_gas(&self) -> Option<u64>;
}
Expand description

Trait for extracting specific Ethereum block data from a header

Required Methods§

source

fn beneficiary(&self) -> Address

Retrieves the beneficiary (miner) of the block

source

fn difficulty(&self) -> U256

Retrieves the difficulty of the block

source

fn number(&self) -> BlockNumber

Retrieves the block number

source

fn gas_limit(&self) -> u64

Retrieves the gas limit of the block

source

fn timestamp(&self) -> u64

Retrieves the timestamp of the block

source

fn mix_hash(&self) -> B256

Retrieves the mix hash of the block

source

fn base_fee_per_gas(&self) -> Option<u64>

Retrieves the base fee per gas of the block, if available

source

fn excess_blob_gas(&self) -> Option<u64>

Retrieves the excess blob gas of the block, if available

Implementors§