This storage item was removed in v377

This storage item is no longer available in the current runtime. Existed from v195 to v377. Shown here for historical reference.

ColdkeySwapScheduled

Storage Removed Map v195 → v411 · 1 shape change

REMOVED. Scheduled coldkey swaps pending execution.

Queried by: walletsstakersvalidatorsdevelopers

The Big Picture

Coldkey swaps allow you to transfer all assets (stake, hotkeys, balances) to a new coldkey. This is essential for key rotation and security upgrades. The swap is scheduled, not instant - this delay gives you time to detect and dispute unauthorized swaps. This storage tracks pending swaps.

Why This Matters

Did someone schedule a swap on your coldkey? This could be you rotating keys, or an attacker. Checking this storage lets you detect unauthorized swap attempts during the arbitration window.

Example Scenario

Query ColdkeySwapScheduled(coldkey=your_address). If true, a swap is pending. Check ColdkeySwapDestinations to see where it's going and ColdkeyArbitrationBlock for when it executes.

Common Questions

How do I cancel an unauthorized swap?
Enter arbitration to dispute the swap. The protocol has mechanisms to handle contested swaps. Act quickly - you only have the arbitration period to respond.
Why is there a delay?
Security. If your key is compromised, the delay gives you time to notice and dispute before assets are permanently transferred. Instant swaps would be catastrophic for key theft.
Can I swap to any address?
Yes, you specify the destination when scheduling. The destination doesn't need to approve - they just receive the assets when the swap executes.

Use Cases

  • Check if your coldkey has a pending swap
  • Verify legitimate key rotations are in progress
  • Detect unauthorized swap attempts for security alerts
  • Build wallet security dashboards
  • Monitor high-value accounts for swap activity

From Chain Metadata

DMAP ( cold ) --> (block_expected, new_coldkey), Maps coldkey to the block to swap at and new coldkey.

Purpose & Usage

Purpose

Track pending coldkey ownership transfers - allows secure key rotation with time delay.

Common Query Patterns

  • Check if coldkey has pending swap
  • Query destination of scheduled swap
  • Monitor for swap attacks

Migration Notes

v265 v273 Breaking

value type changed from () to (u32, AccountId)

Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.

Query Keys

#NameTypeDescription
1
cold
[u8; 32] [32] cold ([u8; 32], hashed key component)

Stored Value

(block_expected, ((u32, AccountId))

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 ColdkeySwapScheduled storage
const cold = "0x0000000000000000000000000000000000000000000000000000000000000000";

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

Version History

v195 block 3,791,350 Added
v266–v272 · runtime versions skipped on chain (never deployed)
v273 block 5,659,032 Shape changed
  • value : ()(u32, AccountId)
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind
v307–v314 · runtime versions skipped on chain (never deployed)
v315 block 6,414,634 Internal re-bind
v316–v319 · runtime versions skipped on chain (never deployed)
v320 block 6,523,566 Internal re-bind
v327–v333 · runtime versions skipped on chain (never deployed)
v334 block 6,811,690 Internal re-bind
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind
v363–v364 · runtime versions skipped on chain (never deployed)
v365 block 7,135,419 Internal re-bind
v377 Removed

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v195
Removed In
v377