Balances::Event

Variant 36 v393

pallet_balances::pallet::Event

The `Event` enum of this pallet

About This Type

Event enum for the Event pallet.

Contains all possible events emitted by the Event pallet. Each variant represents a different event type with its own data fields.

Variants (22)

IndexNameFieldsDocs
0Endowed
account: AccountId
free_balance: u64
An account was created with some free balance.
1DustLost
account: AccountId
amount: u64
An account was removed whose balance was non-zero but below ExistentialDeposit, resulting in an outright loss.
2Transfer
from: AccountId
amount: u64
Transfer succeeded.
3BalanceSet
free: u64
A balance was set by root.
4Reserved
amount: u64
Some balance was reserved (moved from free to reserved).
5Unreserved
amount: u64
Some balance was unreserved (moved from reserved to free).
6ReserveRepatriated
from: AccountId
amount: u64
destination_status: BalanceStatus
Some balance was moved from the reserve of the first account to the second account. Final argument indicates the destination balance type.
7Deposit
amount: u64
Some amount was deposited (e.g. for transaction fees).
8Withdraw
amount: u64
Some amount was withdrawn from the account (e.g. for transaction fees).
9Slashed
amount: u64
Some amount was removed from the account (e.g. for misbehavior).
10Minted
amount: u64
Some amount was minted into an account.
11Burned
amount: u64
Some amount was burned from an account.
12Suspended
amount: u64
Some amount was suspended from an account (it can be restored later).
13Restored
amount: u64
Some amount was restored into an account.
14UpgradedAn account was upgraded.
15Issued
amount: u64
Total issuance was increased by `amount`, creating a credit to be balanced.
16Rescinded
amount: u64
Total issuance was decreased by `amount`, creating a debt to be balanced.
17Locked
amount: u64
Some balance was locked.
18Unlocked
amount: u64
Some balance was unlocked.
19Frozen
amount: u64
Some balance was frozen.
20Thawed
amount: u64
Some balance was thawed.
21TotalIssuanceForced
old: u64
new: u64
The `TotalIssuance` was forcefully changed.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 22 possible variants.
Size
variable (1+ bytes)

Examples

Endowed = Endowed(account, free_balance)
0x00<field0><field1>
00 Variant index 0 = Endowed
field 0 account: AccountId
field 1 free_balance: u64
DustLost = DustLost(account, amount)
0x01<field0><field1>
01 Variant index 1 = DustLost
field 0 account: AccountId
field 1 amount: u64
Transfer = Transfer(from, to, amount)
0x02<field0><field1><field2>
02 Variant index 2 = Transfer
field 0 from: AccountId
field 1 to: AccountId
field 2 amount: u64

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode Balances::Event — variant "Endowed"
const value = registry.createType("Balances::Event", { Endowed: { account: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", free_balance: 1_000_000_000n } });
console.log("Hex:", value.toHex());

Type Parameters

T
I

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
36
Kind
Variant
Path
pallet_balances::pallet::Event
Runtime
v393