IdAmount

Composite 420 v393

frame_support::traits::tokens::misc::IdAmount

About This Type

Structured type: IdAmount.

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 (2)

#NameType
0idRuntimeFreezeReason
1amountu64

SCALE Encoding

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

Examples

Struct with 2 fields = id: RuntimeFreezeReason, amount: u64
0x<field0><field1>
field 0 id: RuntimeFreezeReason
field 1 amount: u64

Code Examples

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

const registry = new TypeRegistry();

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

Type Parameters

Id = RuntimeFreezeReason
Balance = u64

Referenced By (2)

Type Information

Type ID
420
Kind
Composite
Path
frame_support::traits::tokens::misc::IdAmount
Runtime
v393