SafeMode::Error

Variant 510 v393

pallet_safe_mode::pallet::Error

The `Error` enum of this pallet.

About This Type

Error enum for the Error pallet.

Contains all error types that the Error pallet can return when a call fails.

Variants (7)

IndexNameFieldsDocs
0EnterednoneThe safe-mode is (already or still) entered.
1ExitednoneThe safe-mode is (already or still) exited.
2NotConfigurednoneThis functionality of the pallet is disabled by the configuration.
3NoDepositnoneThere is no balance reserved.
4AlreadyDepositednoneThe account already has a deposit reserved and can therefore not enter or extend again.
5CannotReleaseYetnoneThis deposit cannot be released yet.
6CurrencyErrornoneAn error from the underlying `Currency`.

SCALE Encoding

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

Examples

Entered
0x00
00 Variant index 0 = Entered
Exited
0x01
01 Variant index 1 = Exited
NotConfigured
0x02
02 Variant index 2 = NotConfigured

Code Examples

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

const registry = new TypeRegistry();

// Encode SafeMode::Error — variant "Entered"
const value = registry.createType("SafeMode::Error", "Entered");
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
510
Kind
Variant
Path
pallet_safe_mode::pallet::Error
Runtime
v393