Vec<Compact<u64>>
Sequence 149 v393About This Type
Variable-length list of 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)
- Element Type
- Compact<u64>
- SCALE Encoding
- Length-prefixed (Compact<u32> length followed by elements)
SCALE Encoding
- Rule
- Compact<u32> length prefix followed by each Compact<u64> element encoded in sequence.
- Size
- variable
Examples
3-element Vec<Compact<u64>> = [elem0, elem1, elem2]
0x0c<elem0><elem1><elem2>0c Compact length = 3<elem0>... Each Compact<u64> encoded in sequenceCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode a Vec<Compact<u64>>
const vec = registry.createType("Vec<Compact<u64>>", [1, 2, 3]);
console.log("Hex:", vec.toHex());Referenced By (17)
#143 SubtensorModule::Call via batch_set_weights.version_keys#668 Metagraph via last_update#668 Metagraph via emission#668 Metagraph via block_at_registration#668 Metagraph via alpha_stake#668 Metagraph via tao_stake#668 Metagraph via total_stake#678 SubnetState via last_update#678 SubnetState via emission#678 SubnetState via block_at_registration#678 SubnetState via alpha_stake#678 SubnetState via tao_stake#678 SubnetState via total_stake#679 Vec<Vec<Compact<u64>>> #695 Option via Some#696 Option via Some#697 Option via Some
Type Information
- Type ID
- 149
- Kind
- Sequence
- Runtime
- v393