Trait reth::builder::ConfigureEvmEnv

pub trait ConfigureEvmEnv: Send + Sync + Unpin + Clone + 'static {
    // Required methods
    fn fill_tx_env(
        &self,
        tx_env: &mut TxEnv,
        transaction: &TransactionSigned,
        sender: Address,
    );
    fn fill_tx_env_system_contract_call(
        &self,
        env: &mut Env,
        caller: Address,
        contract: Address,
        data: Bytes,
    );
    fn fill_cfg_env(
        &self,
        cfg_env: &mut CfgEnvWithHandlerCfg,
        chain_spec: &ChainSpec,
        header: &Header,
        total_difficulty: Uint<256, 4>,
    );

    // Provided methods
    fn tx_env(&self, transaction: &TransactionSignedEcRecovered) -> TxEnv { ... }
    fn fill_block_env(
        &self,
        block_env: &mut BlockEnv,
        header: &Header,
        after_merge: bool,
    ) { ... }
    fn fill_cfg_and_block_env(
        &self,
        cfg: &mut CfgEnvWithHandlerCfg,
        block_env: &mut BlockEnv,
        chain_spec: &ChainSpec,
        header: &Header,
        total_difficulty: Uint<256, 4>,
    ) { ... }
}
Expand description

This represents the set of methods used to configure the EVM’s environment before block execution.

Default trait method implementation is done w.r.t. L1.

Required Methods§

fn fill_tx_env( &self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address, )

Fill transaction environment from a TransactionSigned and the given sender address.

fn fill_tx_env_system_contract_call( &self, env: &mut Env, caller: Address, contract: Address, data: Bytes, )

Fill transaction environment with a system contract call.

fn fill_cfg_env( &self, cfg_env: &mut CfgEnvWithHandlerCfg, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

Fill CfgEnvWithHandlerCfg fields according to the chain spec and given header

Provided Methods§

fn tx_env(&self, transaction: &TransactionSignedEcRecovered) -> TxEnv

fn fill_block_env( &self, block_env: &mut BlockEnv, header: &Header, after_merge: bool, )

Fill BlockEnv field according to the chain spec and given header

fn fill_cfg_and_block_env( &self, cfg: &mut CfgEnvWithHandlerCfg, block_env: &mut BlockEnv, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

Convenience function to call both fill_cfg_env and ConfigureEvmEnv::fill_block_env.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ConfigureEvmEnv for EthEvmConfig

source§

fn fill_cfg_env( &self, cfg_env: &mut CfgEnvWithHandlerCfg, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

source§

fn fill_tx_env( &self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address, )

source§

fn fill_tx_env_system_contract_call( &self, env: &mut Env, caller: Address, contract: Address, data: Bytes, )

source§

impl ConfigureEvmEnv for OptimismEvmConfig

source§

fn fill_tx_env( &self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address, )

source§

fn fill_tx_env_system_contract_call( &self, env: &mut Env, caller: Address, contract: Address, data: Bytes, )

source§

fn fill_cfg_env( &self, cfg_env: &mut CfgEnvWithHandlerCfg, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

§

impl<'a, T> ConfigureEvmEnv for &'a T
where T: 'a + ConfigureEvmEnv + ?Sized, &'a T: Send + Sync + Unpin + Clone + 'static,

§

fn tx_env(&self, transaction: &TransactionSignedEcRecovered) -> TxEnv

§

fn fill_tx_env( &self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address, )

§

fn fill_tx_env_system_contract_call( &self, env: &mut Env, caller: Address, contract: Address, data: Bytes, )

§

fn fill_cfg_env( &self, cfg_env: &mut CfgEnvWithHandlerCfg, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

§

fn fill_block_env( &self, block_env: &mut BlockEnv, header: &Header, after_merge: bool, )

§

fn fill_cfg_and_block_env( &self, cfg: &mut CfgEnvWithHandlerCfg, block_env: &mut BlockEnv, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

§

impl<T> ConfigureEvmEnv for Arc<T>
where T: ConfigureEvmEnv + ?Sized, Arc<T>: Send + Sync + Unpin + Clone + 'static,

§

fn tx_env(&self, transaction: &TransactionSignedEcRecovered) -> TxEnv

§

fn fill_tx_env( &self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address, )

§

fn fill_tx_env_system_contract_call( &self, env: &mut Env, caller: Address, contract: Address, data: Bytes, )

§

fn fill_cfg_env( &self, cfg_env: &mut CfgEnvWithHandlerCfg, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

§

fn fill_block_env( &self, block_env: &mut BlockEnv, header: &Header, after_merge: bool, )

§

fn fill_cfg_and_block_env( &self, cfg: &mut CfgEnvWithHandlerCfg, block_env: &mut BlockEnv, chain_spec: &ChainSpec, header: &Header, total_difficulty: Uint<256, 4>, )

Implementors§