trace_call
Last updated:
trace_call simulates a transaction call exactly as
eth_call would, evaluating it against the state at a chosen
block, but instead of returning only the call's return data it returns the
Parity/OpenEthereum-style traces you ask for. Nothing is broadcast and no state
is persisted. Use it to inspect the internal call hierarchy of a transaction, to
preview the exact storage and balance changes a call would cause, or to capture
a low-level VM execution trace — all before sending the transaction on-chain.
You control which traces are produced with a trace-type array. Request any combination of:
trace— the flat list of call/create/suicide actions (the call tree).vmTrace— a full virtual-machine execution trace, opcode by opcode.stateDiff— the set of storage, balance, nonce, and code changes the call would apply, expressed as before/after diffs.
The method belongs to the trace namespace and is available on the pro and
business tiers. Because producing traces is more expensive than a plain
eth_call, the per-second limits are lower than for standard eth_* read
methods.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://triport.io/sol \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"id":1,"method":"trace_call","params":[],"jsonrpc":"2.0"}'const res = await fetch("https://triport.io/sol", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"id": 1,
"method": "trace_call",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/sol",
headers={"Authorization": "Bearer <api-key>"},
json={"id":1,"method":"trace_call","params":[],"jsonrpc":"2.0"},
)
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- Credit cost: 5 per call.
FAQ
- What does trace_call do?
- Executes a transaction call against the state of a chosen block and returns the requested Parity-style traces (trace, vmTrace, stateDiff) without broadcasting anything.
- How many credits does trace_call cost?
- trace_call costs 5 credit(s) per call on Triport by default.
- Is trace_call available over WebSocket?
- trace_call is an HTTP JSON-RPC method.