Trait pallet_tx_pause::pallet::Config

source ·
pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + GetCallMetadata + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>;
    type PauseOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type UnpauseOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type WhitelistedCalls: Contains<RuntimeCallNameOf<Self>>;
    type MaxNameLen: Get<u32>;
    type WeightInfo: WeightInfo;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + GetCallMetadata + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>

The overarching call type.

source

type PauseOrigin: EnsureOrigin<Self::RuntimeOrigin>

The only origin that can pause calls.

source

type UnpauseOrigin: EnsureOrigin<Self::RuntimeOrigin>

The only origin that can un-pause calls.

source

type WhitelistedCalls: Contains<RuntimeCallNameOf<Self>>

Contains all calls that cannot be paused.

The TxMode pallet cannot pause its own calls, and does not need to be explicitly added here.

source

type MaxNameLen: Get<u32>

Maximum length for pallet name and call name SCALE encoded string names.

TOO LONG NAMES WILL BE TREATED AS PAUSED.

source

type WeightInfo: WeightInfo

Object Safety§

This trait is not object safe.

Implementors§