POST
/
3997273fc956a67dc6982384500e669e
curl --request POST \
  --url https://ronin-mainnet.core.chainstack.com/3997273fc956a67dc6982384500e669e \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "debug_traceCall",
  "params": [
    {
      "to": "0x5a254c12ddeb86e2f5626d59c490eb3db1974944",
      "data": "0x0d9160e7"
    },
    "latest"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}

The interactive example here is a call to the Ronin Staking Vesting contract. Specifically, to the lastBlockSendingBonus function. The data 0x0d9160e7 in the call is the signature for the function lastBlockSendingBonus. You can generate the function signature using Chainstack’s Web3Tools by typing lastBlockSendingBonus() into the function name field.

The debug_traceCall method allows for the execution of a call directly on the node, similar to eth_call, but with the added benefit of returning detailed execution traces. This method is invaluable for debugging contract interactions by providing insights into the execution flow, state changes, and gas usage without requiring a transaction to be committed to a block.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • object - The transaction call object, which includes:
    • to: The address of the contract to call.
    • data: The data to send to the contract, typically including the method signature and encoded parameters.
  • string - The block number or string (latest, earliest, pending) specifying the state to use for executing the call.

Response

  • result - An object containing the detailed execution trace of the call. This includes information on gas usage, the operations performed, and any state changes that occurred as a result of the call’s execution.

Use case

The debug_traceCall method is particularly useful for developers during the contract development and debugging phase. It provides a powerful tool for analyzing how contract methods behave when invoked, identifying potential issues, and optimizing gas usage.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:debug_traceCall
params
array

Response

200 - application/json
Trace result of the call execution
jsonrpc
string
id
integer
result
object