# debug\_traceBlockByHash

Returns the possible tracing result number by executing all transactions in the block specified by the block hash with a tracer.

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

***

## **Parameters**

`blockHash` - String - <mark style="color:red;">Required</mark> - The block hash.

`object` - Object - <mark style="color:red;">Required</mark> - 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.

```bash
// Result
{
	"jsonrpc": "2.0",
	"result": [
		{
			"result": {
				"from": "0x4c0509028c480effc7a6ab8276de285ae6d7fb21",
				"gas": "0x33450",
				"gasUsed": "0x5208",
				"input": "0x",
				"to": "0x6258e085ac9743130da0c9906ccdb252977cba8b",
				"type": "CALL",
				"value": "0x6c5db2a4d815dc0000"
			},
			"txHash": "0xb734cf7883d4247f3080dfbe2223204c2b1a594aa7112aa5539a58bd98b0ef99"
		}
	],
	"id": 1
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.conflux.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0x769f50299d06cd9fe08fe4a775c5d9f7a340ed78f6da06c3f11c003dc43aa447", {"tracer": "callTracer"}],"id":1}'
    
```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.conflux.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0xc46bbdcedaef47b46a5882e421c4c313a0c5f21b77a371fd93fdab58655e125f", {"tracer": "callTracer"}],"id":1}'
    
```

{% endtab %}
{% endtabs %}
