SafeMode::Event

Variant 72 v393

pallet_safe_mode::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
0Entered
until: u32
The safe-mode was entered until inclusively this block.
1Extended
until: u32
The safe-mode was extended until inclusively this block.
2Exited
reason: ExitReason
Exited the safe-mode for a specific reason.
3DepositPlaced
account: AccountId
amount: u64
An account reserved funds for either entering or extending the safe-mode.
4DepositReleased
account: AccountId
amount: u64
An account had a reserve released that was reserved.
5DepositSlashed
account: AccountId
amount: u64
An account had reserve slashed that was reserved.
6CannotDepositnoneCould not hold funds for entering or extending the safe-mode. This error comes from the underlying `Currency`.
7CannotReleasenoneCould not release funds for entering or extending the safe-mode. This error comes from the underlying `Currency`.

SCALE Encoding

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

Examples

Entered = Entered(until)
0x00<field0>
00 Variant index 0 = Entered
field 0 until: u32
Extended = Extended(until)
0x01<field0>
01 Variant index 1 = Extended
field 0 until: u32
Exited = Exited(reason)
0x02<field0>
02 Variant index 2 = Exited
field 0 reason: ExitReason

Code Examples

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

const registry = new TypeRegistry();

// Encode SafeMode::Event — variant "Entered"
const value = registry.createType("SafeMode::Event", { Entered: { until: 1000000 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
72
Kind
Variant
Path
pallet_safe_mode::pallet::Event
Runtime
v393