LastColdkeyHotkeyStakeBlock
Storage Map v238 → currentBlock when stake was last added/removed for a coldkey -hotkey pair.
Explore chainQueried by: developersstakers
The Big Picture
Staking operations may be rate-limited. This tracks the last block when stake changed for each coldkey-hotkey pair, enabling rate limit calculations.
Use Cases
- Check staking cooldowns
- Debug rate limit errors
- Build staking timing tools
From Chain Metadata
Map (coldkey, hotkey) --> u64 the last block at which stake was added/removed.
Purpose & Usage
Purpose
Track staking activity timing for rate limiting.
Common Query Patterns
- Query by (coldkey, hotkey)
Query Keys
Stored Value
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 LastColdkeyHotkeyStakeBlock storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("LastColdkeyHotkeyStakeBlock")](
key1,
key2
);
console.log("LastColdkeyHotkeyStakeBlock:", result.toHuman());Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v238
- Current Version
- v393