> ## 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_getStorageValues | Ethereum

> Ethereum API method that returns the values of up to 1,024 storage slots across one or more smart contracts in a single call. Use it on Ethereum via Chainstack.

Ethereum API method that returns the values stored at multiple storage slots, across one or more smart contracts, in a single call. It replaces a batch of [eth\_getStorageAt](https://docs.chainstack.com/reference/ethereum-getstorageat.md) requests when you read several slots at the same block, for example to snapshot a contract's state.

> [!NOTE]
>
> On Ethereum Global Nodes, `eth_getStorageValues` serves the latest 128 blocks. For an older block, it returns an error of the form `historical state <state root> is not available`; use [eth\_getStorageAt](https://docs.chainstack.com/reference/ethereum-getstorageat.md) to read older state.

## Parameters

* `object` — an object that maps each contract address to an array of storage slot keys. Each key must be a full 32-byte hex value, such as `0x0000000000000000000000000000000000000000000000000000000000000001`; a short form such as `0x1` is rejected.
* `quantity or tag` — the block number encoded as hexadecimal, or a block tag such as `latest`.

## Response

`result` — an object that maps each requested contract address, in lowercase, to an array of 32-byte storage values in the same order as the requested slots.

A request with no slots returns `-32602` with `empty request`, and a request with more than 1,024 slots returns `-38026` with `too many slots (max 1024)`.

## `eth_getStorageValues` code examples

The examples read slots `0`, `1`, and `2` of the [WETH contract](https://etherscan.io/token/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2), which hold the token name, symbol, and decimals, in one call.

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

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

const slot = (n) => ethers.zeroPadValue(ethers.toBeHex(n), 32);

const getStorageValues = async () => {
  const values = await provider.send("eth_getStorageValues", [
    {
      "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": [slot(0), slot(1), slot(2)],
    },
    "latest",
  ]);
  console.log(values);
};

getStorageValues();
```

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

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

def slot(n):
    return "0x" + format(n, "064x")

response = w3.provider.make_request("eth_getStorageValues", [
    {
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": [slot(0), slot(1), slot(2)],
    },
    "latest",
])
print(response["result"])
```

## Use case

One use case for `eth_getStorageValues` is reading a consistent snapshot of several contracts' internal state. All slots come from the same block in one round trip, so a monitoring service that tracks owners, balances, or configuration slots across many contracts avoids both the request overhead of separate `eth_getStorageAt` calls and the risk of reading different slots at different blocks.


## OpenAPI

````yaml openapi/ethereum_node_api/accounts_info/eth_getStorageValues.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_getStorageValues
      operationId: getStorageValues
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  default: eth_getStorageValues
                params:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        title: Slots by contract
                        description: >-
                          An object that maps each contract address to an array
                          of 32-byte storage slot keys. Up to 1,024 slots in
                          total per request.
                        additionalProperties:
                          type: array
                          items:
                            type: string
                      - type: string
                        title: Block ID
                        description: The block number or tag to use as a reference.
                  default:
                    - '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2':
                        - >-
                          0x0000000000000000000000000000000000000000000000000000000000000000
                        - >-
                          0x0000000000000000000000000000000000000000000000000000000000000001
                        - >-
                          0x0000000000000000000000000000000000000000000000000000000000000002
                    - latest
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
      responses:
        '200':
          description: >-
            The storage values for each requested contract, in the order of the
            requested slots.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    description: >-
                      An object that maps each contract address (lowercase) to
                      an array of 32-byte storage values, in the order of the
                      requested slots.
                    additionalProperties:
                      type: array
                      items:
                        type: string

````