pub trait PrecompileHandleExt: PrecompileHandle {
    // Required methods
    fn record_log_costs_manual(
        &mut self,
        topics: usize,
        data_len: usize
    ) -> EvmResult;
    fn record_log_costs(&mut self, logs: &[&Log]) -> EvmResult;
    fn check_function_modifier(&self, modifier: FunctionModifier) -> EvmResult;
    fn read_selector<T>(&self) -> EvmResult<T>
       where T: TryFromPrimitive<Primitive = u32>;
    fn read_input(&self) -> EvmResult<EvmDataReader<'_>>;
}

Required Methods§

source

fn record_log_costs_manual( &mut self, topics: usize, data_len: usize ) -> EvmResult

Record cost of a log manually. This can be useful to record log costs early when their content have static size.

source

fn record_log_costs(&mut self, logs: &[&Log]) -> EvmResult

Record cost of logs.

source

fn check_function_modifier(&self, modifier: FunctionModifier) -> EvmResult

Check that a function call is compatible with the context it is called into.

source

fn read_selector<T>(&self) -> EvmResult<T>where T: TryFromPrimitive<Primitive = u32>,

Read the selector from the input data.

source

fn read_input(&self) -> EvmResult<EvmDataReader<'_>>

Returns a reader of the input, skipping the selector.

Implementors§