Skip to main content

eth_precompile_fn

Macro eth_precompile_fn 

macro_rules! eth_precompile_fn {
    ($name:ident, $eth_fn:expr) => { ... };
}
Available on crate feature evm only.
Expand description

Macro that generates a thin wrapper function converting a PrecompileEthFn into a PrecompileFn.

Usage:

eth_precompile_fn!(my_precompile, my_eth_fn);

Expands to:

fn my_precompile(input: &[u8], gas_limit: u64, reservoir: u64) -> PrecompileOutput {
    call_eth_precompile(my_eth_fn, input, gas_limit, reservoir)
}