Trait reth_node_builder::ConfigureEvm

source ·
pub trait ConfigureEvm: ConfigureEvmEnv {
    type DefaultExternalContext<'a>;

    // Required method
    fn evm<'a, DB>(
        &'a self,
        db: DB
    ) -> Evm<'a, Self::DefaultExternalContext<'a>, DB>
       where DB: Database + 'a;

    // Provided methods
    fn evm_with_env<'a, DB>(
        &'a self,
        db: DB,
        env: EnvWithHandlerCfg
    ) -> Evm<'a, Self::DefaultExternalContext<'a>, DB>
       where DB: Database + 'a { ... }
    fn evm_with_env_and_inspector<'a, DB, I>(
        &'a self,
        db: DB,
        env: EnvWithHandlerCfg,
        inspector: I
    ) -> Evm<'a, I, DB>
       where DB: Database + 'a,
             I: GetInspector<DB> { ... }
    fn evm_with_inspector<'a, DB, I>(
        &'a self,
        db: DB,
        inspector: I
    ) -> Evm<'a, I, DB>
       where DB: Database + 'a,
             I: GetInspector<DB> { ... }
}
Expand description

Trait for configuring the EVM for executing full blocks.

Required Associated Types§

source

type DefaultExternalContext<'a>

Associated type for the default external context that should be configured for the EVM.

Required Methods§

source

fn evm<'a, DB>( &'a self, db: DB ) -> Evm<'a, Self::DefaultExternalContext<'a>, DB>
where DB: Database + 'a,

Returns new EVM with the given database

This does not automatically configure the EVM with ConfigureEvmEnv methods. It is up to the caller to call an appropriate method to fill the transaction and block environment before executing any transactions using the provided EVM.

Provided Methods§

source

fn evm_with_env<'a, DB>( &'a self, db: DB, env: EnvWithHandlerCfg ) -> Evm<'a, Self::DefaultExternalContext<'a>, DB>
where DB: Database + 'a,

Returns a new EVM with the given database configured with the given environment settings, including the spec id.

This will preserve any handler modifications

source

fn evm_with_env_and_inspector<'a, DB, I>( &'a self, db: DB, env: EnvWithHandlerCfg, inspector: I ) -> Evm<'a, I, DB>
where DB: Database + 'a, I: GetInspector<DB>,

Returns a new EVM with the given database configured with the given environment settings, including the spec id.

This will use the given external inspector as the EVM external context.

This will preserve any handler modifications

source

fn evm_with_inspector<'a, DB, I>( &'a self, db: DB, inspector: I ) -> Evm<'a, I, DB>
where DB: Database + 'a, I: GetInspector<DB>,

Returns a new EVM with the given inspector.

Caution: This does not automatically configure the EVM with ConfigureEvmEnv methods. It is up to the caller to call an appropriate method to fill the transaction and block environment before executing any transactions using the provided EVM.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ConfigureEvm for OptimismEvmConfig

§

type DefaultExternalContext<'a> = ()

source§

fn evm<'a, DB>( &self, db: DB ) -> Evm<'a, <OptimismEvmConfig as ConfigureEvm>::DefaultExternalContext<'a>, DB>
where DB: Database + 'a,

source§

fn evm_with_inspector<'a, DB, I>(&self, db: DB, inspector: I) -> Evm<'a, I, DB>
where DB: Database + 'a, I: GetInspector<DB>,

Implementors§