Trait pallet_evm::Precompile[][src]

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

One single precompile used by EVM engine.

Required methods

Try to execute the precompile. Calculate the amount of gas needed with given input and target_gas. Return Ok(status, output, gas_used) if the execution is successful. Otherwise return Err(_).

Implementors