Vec<(AccountId, Compact<u64>)>

Sequence 641 v393

About This Type

Variable-length list of (AccountId, Compact<u64)> values.

A dynamically-sized collection. The encoded length precedes the element data.

Encoding: Compact<u32> length prefix followed by each element encoded in sequence.

Sequence (Vec)

SCALE Encoding
Length-prefixed (Compact<u32> length followed by elements)

SCALE Encoding

Rule
Compact<u32> length prefix followed by each (AccountId, Compact<u64>) element encoded in sequence.
Size
variable

Examples

3-element Vec<(AccountId, Compact<u64>)> = [elem0, elem1, elem2]
0x0c<elem0><elem1><elem2>
0c Compact length = 3
<elem0>... Each (AccountId, Compact<u64>) encoded in sequence

Code Examples

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

const registry = new TypeRegistry();

// Encode a Vec<(AccountId, Compact<u64>)>
const vec = registry.createType("Vec<(AccountId, Compact<u64>)>", [1, 2, 3]);
console.log("Hex:", vec.toHex());

Referenced By (6)

Type Information

Type ID
641
Kind
Sequence
Runtime
v393