Equivocation
Composite 133 v393finality_grandpa::Equivocation
About This Type
Structured type: Equivocation.
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 (4)
| # | Name | Type |
|---|---|---|
| 0 | round_number | u64 |
| 1 | identity | Public |
| 2 | first | (Precommit, Signature) |
| 3 | second | (Precommit, Signature) |
SCALE Encoding
- Rule
- 4 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 4 fields = round_number: u64, identity: Public, first: (Precommit, Signature), second: (Precommit, Signature)
0x<field0><field1><field2><field3>field 0 round_number: u64field 1 identity: Publicfield 2 first: (Precommit, Signature)field 3 second: (Precommit, Signature)Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Equivocation
const value = registry.createType("Equivocation", {
round_number: 1_000_000_000n,
identity: 0,
first: 0,
second: 0
});
console.log("Hex:", value.toHex());Type Parameters
Id = Public
V = Precommit
S = Signature
Referenced By (3)
Type Information
- Type ID
- 133
- Kind
- Composite
- Path
- finality_grandpa::Equivocation
- Runtime
- v393