EIP-7906
Transaction Assertions via State Diff Opcode
Opcodes that expose a transaction's state diff to on-chain assertions that can reject the transaction's outcome
DraftSplurge
Status history
- Draft21 Feb 2025
Abstract
This proposal introduces three opcodes, TXTRACE, TXDIFF, and EVENTDATACOPY, that let a contract inspect the outcome of the transaction executing it: the balance, storage, and code changes it produced, and the events it emitted. TXTRACE enumerates the full transaction state diff, TXDIFF reads a single entry by key, and EVENTDATACOPY copies event data into memory. These opcodes are valid only…