Run a lab block on Amsterdam with header slot 42 — one transaction calls a contract whose runtime runs SLOTNUM and returns the slot number. What value is returned?
Look forreturn data equal to 42 (0x2a)
Agent will likely call run_block
EIP-7843SLOTNUM opcode
RunnableLive on the hosted MCP — free on Amsterdam. Connect an agent and ask.
Website twin: exploration on feelyourprotocol.org
How do you read the beacon slot on-chain without hardcoding 12-second slots?
EIP-7843 adds SLOTNUM (0x4b): the consensus layer writes the slot on the execution header, and the opcode pushes it for 2 gas.
Dividing the block timestamp by 12 works only while slots stay 12 seconds. The opcode abstracts that away.
The MCP server runs your bytecode in a lab block with a chosen header.slotNumber and returns the per-tx result (return data, gas) plus a header snapshot. It does not ship demo programs.
The hosted MCP is live (Connect). Copy a prompt into your agent — each quote is self-contained.
Job
Run a lab block on Amsterdam with header slot 42 — one transaction calls a contract whose runtime runs SLOTNUM and returns the slot number. What value is returned?
Look forreturn data equal to 42 (0x2a)
Agent will likely call run_block
Lesson
On Fusaka and on Glamsterdam, run the same lab block with header slot 100 — each block has one transaction calling a contract whose runtime runs SLOTNUM and returns the slot. Does the opcode exist only on Glamsterdam?
Look forFusaka rejecting the opcode, Glamsterdam returning 100
Agent will likely call run_block
Check
On Amsterdam, run a lab block with header slot 12345678 — one transaction calls a contract whose runtime runs SLOTNUM and returns the slot number. What value is returned?
Look forreturn data equal to 12345678
Agent will likely call run_block
Confirm 7843 is runnable; tools include run_block; read opcode encoding.
Per-tx return data equals the slot on Glamsterdam; slotNumber is rejected on Fusaka.
Run bytecode still uses a mock header (slot 0). A chosen beacon slot needs run block.
Fork caveat
Glamsterdam already bundles EIP-7843 in EthereumJS v10. Passing eips: [7843] is accepted but is not a before/after toggle on Glamsterdam itself.
For 7843 off vs on, run the same program on baseline fork fusaka, then on preview fork glamsterdam. Opcode 0x4b is invalid on Fusaka; on Glamsterdam it pushes header.slotNumber (2 gas). You do not need Fusaka for Glamsterdam-only SLOTNUM runs.