POSTtrace_replayTransaction
Re-executes a specified transaction and traces all events that occur during the process. Since the transaction execution is performed locally, it is not reflected on the actual blockchain. This method is used when you want to reproduce and analyze the execution of a past transaction.
Enter the following parameters as an array with the appropriate types.
transaction hash: Enter the transaction hash to query as a string.trace type: Select one or more trace types to use and enter as an array. You can use "vmTrace", "trace", or "stateDiff" values. See the API documentation for details on each option.
Transaction hash is the unique identifier of a transaction. Transaction hashes are expressed as 64-digit hexadecimal strings.
Trace type specifies the data types used when querying detailed execution information for a specific transaction or block on the Ethereum blockchain. This array can contain the following three string values:
- vmTrace: Traces the virtual machine's step-by-step execution in detail. This includes memory state, stack state, and the result of each execution instruction.
trace: Provides step-by-step logs of transaction execution. These logs include call flow and details of internal transactions that occurred.stateDiff: Shows the difference in account state before and after transaction execution. This includes changed storage keys and values, account balance changes, and contract code changes.
This information helps developers better understand the transaction processing flow and debug. Each type provides detailed information on a specific aspect of the blockchain to clearly understand the impact of a transaction.
Caller address
Call type (call, delegatecall, staticcall, etc.)
Gas limit set for the call (hex)
Call input data (hex)
Callee address
Amount of ETH transferred (hex, in wei)
Hash of the block containing this transaction
Block number containing the transaction
Actual gas used (hex)
Call return data (hex)
Number of sub-traces
Index array representing the trace path
Hash of the traced transaction
Position of the transaction within the block
Trace type (call, create, reward, etc.)