Trait pallet_maintenance_mode::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>;
type NormalCallFilter: Contains<Self::RuntimeCall>;
type MaintenanceCallFilter: Contains<Self::RuntimeCall>;
type MaintenanceOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type NormalExecutiveHooks: OnRuntimeUpgrade + OnInitialize<BlockNumberFor<Self>> + OnIdle<BlockNumberFor<Self>> + OnFinalize<BlockNumberFor<Self>> + OffchainWorker<BlockNumberFor<Self>>;
type MaintenanceExecutiveHooks: OnRuntimeUpgrade + OnInitialize<BlockNumberFor<Self>> + OnIdle<BlockNumberFor<Self>> + OnFinalize<BlockNumberFor<Self>> + OffchainWorker<BlockNumberFor<Self>>;
}
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. Configuration trait of this pallet.
Required Associated Types§
sourcetype RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
Overarching event type
sourcetype NormalCallFilter: Contains<Self::RuntimeCall>
type NormalCallFilter: Contains<Self::RuntimeCall>
The base call filter to be used in normal operating mode (When we aren’t in the middle of a migration)
sourcetype MaintenanceCallFilter: Contains<Self::RuntimeCall>
type MaintenanceCallFilter: Contains<Self::RuntimeCall>
The base call filter to be used when we are in the middle of migrations This should be very restrictive. Probably not allowing anything except possibly something like sudo or other emergency processes
sourcetype MaintenanceOrigin: EnsureOrigin<Self::RuntimeOrigin>
type MaintenanceOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin from which the call to enter or exit maintenance mode must come Take care when choosing your maintenance call filter to ensure that you’ll still be able to return to normal mode. For example, if your MaintenanceOrigin is a council, make sure that your councilors can still cast votes.
sourcetype NormalExecutiveHooks: OnRuntimeUpgrade + OnInitialize<BlockNumberFor<Self>> + OnIdle<BlockNumberFor<Self>> + OnFinalize<BlockNumberFor<Self>> + OffchainWorker<BlockNumberFor<Self>>
type NormalExecutiveHooks: OnRuntimeUpgrade + OnInitialize<BlockNumberFor<Self>> + OnIdle<BlockNumberFor<Self>> + OnFinalize<BlockNumberFor<Self>> + OffchainWorker<BlockNumberFor<Self>>
Handler to suspend and resume XCM execution The DMP handler to be used in maintenance mode TODO: remove once https://github.com/paritytech/polkadot/pull/5035 is merged The executive hooks that will be used in normal operating mode Important: Use AllPalletsWithSystem here if you dont want to modify the hooks behaviour
sourcetype MaintenanceExecutiveHooks: OnRuntimeUpgrade + OnInitialize<BlockNumberFor<Self>> + OnIdle<BlockNumberFor<Self>> + OnFinalize<BlockNumberFor<Self>> + OffchainWorker<BlockNumberFor<Self>>
type MaintenanceExecutiveHooks: OnRuntimeUpgrade + OnInitialize<BlockNumberFor<Self>> + OnIdle<BlockNumberFor<Self>> + OnFinalize<BlockNumberFor<Self>> + OffchainWorker<BlockNumberFor<Self>>
The executive hooks that will be used in maintenance mode Important: Use AllPalletsWithSystem here if you dont want to modify the hooks behaviour