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
Expand description

Converts a PrecompileOutput into an InterpreterResult.

Maps precompile status to the corresponding instruction result:

  • SuccessInstructionResult::Return
  • RevertInstructionResult::Revert
  • Halt(OOG)InstructionResult::PrecompileOOG
  • Halt(other)InstructionResult::PrecompileError