Skip to main content

with_inherited_evm

Function with_inherited_evm 

Source
pub fn with_inherited_evm<F, I>(
    ecx: &mut <F as FoundryEvmFactory>::FoundryContext<'_>,
    inspector: I,
    f: &mut dyn for<'j> FnMut(&mut dyn NestedEvm<Spec = <F as EvmFactory>::Spec, Block = <F as EvmFactory>::BlockEnv, Chain = <F as FoundryEvmFactory>::Chain, Tx = <F as EvmFactory>::Tx, Journal = <<F as FoundryEvmFactory>::FoundryContext<'j> as ContextTr>::Journal>) -> Result<(), EVMError<DatabaseError>>,
) -> Result<(), EVMError<DatabaseError>>
Expand description

Runs a child operation with the parent’s environment, journal, and native chain state.

Publishes child environment, journal, and chain changes only when the operation returns Ok. This does not roll back database or inspector effects: callers retain their existing ownership of those effects. The outer transaction environment is not replaced.

Both inspector adapters use this operation so inheritance and write-back remain paired. The existing Monad journal bridge is retained here until native journal lifecycle ownership migrates.