Skip to main content

PrecompileFn

Type Alias PrecompileFn 

pub type PrecompileFn = fn(&[u8], u64, u64) -> Result<PrecompileOutput, PrecompileError>;
Expand description

Precompile function type. Takes input, gas limit and reservoir, returns a PrecompileResult.

Returns Ok(PrecompileOutput) for successful execution or non-fatal halts, or Err(PrecompileError) for fatal/unrecoverable errors that should abort EVM execution.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 8 bytes