AccountFlags

Storage Map v421 → current

MAP ( coldkey ) --> flags | Account-level flags. Defaults to zero.

Explore chain

From Chain Metadata

MAP ( coldkey ) --> flags | Account-level flags. Defaults to zero.

Purpose & Usage

Purpose

Stores chain state data.

Common Query Patterns

  • Single value query for aggregate data

Query Keys

#NameTypeDescription
1
coldkey
AccountId [u8; 32]coldkey (AccountId, hashed key component) (hex -> SS58)

Stored Value

flags (u128)

RAO -> TAO (/ 10^9)

Default Value

0 0x00000000000000000000000000000000

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

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 AccountFlags storage
const coldkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query.SubtensorModule.AccountFlags.getValue(coldkey);
console.log("AccountFlags:", result);

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v421
Current Version
v472