> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# debug_traceBlockByNumber

> Similar to debug_traceBlock, traceBlockByHashByNumber accepts a block number and will replay the block that is already present in the database.

### Parameters

<ParamField query="chainId" type="string" default="1" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="debug_traceBlockByNumber" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={["0xccde12",{"tracer":"callTracer"}]} placeholder="[&#x22;0xccde12&#x22;,{&#x22;tracer&#x22;:&#x22;callTracer&#x22;}]" required>
  Parameters for method debug\_traceBlockByNumber: \[blockNumber, traceConfig]

  Positional parameters for <code>debug\_traceBlockByNumber</code>:

  <ul>
    <li><code>params\[0]</code>: Block number where this transaction was included. Null when pending.</li>
    <li><code>params\[1]</code>: Optional configuration object passed to tracing RPC methods.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="array">
  Full stack trace.
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=1 \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "debug_traceBlockByNumber",
      "params": [
        "0xccde12",
        {
          "tracer": "callTracer"
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      {
        "txHash": "0xabba...",
        "result": {
          "gas": 85301,
          "returnValue": "",
          "structLogs": [
            "..."
          ]
        }
      },
      {
        "txHash": "0xacca...",
        "result": {}
      }
    ]
  }
  ```
</ResponseExample>
