SafeMode::Call
Variant 328 v393pallet_safe_mode::pallet::Call
Contains a variant per dispatchable extrinsic that this pallet has.
About This Type
Call enum for the Call pallet.
Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.
Variants (8)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | enter | none | Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks. Reserves [`Config::EnterDepositAmount`] from the caller's account. Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. |
| 1 | force_enter | none | Enter safe-mode by force for a per-origin configured number of blocks. Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. Can only be called by the [`Config::ForceEnterOrigin`] origin. |
| 2 | extend | none | Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks. This accumulates on top of the current remaining duration. Reserves [`Config::ExtendDepositAmount`] from the caller's account. Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. This may be called by any signed origin with [`Config::ExtendDepositAmount`] free currency to reserve. This call can be disabled for all origins by configuring [`Config::ExtendDepositAmount`] to `None`. |
| 3 | force_extend | none | Extend the safe-mode by force for a per-origin configured number of blocks. Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. Can only be called by the [`Config::ForceExtendOrigin`] origin. |
| 4 | force_exit | none | Exit safe-mode by force. Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook after the block height is greater than the [`EnteredUntil`] storage item. Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the hook. |
| 5 | force_slash_deposit | Slash a deposit for an account that entered or extended safe-mode at a given historical block. This can only be called while safe-mode is entered. Emits a [`Event::DepositSlashed`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. Can only be called by the [`Config::ForceDepositOrigin`] origin. | |
| 6 | release_deposit | Permissionlessly release a deposit for an account that entered safe-mode at a given historical block. The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`. This cannot be called while safe-mode is entered and not until [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered. Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if the safe-mode is entered. Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the block specified. | |
| 7 | force_release_deposit | Force to release a deposit for an account that entered safe-mode at a given historical block. This can be called while safe-mode is still entered. Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the specified block. Can only be called by the [`Config::ForceDepositOrigin`] origin. |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 8 possible variants.
- Size
- variable (1+ bytes)
Examples
enter
0x0000 Variant index 0 = enterforce_enter
0x0101 Variant index 1 = force_enterextend
0x0202 Variant index 2 = extendCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SafeMode::Call — variant "enter"
const value = registry.createType("SafeMode::Call", "enter");
console.log("Hex:", value.toHex());Type Parameters
T
Referenced By (23)
#123 RuntimeCall via System#123 RuntimeCall via Timestamp#123 RuntimeCall via Grandpa#123 RuntimeCall via Balances#123 RuntimeCall via SubtensorModule#123 RuntimeCall via Utility#123 RuntimeCall via Sudo#123 RuntimeCall via Multisig#123 RuntimeCall via Preimage#123 RuntimeCall via Scheduler#123 RuntimeCall via Proxy#123 RuntimeCall via Registry#123 RuntimeCall via Commitments#123 RuntimeCall via AdminUtils#123 RuntimeCall via SafeMode#123 RuntimeCall via Ethereum#123 RuntimeCall via EVM#123 RuntimeCall via BaseFee#123 RuntimeCall via Drand#123 RuntimeCall via Crowdloan
and 3 more...
Also See
Type Information
- Type ID
- 328
- Kind
- Variant
- Path
- pallet_safe_mode::pallet::Call
- Runtime
- v393