Optimism
Optimism
Optimism
Free tier covers personal projects. Pay-as-you-go scales without a card.
trace_block returns OpenEthereum-style call-tree traces for every transaction in an OP Mainnet block, addressed by block number or a tag like latest. It flattens all internal calls, contract creations, and self-destructs across the whole block into one array, each entry tagged with its transactionPosition. On OP Mainnet — the OP Stack rollup where value and gas are denominated in ETH — this is the fastest way to capture every internal ETH movement in a block at once. Send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa).
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockParameter | string | Yes | Block whose transactions to trace. |
| Type | Description |
|---|---|
| array | Flat array of all trace objects across all transactions in the block. Each object has the same shape as individual entries from trace_transaction, with `transactionPosition` indicating which transaction it belongs to. |
Try it live in the Optimism playground.
| Code | Message | Cause |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client. |
-32602 | Invalid params | blockParameter is malformed or not a recognized tag. |
-32000 | block not found | Block does not exist or trace archive data is unavailable. |
pending for production data — at ~2-second block times the pending block is unstable and its traces can change before the block is sealed and settled to L1.Parameters
hex block number or "latest" | "earliest" | "pending"