AccountData
Composite 5 v393pallet_balances::types::AccountData
About This Type
Structured type: AccountData.
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 (4)
| # | Name | Type |
|---|---|---|
| 0 | free | u64 |
| 1 | reserved | u64 |
| 2 | frozen | u64 |
| 3 | flags | ExtraFlags |
SCALE Encoding
- Rule
- 4 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 4 fields = free: u64, reserved: u64, frozen: u64, flags: ExtraFlags
0x<field0><field1><field2><field3>field 0 free: u64field 1 reserved: u64field 2 frozen: u64field 3 flags: ExtraFlagsCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode AccountData
const value = registry.createType("AccountData", {
free: 1_000_000_000n,
reserved: 1_000_000_000n,
frozen: 1_000_000_000n,
flags: 0
});
console.log("Hex:", value.toHex());Type Parameters
Balance = u64
Referenced By (1)
Type Information
- Type ID
- 5
- Kind
- Composite
- Path
- pallet_balances::types::AccountData
- Runtime
- v393