> ## Documentation Index
> Fetch the complete documentation index at: https://daehan-base.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getBlockByNumber

> Returns block information by number. On Flashblocks endpoints, the pending tag returns the live pre-confirmed block updated every ~200ms.

Returns information about a block by its number.

<Tip>
  **Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to fetch the live Flashblock in progress — a real block object updated every \~200ms with new pre-confirmed transactions. The response shape is identical; the block is simply not yet sealed.
</Tip>

## Parameters

<ParamField body="block" type="string" required>
  Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` on a Flashblocks endpoint to get the in-progress block.
</ParamField>

<ParamField body="fullTransactions" type="boolean" required>
  If `true`, returns full transaction objects. If `false`, returns only transaction hashes.
</ParamField>

## Returns

<ResponseField name="result" type="object">
  A block object, or `null` if no block was found.

  <Expandable title="Block fields">
    <ResponseField name="number" type="string">Block number in hex. `null` when pending.</ResponseField>
    <ResponseField name="hash" type="string">Block hash. `null` when pending.</ResponseField>
    <ResponseField name="parentHash" type="string">Hash of the parent block.</ResponseField>
    <ResponseField name="nonce" type="string">PoW nonce. Always `"0x0000000000000000"` on Base (PoS).</ResponseField>
    <ResponseField name="sha3Uncles" type="string">Hash of the uncles list. Always empty on Base.</ResponseField>
    <ResponseField name="logsBloom" type="string">Bloom filter for the block's logs.</ResponseField>
    <ResponseField name="transactionsRoot" type="string">Root of the transaction trie.</ResponseField>
    <ResponseField name="stateRoot" type="string">Root of the final state trie.</ResponseField>
    <ResponseField name="receiptsRoot" type="string">Root of the receipts trie.</ResponseField>
    <ResponseField name="miner" type="string">Address of the fee recipient (coinbase).</ResponseField>
    <ResponseField name="difficulty" type="string">Always `"0x0"` on Base (PoS).</ResponseField>
    <ResponseField name="totalDifficulty" type="string">Always `"0x0"` on Base (PoS).</ResponseField>
    <ResponseField name="extraData" type="string">Arbitrary data field set by the sequencer.</ResponseField>
    <ResponseField name="size" type="string">Block size in bytes (hex).</ResponseField>
    <ResponseField name="gasLimit" type="string">Maximum gas allowed in this block (hex).</ResponseField>
    <ResponseField name="gasUsed" type="string">Total gas used in this block (hex).</ResponseField>
    <ResponseField name="timestamp" type="string">Unix timestamp (hex).</ResponseField>
    <ResponseField name="transactions" type="array">Array of transaction hashes or full transaction objects.</ResponseField>
    <ResponseField name="uncles" type="array">Always `[]` on Base.</ResponseField>
    <ResponseField name="withdrawals" type="array">Always `[]` on Base.</ResponseField>
    <ResponseField name="baseFeePerGas" type="string">EIP-1559 base fee per gas (hex).</ResponseField>
    <ResponseField name="blobGasUsed" type="string">Total blob gas used (EIP-4844, hex).</ResponseField>
    <ResponseField name="excessBlobGas" type="string">Excess blob gas for blob fee calculation (EIP-4844, hex).</ResponseField>
    <ResponseField name="parentBeaconBlockRoot" type="string">Parent beacon block root (EIP-4788).</ResponseField>
    <ResponseField name="requestsHash" type="string">Hash of requests (EIP-7685).</ResponseField>
  </Expandable>
</ResponseField>

## Flashblock-Specific Response Fields

When querying `"pending"` on a Flashblocks endpoint, the response is a live snapshot of the block being built. A few fields behave differently:

| Field          | Standard `latest`       | Flashblocks `pending`                              |
| -------------- | ----------------------- | -------------------------------------------------- |
| `number`       | Sealed block number     | Current block number (being built)                 |
| `hash`         | Final block hash        | Hash of the partial block at this Flashblock index |
| `gasUsed`      | Final gas used          | Cumulative gas used up to this Flashblock          |
| `transactions` | All sealed transactions | Transactions pre-confirmed so far                  |
| `blobGasUsed`  | Final blob gas used     | Propagated from cumulative Flashblock state        |

## Example

<CodeGroup>
  ```bash Standard (latest sealed block) theme={null}
  curl https://mainnet.base.org \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_getBlockByNumber",
      "params": ["latest", false],
      "id": 1
    }'
  ```

  ```bash Flashblocks (pending, live at ~200ms) theme={null}
  curl https://mainnet-preconf.base.org \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_getBlockByNumber",
      "params": ["pending", false],
      "id": 1
    }'
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "number": "0x158a0e9",
      "hash": "0x5c330e55a190f82ea486b61e5b12e27dfb4fb3cecfc5746886ef38ca1281bce8",
      "parentHash": "0x9edc29b8b0a1e31d28616e40c16132ad0d58faa8bb952595b557526bdb9a960a",
      "timestamp": "0x67bf8332",
      "gasLimit": "0x3938700",
      "gasUsed": "0xab3f",
      "baseFeePerGas": "0xfa",
      "transactions": ["0x7ef8f8a0..."],
      "withdrawals": [],
      "miner": "0x4200000000000000000000000000000000000011"
    }
  }
  ```
</CodeGroup>
