Balances::Call

Variant 137 v393

pallet_balances::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (9)

IndexNameFieldsDocs
0transfer_allow_deathTransfer some liquid free balance to another account. `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped. The dispatch origin for this call must be `Signed` by the transactor.
2force_transferExactly as `transfer_allow_death`, except the origin must be root and the source account may be specified.
3transfer_keep_aliveSame as the [`transfer_allow_death`] call, but with a check that the transfer will not kill the origin account. 99% of the time you want [`transfer_allow_death`] instead. [`transfer_allow_death`]: struct.Pallet.html#method.transfer
4transfer_all
keep_alive: bool
Transfer the entire transferable balance from the caller account. NOTE: This function only attempts to transfer _transferable_ balances. This means that any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... The dispatch origin of this call must be Signed. - `dest`: The recipient of the transfer. - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true).
5force_unreserve
amount: u64
Unreserve some balance from a user by force. Can only be called by ROOT.
6upgrade_accountsUpgrade a specified account. - `origin`: Must be `Signed`. - `who`: The account to be upgraded. This will waive the transaction fee if at least all but 10% of the accounts needed to be upgraded. (We let some not have to be upgraded just in order to allow for the possibility of churn).
8force_set_balanceSet the regular balance of a given account. The dispatch origin for this call is `root`.
9force_adjust_total_issuanceAdjust the total issuance in a saturating way. Can only be called by root and always needs a positive `delta`. # Example
10burn
keep_alive: bool
Burn the specified liquid free balance from the origin account. If the origin's account ends up below the existential deposit as a result of the burn and `keep_alive` is false, the account will be reaped. Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, this `burn` operation will reduce total issuance by the amount _burned_.

SCALE Encoding

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

Examples

transfer_allow_death = transfer_allow_death(dest, value)
0x00<field0><field1>
00 Variant index 0 = transfer_allow_death
field 0 dest: MultiAddress
field 1 value: Compact<u64>
force_transfer = force_transfer(source, dest, value)
0x02<field0><field1><field2>
02 Variant index 2 = force_transfer
field 0 source: MultiAddress
field 1 dest: MultiAddress
field 2 value: Compact<u64>
transfer_keep_alive = transfer_keep_alive(dest, value)
0x03<field0><field1>
03 Variant index 3 = transfer_keep_alive
field 0 dest: MultiAddress
field 1 value: Compact<u64>

Code Examples

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

const registry = new TypeRegistry();

// Encode Balances::Call — variant "transfer_allow_death"
const value = registry.createType("Balances::Call", { transfer_allow_death: { dest: 0, value: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T
I

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
137
Kind
Variant
Path
pallet_balances::pallet::Call
Runtime
v393