TriportRPC

trace_block

POSThttps://api.triport.io/v1/eth

Returns OpenEthereum-style action traces for every transaction in a single Ethereum block.

Ethereumeth_tracePro — 5 RPS · Business — 15 RPS

trace_block replays a block and returns the full set of OpenEthereum-style action traces for all transactions it contains. Each trace describes a single step of execution — a top-level call, an internal (nested) call, a contract create, or a suicide/selfdestruct — along with the value moved, gas used, and the trace's position in the call tree.

Use it when you need a block-wide view of internal value flow that is not visible from receipts alone: indexing internal ETH transfers, reconstructing contract-creation events, attributing gas across nested calls, or auditing MEV activity. For a single transaction, prefer trace_transaction; to query traces across a range with filters, use trace_filter.

This is a Pro-tier method in the eth_trace category. Tracing is compute-heavy, so rate limits are lower than for plain reads — 5 RPS on Pro and 15 RPS on Business.

Parameters

A single positional parameter.

blockstringrequired
Block to trace, as a hex-encoded block number (e.g. "0x118b3c5") or a block tag ("latest", "earliest", "pending", "safe", "finalized").

Response

Response fields

result is an array of trace objects, ordered by transaction position and then by execution order within each transaction.

FieldTypeDescription
actionobjectThe operation performed. Shape depends on type.
action.callTypestringFor call traces: call, delegatecall, staticcall, or callcode.
action.fromstringSender address of this action.
action.tostringRecipient address (calls only).
action.valuestringWei transferred, hex-encoded.
action.gasstringGas provided to this action, hex-encoded.
action.inputstringCall data, hex-encoded (calls only).
action.initstringContract init bytecode (create traces only).
resultobject | nullOutcome of the action; null when the action errored.
result.gasUsedstringGas consumed by this action, hex-encoded.
result.outputstringReturned data, hex-encoded (calls only).
result.addressstringAddress of the newly deployed contract (create traces only).
errorstringPresent instead of result when the action reverted or failed (e.g. "Reverted", "out of gas").
subtracesnumberNumber of direct child actions.
traceAddressnumber[]Path of this trace within the call tree (empty for the top-level call).
typestringcall, create, or suicide.
blockHashstringHash of the traced block.
blockNumbernumberNumber of the traced block.
transactionHashstringHash of the transaction this trace belongs to.
transactionPositionnumberIndex of the transaction within the block.

Errors

CodeMeaningWhen it happens
-32002tier_insufficientYour plan does not include the eth_trace category. Upgrade to Pro or Business.
-32003rate_limitedYou exceeded your tier's RPS for this method (5 RPS Pro, 15 RPS Business). Back off and retry.
-32602Invalid paramsThe block argument is missing or not a valid hex number / block tag.
-32000Block not foundThe requested block does not exist on the canonical chain.

See the shared error envelope reference for the full error object shape and retry guidance.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/eth", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "trace_block",
    params: ["0x118b3c5"],
  }),
});


const { result } = await res.json();
const internalTransfers = result.filter(
  (t) => t.type === "call" && t.action.value !== "0x0"
);
console.log(`${internalTransfers.length} value-bearing calls in block`);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const traces = await triport.eth.traceBlock("0x118b3c5");
for (const trace of traces) {
  if (trace.type === "create") {
    console.log("deployed:", trace.result?.address);
  }
}

Python (triport-sdk)

import os
from triport import Triport


triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])


traces = triport.eth.trace_block("0x118b3c5")
creates = [t for t in traces if t["type"] == "create"]
print(f"{len(creates)} contract deployments in block")

Notes

  • traceAddress reconstructs the call tree. An empty array is the transaction's top-level call; [0] is its first child, [0, 1] is the second child of that child, and so on. Combined with transactionPosition you can rebuild each transaction's full execution graph.
  • Failed actions carry an error field instead of result. A reverted top-level call still appears, along with whatever sub-traces ran before the revert.
  • The result can be large for busy blocks (hundreds to thousands of traces); size your client buffers accordingly.
  • Related methods: trace_transaction for a single transaction, trace_filter to query traces by address and block range, and trace_replayBlockTransactions for traces plus state diffs and VM output.