BNB Smart Chain
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
debug_traceCall runs a call against a chosen block's state and hands back a full opcode-level trace, all without submitting a transaction or burning a single unit of gas. BNB Smart Chain (BSC) charges that gas in BNB and hosts the BEP-20 contracts behind protocols like PancakeSwap and Venus, so a dry run that costs nothing is genuinely useful here. Aim it at chain ID 56 via https://bsc.therpc.io/YOUR_API_KEY. The call object and block parameter are only the start: state and block overrides let you rehearse a contract interaction under hypothetical balances or an invented block context. Any block but the latest forces a reach back into historical state, which is heavy, so plan on a debug-enabled archive node.
| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transaction | object | Sim | Call object — same fields as eth_call: `from?`, `to`, `gas?`, `gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`, `value?`, `data?`. |
| 2 | blockParameter | string | Não | Block number or tag defining the state against which the call is simulated.Padrão: latest |
| 3 | options | object | Não | Same tracer configuration object as debug_traceTransaction (tracer, tracerConfig, timeout, reexec, enableMemory, enableReturnData, disableStack, disableStorage, limit, debug). |
| 4 | stateOverrides | object | Não | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. |
| 5 | blockOverrides | object | Não | Optional map of block-context fields to override (e.g. `number`, `time`, `gasLimit`, `coinbase`, `random`, `baseFee`) for the simulated call. |
| Tipo | Descrição |
|---|---|
| object | Same shape as debug_traceTransaction: structLog array with default tracer, or tracer-specific object (callTracer, prestateTracer, etc.). |
Try it live in the BNB Smart Chain playground.
| Código | Mensagem | Causa |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Transaction object is missing required fields or blockParameter is unrecognized. |
-32000 | execution reverted | Simulated call reverted; trace is still returned up to the revert point. |
callTracer, or just switch off the stack and storage dumps. Heavy traces may get throttled on lower tiers.Parâmetros
Call object — same fields as eth_call: `from?`, `to`, `gas?`, `gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`, `value?`, `data?`.
hex block number or "latest" | "earliest" | "pending"
Same tracer configuration object as debug_traceTransaction (tracer, tracerConfig, timeout, reexec, enableMemory, enableReturnData, disableStack, disableStorage, limit, debug).
Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call.
Optional map of block-context fields to override (e.g. `number`, `time`, `gasLimit`, `coinbase`, `random`, `baseFee`) for the simulated call.