Prevote

Composite 129 v393

finality_grandpa::Prevote

About This Type

Structured type: Prevote.

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
0target_hashH256
1target_numberu32

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 = target_hash: H256, target_number: u32
0x<field0><field1>
field 0 target_hash: H256
field 1 target_number: u32

Code Examples

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

const registry = new TypeRegistry();

// Encode Prevote
const value = registry.createType("Prevote", {
  target_hash: 0,
  target_number: 1000000
});
console.log("Hex:", value.toHex());

Type Parameters

H = H256
N = u32

Referenced By (1)

Type Information

Type ID
129
Kind
Composite
Path
finality_grandpa::Prevote
Runtime
v393