# eth_getBlockAccessListByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-sepolia.g.alchemy.com/v2/{apiKey}

Returns the [EIP-7928](https://eips.ethereum.org/EIPS/eip-7928) block-level access list (BAL) for a block identified by its hash. The BAL records every account and storage slot accessed during block execution together with the post-execution values of writes, enabling parallel transaction validation and executionless state updates.

Returns `null` when the block is unknown. The node returns a JSON-RPC error when the BAL is unavailable, for example on pre-Amsterdam blocks or when local history has been pruned.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-block-access-list-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The 32-byte hash of the block to retrieve the access list for. |

## Result

**Block access list** (null or object[]): An array of per-account access entries describing every address and storage slot accessed during block execution, or `null` when the block is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockAccessListByBlockHash",
  "params": [
    "0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
      "balanceChanges": [
        {
          "index": "0x0",
          "value": "0x56bc75e2d63100000"
        },
        {
          "index": "0x1",
          "value": "0x56bc75e2d63000000"
        }
      ],
      "codeChanges": [],
      "nonceChanges": [
        {
          "index": "0x0",
          "value": "0x0"
        },
        {
          "index": "0x1",
          "value": "0x1"
        }
      ],
      "storageChanges": [
        {
          "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "changes": [
            {
              "index": "0x0",
              "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
            },
            {
              "index": "0x1",
              "value": "0x0000000000000000000000000000000000000000000000000000000000000100"
            }
          ]
        }
      ],
      "storageReads": []
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockAccessListByBlockHash",
  "params": [
    "0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63"
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_getBlockAccessListByBlockHash',
    params: ['0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63']
  })
};

fetch('https://base-sepolia.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://base-sepolia.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getBlockAccessListByBlockHash",
    "params": ["0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://base-sepolia.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_getBlockAccessListByBlockHash\",\n  \"params\": [\n    \"0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://base-sepolia.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_getBlockAccessListByBlockHash\",\n  \"params\": [\n    \"0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63\"\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://base-sepolia.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_getBlockAccessListByBlockHash\",\n  \"params\": [\n    \"0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63\"\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
servers:
  - url: https://base-sepolia.g.alchemy.com/v2
    name: Base Sepolia
name: eth_getBlockAccessListByBlockHash
description: |-
  Returns the [EIP-7928](https://eips.ethereum.org/EIPS/eip-7928) block-level access list (BAL) for a block identified by its hash. The BAL records every account and storage slot accessed during block execution together with the post-execution values of writes, enabling parallel transaction validation and executionless state updates.

  Returns `null` when the block is unknown. The node returns a JSON-RPC error when the BAL is unavailable, for example on pre-Amsterdam blocks or when local history has been pruned.
x-compute-units: 20
params:
  - name: Block hash
    required: true
    description: The 32-byte hash of the block to retrieve the access list for.
    schema:
      title: 32 byte hex value
      type: string
      pattern: ^0x[0-9a-f]{64}$
result:
  name: Block access list
  description: An array of per-account access entries describing every address and storage slot accessed during block execution, or `null` when the block is not found.
  schema:
    oneOf:
      - title: Not Found (null)
        type: 'null'
      - title: Block access list
        type: array
        items:
          title: Account access
          type: object
          required:
            - address
          additionalProperties: false
          properties:
            address:
              title: Address
              type: string
              pattern: ^0x[0-9a-fA-F]{40}$
              description: The address of the account accessed during block execution.
            balanceChanges:
              title: Balance changes
              description: Post-execution balance updates for the account, each tagged with the block access index at which the change occurred.
              type: array
              items:
                title: Balance change
                type: object
                required:
                  - index
                  - value
                additionalProperties: false
                properties:
                  index:
                    title: Block access index
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    description: 'Index into the block execution timeline: `0` for pre-execution system contracts, `1..n` for transactions (1-indexed), and `n+1` for post-execution (withdrawals and post-block system calls).'
                  value:
                    title: Post-execution balance
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    description: The account balance in wei after the change.
            codeChanges:
              title: Code changes
              description: Code deployments for the account, each tagged with the block access index at which the deployment occurred.
              type: array
              items:
                title: Code change
                type: object
                required:
                  - index
                  - code
                additionalProperties: false
                properties:
                  index:
                    title: Block access index
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    description: Block access index at which the code was deployed.
                  code:
                    title: Deployed bytecode
                    type: string
                    pattern: ^0x[0-9a-f]*$
                    description: The bytecode that was deployed at this account.
            nonceChanges:
              title: Nonce changes
              description: Post-execution nonce updates for the account, each tagged with the block access index at which the change occurred.
              type: array
              items:
                title: Nonce change
                type: object
                required:
                  - index
                  - value
                additionalProperties: false
                properties:
                  index:
                    title: Block access index
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    description: Block access index at which the nonce changed.
                  value:
                    title: Post-execution nonce
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    description: The account nonce after the change.
            storageChanges:
              title: Storage changes
              description: Storage slots written during block execution, grouped by slot key. Each slot carries one or more changes tagged with the block access index at which the write occurred.
              type: array
              items:
                title: Slot changes
                type: object
                required:
                  - key
                  - changes
                additionalProperties: false
                properties:
                  key:
                    title: Storage slot
                    type: string
                    pattern: ^0x[0-9a-f]{64}$
                    description: The 32-byte storage slot key.
                  changes:
                    title: Storage changes
                    type: array
                    items:
                      title: Storage change
                      type: object
                      required:
                        - index
                        - value
                      additionalProperties: false
                      properties:
                        index:
                          title: Block access index
                          type: string
                          pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                          description: Block access index at which the slot was written.
                        value:
                          title: Post-execution storage value
                          type: string
                          pattern: ^0x[0-9a-f]{64}$
                          description: The 32-byte storage value after the write.
            storageReads:
              title: Storage reads
              description: Storage slot keys read (SLOAD) during block execution without a corresponding write.
              type: array
              items:
                title: 32 byte hex value
                type: string
                pattern: ^0x[0-9a-f]{64}$
examples:
  - name: eth_getBlockAccessListByBlockHash example
    params:
      - name: Block hash
        value: '0xd48332090d1ba618f3d4f27b3316f3eab4700a5a3c1b77ef15a15f1000fc2a63'
    result:
      name: Block access list
      value:
        - address: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
          balanceChanges:
            - index: '0x0'
              value: '0x56bc75e2d63100000'
            - index: '0x1'
              value: '0x56bc75e2d63000000'
          codeChanges: []
          nonceChanges:
            - index: '0x0'
              value: '0x0'
            - index: '0x1'
              value: '0x1'
          storageChanges:
            - key: '0x0000000000000000000000000000000000000000000000000000000000000000'
              changes:
                - index: '0x0'
                  value: '0x0000000000000000000000000000000000000000000000000000000000000000'
                - index: '0x1'
                  value: '0x0000000000000000000000000000000000000000000000000000000000000100'
          storageReads: []
errors:
  - code: 4444
    message: Pruned history unavailable
  - code: -32001
    message: Resource not found
```
