Optimism
Optimism
Optimism
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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).
| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockParameter | string | Sim | Block whose transactions to trace. |
| Tipo | Descrição |
|---|---|
| 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.
| Código | Mensagem | Causa |
|---|---|---|
-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.Parâmetros
hex block number or "latest" | "earliest" | "pending"