TriportRPC

debug_traceTransaction

Last updated:

debug_traceTransaction re-executes a transaction that has already been included in a block and records every step of its EVM execution. It is the canonical way to understand why a transaction behaved the way it did — which opcodes ran, how gas was consumed, what state was touched, where it reverted, and the revert reason.

By default the method returns a struct (opcode) log: a step-by-step list of every executed opcode with its program counter, gas, stack, memory, and storage deltas. Because these logs can be very large for complex transactions, you will usually pass a tracer in the options object instead — for example callTracer to get a compact tree of internal calls, or prestateTracer to get the accounts and storage the transaction read. See Tracer options below.

This is a debug-namespace method available on the Pro tier and above. It is rate limited per tier (5 RPS on Pro, 15 RPS on Business) with a short burst allowance; there is no daily quota. Tracing is computationally heavy — keep the opcode-level default reserved for the transactions you genuinely need to inspect, and prefer a focused tracer where possible.

Parameters

This method takes no parameters.

Returns

debug_traceTransaction return value
FieldType
resultobject

Examples

curl https://triport.io/sol \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"id":1,"method":"debug_traceTransaction","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": "debug_traceTransaction",
  "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":"debug_traceTransaction","params":[],"jsonrpc":"2.0"},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 5 per call.

FAQ

What does debug_traceTransaction do?
Replays a single already-mined transaction and returns its full EVM execution trace.
How many credits does debug_traceTransaction cost?
debug_traceTransaction costs 5 credit(s) per call on Triport by default.
Is debug_traceTransaction available over WebSocket?
debug_traceTransaction is an HTTP JSON-RPC method.