Skip to main content

debug_traceTransaction

The debug_traceTransaction command allows users to see all traces of a given transaction. Trace mode is required for this command to return the correct results.

warning

The traceTransaction debugging method will attempt to run the transaction exactly as it was executed on the network. It will replay any transaction that may have been executed before this one before it will finally attempt to execute the transaction that corresponds to the given hash.

Parameters

In addition to the hash of the transaction you may give it a secondary optional argument, which specifies the options for this specific call. The possible options are:

  • disableStorage: BOOL. Setting this to true will disable storage capture (default = false).
  • disableStack: BOOL. Setting this to true will disable stack capture (default = false).
  • enableMemory: BOOL. Setting this to true will enable memory capture (default = false).
  • enableReturnData: BOOL. Setting this to true will enable return data capture (default = false).
  • tracer: STRING. Setting this will enable JavaScript-based transaction tracing, described below. If set, the previous four arguments will be ignored.
  • timeout: STRING. Overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Valid values are described here.
ClientMethod invocation
Godebug.TraceTransaction(txHash common.Hash, logger *vm.LogConfig) (*ExecutionResult, error)
Consoledebug.traceTransaction(txHash, [options])
RPC{"method": "debug_traceTransaction", "params": [txHash, {}]}

Example

Request

curl https://astar.blastapi.io/<project-id> \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceTransaction","params":["0x30107e41fa84cec5f2d9ee28dd61aade05c27ebcc0aa3ab16dbb5a7eceed9882"],"id":1,"jsonrpc":"2.0"}'