Balances pallet
Derived from live runtime metadata on TRN root (pallet index 5, captured 2026-05-02). For prose-style documentation see Balances on the curated reference side.
- Pallet index
5- Calls
- 9
- Events
- 21
- Errors
- 10
- Storage items
- 7
- Constants
- 5
Calls (extrinsics)
Balances.transfer_allow_death
See [
Pallet::transfer_allow_death].
api.tx.balances.transfer_allow_death(dest: [u8;20], value: Compact<u128>)| Argument | Type | Doc |
|---|---|---|
dest | [u8;20] | AccountIdLookupOf<T> |
value | Compact<u128> | T::Balance |
Call index: 0
Balances.set_balance_deprecated
See [
Pallet::set_balance_deprecated].
api.tx.balances.set_balance_deprecated(who: [u8;20], new_free: Compact<u128>, old_reserved: Compact<u128>)| Argument | Type | Doc |
|---|---|---|
who | [u8;20] | AccountIdLookupOf<T> |
new_free | Compact<u128> | T::Balance |
old_reserved | Compact<u128> | T::Balance |
Call index: 1
Balances.force_transfer
See [
Pallet::force_transfer].
api.tx.balances.force_transfer(source: [u8;20], dest: [u8;20], value: Compact<u128>)| Argument | Type | Doc |
|---|---|---|
source | [u8;20] | AccountIdLookupOf<T> |
dest | [u8;20] | AccountIdLookupOf<T> |
value | Compact<u128> | T::Balance |
Call index: 2
Balances.transfer_keep_alive
See [
Pallet::transfer_keep_alive].
api.tx.balances.transfer_keep_alive(dest: [u8;20], value: Compact<u128>)| Argument | Type | Doc |
|---|---|---|
dest | [u8;20] | AccountIdLookupOf<T> |
value | Compact<u128> | T::Balance |
Call index: 3
Balances.transfer_all
See [
Pallet::transfer_all].
api.tx.balances.transfer_all(dest: [u8;20], keep_alive: bool)| Argument | Type | Doc |
|---|---|---|
dest | [u8;20] | AccountIdLookupOf<T> |
keep_alive | bool | bool |
Call index: 4
Balances.force_unreserve
See [
Pallet::force_unreserve].
api.tx.balances.force_unreserve(who: [u8;20], amount: u128)| Argument | Type | Doc |
|---|---|---|
who | [u8;20] | AccountIdLookupOf<T> |
amount | u128 | T::Balance |
Call index: 5
Balances.upgrade_accounts
See [
Pallet::upgrade_accounts].
api.tx.balances.upgrade_accounts(who: Vec<SeedPrimitivesSignatureAccountId20>)| Argument | Type | Doc |
|---|---|---|
who | Vec<SeedPrimitivesSignatureAccountId20> | Vec<T::AccountId> |
Call index: 6
Balances.transfer
See [
Pallet::transfer].
api.tx.balances.transfer(dest: [u8;20], value: Compact<u128>)| Argument | Type | Doc |
|---|---|---|
dest | [u8;20] | AccountIdLookupOf<T> |
value | Compact<u128> | T::Balance |
Call index: 7
Balances.force_set_balance
See [
Pallet::force_set_balance].
api.tx.balances.force_set_balance(who: [u8;20], new_free: Compact<u128>)| Argument | Type | Doc |
|---|---|---|
who | [u8;20] | AccountIdLookupOf<T> |
new_free | Compact<u128> | T::Balance |
Call index: 8
Events
Balances.Endowed
An account was created with some free balance.
| Field | Type | Doc |
|---|---|---|
account | [u8;20] | |
free_balance | u128 |
Balances.DustLost
An account was removed whose balance was non-zero but below ExistentialDeposit, resulting in an outright loss.
| Field | Type | Doc |
|---|---|---|
account | [u8;20] | |
amount | u128 |
Balances.Transfer
Transfer succeeded.
| Field | Type | Doc |
|---|---|---|
from | [u8;20] | |
to | [u8;20] | |
amount | u128 |
Balances.BalanceSet
A balance was set by root.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
free | u128 |
Balances.Reserved
Some balance was reserved (moved from free to reserved).
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Unreserved
Some balance was unreserved (moved from reserved to free).
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.ReserveRepatriated
Some balance was moved from the reserve of the first account to the second account. Final argument indicates the destination balance type.
| Field | Type | Doc |
|---|---|---|
from | [u8;20] | |
to | [u8;20] | |
amount | u128 | |
destination_status | {"_enum":["Free","Reserved"]} |
Balances.Deposit
Some amount was deposited (e.g. for transaction fees).
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Withdraw
Some amount was withdrawn from the account (e.g. for transaction fees).
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Slashed
Some amount was removed from the account (e.g. for misbehavior).
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Minted
Some amount was minted into an account.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Burned
Some amount was burned from an account.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Suspended
Some amount was suspended from an account (it can be restored later).
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Restored
Some amount was restored into an account.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Upgraded
An account was upgraded.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] |
Balances.Issued
Total issuance was increased by
amount, creating a credit to be balanced.
| Field | Type | Doc |
|---|---|---|
amount | u128 |
Balances.Rescinded
Total issuance was decreased by
amount, creating a debt to be balanced.
| Field | Type | Doc |
|---|---|---|
amount | u128 |
Balances.Locked
Some balance was locked.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Unlocked
Some balance was unlocked.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Frozen
Some balance was frozen.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Balances.Thawed
Some balance was thawed.
| Field | Type | Doc |
|---|---|---|
who | [u8;20] | |
amount | u128 |
Errors
Balances.VestingBalance
Vesting balance too high to send value.
Balances.LiquidityRestrictions
Account liquidity restrictions prevent withdrawal.
Balances.InsufficientBalance
Balance too low to send value.
Balances.ExistentialDeposit
Value too low to create account due to existential deposit.
Balances.Expendability
Transfer/payment would kill account.
Balances.ExistingVestingSchedule
A vesting schedule already exists for this account.
Balances.DeadAccount
Beneficiary account must pre-exist.
Balances.TooManyReserves
Number of named reserves exceed
MaxReserves.
Balances.TooManyHolds
Number of holds exceed
MaxHolds.
Balances.TooManyFreezes
Number of freezes exceed
MaxFreezes.
Storage
Balances.TotalIssuance
The total units issued in the system.
await api.query.balances.totalIssuance()Returns: u128
Modifier: Default
Balances.InactiveIssuance
The total units of outstanding deactivated balance in the system.
await api.query.balances.inactiveIssuance()Returns: u128
Modifier: Default
Balances.Account
The Balances pallet example of storing the balance of an account. # Example
nocompile impl pallet_balances::Config for Runtime { type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>> }You can also store the balance of an account in theSystempallet. # Examplenocompile impl pallet_balances::Config for Runtime { type AccountStore = System }But this comes with tradeoffs, storing account balances in the system pallet storesframe_systemdata alongside the account data contrary to storing account balances in theBalancespallet, which uses aStorageMapto store balances data only. NOTE: This is only used in the case that this pallet is used to store balances.
await api.query.balances.account(key1)- Key:
[u8;20](hasher: Blake2_128Concat) - Returns:
{"free":"u128","reserved":"u128","frozen":"u128","flags":"u128"}
Modifier: Default
Balances.Locks
Any liquidity locks on some account balances. NOTE: Should only be accessed when setting, changing and freeing a lock.
await api.query.balances.locks(key1)- Key:
[u8;20](hasher: Blake2_128Concat) - Returns:
Vec<PalletBalancesBalanceLock>
Modifier: Default
Balances.Reserves
Named reserves on some account balances.
await api.query.balances.reserves(key1)- Key:
[u8;20](hasher: Blake2_128Concat) - Returns:
Vec<PalletBalancesReserveData>
Modifier: Default
Balances.Holds
Holds on account balances.
await api.query.balances.holds(key1)- Key:
[u8;20](hasher: Blake2_128Concat) - Returns:
Vec<PalletBalancesIdAmount>
Modifier: Default
Balances.Freezes
Freeze locks on account balances.
await api.query.balances.freezes(key1)- Key:
[u8;20](hasher: Blake2_128Concat) - Returns:
Vec<PalletBalancesIdAmount>
Modifier: Default
Constants
Balances.ExistentialDeposit
The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! If you really need it to be zero, you can enable the feature
insecure_zero_edfor this pallet. However, you do so at your own risk: this will open up a major DoS vector. In case you have multiple sources of provider references, you may also get unexpected behaviour if you set this to zero. Bottom line: Do yourself a favour and make it at least one!
Type: u128
SCALE-encoded value: 0x01000000000000000000000000000000
Balances.MaxLocks
The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation.
Type: u32
SCALE-encoded value: 0x32000000
Balances.MaxReserves
The maximum number of named reserves that can exist on an account.
Type: u32
SCALE-encoded value: 0x32000000
Balances.MaxHolds
The maximum number of holds that can exist on an account at any time.
Type: u32
SCALE-encoded value: 0x00000000
Balances.MaxFreezes
The maximum number of individual freeze locks that can exist on an account at any time.
Type: u32
SCALE-encoded value: 0x00000000
wss://root.rootnet.live/archive/ws · captured 2026-05-02