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§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + GetCallMetadata + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + GetCallMetadata + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>
The overarching call type.
sourcetype PauseOrigin: EnsureOrigin<Self::RuntimeOrigin>
type PauseOrigin: EnsureOrigin<Self::RuntimeOrigin>
The only origin that can pause calls.
sourcetype UnpauseOrigin: EnsureOrigin<Self::RuntimeOrigin>
type UnpauseOrigin: EnsureOrigin<Self::RuntimeOrigin>
The only origin that can un-pause calls.
sourcetype WhitelistedCalls: Contains<RuntimeCallNameOf<Self>>
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.
sourcetype MaxNameLen: Get<u32>
type MaxNameLen: Get<u32>
Maximum length for pallet name and call name SCALE encoded string names.
TOO LONG NAMES WILL BE TREATED AS PAUSED.