Skip to main content

precompile_output_to_interpreter_result

Function precompile_output_to_interpreter_result 

pub fn precompile_output_to_interpreter_result(
    output: PrecompileOutput,
    gas_limit: u64,
) -> InterpreterResult
Available on crate feature evm only.
Expand description

Converts a PrecompileOutput into an InterpreterResult for a call frame with gas_limit regular gas.

Maps precompile status to the corresponding instruction result:

A precompile that reports more gas than it was given is downgraded to InstructionResult::PrecompileOOG. Anything but a success or revert consumes all regular gas and returns no output bytes.