StakingColdkeys

Storage Map v334 → current

Reverse index mapping coldkey to its position.

Explore chain
Queried by: analyticsdevelopers

The Big Picture

Reverse lookup for the StakingColdkeysByIndex storage. Together they enable efficient bidirectional access to the set of staking coldkeys.

Use Cases

  • Check if coldkey is in staking set
  • Get coldkey's index position

Purpose & Usage

Purpose

Lookup a coldkey's position in the staking index.

Common Query Patterns

  • Query by coldkey address

Query Keys

#NameTypeDescription
1
coldkey coldkey
raw: key1
[u8; 32] [32] key1 ([u8; 32])

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

Relationships

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 StakingColdkeys storage
const key1 = "0x0000000000000000000000000000000000000000000000000000000000000000";

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

On-Chain Activity

Write Frequency
●●●●●● Ultra-High >10M est. writes

>10M estimated writes

#7 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v334
Current Version
v411