Type Alias MainnetEvm
pub type MainnetEvm<CTX, INSP = ()> = Evm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, EthPrecompiles>;
Aliased Type§
pub struct MainnetEvm<CTX, INSP = ()> {
pub ctx: CTX,
pub inspector: INSP,
pub instruction: EthInstructions<EthInterpreter, CTX>,
pub precompiles: EthPrecompiles,
}
Fields§
§ctx: CTX
context_interface::ContextTr
of the EVM it is used to fetch data from database.
inspector: INSP
Inspector of the EVM it is used to inspect the EVM. Its trait are defined in revm-inspector crate.
instruction: EthInstructions<EthInterpreter, CTX>
Instructions provider of the EVM it is used to execute instructions.
InstructionProvider
trait is defined in revm-handler crate.
precompiles: EthPrecompiles
Precompile provider of the EVM it is used to execute precompiles.
PrecompileProvider
trait is defined in revm-handler crate.
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.
Implementations
§impl<CTX, I, INSP, P> Evm<CTX, INSP, I, P>
impl<CTX, I, INSP, P> Evm<CTX, INSP, I, P>
pub fn new_with_inspector(
ctx: CTX,
inspector: INSP,
instruction: I,
precompiles: P,
) -> Evm<CTX, INSP, I, P>
pub fn new_with_inspector( ctx: CTX, inspector: INSP, instruction: I, precompiles: P, ) -> Evm<CTX, INSP, I, P>
Create a new EVM instance with a given context, inspector, instruction set, and precompile provider.
§impl<CTX, INSP, I, P> Evm<CTX, INSP, I, P>
impl<CTX, INSP, I, P> Evm<CTX, INSP, I, P>
pub fn with_inspector<OINSP>(self, inspector: OINSP) -> Evm<CTX, OINSP, I, P>
pub fn with_inspector<OINSP>(self, inspector: OINSP) -> Evm<CTX, OINSP, I, P>
Consumed self and returns new Evm type with given Inspector.
pub fn with_precompiles<OP>(self, precompiles: OP) -> Evm<CTX, INSP, I, OP>
pub fn with_precompiles<OP>(self, precompiles: OP) -> Evm<CTX, INSP, I, OP>
Consumes self and returns new Evm type with given Precompiles.
pub fn into_inspector(self) -> INSP
pub fn into_inspector(self) -> INSP
Consumes self and returns inner Inspector.
Trait Implementations
§impl<CTX, INSP, I, P> EvmTr for Evm<CTX, INSP, I, P>where
CTX: ContextTr,
I: InstructionProvider<Context = CTX>,
<I as InstructionProvider>::InterpreterTypes: InterpreterTypes<Output = InterpreterAction>,
P: PrecompileProvider<CTX>,
impl<CTX, INSP, I, P> EvmTr for Evm<CTX, INSP, I, P>where
CTX: ContextTr,
I: InstructionProvider<Context = CTX>,
<I as InstructionProvider>::InterpreterTypes: InterpreterTypes<Output = InterpreterAction>,
P: PrecompileProvider<CTX>,
§type Instructions = I
type Instructions = I
§type Precompiles = P
type Precompiles = P
§fn run_interpreter(
&mut self,
interpreter: &mut Interpreter<<<Evm<CTX, INSP, I, P> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes>,
) -> <<<Evm<CTX, INSP, I, P> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output
fn run_interpreter( &mut self, interpreter: &mut Interpreter<<<Evm<CTX, INSP, I, P> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes>, ) -> <<<Evm<CTX, INSP, I, P> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output
§fn ctx(&mut self) -> &mut <Evm<CTX, INSP, I, P> as EvmTr>::Context
fn ctx(&mut self) -> &mut <Evm<CTX, INSP, I, P> as EvmTr>::Context
§fn ctx_ref(&self) -> &<Evm<CTX, INSP, I, P> as EvmTr>::Context
fn ctx_ref(&self) -> &<Evm<CTX, INSP, I, P> as EvmTr>::Context
§fn ctx_instructions(
&mut self,
) -> (&mut <Evm<CTX, INSP, I, P> as EvmTr>::Context, &mut <Evm<CTX, INSP, I, P> as EvmTr>::Instructions)
fn ctx_instructions( &mut self, ) -> (&mut <Evm<CTX, INSP, I, P> as EvmTr>::Context, &mut <Evm<CTX, INSP, I, P> as EvmTr>::Instructions)
§fn ctx_precompiles(
&mut self,
) -> (&mut <Evm<CTX, INSP, I, P> as EvmTr>::Context, &mut <Evm<CTX, INSP, I, P> as EvmTr>::Precompiles)
fn ctx_precompiles( &mut self, ) -> (&mut <Evm<CTX, INSP, I, P> as EvmTr>::Context, &mut <Evm<CTX, INSP, I, P> as EvmTr>::Precompiles)
§impl<CTX, INSP, INST, PRECOMPILES> ExecuteCommitEvm for Evm<CTX, INSP, INST, PRECOMPILES>where
CTX: ContextTr + ContextSetters,
<CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput>,
<CTX as ContextTr>::Db: DatabaseCommit,
INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>,
PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,
impl<CTX, INSP, INST, PRECOMPILES> ExecuteCommitEvm for Evm<CTX, INSP, INST, PRECOMPILES>where
CTX: ContextTr + ContextSetters,
<CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput>,
<CTX as ContextTr>::Db: DatabaseCommit,
INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>,
PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,
§type CommitOutput = Result<ExecutionResult, EVMError<<<CTX as ContextTr>::Db as Database>::Error>>
type CommitOutput = Result<ExecutionResult, EVMError<<<CTX as ContextTr>::Db as Database>::Error>>
§fn replay_commit(
&mut self,
) -> <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteCommitEvm>::CommitOutput
fn replay_commit( &mut self, ) -> <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteCommitEvm>::CommitOutput
§fn transact_commit(&mut self, tx: Self::Tx) -> Self::CommitOutput
fn transact_commit(&mut self, tx: Self::Tx) -> Self::CommitOutput
§impl<CTX, INSP, INST, PRECOMPILES> ExecuteEvm for Evm<CTX, INSP, INST, PRECOMPILES>where
CTX: ContextTr + ContextSetters,
<CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput>,
INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>,
PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,
impl<CTX, INSP, INST, PRECOMPILES> ExecuteEvm for Evm<CTX, INSP, INST, PRECOMPILES>where
CTX: ContextTr + ContextSetters,
<CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput>,
INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>,
PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,
§type Output = Result<ResultAndState, EVMError<<<CTX as ContextTr>::Db as Database>::Error>>
type Output = Result<ResultAndState, EVMError<<<CTX as ContextTr>::Db as Database>::Error>>
§fn replay(
&mut self,
) -> <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteEvm>::Output
fn replay( &mut self, ) -> <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteEvm>::Output
§fn set_tx(&mut self, tx: <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteEvm>::Tx)
fn set_tx(&mut self, tx: <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteEvm>::Tx)
§fn set_block(
&mut self,
block: <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteEvm>::Block,
)
fn set_block( &mut self, block: <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteEvm>::Block, )
§impl<CTX, INSP, INST, PRECOMPILES> InspectCommitEvm for Evm<CTX, INSP, INST, PRECOMPILES>where
CTX: ContextSetters + ContextTr,
<CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput> + JournalExt,
<CTX as ContextTr>::Db: DatabaseCommit,
INSP: Inspector<CTX>,
INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>,
PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,
impl<CTX, INSP, INST, PRECOMPILES> InspectCommitEvm for Evm<CTX, INSP, INST, PRECOMPILES>where
CTX: ContextSetters + ContextTr,
<CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput> + JournalExt,
<CTX as ContextTr>::Db: DatabaseCommit,
INSP: Inspector<CTX>,
INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>,
PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,
§fn inspect_replay_commit(
&mut self,
) -> <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteCommitEvm>::CommitOutput
fn inspect_replay_commit( &mut self, ) -> <Evm<CTX, INSP, INST, PRECOMPILES> as ExecuteCommitEvm>::CommitOutput
InspectEvm::inspect_replay
and commit the state diff to the database.§fn inspect_replay_commit_with_inspector(
&mut self,
inspector: Self::Inspector,
) -> Self::CommitOutput
fn inspect_replay_commit_with_inspector( &mut self, inspector: Self::Inspector, ) -> Self::CommitOutput
InspectEvm::inspect_replay_with_inspector
and commit the state diff to the database.§fn inspect_replay_with_inspector(
&mut self,
inspector: Self::Inspector,
) -> Self::CommitOutput
fn inspect_replay_with_inspector( &mut self, inspector: Self::Inspector, ) -> Self::CommitOutput
InspectEvm::inspect_replay_with_inspector
and commit the state diff to the database.§fn inspect_commit(
&mut self,
tx: Self::Tx,
inspector: Self::Inspector,
) -> Self::CommitOutput
fn inspect_commit( &mut self, tx: Self::Tx, inspector: Self::Inspector, ) -> Self::CommitOutput
InspectEvm::inspect
and commit the state diff to the database.