InstructionProvider

Trait InstructionProvider 

Source
pub trait InstructionProvider {
    type Context;
    type InterpreterTypes: InterpreterTypes;

    // Required methods
    fn instruction_table(
        &self,
    ) -> &InstructionTable<Self::InterpreterTypes, Self::Context>;
    fn gas_params(&self) -> GasParams;
    fn set_spec(&mut self, spec: SpecId) -> bool;
}
Expand description

Stores instructions for EVM.

Required Associated Types§

Source

type Context

Context type.

Source

type InterpreterTypes: InterpreterTypes

Interpreter types.

Required Methods§

Source

fn instruction_table( &self, ) -> &InstructionTable<Self::InterpreterTypes, Self::Context>

Returns the instruction table that is used by EvmTr to execute instructions.

Source

fn gas_params(&self) -> GasParams

Returns the gas params that is used by EvmTr to execute instructions.

Source

fn set_spec(&mut self, spec: SpecId) -> bool

Sets the spec. Return true if the spec was changed.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + InstructionProvider + ?Sized> InstructionProvider for &'a mut T

Source§

impl<T: InstructionProvider + ?Sized> InstructionProvider for Box<T>

Implementors§