Queried by: developerswalletsanalytics
The Big Picture
Freezes are balance locks that may overlap with other locks. Unlike reserves which set aside specific amounts, freezes mark portions of free balance as non-transferable. Used for staking, governance, and other temporary locks.
Use Cases
- Debug why balance appears locked
- Track frozen amounts by reason
- Build freeze analytics dashboards
From Chain Metadata
Freeze locks on account balances.
Purpose & Usage
Purpose
Track funds frozen for various reasons like staking or governance.
Common Query Patterns
- Query by account address
- List all freezes for an account
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 | AccountId | key1 (AccountId) (hex -> SS58) |
Stored Value
value (BoundedVec)
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 Freezes storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query
[stringCamelCase("Balances")]
[stringCamelCase("Freezes")](
key1
);
console.log("Freezes:", result.toHuman());Runtime Info
- Pallet
- Balances
- Storage Kind
- Map
- First Version
- v149
- Current Version
- v393