Trait pallet_gear::BuiltinDispatcher

source ·
pub trait BuiltinDispatcher {
    type Context;
    type Error;

    // Required methods
    fn lookup<'a>(
        &'a self,
        id: &ProgramId,
    ) -> Option<BuiltinInfo<'a, Self::Context, Self::Error>>;
    fn run(
        &self,
        context: BuiltinInfo<'_, Self::Context, Self::Error>,
        dispatch: StoredDispatch,
        gas_limit: u64,
    ) -> Vec<JournalNote>;
}
Expand description

A trait representing a registry that provides methods to lookup and run a builtin actor.

Required Associated Types§

Required Methods§

source

fn lookup<'a>( &'a self, id: &ProgramId, ) -> Option<BuiltinInfo<'a, Self::Context, Self::Error>>

Looks up a builtin actor by its actor id.

source

fn run( &self, context: BuiltinInfo<'_, Self::Context, Self::Error>, dispatch: StoredDispatch, gas_limit: u64, ) -> Vec<JournalNote>

Implementations on Foreign Types§

source§

impl BuiltinDispatcher for ()

§

type Context = ()

§

type Error = ()

source§

fn lookup<'a>( &'a self, _id: &ProgramId, ) -> Option<BuiltinInfo<'a, Self::Context, Self::Error>>

source§

fn run( &self, _context: BuiltinInfo<'_, Self::Context, Self::Error>, _dispatch: StoredDispatch, _gas_limit: u64, ) -> Vec<JournalNote>

Implementors§