Crate tx_pause

source ·
Expand description

Transaction Pause Pallet

The Transaction Pause pallet provides a dynamic call filter that can be controlled with extrinsics. This pallet may be used to disable dispatch of specific calls within a runtime.

Overview

The Transaction Pause pallet provides functions for:

  • Setting a dynamic list of FullNameOf items that are matched against to filter these calls.
  • Setting Config::WhitelistCallNames that cannot be paused by this pallet.
  • Repatriating a reserved balance to a beneficiary account that exists.
  • Transferring a balance between accounts (when not reserved).
  • Slashing an account balance.
  • Account creation and removal.
  • Managing total issuance.
  • Setting and managing locks.

Can also be used as call-filter by the runtime together with the SafeMode

TODO expand an link to safe mode in docs.

Terminology

  • Pause: The ability to dispatch of a specific call becomes disabled.
  • Unpause: The ability to dispatch of a specific call becomes enabled, if it was paused.

Interface

Dispatchable Functions

  • pause - Pause a pallet or optionally a specific call within a pallet.
  • unpause - Unpause a pallet or optionally a specific call within a pallet.

Usage

The following examples show how to use the Transaction Pause pallet in your custom pallet. TODO check doc links

Example within a runtime’s [pallet-frame-system::BaseCallFilter] configuration:

impl frame_system::Config for Runtime {
	…
	type BaseCallFilter = InsideBoth<DefaultFilter, InsideBoth<TxPause, SafeMode>>;
	…
}

Genesis config

The Transaction Pause pallet may be configured to pause calls on genesis with it’s GenesisConfig.

Assumptions

  • TODO

Re-exports

Modules

  • The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
  • Autogenerated weights for tx_pause

Type Definitions