TriportRPC

debug_traceBlockByNumber

BNB Smart Chain / https://triport.io/rpc/bsc

Minimum tier: Pro

BNB Smart Chain method guide

Last updated:

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

debug_traceBlockByNumber parameters
NameTypeRequiredDescription
blockBlockTagYes
optionsTraceOptionsNo

Returns

debug_traceBlockByNumber return value
FieldType
tracesTraceList

Examples

curl https://triport.io/rpc/bsc \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"debug_traceBlockByNumber","params":["<block>","<options>"]}'
const res = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceBlockByNumber",
  "params": [
    "<block>",
    "<options>"
  ]
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/bsc",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"debug_traceBlockByNumber","params":["<block>","<options>"]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: BNB Smart Chain.
  3. Clusters: mainnet.
  4. Credit cost: 5 per call.

FAQ

What does debug_traceBlockByNumber do?
Trace every transaction in a block.
How many credits does debug_traceBlockByNumber cost?
debug_traceBlockByNumber costs 5 credit(s) per call on Triport by default.
Is debug_traceBlockByNumber available over WebSocket?
debug_traceBlockByNumber is an HTTP JSON-RPC method.