Suspended
Event v149 → v424, v432 → current #12Emitted when balance is suspended from an account (can be restored later).
View events on chainUseful for: developersanalyticswallets
The Big Picture
Suspension temporarily removes balance from an account without destroying it. Unlike burning or slashing, suspended balance can be restored later. This is useful for operations that may need to be reversed, like pending transactions or dispute resolution. The Restored event indicates when suspended funds are returned.
Use Cases
- Track temporary balance holds
- Monitor pending operations that may be reversed
- Build balance state tracking tools
From Chain Metadata
Some amount was suspended from an account (it can be restored later).
Migration Notes
v424 v432 Breaking
amount changed from u64 to TaoBalance
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Triggers
Preconditions
- Account has sufficient balance
- Suspension operation authorized
Effects
Postconditions
- Account balance decreased by suspended amount
Side Effects
- Balance is held but not destroyed - can be restored
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | who | AccountId | who: Account address (32 bytes, SS58-encoded) (hex -> SS58) |
| 1 | amount | TaoBalance T::Balance | amount: Balance in chain native currency (RAO for TAO; ÷10⁹) |
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);
// Subscribe to Suspended events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Balances.Suspended.get(block.hash);
for (const evt of events) {
console.log("Suspended:", evt.payload);
}
});Version History
v149 block 3,014,339 2 args
v432 block 8,636,190 2 args Current
Runtime Info
- Pallet Index
- 5
- Event Index
- 12
- First Version
- v149
- Current Version
- v490