HotkeySuccessor

Storage Map v437 → current

DMap ( netuid , old_hotkey ) --> new_hotkey | hotkey swap successor on a subnet .

Explore chain

From Chain Metadata

DMap ( netuid, old_hotkey ) --> new_hotkey | hotkey swap successor on a subnet. Written on each successful hotkey swap so watchers can follow identity without an archive node. Per-subnet because a swap may move a UID on one netuid while the old hotkey remains registered elsewhere.

Purpose & Usage

Common Query Patterns

  • Query by key
  • Iterate all entries

Query Keys

#NameTypeDescription
1
key1
NetUid key1 (NetUid)
2
key2
AccountId key2 (AccountId) (hex -> SS58)

Stored Value

value (AccountId)

hex -> SS58

Default Value

None (absent keys return no value)

Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.

Code Examples

// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 HotkeySuccessor storage
const key1 = undefined as any /* NetUid — replace with real value */;
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

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

On-Chain Activity

Write Frequency
●●●●○○ Medium 100K–1M est. writes

100K to 1M writes

#192 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v437
Current Version
v490