Trait pallet_migrations::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Migrations: MockedMigrations;
type CursorMaxLen: Get<u32>;
type IdentifierMaxLen: Get<u32>;
type MigrationStatusHandler: MigrationStatusHandler;
type FailedMigrationHandler: FailedMigrationHandler;
type MaxServiceWeight: Get<Weight>;
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 of the runtime.
sourcetype Migrations: MockedMigrations
type Migrations: MockedMigrations
Mocked migrations for benchmarking only.
Should be configured to crate::mock_helpers::MockedMigrations
in benchmarks.
sourcetype CursorMaxLen: Get<u32>
type CursorMaxLen: Get<u32>
The maximal length of an encoded cursor.
A good default needs to selected such that no migration will ever have a cursor with MEL
above this limit. This is statically checked in integrity_test
.
sourcetype IdentifierMaxLen: Get<u32>
type IdentifierMaxLen: Get<u32>
The maximal length of an encoded identifier.
A good default needs to selected such that no migration will ever have an identifier
with MEL above this limit. This is statically checked in integrity_test
.
sourcetype MigrationStatusHandler: MigrationStatusHandler
type MigrationStatusHandler: MigrationStatusHandler
Notifications for status updates of a runtime upgrade.
Could be used to pause XCM etc.
sourcetype FailedMigrationHandler: FailedMigrationHandler
type FailedMigrationHandler: FailedMigrationHandler
Handler for failed migrations.
sourcetype MaxServiceWeight: Get<Weight>
type MaxServiceWeight: Get<Weight>
The maximum weight to spend each block to execute migrations.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for the calls and functions of this pallet.