Drand::Event

Variant 89 v393

pallet_drand::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
0BeaconConfigChangednoneBeacon Configuration has changed.
1NewPulse
rounds: Vec<u64>
Successfully set a new pulse(s).
2SetOldestStoredRoundOldest Stored Round has been set.

SCALE Encoding

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

Examples

BeaconConfigChanged
0x00
00 Variant index 0 = BeaconConfigChanged
NewPulse = NewPulse(rounds)
0x01<field0>
01 Variant index 1 = NewPulse
field 0 rounds: Vec<u64>
SetOldestStoredRound = SetOldestStoredRound(u64)
0x02<field0>
02 Variant index 2 = SetOldestStoredRound
field 0 field0: u64

Code Examples

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

const registry = new TypeRegistry();

// Encode Drand::Event — variant "BeaconConfigChanged"
const value = registry.createType("Drand::Event", "BeaconConfigChanged");
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
89
Kind
Variant
Path
pallet_drand::pallet::Event
Runtime
v393