trace_replayBlockTransactions

Replays all transactions in a block returning the requested traces for each transaction.

🚧

Note for trace_ methods

  1. trace_ namespace methods are only available on paid plans.
    1. developer plan, team plan, enterprise plan, custom plans. dedicated nodes
  2. trace_ namespace methods are only available on erigon client.

Parameters

  • quantity|tag - Hex encoded integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
  • Array - Type of trace, one or more of:
    • "trace" - To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcells.
    • "stateDiff" - To get the basic trace of the given transaction.
    • "vmTrace" - To get information on altered Ethereum state due to execution of the given transaction.
curl https://ethereum-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "trace_replayBlockTransactions",
  "params": [
    "latest",
    ["trace"]
  ]
}'

Returns

  • output - The data which is returned as an output encoded in hexadecimal format
  • stateDiff - It returns the information on altered Ethereum state due to execution of the given transaction
  • block trace: A list of calls to other contracts containing one object per call, in transaction execution order.
    • action - The ParityTrace object, which has the following fields:
      • from - The address of the sender
      • callType - The type of method such as call, delegatecall
      • gas - The gas provided by the sender, encoded as hexadecimal
      • input - The data sent along with the transaction
      • to - The address of the receiver
      • value - The integer of the value sent with this transaction, encoded as hexadecimal
    • blockHash - The hash of the block where this transaction was in
    • blockNumber - An integer value representing the block number where this transaction was in
    • error - The error message, if any
    • result - The ParityTraceResult object which has the following fields:
      • gasUsed - The amount of gas used by this specific transaction alone
      • output - The value returned by the contract call, and it only contains the actual value sent by the RETURN method. If the RETURN method was not executed, the output is empty bytes
    • subtraces - The traces of contract calls made by the transaction
    • traceAddress - The list of addresses where the call executed, the address of the parents and the order of the current sub call
    • type - The value of the method such as call or create
  • vmTrace - It is used to get a full trace of the virtual machine's state during the execution of the given transaction, including for any sub-calls
  • transactionHash - The hash of the transaction
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "output": "0x",
            "stateDiff": null,
            "trace": [
                {
                    "action": {
                        "from": "0x950e6bb163a064cc8d2c9e5b804053b9991e2c1a",
                        "callType": "call",
                        "gas": "0x7d0",
                        "input": "0x",
                        "to": "0x950e6bb163a064cc8d2c9e5b804053b9991e2c1a",
                        "value": "0x38d7ea4c68000"
                    },
                    "result": {
                        "gasUsed": "0x0",
                        "output": "0x"
                    },
                    "subtraces": 0,
                    "traceAddress": [],
                    "type": "call"
                }
            ],
            "vmTrace": null,
            "transactionHash": "0x09b5a474889acb3d17ecf075d7048f159896be2375388fb36b707d638fa38a5e"
        },
        {
            "output": "0x",
            "stateDiff": null,
            "trace": [
                {
                    "action": {
                        "from": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
                        "callType": "call",
                        "gas": "0x0",
                        "input": "0x",
                        "to": "0x4675c7e5baafbffbca748158becba61ef3b0a263",
                        "value": "0xea56e8c571e638"
                    },
                    "result": {
                        "gasUsed": "0x0",
                        "output": "0x"
                    },
                    "subtraces": 0,
                    "traceAddress": [],
                    "type": "call"
                }
            ],
            "vmTrace": null,
            "transactionHash": "0xe8715eef73dab802fc3fd9aa493a5f24f9e03c0bfe823c6b514a6a18f4ef4ac2"
        }
    ]
}

Try Yourself

Language
Click Try It! to start a request and see the response here!