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
key1
AccountId key1 (AccountId) (hex -> SS58)

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

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 StakingColdkeys storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("StakingColdkeys")](
  key1
);

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

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
v393