This storage item was removed in v385

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 → v490 · 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

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
key1
AccountId [u8; 32]key1 (AccountId) (hex -> SS58)

Stored Value

value ((u32, AccountId))

Default Value

0x000000000000000000000000000000000000000000000000000000000000000000000000 (raw SCALE bytes)

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Default changed

  • v195 → 0x
  • v273 → 0x000000000000000000000000000000000000000000000000000000000000000000000000 Current

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

const result = await api.query.SubtensorModule.ColdkeySwapScheduled.getValue(key1);
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)
v385 Removed

Runtime Info

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