Function precompile_output_to_interpreter_result
pub fn precompile_output_to_interpreter_result(
output: PrecompileOutput,
gas_limit: u64,
) -> InterpreterResultAvailable 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:
Success->InstructionResult::ReturnRevert->InstructionResult::RevertHalt(OOG)->InstructionResult::PrecompileOOGHalt(other)->InstructionResult::PrecompileError
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.