pub trait BlockHeader {
Show 21 methods
// Required methods
fn parent_hash(&self) -> B256;
fn ommers_hash(&self) -> B256;
fn beneficiary(&self) -> Address;
fn state_root(&self) -> B256;
fn transactions_root(&self) -> B256;
fn receipts_root(&self) -> B256;
fn withdrawals_root(&self) -> Option<B256>;
fn logs_bloom(&self) -> Bloom;
fn difficulty(&self) -> U256;
fn number(&self) -> BlockNumber;
fn gas_limit(&self) -> u64;
fn gas_used(&self) -> u64;
fn timestamp(&self) -> u64;
fn mix_hash(&self) -> B256;
fn nonce(&self) -> B64;
fn base_fee_per_gas(&self) -> Option<u64>;
fn blob_gas_used(&self) -> Option<u64>;
fn excess_blob_gas(&self) -> Option<u64>;
fn parent_beacon_block_root(&self) -> Option<B256>;
fn requests_hash(&self) -> Option<B256>;
fn extra_data(&self) -> &Bytes;
}
Expand description
Trait for extracting specific Ethereum block data from a header
Required Methods§
sourcefn parent_hash(&self) -> B256
fn parent_hash(&self) -> B256
Retrieves the parent hash of the block
sourcefn ommers_hash(&self) -> B256
fn ommers_hash(&self) -> B256
Retrieves the ommers hash of the block
sourcefn beneficiary(&self) -> Address
fn beneficiary(&self) -> Address
Retrieves the beneficiary (miner) of the block
sourcefn state_root(&self) -> B256
fn state_root(&self) -> B256
Retrieves the state root hash of the block
sourcefn transactions_root(&self) -> B256
fn transactions_root(&self) -> B256
Retrieves the transactions root hash of the block
sourcefn receipts_root(&self) -> B256
fn receipts_root(&self) -> B256
Retrieves the receipts root hash of the block
sourcefn withdrawals_root(&self) -> Option<B256>
fn withdrawals_root(&self) -> Option<B256>
Retrieves the withdrawals root hash of the block, if available
sourcefn logs_bloom(&self) -> Bloom
fn logs_bloom(&self) -> Bloom
Retrieves the logs bloom filter of the block
sourcefn difficulty(&self) -> U256
fn difficulty(&self) -> U256
Retrieves the difficulty of the block
sourcefn number(&self) -> BlockNumber
fn number(&self) -> BlockNumber
Retrieves the block number
sourcefn base_fee_per_gas(&self) -> Option<u64>
fn base_fee_per_gas(&self) -> Option<u64>
Retrieves the base fee per gas of the block, if available
sourcefn blob_gas_used(&self) -> Option<u64>
fn blob_gas_used(&self) -> Option<u64>
Retrieves the blob gas used by the block, if available
sourcefn excess_blob_gas(&self) -> Option<u64>
fn excess_blob_gas(&self) -> Option<u64>
Retrieves the excess blob gas of the block, if available
sourcefn parent_beacon_block_root(&self) -> Option<B256>
fn parent_beacon_block_root(&self) -> Option<B256>
Retrieves the parent beacon block root of the block, if available
sourcefn requests_hash(&self) -> Option<B256>
fn requests_hash(&self) -> Option<B256>
Retrieves the requests hash of the block, if available
sourcefn extra_data(&self) -> &Bytes
fn extra_data(&self) -> &Bytes
Retrieves the block’s extra data field