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§

source

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

The overarching event type of the runtime.

source

type Migrations: MockedMigrations

Mocked migrations for benchmarking only.

Should be configured to crate::mock_helpers::MockedMigrations in benchmarks.

source

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.

source

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.

source

type MigrationStatusHandler: MigrationStatusHandler

Notifications for status updates of a runtime upgrade.

Could be used to pause XCM etc.

source

type FailedMigrationHandler: FailedMigrationHandler

Handler for failed migrations.

source

type MaxServiceWeight: Get<Weight>

The maximum weight to spend each block to execute migrations.

source

type WeightInfo: WeightInfo

Weight information for the calls and functions of this pallet.

Object Safety§

This trait is not object safe.

Implementors§