Account

Storage Map v101 → current

Core account data including nonce, providers, and consumers.

Explore chain
Queried by: developerswalletsanalytics

The Big Picture

Every account on Subtensor has an entry here. Different from Balances.Account which tracks balance.

Use Cases

  • Get account nonce before signing
  • Check if account exists on-chain

From Chain Metadata

The full account information for a particular account ID.

Purpose & Usage

Purpose

Tracks account existence, reference counting, and transaction nonce.

Common Query Patterns

  • Query by account address
  • Get nonce for transaction signing
  • Check if account exists
Part of: Stake Operations

Query Keys

#NameTypeDescription
1
accountId account
raw: key1
AccountId [u8; 32]Account address (hex -> SS58)

Stored Value

Account data (nonce, balances, locks)

Default Value

0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 (raw SCALE bytes)

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Default changed

  • v101 → 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  • v149 → 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 Current

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Query Account storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query.System.Account.getValue(key1);
console.log("Account:", result);

Runtime Info

Pallet
System
Storage Kind
Map
First Version
v101
Current Version
v472