Grandpa::Event

Variant 32 v393

pallet_grandpa::pallet::Event

The `Event` enum of this pallet

About This Type

Event enum for the Event pallet.

Contains all possible events emitted by the Event pallet. Each variant represents a different event type with its own data fields.

Variants (3)

IndexNameFieldsDocs
0NewAuthorities
authority_set: Vec<(Public, u64)>
New authority set has been applied.
1PausednoneCurrent authority set has been paused.
2ResumednoneCurrent authority set has been resumed.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 3 possible variants.
Size
variable (1+ bytes)

Examples

NewAuthorities = NewAuthorities(authority_set)
0x00<field0>
00 Variant index 0 = NewAuthorities
field 0 authority_set: Vec<(Public, u64)>
Paused
0x01
01 Variant index 1 = Paused
Resumed
0x02
02 Variant index 2 = Resumed

Code Examples

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

const registry = new TypeRegistry();

// Encode Grandpa::Event — variant "NewAuthorities"
const value = registry.createType("Grandpa::Event", { NewAuthorities: { authority_set: 0 } });
console.log("Hex:", value.toHex());

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
32
Kind
Variant
Path
pallet_grandpa::pallet::Event
Runtime
v393