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

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

This method will use `80` [Compute Units](/nodeapi/about/billing).

***

<Info>
  This method is served by nanoreth, the HyperEVM archive client, and works for any block back to genesis. On blocks that carry a HyperCore deposit, block-level traces include the deposit as their first entry; see [Overview](/nodeapi/hyperliquid/overview).
</Info>

## **Parameters**

`blockNumber` - String - <span style={{color: "red"}}>Required</span>  - The block number as a string in hexadecimal format.

`object` - Object - <span style={{color: "red"}}>Required</span>  - 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 of transactions for that block, each containing:

* `txHash` - The transaction hash of the transaction
* `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.
* `value` - The integer of the value sent with this transaction.
* `type` - The type of call.
* `calls` - A list of sub-calls.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": {
        "from": "0x20c8e44efbadd6f1a462977d941abcd58924bd18",
        "gas": "0x5208",
        "gasUsed": "0x5208",
        "to": "0xf480341493c46f214b0e260005cf12c17449a0ab",
        "input": "0x",
        "value": "0xe2cf739126400",
        "type": "CALL"
      },
      "txHash": "0x6107789e29176dd9c1fef9c2a0bffc9cf65590f3660a9dd614c0e20a65a36aba"
    },
    // ...
    {
      "txHash": "0x86a487d74f726697ffc06cca32975d8217142401ee459a1a604b8174315f2378",
      "result": {
        "from": "0xd4db58f65cc967a67449dc1570f408aeb496e5c8",
        "gas": "0xe040",
        "gasUsed": "0x9960",
        "to": "0xb9cd945141f7d99fd562a6222accde5043350ad4",
        "input": "0xa9059cbb000000000000000000000000ae054f4e67bd9c95844e0152f5face89ee4e7e450000000000000000000000000000000000000000000023b5482ca79b97450164",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "value": "0x0",
        "type": "CALL"
      }
    }
  ]
}
```

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


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