trace_replayTransaction - Arbitrum

trace_replayTransaction. Replays a specified transaction and returns detailed trace information

arbtrace_replayTransaction - arbitrum [Value: 90CU]
Replays a transaction, providing detailed trace information about its execution
Use cases

Use cases

  • Replay specific transaction to debug execution details
  • Analyze transaction trace to optimize gas usage
  • Investigate internal contract calls in a transaction
Constraints

Constraints

  • arbtrace_ methods can be used on blocks prior to 22207816, while debug_trace methods can be used for blocks after 22207818
  • Block 22207817 cannot be traced but is empty.
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 --request POST \
     --url https://arbitrum.drpc.org \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "arbtrace_replayTransaction",
  "params": [
    "0xe8648e3ad982a3d67ef0880d6631343cffff364786994b34e5fa292cfef0e680",
    [
      "trace"
    ]
  ]
}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "output": "0x000000000000000000000000000000000000000000000000000000000e2627b4",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "callType": "call",
          "from": "0x492bf2ae22a0796ba5078d4db40ea14e41c73c54",
          "gas": "0x205c2",
          "input": "0xc4de93a50000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000e20b5f0000000000000000000000000492bf2ae22a0796ba5078d4db40ea14e41c73c54",
          "to": "0x53bf833a5d6c4dda888f69c22c88c9f356a41614",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0xd8cd",
          "output": "0x000000000000000000000000000000000000000000000000000000000e2627b4"
        },
        "subtraces": 2,
        "traceAddress": [],
        "type": "call"
      },
      {
        "action": {
          "callType": "staticcall",
          "from": "0x53bf833a5d6c4dda888f69c22c88c9f356a41614",
          "gas": "0x1fad9",
          "input": "0x068bcd8d0000000000000000000000000000000000000000000000000000000000000001",
          "to": "0x55bdb4164d28fbaf0898e0ef14a589ac09ac9970",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x105",
          "output": "0x000000000000000000000000892785f33cdee22a30aef750f285e18c18040c3e"
        },
        "subtraces": 0,
        "traceAddress": [
          0
        ],
        "type": "call"
      },
      {
        "action": {
          "callType": "call",
          "from": "0x53bf833a5d6c4dda888f69c22c88c9f356a41614",
          "gas": "0x1f87e",
          "input": "0x0986b61a000000000000000000000000492bf2ae22a0796ba5078d4db40ea14e41c73c54000000000000000000000000000000000000000000000000000000000e20b5f0000000000000000000000000492bf2ae22a0796ba5078d4db40ea14e41c73c54",
          "to": "0x892785f33cdee22a30aef750f285e18c18040c3e",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0xd278",
          "output": "0x000000000000000000000000000000000000000000000000000000000e2627b4"
        },
        "subtraces": 1,
        "traceAddress": [
          1
        ],
        "type": "call"
      },
      {
        "action": {
          "callType": "call",
          "from": "0x892785f33cdee22a30aef750f285e18c18040c3e",
          "gas": "0x1e928",
          "input": "0xa9059cbb000000000000000000000000492bf2ae22a0796ba5078d4db40ea14e41c73c54000000000000000000000000000000000000000000000000000000000e2627b4",
          "to": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0xc92b",
          "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 1,
        "traceAddress": [
          1,
          0
        ],
        "type": "call"
      },
      {
        "action": {
          "callType": "delegatecall",
          "from": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
          "gas": "0x1e089",
          "input": "0xa9059cbb000000000000000000000000492bf2ae22a0796ba5078d4db40ea14e41c73c54000000000000000000000000000000000000000000000000000000000e2627b4",
          "to": "0x1efb3f88bc88f03fd1804a5c53b7141bbef5ded8",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0xc804",
          "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [
          1,
          0,
          0
        ],
        "type": "call"
      }
    ],
    "vmTrace": null,
    "destroyedContracts": null
  }
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
transactionHashstring
The hash of the transaction to replay.
traceTypearray
An array specifying the types of traces to include, such as "trace", "vmTrace", and "stateDiff".

Response

200
Detailed trace information of the transaction, including execution traces

Response params

object
idinteger
jsonrpcstring
resultobject
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.
vmTracestring
The virtual machine trace.
typestring
The type of trace.