BasketTradingFrozen
Storage Map v464 → currentValidator hotkeys whose basket trading governance has frozen.
Explore chainThe Big Picture
The second gate in do_swap_basket (staking/basket_trade.rs at v467).
Why This Matters
Holders of a frozen fund keep every right except having its composition changed.
Example Scenario
Hotkey H is inserted after a compromise report. swap_basket for H fails until root removes it.
Use Cases
- Explain BasketTradingFrozen on a swap_basket attempt
- List funds under a governance freeze
From Chain Metadata
SET ( validator_hotkey ) --> basket trading frozen for this fund. Per-fund kill switch set by governance (`AdminUtils::sudo_set_basket_trading_frozen`), e.g. after a suspected key compromise. A frozen fund still accepts deposits and pays claims; only `swap_basket` is refused. Follows the fund on hotkey swap.
Purpose & Usage
Purpose
Per-fund kill switch, for example after a suspected key compromise.
Common Query Patterns
- Query a hotkey before submitting swap_basket
- Presence means frozen; the value is unit
Notes
- First appears at runtime v464.
- Inserted and removed by sudo_set_basket_trading_frozen; the change emits BasketTradingFrozenSet.
- A frozen fund still accepts deposits and pays claims. The flag follows the fund on hotkey swap.
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 | AccountId [u8; 32] | key1 (AccountId) (hex -> SS58) |
Stored Value
value (())
Default Value
Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.
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 BasketTradingFrozen storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.SubtensorModule.BasketTradingFrozen.getValue(key1);
console.log("BasketTradingFrozen:", result);Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v464
- Current Version
- v472