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

***

## **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 transaction objects for that block, each containing:

* `txHash` - The transaction hash of the transaction
* `result` - An object containing detailed information about the traced transaction
  * `beforeEVMTransfers` - An array representing EVM transfers that occurred before the execution of the transaction
    * `purpose` - (Optional) The purpose of the EVM transfer
    * `from` - (Optional) The Ethereum address initiating the transfer
    * `to` - (Optional) The Ethereum address receiving the transfer
    * `value` - (Optional) The value of the transfer, specified in hexadecimal format (Wei)
  * `afterEVMTransfers` - An array representing EVM transfers that occurred after the execution of the transaction
    * Optional fields are the same as `beforeEVMTransfers` above
  * `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",
	"result": [
		{
			"txHash": "0xd11b0067cf4fb01858ea76e545871667de8c7f877e0bba812725d38e6887ce2a",
			"result": {
				"beforeEVMTransfers": [],
				"afterEVMTransfers": [],
				"from": "0x00000000000000000000000000000000000a4b05",
				"gas": "0x0",
				"gasUsed": "0x0",
				"to": "0x00000000000000000000000000000000000a4b05",
				"input": "0x6bf6a42d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013d23bb000000000000000000000000000000000000000000000000000000000f34b2d70000000000000000000000000000000000000000000000000000000000000000",
				"value": "0x0",
				"type": "CALL"
			}
		},
		{
			"txHash": "0x69f5fcbd690d97665637a62b101c29db2d5cd444682599746d6078b42b2c5e10",
			"result": {
				"beforeEVMTransfers": [
					{
						"purpose": "feePayment",
						"from": "0x4DF13106b8DFa90b4D7A9485274a5fD23CC02Fa0",
						"to": null,
						"value": "0x939d1582280"
					}
				],
				"afterEVMTransfers": [
					{
						"purpose": "gasRefund",
						"from": null,
						"to": "0x4DF13106b8DFa90b4D7A9485274a5fD23CC02Fa0",
						"value": "0x2cf78501500"
					},
					{
						"purpose": "feeCollection",
						"from": null,
						"to": "0xbF5041Fc07E1c866D15c749156657B8eEd0fb649",
						"value": "0x1bcd50edb00"
					},
					{
						"purpose": "feeCollection",
						"from": null,
						"to": "0xa4B00000000000000000000000000000000000F6",
						"value": "0x4ad83f93280"
					}
				],
				"from": "0x4df13106b8dfa90b4d7a9485274a5fd23cc02fa0",
				"gas": "0xf7a79",
				"gasUsed": "0xac367",
				"to": "0x89d43d991f47924dd47c9b6a7fa17c6a15091999",
				"input": ...
				...
}
```

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

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


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