Trait ConfigureEvm
pub trait ConfigureEvm: ConfigureEvmEnv {
type Evm<'a, DB: Database + 'a, I: 'a>: Evm<Tx = TxEnv, DB = DB, Error = EVMError<<DB as Database>::Error>>;
// Required methods
fn evm_with_env<DB>(
&self,
db: DB,
evm_env: EvmEnv,
tx: TxEnv,
) -> Self::Evm<'_, DB, ()>
where DB: Database;
fn evm_with_env_and_inspector<DB, I>(
&self,
db: DB,
evm_env: EvmEnv,
tx: TxEnv,
inspector: I,
) -> Self::Evm<'_, DB, I>
where DB: Database,
I: GetInspector<DB>;
// Provided method
fn evm_for_block<DB>(
&self,
db: DB,
header: &Self::Header,
) -> Self::Evm<'_, DB, ()>
where DB: Database { ... }
}
Expand description
Trait for configuring the EVM for executing full blocks.
Required Associated Types§
Required Methods§
fn evm_with_env<DB>(
&self,
db: DB,
evm_env: EvmEnv,
tx: TxEnv,
) -> Self::Evm<'_, DB, ()>where
DB: Database,
fn evm_with_env<DB>(
&self,
db: DB,
evm_env: EvmEnv,
tx: TxEnv,
) -> Self::Evm<'_, DB, ()>where
DB: Database,
Returns a new EVM with the given database configured with the given environment settings, including the spec id and transaction environment.
This will preserve any handler modifications
fn evm_with_env_and_inspector<DB, I>(
&self,
db: DB,
evm_env: EvmEnv,
tx: TxEnv,
inspector: I,
) -> Self::Evm<'_, DB, I>where
DB: Database,
I: GetInspector<DB>,
fn evm_with_env_and_inspector<DB, I>(
&self,
db: DB,
evm_env: EvmEnv,
tx: TxEnv,
inspector: I,
) -> Self::Evm<'_, DB, I>where
DB: Database,
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
Provided Methods§
fn evm_for_block<DB>(
&self,
db: DB,
header: &Self::Header,
) -> Self::Evm<'_, DB, ()>where
DB: Database,
fn evm_for_block<DB>(
&self,
db: DB,
header: &Self::Header,
) -> Self::Evm<'_, DB, ()>where
DB: Database,
Returns a new EVM with the given database configured with cfg
and block_env
configuration derived from the given header. Relies on
ConfigureEvmEnv::cfg_and_block_env
.
§Caution
This does not initialize the tx environment.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.