trace_replayBlockTransactions - Ethereum

trace_replayBlockTransactions. Replays the block that is already present in the database

trace_replayBlockTransactions - ethereum [Value: 90CU]
Replays the block that is already present in the database.
Use cases

Use cases

  • Analyze execution trace of raw transactions
  • Debug smart contract interactions in raw transactions
  • Investigate gas usage within specific raw transactions
Constraints

Constraints

  • Requires accurate raw transaction encoding
  • Limited to nodes with tracing enabled
  • High resource usage for detailed trace analysis
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://eth.drpc.org \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_replayBlockTransactions","params":["0x2ed119",["trace"]],"id":1,"jsonrpc":"2.0"}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "callType": "call",
          "from": "0x6f1fb6efdf50f34bfa3f2bc0e5576edd71631638",
          "gas": "0x1dcd11f8",
          "input": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000",
          "to": "0x1e0447b19bb6ecfdae1e4ae1694b0c3659614e4e",
          "value": "0x0"
        },
        "error": "Reverted",
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": null
  },
  "id": 0
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
toBlockstring
The block number or block hash to search up to
  • latest [default] - the blockchain's most recent block
  • safe - a block validated by the beacon chain
  • finalized - a block confirmed by over two-thirds of validators
  • earliest - the first or genesis block
  • pending - transactions broadcasted but not yet included in a block
traceTypestring
Type of trace, one or more of: "trace", "stateDiff".

Response

200
Array of block traces.

Response params

object
idinteger
jsonrpcstring
resultobject
object
actionobject
object
callTypestring
The type of call.
fromstring
The address of the sender.
tostring
The address of the receiver.
valuestring
The value transferred in wei.
gasstring
The gas provided for the call.
inputstring
The data sent along 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
The amount of gas used by the trace.
outputstring
The output of the call.
subtracesinteger
The number of subtraces created by this trace.
traceAddressarray_of_strings
The trace address indicating the position of this trace in the call stack.
transactionHashstring
The hash of the transaction to which this trace belongs.
transactionPositionstring
The position of the transaction in the block.
typestring
The type of trace.