Decode event rows
Use log_decode_json after fetching logs when one JSON value must preserve whether decoding succeeded, found no matching ABI, found multiple candidates, or failed. Required NULL inputs propagate NULL.
- Use table-shaped log functions when you need to join decoded event fields across many rows.
- Use event_decode_json when NULL on malformed input is preferable to diagnostic statuses.
- The canonical sample reconstructs USDC transaction 0x5cbf...3dde, log index 97, at Ethereum block 20,000,000 without an RPC call.
- Non-anonymous logs begin with topic0; anonymous logs begin with their first indexed parameter.
- Indexed dynamic parameters remain BYTES32 hashes. Unnamed inputs use arg0, arg1, and so on.
- Keep topic and data bytes alongside decoded JSON for review and troubleshooting.