# debug\_traceBlockByNumber

### Parameters

1. `Quantity` or `tag` - choose 1 of the following options:
   * A hexadecimal block number.
   * `"latest"` - the latest mined block.
   * `"safe"` - the latest safe head block.
   * `"finalized"` - the latest finalized block.
   * `"pending"` - the pending state/transactions.
2. `Tracer` - choose from one of these options:
   * `4byteTracer` - Solidity contract functions are [addressed](https://docs.soliditylang.org/en/develop/abi-spec.html#function-selector) using the first four byte of the Keccak-256 hash of their signature. This `tracer` monitors and analyzes the usage of specific function signatures within smart contracts by capturing their unique first four bytes.
   * `callTracer` - collects data about all call frames executed within a transaction, creating a hierarchical list of call frames structured mirroring the EVM's operations. This is useful for debugging and analytical purposes.
   * `prestateTracer` - captures and analyzes the state of the blockchain before the execution of a specific transaction. It helps in understanding the state changes and effects that a transaction will have on the blockchain's data and accounts before the transaction is actually executed.
   * `noopTracer` - returns empty results. This is used for testing purpose.
   * `opcountTracer` - count and track the number of operations (or opcodes) executed during a specific transaction.
   * `unigramTracer` - counts the frequency of occurrence of each opcode.
   * `bigramTracer` - a bigram refers to a sequence of two bytes or characters. This tracer is designed to observe and provide insights into the patterns and occurrences of these two-byte sequences as they appear within the data of executed transactions.
   * `trigramTracer` - a trigram refers to a sequence of three bytes or characters. This tracer is designed to observe and provide insights into the patterns and occurrences of these three-byte sequences as they appear within the data of executed transactions.
   * `evmdisTracer` - generates the bytecode disassembly of executed transactions, providing developers with insights into how smart contracts operate at a low-level bytecode level for debugging, security audits, and performance optimization purposes.

#### Sample Request

{% code overflow="wrap" %}

```
curl https://lb.nodies.app/v1/<INTERT API> -X POST -H "Content-Type: application/json" -d '{
  "method": "debug_traceBlockByNumber",
  "params": [
    "0x2ec5107",
    {
      "tracer": "opcountTracer"
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}'
```

{% endcode %}

#### Sample Response

{% code overflow="wrap" %}

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": 2439
    },
    {
      "result": 754
    },
    {
      "result": 2439
    },
    {
      "result": 862
    },
    {
      "result": 2637
    },
    {
      "result": 19867
    },
    {
      "result": 6615
    },
    {
      "result": 7050
    },
    {
      "result": 37395
    },
    {
      "result": 22439
    },
    {
      "result": 17230
    },
    {
      "result": 319
    },
    {
      "result": 551
    },
    {
      "result": 11714
    },
    {
      "result": 11714
    },
    {
      "result": 11714
    },
    {
      "result": 434
    },
    {
      "result": 434
    },
    {
      "result": 322
    },
    {
      "result": 525
    },
    {
      "result": 11714
    },
    {
      "result": 11404
    },
    {
      "result": 962
    },
    {
      "result": 962
    },
    {
      "result": 290
    },
    {
      "result": 264
    },
    {
      "result": 8870
    },
    {
      "result": 3371
    },
    {
      "result": 3884
    },
    {
      "result": 3793
    },
    {
      "result": 0
    },
    {
      "result": 18700
    },
    {
      "result": 0
    },
    {
      "result": 12631
    },
    {
      "result": 11714
    },
    {
      "result": 11404
    },
    {
      "result": 11399
    },
    {
      "result": 11709
    },
    {
      "result": 11709
    },
    {
      "result": 11714
    },
    {
      "result": 11714
    },
    {
      "result": 11404
    },
    {
      "result": 11709
    },
    {
      "result": 11661
    },
    {
      "result": 551
    },
    {
      "result": 785
    },
    {
      "result": 785
    },
    {
      "result": 4921
    },
    {
      "result": 373
    },
    {
      "result": 373
    },
    {
      "result": 17616
    },
    {
      "result": 60911
    },
    {
      "result": 995
    },
    {
      "result": 19445
    },
    {
      "result": 6099
    },
    {
      "result": 420
    },
    {
      "result": 2398
    },
    {
      "result": 0
    },
    {
      "result": 586
    },
    {
      "result": 1938
    },
    {
      "result": 9149
    },
    {
      "result": 157
    },
    {
      "result": 6402
    },
    {
      "result": 424401
    },
    {
      "result": 5100
    },
    {
      "result": 4256
    }
  ]
}
```

{% endcode %}
