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

# eth_getBlockAccessList | Ethereum

> Ethereum API method that returns the block-level access list of a block: every account the block touched, with its balance, nonce, code, and storage changes. Added in the Glamsterdam upgrade (EIP-7928).

Ethereum API method that returns the block-level access list of a block, defined by [EIP-7928](https://eips.ethereum.org/EIPS/eip-7928). The list names every account the block touched and records each balance, nonce, code, and storage change with the position in the block where it happened, so you can see what a block changed without tracing or re-executing it.

> [!NOTE]
>
> `eth_getBlockAccessList` serves blocks produced after the [Glamsterdam upgrade](https://docs.chainstack.com/docs/ethereum-glamsterdam-upgrade.md), which is active on Ethereum Sepolia. Ethereum Mainnet serves the method only after Glamsterdam activates there, so the Try it request on this page returns an error until then.

## Parameters

* `quantity, tag, or hash` — the block number encoded as hexadecimal, a block tag such as `latest`, `safe`, or `finalized`, or a block hash.

## Response

`result` — an array with one object per account the block touched, ordered by address. Each object has these fields, and a field with no changes is an empty array:

* `address` — the account address.
* `balanceChanges` — the account balance after each change, as `{index, value}` objects.
* `nonceChanges` — the account nonce after each change, as `{index, value}` objects.
* `codeChanges` — the account code after each change, as `{index, value}` objects.
* `storageChanges` — the storage slots the block wrote, as `{key, changes}` objects, where `changes` lists the slot value after each change as `{index, value}` objects.
* `storageReads` — the storage slots the block read but didn't write.

`index` is the block access index of the change:

* `0x0` — pre-execution system calls, such as the beacon block root and block hash history updates.
* `0x1` to `n` — the transaction at `transactionIndex` `index − 1`, where `n` is the number of transactions in the block.
* `n + 1` — post-execution operations, such as withdrawals.

Storage keys, storage values, balances, and nonces are hex quantities without leading zeros, for example `0x1a1`. Pad a storage key to 32 bytes before you compare it with keys used by [eth\_getStorageAt](https://docs.chainstack.com/reference/ethereum-getstorageat.md).

The result is `null` for an unknown block or the `pending` tag. A request without a block parameter returns `-32602`.

## `eth_getBlockAccessList` code examples

The examples read the access list of Ethereum Sepolia block `12267482` (`0xbb2fda`), which has 111 transactions and touched 268 accounts, and print the entry of the account `0x3d637318ae0d8212c5c1285a47374f4ae3e94957`.

```javascript ethers.js theme={"system"}
const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT");

const getBlockAccessList = async () => {
  const accessList = await provider.send("eth_getBlockAccessList", ["0xbb2fda"]);
  console.log(`${accessList.length} accounts`);
  console.log(
    accessList.find((entry) => entry.address === "0x3d637318ae0d8212c5c1285a47374f4ae3e94957")
  );
};

getBlockAccessList();
```

```python web3.py theme={"system"}
from web3 import Web3

w3 = Web3(Web3.HTTPProvider("YOUR_CHAINSTACK_ENDPOINT"))

response = w3.provider.make_request("eth_getBlockAccessList", ["0xbb2fda"])
access_list = response["result"]
print(f"{len(access_list)} accounts")
print(next(e for e in access_list if e["address"] == "0x3d637318ae0d8212c5c1285a47374f4ae3e94957"))
```

```shell cURL theme={"system"}
curl -X POST YOUR_CHAINSTACK_ENDPOINT \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockAccessList","params":["0xbb2fda"]}'
```

The following four entries come from the 268-entry response for block `0xbb2fda`:

```json Response theme={"system"}
[
  {
    "address": "0x0000f90827f1c53a10cb7a02335b175320002935",
    "balanceChanges": [],
    "codeChanges": [],
    "nonceChanges": [],
    "storageChanges": [
      {
        "changes": [
          { "index": "0x0", "value": "0xaf5a6d101acb3a8e50ee80049f0dd8573a208902cb496703bf969400eecab6c3" }
        ],
        "key": "0x15b2"
      }
    ],
    "storageReads": []
  },
  {
    "address": "0x000f3df6d732807ef1319fb7b8bb8522d0beac02",
    "balanceChanges": [],
    "codeChanges": [],
    "nonceChanges": [],
    "storageChanges": [
      {
        "changes": [{ "index": "0x0", "value": "0x6b1248f4" }],
        "key": "0x1a1"
      },
      {
        "changes": [
          { "index": "0x0", "value": "0x5aa8380580e2ab185cbbbe23f5cdb3767888eb21ef9ea1554ecc40c5a931636c" }
        ],
        "key": "0x21a0"
      }
    ],
    "storageReads": []
  },
  {
    "address": "0x09d42c9bac97930ea0825538fff29182a330f16f",
    "balanceChanges": [{ "index": "0x4e", "value": "0x35f087d7f3e00" }],
    "codeChanges": [],
    "nonceChanges": [],
    "storageChanges": [],
    "storageReads": []
  },
  {
    "address": "0x3d637318ae0d8212c5c1285a47374f4ae3e94957",
    "balanceChanges": [{ "index": "0x4e", "value": "0x4a07e2d7a906a1c0" }],
    "codeChanges": [],
    "nonceChanges": [{ "index": "0x4e", "value": "0xc2b9" }],
    "storageChanges": [],
    "storageReads": []
  }
]
```

How to read these entries:

* `0x0000f90827f1c53a10cb7a02335b175320002935` and `0x000f3df6d732807ef1319fb7b8bb8522d0beac02` — the block hash history and beacon block root system contracts. Their writes have index `0x0`, the pre-execution system calls.
* `0x3d637318ae0d8212c5c1285a47374f4ae3e94957` and `0x09d42c9bac97930ea0825538fff29182a330f16f` — the sender and recipient of transaction [`0x0777400768f19e603dcf176d031ae201e54ae7bcf1f3ed237b084248a9a3c514`](https://sepolia.etherscan.io/tx/0x0777400768f19e603dcf176d031ae201e54ae7bcf1f3ed237b084248a9a3c514), a plain ether transfer at `transactionIndex` `0x4d`, so its changes have index `0x4e`. The sender's nonce and balance change; the recipient's balance changes to the amount received.

## Use case

One use case for `eth_getBlockAccessList` is building a state diff for each block. An indexer that tracks balances can read every balance change in a block from one response, including ether moved by contract calls and withdrawals, instead of tracing each transaction with [debug\_traceBlockByNumber](https://docs.chainstack.com/reference/ethereum-traceblockbynumber.md).


## OpenAPI

````yaml openapi/ethereum_node_api/blocks_info/eth_getBlockAccessList.json POST /mt_c524ad9781ae5dccd9ac6f5b0370e
openapi: 3.0.0
info:
  title: Ethereum Node API
  version: 1.0.0
  description: This is an API for interacting with a Ethereum node.
servers:
  - url: https://ethereum-mainnet.core.chainstack.com
security: []
paths:
  /mt_c524ad9781ae5dccd9ac6f5b0370e:
    post:
      tags:
        - upload
      summary: eth_getBlockAccessList
      operationId: getBlockAccessList
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockAccessList
                params:
                  type: array
                  items:
                    type: string
                    title: Block identifier
                    description: >-
                      The block number encoded as hexadecimal, a block tag, or a
                      block hash.
                  default:
                    - latest
      responses:
        '200':
          description: The block access list of the block
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    nullable: true
                    description: >-
                      One entry per account the block touched, ordered by
                      address. null for an unknown block or the pending tag.
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: The account address.
                        balanceChanges:
                          type: array
                          description: >-
                            The account balance after each change, with the
                            block access index of the change.
                          items:
                            type: object
                            properties:
                              index:
                                type: string
                              value:
                                type: string
                        codeChanges:
                          type: array
                          description: >-
                            The account code after each change, with the block
                            access index of the change.
                          items:
                            type: object
                            properties:
                              index:
                                type: string
                              value:
                                type: string
                        nonceChanges:
                          type: array
                          description: >-
                            The account nonce after each change, with the block
                            access index of the change.
                          items:
                            type: object
                            properties:
                              index:
                                type: string
                              value:
                                type: string
                        storageChanges:
                          type: array
                          description: >-
                            The storage slots the block wrote, each with its
                            value after every change.
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                              changes:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    index:
                                      type: string
                                    value:
                                      type: string
                        storageReads:
                          type: array
                          description: The storage slots the block read without writing.
                          items:
                            type: string

````