ColdkeySwapAnnouncements
Storage Map v385 → v411Per-coldkey announcement of a pending coldkey swap (block + extrinsic hash).
Explore chainQueried by: walletsanalyticsdevelopers
The Big Picture
Part of the coldkey swap arbitration flow. When a coldkey announces a swap, this stores the announcement block; if no dispute lands within the schedule duration, the swap proceeds.
From Chain Metadata
A map of the coldkey swap announcements from a coldkey to the block number the coldkey swap can be performed.
Purpose & Usage
Purpose
Records the block at which a coldkey announced its intent to swap, plus the hash for dispute lookup.
Common Query Patterns
- Query by coldkey to see pending swap
- Iterate to find all pending swaps
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | coldkey coldkey raw: key1 | [u8; 32] [32] | Source coldkey AccountId32 — the coldkey that announced the upcoming swap. |
Stored Value
- .0 execution_block — Block number at which the coldkey swap CAN be performed (future block). The storage docstring says "the block number the coldkey swap can be performed." Empirically verified at v411: chain values exceed current block height. Migration site stores (when - delay) but `when` here is computed AHEAD of current execution, so the result is still future-relative.
- .1 destination_coldkey_hash — Hash of the destination (new) coldkey: Hashing::hash_of(&new_coldkey). T::Hash is H256 on subtensor. NOT a call hash — directly hashes the AccountId32.
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 ColdkeySwapAnnouncements storage
const key1 = "0x0000000000000000000000000000000000000000000000000000000000000000";
const result = await api.query.SubtensorModule.ColdkeySwapAnnouncements.getValue(key1);
console.log("ColdkeySwapAnnouncements:", result);Version History
v385 block 7,782,670 Added
v386–v390 · runtime versions skipped on chain (never deployed)
v391 block 7,782,857 Internal re-bind
v394–v400 · runtime versions skipped on chain (never deployed)
v401 block 8,036,576 Internal re-bind Current
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v385
- Current Version
- v411