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 → v265, v273 → v377 (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

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)

Stored Value

value ((u32, AccountId))

Relationships

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query ColdkeySwapScheduled storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("ColdkeySwapScheduled")](
  key1
);

console.log("ColdkeySwapScheduled:", result.toHuman());

Version History

v195 block 3,791,350 Added
v273 block 5,659,032 Re-added
v377 Removed

Runtime Info

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