TriportRPC

debug_traceBlockByNumber

POSThttps://triport.io/rpc/bsc

Trace every transaction in a block.

BNB Smart Chainbsc:rpcbsc_read_rpc_heavy - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

debug_traceBlockByNumber executes the configured debug tracer for every transaction in one BNB Smart Chain block and returns the resulting trace frames as an array.

Use it when transaction receipts are not enough to explain internal calls, execution paths, or gas consumption across a complete block. The block is selected with a standard EVM block tag or hex quantity; the optional tracer settings control the upstream debug implementation.

Unlike debug_traceTransaction, this method covers all transactions in a block. Unlike trace_block, it uses the debug namespace and accepts debug tracer options. The method is best-effort because the pool currently has a single public source with a shared quota and no SLA.

Parameters

JSON-RPC params is a positional array: [block, options?].

blockstring (block tag or hex quantity)required
Block selector: latest, earliest, pending, or an EVM hex block number.
optionsobjectoptional
Optional debug tracer settings; see the object fields below.
timeoutstringoptional
Positive duration ending in ms, s, or m.
tracerstringoptional
Upstream tracer name, such as the fixture's callTracer.
tracerConfigobjectoptional
Tracer-specific configuration passed to the upstream tracer.

Response

The response below is the checked fixture for this method; it is reproduced without changing its fields or values.

resultarray<object>
Trace frames returned for the block.
result[].typestring
Trace frame type.
result[].fromstring
Caller address.
result[].tostring
Destination address.
result[].gasstring
Gas supplied as a hex quantity.
result[].gasUsedstring
Gas consumed as a hex quantity.
result[].inputstring
Input byte data.
result[].outputstring
Output byte data.
result[].valuestring
Transferred value when supplied.
result[].callsarray<object>
Nested trace frames when supplied.

Errors

Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.

CodeMeaningWhen it happens
-32602Invalid paramsA required positional parameter is missing or a value does not match the OpenRPC schema.
-32000Upstream request failureInterpret the message with the code: header not found means a missing block; pruned/unsupported state text means unavailable historical state.
429Trace source quotaThe one best-effort trace/debug source has exhausted its shared upstream quota.
401UnauthorizedThe x-token API key is missing or invalid.
429Rate limitedThe request exceeds the configured category RPS for the caller's tier.

Examples

JavaScript (fetch)

const response = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "debug_traceBlockByNumber",
    "params": [
      "latest",
      {
        "tracer": "callTracer"
      }
    ]
  }),
});


const payload = await response.json();
console.log(payload.result);

Notes

  • Trace/debug service is best-effort through a single public source with a shared quota and no SLA; a quota failure does not imply that the method was removed from the catalog.
  • The BSC categories use configured defaults of 15 / 20 / 100 / 250 RPS; they are marked unmeasured in the tier matrix.
  • Related methods: debug_traceTransaction, trace_block, eth_getBlockByNumber.