Per-call execution frame.
A frame is everything that gets a fresh value when a CALL/CREATE-like opcode spawns a child, and that gets restored when the child halts:
pc,stack,memory,gas,refund— execution registerscode— the currently-executing bytecodeprogram—codedecoded for the interpreter (EEVM.Interpreter.InstructionTable.decode/3), orundecoded/0while the frame runscodeundecoded;niluntil the frame startsreturn_data— buffer holding the most recent child frame's outputcontract— the per-call message context (msg.sender,msg.value,address,calldata,balances)depth— the EVM call depth (max 1024)is_static— STATICCALL flag; state-mutating opcodes revert under it
The active frame lives at MachineState.frame. CALL and CREATE run a
child frame in a nested EEVM.Interpreter.run_loop/1 and copy its result
back into the parent frame.
Summary
Types
A frame running its code undecoded (#210): the gas left at which its next
jump decodes the code, and the code's JUMPDEST map
(EEVM.Interpreter.InstructionTable.jumpdests/1) once it has jumped.
Types
@type t() :: %EEVM.Interpreter.MachineState.Frame{ code: binary(), contract: EEVM.Context.Contract.t(), depth: non_neg_integer(), gas: non_neg_integer(), is_static: boolean(), memory: EEVM.Interpreter.Memory.t(), pc: non_neg_integer(), program: EEVM.Interpreter.InstructionTable.program() | undecoded() | nil, refund: integer(), return_data: binary(), stack: EEVM.Interpreter.Stack.t() }
A frame running its code undecoded (#210): the gas left at which its next
jump decodes the code, and the code's JUMPDEST map
(EEVM.Interpreter.InstructionTable.jumpdests/1) once it has jumped.