referrerpolicy=no-referrer-when-downgrade
pub trait DefaultConfig: DefaultConfig {
    type WithDefaultValue: Get<u32>;
    type OverwrittenDefaultValue: Get<u32>;
    type CanDeriveDefaultFromSystem: Get<Self::AccountId>;
    type WithDefaultType;
    type OverwrittenDefaultType;
}
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§

source

type WithDefaultValue: Get<u32>

An input parameter to this pallet. This value can have a default, because it is not reliant on frame_system::Config or the overarching runtime in any way.

source

type OverwrittenDefaultValue: Get<u32>

Same as Config::WithDefaultValue, but we don’t intend to define a default for this in our tests below.

source

type CanDeriveDefaultFromSystem: Get<Self::AccountId>

An input parameter that relies on <Self as frame_system::Config>::AccountId. This can too have a default, as long as as it is present in frame_system::DefaultConfig.

source

type WithDefaultType

Something that is a normal type, with default.

source

type OverwrittenDefaultType

Same as Config::WithDefaultType, but we don’t intend to define a default for this in our tests below.

Object Safety§

This trait is not object safe.

Implementors§