> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# trace_replayBlockTransactions

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

This method will use `270` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

## **Parameters**

`blockNumber` - String - Required - The block number as a string in hexadecimal format or tags. The supported tag values include:

* `earliest` - For the earliest/genesis block
* `latest` for the latest mined block
* `safe` for the most recent secure block
* `finalized` for the latest block whose Ethereum (L1) data is finalized

`array` - array - Required - The type of trace, which can be one of the following:

* `vmTrace` string - To get a full trace of the virtual machine's state during the execution of the given transaction, including for any subcalls
* `trace` - string - To get the basic trace of the given transaction
* `stateDiff` - string - To get information on altered Ethereum state due to execution of the given transaction

## **Returns**

`array` - array - The block traces, which have the following fields

* `output` - string - The data returned as output encoded in hexadecimal format
* `stateDiff` - object - The altered state due to execution of the given transaction, or null if not available
* `trace` - array - An array of basic trace objects for the given transaction containing:
  * `action` - object The ParityTrace action object containing call details
    * `from` - string - The address of the sender
    * `callType` - string - The type of method such as call, staticcall, delegatecall
    * `gas` - string - The gas provided by the sender, encoded as hexadecimal
    * `input` - string - The input data sent along with the transaction
    * `to` - string - The address of the receiver
    * `value` - string - The integer of the value sent with this transaction, encoded as hexadecimal
  * `result` - object - The execution result of the trace
    * `gasUsed` - string - The amount of gas used by this trace
    * `output` - string - The return value of the contract call, empty if no RETURN executed
  * `subtraces` - integer - The number of subtraces (internal calls) within this trace
  * `traceAddress` - array - The list of addresses where the call executed, including parent calls and order
  * `type` - string The type of the trace, such as call or create
* `vmTrace` - object - The full trace of the virtual machine's state during execution, including sub-calls, or null if not available
* `transactionHash` - string - The transaction hash

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result (first of the block's 12 transaction replays shown)
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "type": "call",
          "action": {
            "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
            "callType": "call",
            "gas": "0xee9f8",
            "input": "0x3db6be2b00000000000000000000000000000005000000006adab4a700000000019092be00000000000000000000000000000000000000000000000000000000...",
            "to": "0x4200000000000000000000000000000000000015",
            "value": "0x0"
          },
          "result": {
            "gasUsed": "0x5c12",
            "output": "0x"
          },
          "subtraces": 1,
          "traceAddress": []
        }
      ],
      "vmTrace": null,
      "transactionHash": "0x0cf46910a7ede71333dbb1689c03b2eb77b958af08701039cbef40f0cace0a4c"
    }
  ]
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.xlayer.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"trace_replayBlockTransactions","params":["0x4685f68",["trace"]],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.