trace_rawTransaction - Arbitrum

trace_rawTransaction. Processes a raw transaction for tracing, allowing to analyze the transaction

trace_rawTransaction - arbitrum [Value: 75CU]
Executes a raw transaction and returns detailed trace information about its execution
Use cases

Use cases

  • Validate the execution paths of smart contracts
  • Analyze the detailed gas usage of a transaction
  • Investigate the root causes of transaction
Constraints

Constraints

  • Invalid or corrupted transaction data will result in errors
  • Not all nodes may have tracing capabilities enabled
  • The types of traces must be specified correctly in the request
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl https://arbitrum.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"trace_rawTransaction","params":["RAW_TRANSACTION_DATA",["trace"]],"id":1,"jsonrpc":"2.0"}' 
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "callType": "call",
        "from": "0xEdC763b3e418cD14767b3Be02b667619a6374076",
        "gas": "0x76c0",
        "input": "0x",
        "to": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
        "value": "0x0"
      },
      "blockHash": "0x1e3b87c5ea233b9d8c19ad7d7beaf0fa8dd3d74157b1441a13f8a18e176a11db",
      "blockNumber": 13328707,
      "result": {
        "gasUsed": "0x5208",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
      "transactionPosition": 0,
      "type": "call"
    }
    // Additional traces can be included here
  ]
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
datastring
The raw transaction data, encoded as a hexadecimal string.
arrayarray
The raw signed transaction data, provided as an array of objects.
array
vmTracestring
Provides a full trace of the virtual machine's state during the transaction execution, including any subcalls.
traceTypestring
Specifies the type of trace. Can include one or more of the following: "trace", "stateDiff".

Response

200
The trace results, including detailed execution traces such as opcodes executed, state changes, and call stack information

Response params

object
idinteger
jsonrpcstring
resultobject
object
outputstring
The output data returned by the transaction, encoded in hexadecimal format.
stateDiffstring
Details the changes to the state as a result of the transaction execution.
traceobject
Provides the basic trace information for the transaction execution.
object
actionobject
Contains details about the trace action.
object
callTypestring
The type of call.
fromstring
The sender's address.
tostring
The receiver's address.
valuestring
The value transferred in wei.
gasstring
The gas provided for the call.
inputstring
The data sent with the call.
blockHashstring
The hash of the block where the trace occurred.
blockNumberstring
The number of the block where the trace occurred.
resultstring
object
gasUsedstring
Gas used by the trace.
outputstring
Call output.
subtracesinteger
Number of subtraces created by this trace..
traceAddressarray_of_strings
Position of this trace in the call stack.
transactionHashstring
Hash of the transaction containing this trace.
transactionPositionstring
Transaction's position in the block.
gasstring
The gas provided for the call.
inputstring
To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcalls
blockHashstring
The hash of the block where the trace occurred.
blockNumberstring
The number of the block where the trace occurred.
resultstring
object
gasUsedstring
Gas used by the trace.
outputstring
Call output.
subtracesinteger
Number of subtraces created by this trace..
traceAddressarray_of_strings
Position of this trace in the call stack.
transactionHashstring
Hash of the transaction containing this trace.
transactionPositionstring
Transaction's position in the block.
typestring
The type of trace.
vmTracestring
To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcalls