IdAmount
Composite 412 v393frame_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)
| # | Name | Type |
|---|---|---|
| 0 | id | RuntimeHoldReason |
| 1 | amount | u64 |
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: RuntimeHoldReason, amount: u64
0x<field0><field1>field 0 id: RuntimeHoldReasonfield 1 amount: u64Code 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 = RuntimeHoldReason
Balance = u64
Referenced By (2)
Type Information
- Type ID
- 412
- Kind
- Composite
- Path
- frame_support::traits::tokens::misc::IdAmount
- Runtime
- v393