pub trait DefaultConfig: DefaultConfig {
type RuntimeEvent;
type CursorMaxLen: Get<u32>;
type IdentifierMaxLen: Get<u32>;
type MigrationStatusHandler: MigrationStatusHandler;
type FailedMigrationHandler: FailedMigrationHandler;
type MaxServiceWeight: Get<Weight>;
type WeightInfo: WeightInfo;
}
Expand description
Based on Config
. Auto-generated by
#[pallet::config(with_default)]
.
Can be used in tandem with
#[register_default_config]
and
#[derive_impl]
to derive test config traits
based on existing pallet config traits in a safe and developer-friendly way.
See here for more information and caveats about
the auto-generated DefaultConfig
trait and how it is generated.
Required Associated Types§
Sourcetype RuntimeEvent
type RuntimeEvent
The overarching event type of the runtime.
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.