force_set_balance
Call v149 → current #8Sets an account balance to a specific value (root only).
View calls on chainCall Workflow
This diagram shows the call execution flow: starting with force_set_balance, passing through validation
(signature, nonce, mortality, fee payment), then pre-dispatch checks, followed by dispatch which emits events: BalanceSet and modifies storage: Account, TotalIssuance, and finally post-dispatch where ExtrinsicSuccess is emitted and fees are settled.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Click items to navigate. Pan and zoom to explore.
Used by: validators
The Big Picture
A root-only escape hatch to directly set an account balance. Used in emergencies when normal transfer mechanisms cannot fix a problem.
Use Cases
- Emergency balance corrections
- Genesis state setup
- Recovery from bugs
From Chain Metadata
See [`Pallet::force_set_balance`].
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | who | MultiAddress | who (MultiAddress) |
| 1 | new_free | Compact<u64> Cpt | new_free (Compact<u64>) (SCALE compact -> integer) |
Permissions
Origin
Unknown
Required Role
Permission data inferred from metadata. May be incomplete.
Requirements
- Caller is root account
- Target account specified
Effects
Events Emitted
Storage Modified
Postconditions
- Target account free balance set to new_free
- BalanceSet event emitted
Side Effects
- May create account if it did not exist
- May affect TotalIssuance
- Bypasses normal transfer checks
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 });
// Build force_set_balance call
const who = 0 as any /* MultiAddress */;
const new_free = 0;
const call = api.tx[stringCamelCase("Balances")][stringCamelCase("force_set_balance")](
who,
new_free
);Runtime Info
- Pallet Index
- 5
- Call Index
- 8
- First Version
- v149
- Current Version
- v393