POST
/
2fc1de7f08c0465f6a28e3c355e0cb14
curl --request POST \
  --url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "trace_replayTransaction",
  "params": [
    "0x1759c699e6e2b1f249fa0ed605c0de18998bc66556cd6ea3362f92f511aeb06a",
    [
      "trace"
    ]
  ],
  "id": 1
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": [
    {}
  ]
}

Base API method trace_replayTransaction replays a single transaction using the trace module, returning detailed trace data about its execution. This method is crucial for developers, auditors, and analysts who need to understand the precise execution flow of a transaction, including calls made to other contracts, state changes, and the execution outcome.

Parameters

  • transactionHash — The hash of the transaction you want to replay, specified as a hexadecimal string.
  • traceTypes — An array of strings specifying the types of traces to return. Common trace types include "vmTrace", "trace", and "stateDiff".

Response

  • result — The trace data for the specified transaction. Depending on the traceTypes requested, this may include a detailed execution trace (vmTrace), a step-by-step list of executed operations (trace), or a summary of state changes (stateDiff).

Use case

The trace_replayTransaction method is invaluable for a detailed analysis of individual transactions. It can be used by developers to debug smart contract interactions, by auditors to verify transaction integrity and security, and by analysts to understand the effects of a transaction on the blockchain state. This method provides a deep dive into the transaction’s execution, offering insights that are not readily available through standard transaction receipts.

Body

application/json

Response

200 - application/json
Trace data for transactions in the specified block

The response is of type object.