trace_call — Polygon JSON-RPC
Trace format. This interface returns Parity-style call frames. Where the response includes vmTrace and stateDiff, both are null: opcode traces and state diffs are not supported. For trace_callMany, calls are independent simulations and do not share the state changes of preceding calls.
https://triport.io/polygon- Network
- Polygon
- Scope
- polygon_trace
- Auth
- x-token: $TRIPORT_API_KEY (or Authorization: Bearer)
- Rate limit
- Pro — 3 rps · Business — 10 rps (burst above the steady rate is allowed; no daily quota)
Endpoint and plans: Polygon RPC endpoint.
trace_call executes a single call against the chain state at a given block
(no broadcast, no state mutation) and returns the complete Parity trace
array for that call. Optionally it also returns a state diff and/or a low-level
VM trace, depending on the trace types you request.
It is the lightweight sibling of trace_block: instead of
re-executing every transaction in a block, it runs exactly one call, so it is
fast enough for interactive and pre-confirmation use. The primary use case is
MEV pre-confirmation analysis — simulate a candidate transaction (or a
single leg of a sandwich bundle) and read the full internal call tree to
compute expected profit before you sign and broadcast. A plain eth_call
only returns the final return data; trace_call exposes every internal call,
value transfer, and (optionally) storage change along the way.
This is a premium capability: it requires the polygon_trace scope and Pro
tier or higher. Calls below Pro tier are rejected with HTTP 403 tier_insufficient, and calls
that exceed your tier's per-second rate are rejected with HTTP 429.
Parameters
Positional params array: [transaction, traceTypes, blockTag].
transactionobjectrequiredtraceTypesarray of stringrequired["trace"] for call frames. The vmTrace and stateDiff fields are unsupported and remain null.blockTagstringoptionallatest, earliest, pending) to execute against. Defaults to latest.transaction fieldsobjectfromstringoptionaltostringoptionalgasstringoptionalgasPricestringoptionalvaluestringoptionaldatastringoptionalResponse
Response fields
The result object:
| Field | Type | Description |
|---|---|---|
output | string | Return data of the simulated call (hex). |
trace | array | Parity call frames. Each frame carries action, result, subtraces, traceAddress, and type. |
stateDiff | null | Unsupported by this interface; always null, including when requested. |
vmTrace | null | Unsupported by this interface; always null, including when requested. |
Each entry in trace describes one internal call frame:
| Frame field | Type | Description |
|---|---|---|
action | object | The call itself — callType, from, to, gas, input, value. |
result | object | Outcome — gasUsed and output. |
subtraces | number | Count of direct child frames. |
traceAddress | array of number | Position of this frame within the call tree. |
type | string | Frame type, e.g. call, create, delegatecall, staticcall. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
403 | tier_insufficient (HTTP 403) — method requires Pro tier or higher | The key's tier is below Pro, or the polygon_trace category is not enabled for it. The error data includes required_tier, current_tier, and upgrade_url. |
429 | rate_limited (HTTP 429) — per-second limit exceeded for the current tier | You exceeded your tier's rps (Pro 3 / Business 10). The error data includes limit_rps, burst_capacity, and retry_after_sec. |
See the shared errors reference for the full error
envelope and the structure of the data field.
Examples
JavaScript (fetch)
const res = await fetch("https://triport.io/polygon", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "trace_call",
params: [
{
from: "0xa1b2c3d4e5f60718293a4b5c6d7e8f9001122334",
to: "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
value: "0x0",
data: "0x70a08231000000000000000000000000a1b2c3d4e5f60718293a4b5c6d7e8f9001122334",
},
["trace"],
"latest",
],
}),
});
const { result } = await res.json();
console.log(result.trace);Notes
- Supported output. Request
["trace"]; state diffs and opcode traces remain unavailable. - Pre-confirmation MEV workflow. Simulate a candidate transaction against
latest(orpending) state, walk the returnedtraceto follow internal token flows and value transfers, and compute expected profit before signing. Because nothing is broadcast, you can probe many candidate inputs cheaply. - Parity shape, not Geth. This method returns the Parity
traceformat (action/result/subtraces/traceAddress). It is a different shape from Geth-style debug tracing — if your tooling consumes the Gethcallstree, you will need an adapter. - Block tags. Use
latestfor real-time pre-confirmation analysis and a hex block number for reproducible historical simulation.pendingreflects the current pending state. - Related methods:
trace_block(full block call tree),trace_transaction(trace one already-mined tx),trace_filter(range/address filter over historical traces), andtrace_replayBlockTransactions(full block replay with state diff). For an unsimulated read of final state only, useeth_call.