Balances::Error

Variant 423 v393

pallet_balances::pallet::Error

The `Error` enum of this pallet.

About This Type

Error enum for the Error pallet.

Contains all error types that the Error pallet can return when a call fails.

Variants (12)

IndexNameFieldsDocs
0VestingBalancenoneVesting balance too high to send value.
1LiquidityRestrictionsnoneAccount liquidity restrictions prevent withdrawal.
2InsufficientBalancenoneBalance too low to send value.
3ExistentialDepositnoneValue too low to create account due to existential deposit.
4ExpendabilitynoneTransfer/payment would kill account.
5ExistingVestingSchedulenoneA vesting schedule already exists for this account.
6DeadAccountnoneBeneficiary account must pre-exist.
7TooManyReservesnoneNumber of named reserves exceed `MaxReserves`.
8TooManyHoldsnoneNumber of holds exceed `VariantCountOf<T::RuntimeHoldReason>`.
9TooManyFreezesnoneNumber of freezes exceed `MaxFreezes`.
10IssuanceDeactivatednoneThe issuance cannot be modified since it is already deactivated.
11DeltaZerononeThe delta cannot be zero.

SCALE Encoding

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

Examples

VestingBalance
0x00
00 Variant index 0 = VestingBalance
LiquidityRestrictions
0x01
01 Variant index 1 = LiquidityRestrictions
InsufficientBalance
0x02
02 Variant index 2 = InsufficientBalance

Code Examples

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

const registry = new TypeRegistry();

// Encode Balances::Error — variant "VestingBalance"
const value = registry.createType("Balances::Error", "VestingBalance");
console.log("Hex:", value.toHex());

Type Parameters

T
I

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
423
Kind
Variant
Path
pallet_balances::pallet::Error
Runtime
v393