# Ethereum trace_replayTransaction RPC method
Ethereum API method that replays a transaction, returning the traces.
Information
This method is available on Erigon when the trace
namespace is enabled.
Learn how to deploy a node with the debug and trace API methods enabled.
Parameters:
data
— the raw transaction data.array
— type of trace, one or more of:vmTrace
— to get a full trace of virtual machine's state during the execution of the given transaction including any subcalls.trace
— to get the basic trace of the given transaction.statediff
— to get information on altered Ethereum state due to execution of the given transaction.
Returns:
array
— block traces that have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):Output
— string.transactionHash
— the string of the transaction hash.vmtrace
— theParityVmTrace
object with:code
— string.operations
— array of theParityVmOperationTrace
objects.
action
— theParityTrace
object with:traceaddress
— array.calltype
— string.includeintrace
— boolean.isprecomplied
— boolean.type
— string.creationmethod
— string.from
— address.to
— address.gas
— quantity.value
— quantity.input
— data.result
— theParityTraceResult
object with:gasused
— quantity.output
— data.address
— address.code
— data.
subtraces
— array.author
— address.rewardtype
— string.error
— string.
statechanges
— array.
Example:
- web3.py
- cURL
from web3 import Web3
node_url = "CHAINSTACK_NODE_URL"
web3 = Web3.HTTPProvider(node_url)
trace = web3.make_request('trace_replayTransaction', ['0x96161bdfd8e2cfc5ce67d420cfbd2bbaf0cf47ae0655dae94d77d4dd4630bd95',['trace']])
print(trace)