[][src]Trait pallet_evm::Precompiles

pub trait Precompiles {
    fn execute(
        address: H160,
        input: &[u8],
        target_gas: Option<usize>
    ) -> Option<Result<(ExitSucceed, Vec<u8>, usize), ExitError>>; }

Custom precompiles to be used by EVM engine.

Required methods

fn execute(
    address: H160,
    input: &[u8],
    target_gas: Option<usize>
) -> Option<Result<(ExitSucceed, Vec<u8>, usize), ExitError>>

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(_)).

Loading content...

Implementations on Foreign Types

impl Precompiles for ()[src]

Loading content...

Implementors

Loading content...