Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
debug_traceCall runs a call against a chosen Polygon PoS block state and traces it in full, all without broadcasting a transaction or spending any MATIC on gas. Because Polygon's Bor client is Geth-based, you get the same tracer choices as on Ethereum — callTracer, prestateTracer, or the default struct-log — plus optional state and block overrides for what-if simulations. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89). It executes the call against the given block state and returns a full opcode-level trace without submitting a transaction.
stateOverrides to swap in modified bytecode.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | transaction | object | نعم | Call object — same fields as eth_call: `from?`, `to`, `gas?`, `gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`, `value?`, `data?`. |
| 2 | blockParameter | string | لا | Block number or tag defining the state against which the call is simulated.الافتراضي: latest |
| 3 | options | object | لا | Same tracer configuration object as debug_traceTransaction (tracer, tracerConfig, timeout, reexec, enableMemory, enableReturnData, disableStack, disableStorage, limit, debug). |
| 4 | stateOverrides | object | لا | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. |
| 5 | blockOverrides | object | لا | Optional map of block-context fields to override (e.g. `number`, `time`, `gasLimit`, `coinbase`, `random`, `baseFee`) for the simulated call. |
| النوع | الوصف |
|---|---|
| object | Same shape as debug_traceTransaction: structLog array with default tracer, or tracer-specific object (callTracer, prestateTracer, etc.). |
Try it live in the Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Transaction object is missing required fields or blockParameter is unrecognized. |
-32000 | execution reverted | Simulated call reverted; trace is still returned up to the revert point. |
latest.callTracer, or disable stack, memory, and storage in the options to keep it manageable.المعاملات
Call object — same fields as eth_call: `from?`, `to`, `gas?`, `gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`, `value?`, `data?`.
hex block number or "latest" | "earliest" | "pending"
Same tracer configuration object as debug_traceTransaction (tracer, tracerConfig, timeout, reexec, enableMemory, enableReturnData, disableStack, disableStorage, limit, debug).
Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call.
Optional map of block-context fields to override (e.g. `number`, `time`, `gasLimit`, `coinbase`, `random`, `baseFee`) for the simulated call.