Trait pallet_evm::PrecompileSet[][src]

pub trait PrecompileSet {
    fn execute(
        address: H160,
        input: &[u8],
        target_gas: Option<u64>,
        context: &Context
    ) -> Option<Result<PrecompileOutput, ExitError>>; }
Expand description

Custom precompiles to be used by EVM engine.

Required methods

Try to execute the code address as precompile. If the code address is not a precompile or the precompile is not yet available, return None. Otherwise, calculate the amount of gas needed with given input and target_gas. Return Some(Ok(status, output, gas_used)) if the execution is successful. Otherwise return Some(Err(_)).

Implementations on Foreign Types

Implementors