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.
Try the debug_traceCall
RPC method yourself
debug_traceCall
RPC method yourself