Polygon
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Polygon
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
debug_traceBlockByHash re-executes a whole Polygon PoS block and hands back a trace for each transaction it contains, selected by the block's hash rather than its number. Polygon's Bor client is Geth-based, so the same tracers you use on Ethereum — callTracer, prestateTracer, or the default opcode struct-log — apply here against MATIC-fee blocks. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89). It returns opcode-level execution traces for every transaction in the block identified by its hash, in block order.
callTracer.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | blockHash | string | Ja | Hash of the block to trace. |
| 2 | options | object | Nein | Same tracer configuration object as debug_traceTransaction. |
| Typ | Beschreibung |
|---|---|
| array | Array of per-transaction trace results in block order. Each element has the same shape as debug_traceTransaction output for the active tracer. |
Try it live in the Polygon playground.
| Code | Meldung | Ursache |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Block hash is missing or not a valid 32-byte hex value. |
-32000 | block not found | Block hash not found or archive state unavailable. |
debug_traceBlockByNumber: the node replays every transaction in the block, so a dense Polygon block is far heavier than a single-transaction trace.Parameter
0x-prefixed 32-byte block hash
Same tracer configuration object as debug_traceTransaction.