Polygon
Polygon
Polygon
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
trace_block returns the OpenEthereum-style call tree for every transaction in a single Polygon PoS block, flattened into one array. Unlike the opcode-level debug_* tracers, it focuses on the call/create/self-destruct actions and the MATIC value moving between contracts — the level most indexers and explorers want. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89), naming the block by number or a tag like latest. It returns call-tree traces for every transaction in that block.
| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | blockParameter | string | Ja | Block whose transactions to trace. |
| Typ | Beschreibung |
|---|---|
| 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 Polygon playground.
| Code | Meldung | Ursache |
|---|---|---|
-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 — a Polygon block is only ~2 seconds away and the pending set can change, and finality only settles once it is checkpointed to L1 via Heimdall.Parameter
hex block number or "latest" | "earliest" | "pending"