AccountStorages

Storage Map v210 → current

Per-contract storage slots (key-value pairs).

Explore chain
Queried by: developersanalytics

The Big Picture

Smart contract state - variables, mappings, arrays - all live here. Each contract has its own storage namespace identified by 256-bit slots. This is the persistent memory of the EVM.

Use Cases

  • Read contract state
  • Debug contract storage
  • Build storage explorers
  • Verify contract state transitions

Purpose & Usage

Purpose

Stores all persistent state for each smart contract.

Common Query Patterns

  • Query by (contract address, storage slot)
  • Iterate contract storage

Query Keys

#NameTypeDescription
1
key1
H160 key1 (H160)
2
key2
H256 key2 (H256)

Stored Value

value (H256)

Relationships

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query AccountStorages storage
const key1 = 0 as any /* H160 */;
const key2 = 0 as any /* H256 */;

const result = await api.query
  [stringCamelCase("EVM")]
  [stringCamelCase("AccountStorages")](
  key1,
  key2
);

console.log("AccountStorages:", result.toHuman());

Runtime Info

Pallet
EVM
Storage Kind
Map
First Version
v210
Current Version
v393