Scheduler::Event

Variant 62 v393

pallet_scheduler::pallet::Event

Events type.

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 (10)

IndexNameFieldsDocs
0Scheduled
when: u32
index: u32
Scheduled some task.
1Canceled
when: u32
index: u32
Canceled some task.
2Dispatched
id: Option
result: Result
Dispatched some task.
3RetrySet
id: Option
period: u32
retries: u8
Set a retry configuration for some task.
4RetryCancelledCancel a retry configuration for some task.
5CallUnavailableThe call for the provided hash was not found so the task has been aborted.
6PeriodicFailedThe given task was unable to be renewed since the agenda is full at that block.
7RetryFailedThe given task was unable to be retried since the agenda is full at that block or there was not enough weight to reschedule it.
8PermanentlyOverweightThe given task can never be executed since it is overweight.
9AgendaIncomplete
when: u32
Agenda is incomplete from `when`.

SCALE Encoding

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

Examples

Scheduled = Scheduled(when, index)
0x00<field0><field1>
00 Variant index 0 = Scheduled
field 0 when: u32
field 1 index: u32
Canceled = Canceled(when, index)
0x01<field0><field1>
01 Variant index 1 = Canceled
field 0 when: u32
field 1 index: u32
Dispatched = Dispatched(task, id, result)
0x02<field0><field1><field2>
02 Variant index 2 = Dispatched
field 0 task: (u32, u32)
field 1 id: Option
field 2 result: Result

Code Examples

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

const registry = new TypeRegistry();

// Encode Scheduler::Event — variant "Scheduled"
const value = registry.createType("Scheduler::Event", { Scheduled: { when: 1000000, index: 1000000 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
62
Kind
Variant
Path
pallet_scheduler::pallet::Event
Runtime
v393