LastHotkeySwapOnNetuid
Storage Map v276 → currentBlock of last hotkey swap on a subnet .
Explore chainQueried by: validatorsdevelopers
The Big Picture
Hotkey swaps on subnets are rate-limited. This tracks when the last swap occurred, enabling cooldown calculations and preventing spam swaps.
Use Cases
- Check swap cooldowns
- Plan hotkey operations
- Debug rate limit errors
From Chain Metadata
DMap ( netuid, coldkey ) --> blocknumber | last hotkey swap on network.
Purpose & Usage
Purpose
Track hotkey swap timing for rate limiting.
Common Query Patterns
- Query by (hotkey, netuid)
Query Keys
Stored Value
Relationships
Modified By
Related Events
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 LastHotkeySwapOnNetuid storage
const key1 = 0;
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("LastHotkeySwapOnNetuid")](
key1,
key2
);
console.log("LastHotkeySwapOnNetuid:", result.toHuman());Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v276
- Current Version
- v393