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§
sourcefn record_log_costs_manual(
&mut self,
topics: usize,
data_len: usize
) -> EvmResult
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.
sourcefn record_log_costs(&mut self, logs: &[&Log]) -> EvmResult
fn record_log_costs(&mut self, logs: &[&Log]) -> EvmResult
Record cost of logs.
sourcefn check_function_modifier(&self, modifier: FunctionModifier) -> EvmResult
fn check_function_modifier(&self, modifier: FunctionModifier) -> EvmResult
Check that a function call is compatible with the context it is called into.
sourcefn read_selector<T>(&self) -> EvmResult<T>where
T: TryFromPrimitive<Primitive = u32>,
fn read_selector<T>(&self) -> EvmResult<T>where T: TryFromPrimitive<Primitive = u32>,
Read the selector from the input data.
sourcefn read_input(&self) -> EvmResult<EvmDataReader<'_>>
fn read_input(&self) -> EvmResult<EvmDataReader<'_>>
Returns a reader of the input, skipping the selector.