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

**Note:** `debug_traceBlockByNumber`is only supported for non-archive requests, i.e. for blocks and transactions near the head of the chain. All other BNB Smart Chain method requests will be archive requests unless otherwise stated.

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` ,`prestateTracer` or `flatCallTracer`.
  * `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 trackers every part of state that occurred during the transaction.
  * `flatCallTracer` - String - The flatCallTracer is a specific type of tracer that provides a flattened view of all calls made during transaction execution. It offers a simplified output compared to the standard callTracer, making it easier to analyze complex transactions.

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

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
	"jsonrpc": "2.0",
	"result": [
		{
			"txHash": "0xb4f73866b92843791ecdadc79db9fcf99051efaf456832102420a34b4cbe85bd",
			"result": {
				"from": "0xa38a8efa14fb1e541c87371cb52391f8c2a53af0",
				"gas": "0x7a122",
				"gasUsed": "0x523f",
				"to": "0x0000000000b35ae47b12b8ccf2f8d51e208760c8",
				"input": "0x",
				"value": "0x0",
				"type": "CALL"
			}
		},...
```

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

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


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