Utility::Event

Variant 56 v393

pallet_subtensor_utility::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 (8)

IndexNameFieldsDocs
0BatchInterrupted
index: u32
Batch of dispatches did not complete fully. Index of first failing dispatch given, as well as the error.
1BatchCompletednoneBatch of dispatches completed fully with no error.
2BatchCompletedWithErrorsnoneBatch of dispatches completed but has errors.
3ItemCompletednoneA single item within a Batch of dispatches has completed with no error.
4ItemFailedA single item within a Batch of dispatches has completed with error.
5DispatchedAs
result: Result
A call was dispatched.
6IfElseMainSuccessnoneMain call was dispatched.
7IfElseFallbackCalled
main_error: DispatchError
The fallback call was dispatched.

SCALE Encoding

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

Examples

BatchInterrupted = BatchInterrupted(index, error)
0x00<field0><field1>
00 Variant index 0 = BatchInterrupted
field 0 index: u32
field 1 error: DispatchError
BatchCompleted
0x01
01 Variant index 1 = BatchCompleted
BatchCompletedWithErrors
0x02
02 Variant index 2 = BatchCompletedWithErrors

Code Examples

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

const registry = new TypeRegistry();

// Encode Utility::Event — variant "BatchInterrupted"
const value = registry.createType("Utility::Event", { BatchInterrupted: { index: 1000000, error: 0 } });
console.log("Hex:", value.toHex());

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
56
Kind
Variant
Path
pallet_subtensor_utility::pallet::Event
Runtime
v393