revm_handler_interface::execution

Trait ExecutionHandler

Source
pub trait ExecutionHandler {
    type Context;
    type Error;
    type Frame: Frame<Context = Self::Context, Error = Self::Error>;
    type ExecResult;

    // Required methods
    fn init_first_frame(
        &mut self,
        context: &mut Self::Context,
        gas_limit: u64,
    ) -> Result<FrameOrFrameResult<Self::Frame>, Self::Error>;
    fn last_frame_result(
        &self,
        context: &mut Self::Context,
        frame_result: <Self::Frame as Frame>::FrameResult,
    ) -> Result<Self::ExecResult, Self::Error>;

    // Provided method
    fn run(
        &self,
        context: &mut Self::Context,
        frame: Self::Frame,
    ) -> Result<Self::ExecResult, Self::Error> { ... }
}

Required Associated Types§

Source

type Context

Source

type Error

Source

type Frame: Frame<Context = Self::Context, Error = Self::Error>

Source

type ExecResult

Required Methods§

Source

fn init_first_frame( &mut self, context: &mut Self::Context, gas_limit: u64, ) -> Result<FrameOrFrameResult<Self::Frame>, Self::Error>

Execute call.

Source

fn last_frame_result( &self, context: &mut Self::Context, frame_result: <Self::Frame as Frame>::FrameResult, ) -> Result<Self::ExecResult, Self::Error>

Execute create.

Provided Methods§

Source

fn run( &self, context: &mut Self::Context, frame: Self::Frame, ) -> Result<Self::ExecResult, Self::Error>

Implementors§