diff --git a/crates/node-api/src/evm/traits.rs b/crates/node-api/src/evm/traits.rs index d0a8f3c418..bc0b900719 100644 --- a/crates/node-api/src/evm/traits.rs +++ b/crates/node-api/src/evm/traits.rs @@ -5,11 +5,19 @@ use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, SpecId, TxEnv}; /// Trait for configuring the EVM for executing full blocks. pub trait ConfigureEvm: ConfigureEvmEnv { /// 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. fn evm<'a, DB: Database + 'a>(&self, db: DB) -> Evm<'a, (), DB> { EvmBuilder::default().with_db(db).build() } - /// Returns a new EVM with the given inspector + /// Returns a new EVM with the given inspector. + /// + /// 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. fn evm_with_inspector<'a, DB: Database + 'a, I>(&self, db: DB, inspector: I) -> Evm<'a, I, DB> { EvmBuilder::default().with_db(db).with_external_context(inspector).build() }