Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Every contract on Ethereum executes as a sequence of opcodes operating on a 1024-deep stack of 256-bit words. Understanding this model is the difference between treating Solidity as magic and actually predicting what the compiler will emit. Once you can read opcodes, gas costs, security pitfalls, and optimization opportunities all stop being abstract.
A minimal Solidity function compiles to a small sequence of stack ops. Read the disassembly.
a + b when both are uint256 — confirm it's ADD (0x01), not SAFEMATH calls (post-0.8 the compiler emits a CALL? No — it uses arithmetic plus a JUMPI overflow check).forge inspect <Contract> bytecode on a one-function contract and locate the function selector (first 4 bytes after the dispatcher table).// Solidity:
// function add(uint a, uint b) public pure returns (uint) { return a + b; }
//
// Compiles to (selected ops):
PUSH1 0x40 // free memory pointer
MLOAD // load it
CALLDATALOAD 0x04 // load 'a' from calldata
CALLDATALOAD 0x24 // load 'b' from calldata
ADD // stack top = a + b
PUSH1 0x40 // memory ptr
MSTORE // write result to memory
PUSH1 0x20 // length 32
PUSH1 0x40 // offset
RETURN // return memory[offset..offset+length]