EEVM.Tracer.TraceStep (eevm v0.1.0)

Copy Markdown View Source

A single recorded step: one opcode execution in the trace. Every field except error describes the machine before the opcode runs.

FieldDescription
pcProgram counter of the opcode in its frame's code
opOpcode name as an atom, such as :SSTORE; :UNKNOWN for an undefined byte
op_byteThe opcode byte
gas_remainingGas left in the frame
gas_costThe gas the opcode charged, static and dynamic, as geth's gasCost reports it: a CALL counts the gas it forwards, a CREATE does not (see "Gas cost" in EEVM.Tracer)
stackThe stack, top first (to_json/1 writes it bottom first, as EIP-3155 does)
memory_sizeMemory size in bytes
depthCall depth, 0 for the top-level frame (to_json/1 writes it 1-based, as EIP-3155 does)
refundThe gas refund counter
return_dataThe return-data buffer: the output of the frame's last sub-call
errorThe halt reason (an EEVM.Error.halt_reason/0) when this opcode halted the frame, else nil

Summary

Types

t()

@type t() :: %EEVM.Tracer.TraceStep{
  depth: non_neg_integer(),
  error: atom() | nil,
  gas_cost: non_neg_integer(),
  gas_remaining: non_neg_integer(),
  memory_size: non_neg_integer(),
  op: atom(),
  op_byte: non_neg_integer(),
  pc: non_neg_integer(),
  refund: integer(),
  return_data: binary(),
  stack: [non_neg_integer()]
}