BalanceLock

Composite 405 v393

pallet_balances::types::BalanceLock

About This Type

Structured type: BalanceLock.

A struct-like type where each field is encoded in declaration order.

Encoding: Fields encoded consecutively in declaration order, no field names or separators.

Fields (3)

#NameType
0id[u8; 8]
1amountu64
2reasonsReasons

SCALE Encoding

Rule
3 fields encoded consecutively in declaration order. No field names or delimiters.
Size
sum of field sizes

Examples

Struct with 3 fields = id: [u8; 8], amount: u64, reasons: Reasons
0x<field0><field1><field2>
field 0 id: [u8; 8]
field 1 amount: u64
field 2 reasons: Reasons

Code Examples

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

const registry = new TypeRegistry();

// Encode BalanceLock
const value = registry.createType("BalanceLock", {
  id: 0,
  amount: 1_000_000_000n,
  reasons: 0
});
console.log("Hex:", value.toHex());

Type Parameters

Balance = u64

Referenced By (1)

Type Information

Type ID
405
Kind
Composite
Path
pallet_balances::types::BalanceLock
Runtime
v393