fn transact<F, R>(&mut self, op: F) -> R
    where
        F: for<'c> FnOnce(
            &mut StackExecutor<'c, 'static, MemoryStackState<'c, 'c, MemoryBackend<'v>>, ()>,
        ) -> R,
    {
        let config = Config::london();
        let metadata = StackSubstateMetadata::new(u64::MAX, &config);
        let state = MemoryStackState::new(metadata, &self.storage_backend);
        let mut exec = StackExecutor::new_with_precompiles(state, &config, &());

        let res = op(&mut exec);

        let state = exec.into_state();
        let (changes, logs) = state.deconstruct();
        self.storage_backend.apply(changes, logs, false);

        res
    }
// Perform a transaction and commit the changes to the storage backend.
Perform a transaction and commit the changes to the storage backend.
Perform a transaction and commit the changes to the storage backend .
fn transact<F, R>(&mut self, op: F) -> R
    where
        F: for<'c> FnOnce(
            &mut StackExecutor<'c, 'static, MemoryStackState<'c, 'c, MemoryBackend<'v>>, ()>,
        ) -> R,
    {
        let config = Config::london();
        let metadata = StackSubstateMetadata::new(u64::MAX, &config);
        let state = MemoryStackState::new(metadata, &self.storage_backend);
        let mut exec = StackExecutor::new_with_precompiles(state, &config, &());
        let res = op(&mut exec);
        let state = exec.into_state();
        let (changes, logs) = state.deconstruct();
        self.storage_backend.apply(changes, logs, false);
        res
    }
fn transact < F , R > ( & mut self , op : F ) -> R where F : for < ' c > FnOnce ( & mut StackExecutor < ' c , ' static , MemoryStackState < ' c , ' c , MemoryBackend < ' v > > , ( ) > , ) -> R , { let config = Config :: london ( ) ; let metadata = StackSubstateMetadata :: new ( u64 :: MAX , & config ) ; let state = MemoryStackState :: new ( metadata , & self . storage_backend ) ; let mut exec = StackExecutor :: new_with_precompiles ( state , & config , & ( ) ) ; let res = op ( & mut exec ) ; let state = exec . into_state ( ) ; let ( changes , logs ) = state . deconstruct ( ) ; self . storage_backend . apply ( changes , logs , false ) ; res }
Perform a transaction and commit the changes to the storage backend.
Perform a transaction and commit the changes to the storage backend .
&mut self
op
F