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

Implementations on Foreign Types§

Source§

impl BlockHeader for Header

Source§

fn beneficiary(&self) -> Address

Source§

fn difficulty(&self) -> U256

Source§

fn number(&self) -> BlockNumber

Source§

fn gas_limit(&self) -> u64

Source§

fn timestamp(&self) -> u64

Source§

fn mix_hash(&self) -> B256

Source§

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

Source§

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

Implementors§