Opcode metadata registry — single source of truth for every opcode's name, stack I/O signature, implementing module, and static-context flag.
Given an opcode byte (0x00–0xFF) info/1 returns:
:name— the human-readable mnemonic (e.g."ADD"):inputs/:outputs— stack arity, used by the disassembler and stack-depth checks:module— theEEVM.Interpreter.Instructions.*module that implements the opcode;EEVM.Interpreterdispatches on this field:state_mutating(when present) — opcode mutates persistent state and is an exceptional halt ({:error, :static_state_modification}) inside a STATICCALL frame
PUSH1–PUSH32, DUP1–DUP16, and SWAP1–SWAP16 are generated dynamically from their opcode ranges rather than stored in the static map.
Summary
Functions
@spec dup?(non_neg_integer()) :: boolean()
@spec info(non_neg_integer()) :: {:ok, map()} | {:error, :unknown_opcode}
@spec push?(non_neg_integer()) :: boolean()
@spec push_bytes(non_neg_integer()) :: non_neg_integer()
@spec swap?(non_neg_integer()) :: boolean()