ColdkeySwapReservedDestination
Storage Map v482 → currentReverse index of ColdkeySwapDestinationReservations. MAP (announcer coldkey ) → reserved destination.
Explore chainThe Big Picture
For a V2 announcement this is where the destination is in cleartext. ColdkeySwapAnnouncements holds only the commitment hash.
Why This Matters
An indexer that wants the destination of a pending V2 swap reads it here; the announcement hash cannot be inverted.
Example Scenario
ColdkeySwapReservedDestination(A) returns B, and ColdkeySwapDestinationReservations(B) returns A. Both rows agreeing is what a release and the execute-time snapshot check require.
Use Cases
- Show the destination of a pending V2 coldkey swap
- Pair announcements with their reserved destinations in an indexer
From Chain Metadata
Reverse index of [`ColdkeySwapDestinationReservations`]: announcer → reserved destination, so reannounce / clear / execute can free the prior reservation without scanning.
Purpose & Usage
Purpose
Let reannounce, clear, reset and execute free an announcer prior reservation without scanning the forward map.
Common Query Patterns
- Query by announcing coldkey to read the cleartext destination of its V2 announcement
Notes
- First appears at runtime v482. Twox64Concat AccountId → AccountId, OptionQuery (lib.rs L1975 at 8cf229f8e).
- release_coldkey_swap_destination_reservation takes this entry and removes the forward row only when it still points back at the announcer.
- swap_coldkey_announced reads it for a V2 announcement: the destination-balance exemption in the policy snapshot holds only while both maps still name the same pair and the hold has not expired.
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | announcer coldkey raw: key1 | AccountId [u8; 32] | key1 (AccountId) (hex -> SS58) |
Stored Value
value (AccountId)
hex -> SS58
Default Value
Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.
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 ColdkeySwapReservedDestination storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.SubtensorModule.ColdkeySwapReservedDestination.getValue(key1);
console.log("ColdkeySwapReservedDestination:", result);On-Chain Activity
Fewer than 10K writes
#387 most written storage item
Modified via user-submitted extrinsics
As of block 9,385,000
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v482
- Current Version
- v490