Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
debug_traceTransaction is the single most powerful tool for understanding what a transaction actually did — every opcode, every stack frame, every state change. It's how every block explorer renders 'internal transactions' and how every security researcher reconstructs an exploit. Learning to read this output well is a 10× force multiplier for any on-chain investigation.
Get a structured trace from a real transaction and walk through it.
cast run --rpc-url $RPC <tx> — observe the call tree.callTracer to prestateTracer on the same tx and identify every account whose storage was touched.// curl -X POST -H "Content-Type: application/json" \
// --data '{"jsonrpc":"2.0","method":"debug_traceTransaction",
// "params":["0xabc...","callTracer"],"id":1}' $RPC
{
"from": "0xUserAddr",
"to": "0xRouterAddr",
"input": "0x38ed1739...", // swapExactTokensForTokens selector
"value": "0x0",
"gas": "0x186a0",
"gasUsed":"0x18230",
"type": "CALL",
"calls": [
{
"from":"0xRouterAddr",
"to": "0xPairAddr",
"input":"0x022c0d9f...", // swap()
"type":"CALL",
"calls": [
{ "from":"0xPairAddr", "to":"0xToken0", "input":"0xa9059cbb...", "type":"CALL" },
{ "from":"0xPairAddr", "to":"0xToken1", "input":"0x70a08231...", "type":"STATICCALL" }
]
}
]
}