Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
debug_traceBlockByNumber replays an entire Polygon PoS block and returns a per-transaction trace, selecting the block by its height or a tag like latest. Polygon's Bor client is built on Geth, so the standard callTracer, prestateTracer, and default struct-log tracers run unchanged against these 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 number or tag, in the order they were mined.
callTracer.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockNumber | string | نعم | Block to trace. |
| 2 | options | object | لا | Same tracer configuration object as debug_traceTransaction. |
| النوع | الوصف |
|---|---|
| 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.
| الكود | الرسالة | السبب |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Block number is malformed or not a recognized tag. |
-32000 | block not found | Block does not exist or archive state is unavailable for that number. |
latest are valid but race with new blocks: a fresh Polygon block may land mid-request, so pin to a concrete number for reproducible results.المعاملات
hex block number or "latest" | "earliest" | "pending"
Same tracer configuration object as debug_traceTransaction.