> ## 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.

# debug_traceBlockByHash

Traces every transaction in the block specified by block hash and returns the tracer result for each one.

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

***

## **Parameters**

`blockHash` - String - Required - The block hash.

`object` - Object - Required - The tracer object with the following fields:

* `tracer` - String - The type of tracer, options are: `callTracer` or `prestateTracer`.
  * `callTracer` - String - The callTracer keeps track of all call frames, including depth - calls, that are made during a transaction.
  * `prestateTracer` - String - The prestateTracer replays the transaction and tracks every part of state that occurred during the transaction.
* `tracerConfig` - Object (Optional) - The object to specify the configurations of the tracer.
  * `onlyTopCall` - Boolean - When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame.

## **Returns**

`result` - An array with one entry per transaction in the block, each containing:

* `txHash` - The hash of the transaction.
* `result` - With `callTracer`, the call trace of the transaction, an object with:
  * `from` - The address the transaction is sent from.
  * `gas` - The integer of the gas provided for the transaction execution.
  * `gasUsed` - The integer of the gas used.
  * `to` - The address the transaction is directed to.
  * `input` - The data given at the time of input.
  * `output` - The data returned by the call, when present.
  * `value` - The integer of the value sent with this transaction.
  * `type` - The type of call.
  * `calls` - A list of sub-calls, when present.

With `prestateTracer`, each result is instead a map keyed by account address, holding the state the transaction touched (such as `balance`, `nonce`, `code` and `storage`).

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result (first of the block's 5 traces shown)
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "txHash": "0xa8dd1a0f1c32b1e31eb507601a22624b80f3c211a02c836a052ab5d30bbe3293",
      "result": {
        "beforeEVMTransfers": [],
        "afterEVMTransfers": [],
        "from": "0x00000000000000000000000000000000000a4b05",
        "gas": "0x0",
        "gasUsed": "0x0",
        "to": "0x00000000000000000000000000000000000a4b05",
        "input": "0x6bf6a42d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...",
        "calls": [
          {
            "from": "0xfffffffffffffffffffffffffffffffffffffffe",
            "gas": "0x1c9c380",
            "gasUsed": "0x212c",
            "to": "0x0000f90827f1c53a10cb7a02335b175320002935",
            "input": "0x3fa0ac5c23a7fd4fabe59c74a5df1c4092cade7bfeff68e39c8e01ac80fdec63",
            "calls": [
              {
                "from": "0x0000f90827f1c53a10cb7a02335b175320002935",
                "gas": "0x1c29238",
                "gasUsed": "0x323",
                "to": "0x0000000000000000000000000000000000000064",
                "input": "0xa3b1b31d",
                "output": "0x000000000000000000000000000000000000000000000000000000000084dee8",
                "type": "STATICCALL"
              }
            ],
            "value": "0x0",
            "type": "CALL"
          }
        ],
        "value": "0x0",
        "type": "CALL"
      }
    }
  ]
}
```

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

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


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