Vec<(u32, u32)>

Sequence 102 v393

About This Type

Actual weight and fee payment info after dispatch.

Contains the actual weight consumed (may be less than the worst-case estimate) and whether the caller pays fees. Used to calculate fee refunds.

Sequence (Vec)

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

SCALE Encoding

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

Examples

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

Code Examples

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

const registry = new TypeRegistry();

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

Type Information

Type ID
102
Kind
Sequence
Runtime
v393