pub trait FoundryBlock: Block {
// Required methods
fn set_number(&mut self, number: U256);
fn set_beneficiary(&mut self, beneficiary: Address);
fn set_timestamp(&mut self, timestamp: U256);
fn set_gas_limit(&mut self, gas_limit: u64);
fn set_basefee(&mut self, basefee: u64);
fn set_difficulty(&mut self, difficulty: U256);
fn set_prevrandao(&mut self, prevrandao: Option<B256>);
fn set_blob_excess_gas_and_price(
&mut self,
_excess_blob_gas: u64,
_base_fee_update_fraction: u64,
);
}Expand description
Extension of [Block] with mutable setters, allowing EVM-agnostic mutation of block fields.
Required Methods§
Sourcefn set_number(&mut self, number: U256)
fn set_number(&mut self, number: U256)
Sets the block number.
Sourcefn set_beneficiary(&mut self, beneficiary: Address)
fn set_beneficiary(&mut self, beneficiary: Address)
Sets the beneficiary (coinbase) address.
Sourcefn set_timestamp(&mut self, timestamp: U256)
fn set_timestamp(&mut self, timestamp: U256)
Sets the block timestamp.
Sourcefn set_gas_limit(&mut self, gas_limit: u64)
fn set_gas_limit(&mut self, gas_limit: u64)
Sets the gas limit.
Sourcefn set_basefee(&mut self, basefee: u64)
fn set_basefee(&mut self, basefee: u64)
Sets the base fee per gas.
Sourcefn set_difficulty(&mut self, difficulty: U256)
fn set_difficulty(&mut self, difficulty: U256)
Sets the block difficulty.
Sourcefn set_prevrandao(&mut self, prevrandao: Option<B256>)
fn set_prevrandao(&mut self, prevrandao: Option<B256>)
Sets the prevrandao value.
Sourcefn set_blob_excess_gas_and_price(
&mut self,
_excess_blob_gas: u64,
_base_fee_update_fraction: u64,
)
fn set_blob_excess_gas_and_price( &mut self, _excess_blob_gas: u64, _base_fee_update_fraction: u64, )
Sets the excess blob gas and blob gasprice.