Trait NestedEvm
pub trait NestedEvm {
type Spec;
type Block;
type Tx;
// Required methods
fn journal_inner_mut(&mut self) -> &mut JournalInner<JournalEntry>;
fn run_execution(
&mut self,
frame: FrameInput,
) -> Result<FrameResult, EVMError<DatabaseError>>;
fn transact_raw(
&mut self,
tx: Self::Tx,
) -> Result<ExecResultAndState<ExecutionResult>, EVMError<DatabaseError>>;
fn to_evm_env(&self) -> EvmEnv<Self::Spec, Self::Block>;
}Expand description
Object-safe trait exposing the operations that cheatcode nested EVM closures need.
This abstracts over the concrete EVM type (FoundryEvm, future TempoEvm, etc.)
so that cheatcode impls can build and run nested EVMs without knowing the concrete type.
Required Associated Types§
type Spec
type Spec
The spec type.
type Block
type Block
The block environment type.
type Tx
type Tx
The transaction environment type.
Required Methods§
fn journal_inner_mut(&mut self) -> &mut JournalInner<JournalEntry>
fn journal_inner_mut(&mut self) -> &mut JournalInner<JournalEntry>
Returns a mutable reference to the journal inner state (JournaledState).
fn run_execution(
&mut self,
frame: FrameInput,
) -> Result<FrameResult, EVMError<DatabaseError>>
fn run_execution( &mut self, frame: FrameInput, ) -> Result<FrameResult, EVMError<DatabaseError>>
Runs a single execution frame (create or call) through the EVM handler loop.
fn transact_raw(
&mut self,
tx: Self::Tx,
) -> Result<ExecResultAndState<ExecutionResult>, EVMError<DatabaseError>>
fn transact_raw( &mut self, tx: Self::Tx, ) -> Result<ExecResultAndState<ExecutionResult>, EVMError<DatabaseError>>
Executes a full transaction with the given tx env.