Trait pallet_evm::Precompile[][src]

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

One single precompile used by EVM engine.

Required methods

pub fn execute(
    input: &[u8],
    target_gas: Option<u64>,
    context: &Context
) -> Result<(ExitSucceed, Vec<u8, Global>, u64), ExitError>
[src]

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

Loading content...

Implementors

impl<T> Precompile for T where
    T: LinearCostPrecompile
[src]

Loading content...