Trait pallet_evm::Precompile [−][src]
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]
input: &[u8],
target_gas: Option<u64>,
context: &Context
) -> Result<(ExitSucceed, Vec<u8, Global>, u64), ExitError>
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
impl<T> Precompile for T where
T: LinearCostPrecompile,
[src]
T: LinearCostPrecompile,