eth_getStorageValues
curl --request POST \
--url https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"method": "eth_getStorageValues",
"params": [
{
"0x55d398326f99059fF775485246999027B3197955": [
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000003"
],
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
}
'import requests
url = "https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"method": "eth_getStorageValues",
"params": [
{
"0x55d398326f99059fF775485246999027B3197955": ["0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000003"],
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82": ["0x0000000000000000000000000000000000000000000000000000000000000000"]
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'eth_getStorageValues',
params: [
{
'0x55d398326f99059fF775485246999027B3197955': [
'0x0000000000000000000000000000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000000000000000000000000000003'
],
'0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82': ['0x0000000000000000000000000000000000000000000000000000000000000000']
},
'latest'
],
id: 1,
jsonrpc: '2.0'
})
};
fetch('https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'eth_getStorageValues',
'params' => [
[
'0x55d398326f99059fF775485246999027B3197955' => [
'0x0000000000000000000000000000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000000000000000000000000000003'
],
'0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82' => [
'0x0000000000000000000000000000000000000000000000000000000000000000'
]
],
'latest'
],
'id' => 1,
'jsonrpc' => '2.0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"method\": \"eth_getStorageValues\",\n \"params\": [\n {\n \"0x55d398326f99059fF775485246999027B3197955\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"0x0000000000000000000000000000000000000000000000000000000000000003\"\n ],\n \"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ]\n },\n \"latest\"\n ],\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\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))
}HttpResponse<String> response = Unirest.post("https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"eth_getStorageValues\",\n \"params\": [\n {\n \"0x55d398326f99059fF775485246999027B3197955\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"0x0000000000000000000000000000000000000000000000000000000000000003\"\n ],\n \"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ]\n },\n \"latest\"\n ],\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"eth_getStorageValues\",\n \"params\": [\n {\n \"0x55d398326f99059fF775485246999027B3197955\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"0x0000000000000000000000000000000000000000000000000000000000000003\"\n ],\n \"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ]\n },\n \"latest\"\n ],\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}BNB node API
eth_getStorageValues | BNB Chain
BNB 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 BNB Chain via Chainstack.
POST
/
mt_c524ad9781ae5dccd9ac6f5b0370e
eth_getStorageValues
curl --request POST \
--url https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e \
--header 'Content-Type: application/json' \
--data '
{
"method": "eth_getStorageValues",
"params": [
{
"0x55d398326f99059fF775485246999027B3197955": [
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000003"
],
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
}
'import requests
url = "https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload = {
"method": "eth_getStorageValues",
"params": [
{
"0x55d398326f99059fF775485246999027B3197955": ["0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000003"],
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82": ["0x0000000000000000000000000000000000000000000000000000000000000000"]
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'eth_getStorageValues',
params: [
{
'0x55d398326f99059fF775485246999027B3197955': [
'0x0000000000000000000000000000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000000000000000000000000000003'
],
'0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82': ['0x0000000000000000000000000000000000000000000000000000000000000000']
},
'latest'
],
id: 1,
jsonrpc: '2.0'
})
};
fetch('https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'eth_getStorageValues',
'params' => [
[
'0x55d398326f99059fF775485246999027B3197955' => [
'0x0000000000000000000000000000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000000000000000000000000000003'
],
'0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82' => [
'0x0000000000000000000000000000000000000000000000000000000000000000'
]
],
'latest'
],
'id' => 1,
'jsonrpc' => '2.0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e"
payload := strings.NewReader("{\n \"method\": \"eth_getStorageValues\",\n \"params\": [\n {\n \"0x55d398326f99059fF775485246999027B3197955\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"0x0000000000000000000000000000000000000000000000000000000000000003\"\n ],\n \"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ]\n },\n \"latest\"\n ],\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\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))
}HttpResponse<String> response = Unirest.post("https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"eth_getStorageValues\",\n \"params\": [\n {\n \"0x55d398326f99059fF775485246999027B3197955\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"0x0000000000000000000000000000000000000000000000000000000000000003\"\n ],\n \"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ]\n },\n \"latest\"\n ],\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://bsc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"eth_getStorageValues\",\n \"params\": [\n {\n \"0x55d398326f99059fF775485246999027B3197955\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"0x0000000000000000000000000000000000000000000000000000000000000003\"\n ],\n \"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82\": [\n \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n ]\n },\n \"latest\"\n ],\n \"id\": 1,\n \"jsonrpc\": \"2.0\"\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}BNB 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 requests when you read several slots at the same block, for example to snapshot a contract’s state.
The examples read slots
On BNB Smart Chain 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 to read older state.Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
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 as0x0000000000000000000000000000000000000000000000000000000000000001; a short form such as0x1is rejected. A request can include up to 1,024 slots in total. -
quantity or tag— the integer of a block encoded as hexadecimal or the string with:latest— the most recent block in the blockchain and the current state of the blockchain at the most recent block. A chain reorganization is to be expected.safe— the latest justified block. Under BSC fast finality, a block becomes justified when more than two-thirds of the validators vote for it and its direct child carries their attestation in its header, sosafeusually trailslatestby a block or two.finalized— the latest finalized block: a justified block whose direct child is also justified. Two conflicting blocks can both reach finality only if one-third or more of the validators violate the voting rules.pending— the pending state and transactions block. The current state of transactions that have been broadcast to the network but have not yet been included in a block.
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 and 3 of the Binance-Peg BSC-USD (USDT) contract and slot 0 of the CAKE token contract in one call.
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", [
{
"0x55d398326f99059fF775485246999027B3197955": [slot(0), slot(3)],
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82": [slot(0)],
},
"latest",
]);
console.log(values);
};
getStorageValues();
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", [
{
"0x55d398326f99059fF775485246999027B3197955": [slot(0), slot(3)],
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82": [slot(0)],
},
"latest",
])
print(response["result"])
Use case
One use case foreth_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.Body
application/json
Last modified on November 13, 2026
Was this page helpful?