pub trait DefaultConfig {
Show 28 associated items type RuntimeEvent; type BaseCallFilter; type BlockWeights: Get<BlockWeights>; type BlockLength: Get<BlockLength>; type RuntimeOrigin; type RuntimeCall; type RuntimeTask; type Nonce: Parameter + Member + MaybeSerializeDeserialize + Debug + Default + MaybeDisplay + AtLeast32Bit + Copy + MaxEncodedLen; type Hash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaxEncodedLen; type Hashing: Hash<Output = Self::Hash> + TypeInfo; type AccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + MaxEncodedLen; type Lookup: StaticLookup<Target = Self::AccountId>; type BlockHashCount; type DbWeight: Get<RuntimeDbWeight>; type Version: Get<RuntimeVersion>; type PalletInfo; type AccountData: Member + FullCodec + Clone + Default + TypeInfo + MaxEncodedLen; type OnNewAccount: OnNewAccount<Self::AccountId>; type OnKilledAccount: OnKilledAccount<Self::AccountId>; type SystemWeightInfo: WeightInfo; type SS58Prefix: Get<u16>; type OnSetCode; type MaxConsumers: ConsumerLimits; type SingleBlockMigrations: OnRuntimeUpgrade; type MultiBlockMigrator: MultiStepMigrator; type PreInherents: PreInherents; type PostInherents: PostInherents; type PostTransactions: PostTransactions;
}
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 RuntimeEvent

The aggregated event type of the runtime.

source

type BaseCallFilter

The basic call filter to use in Origin. All origins are built with this filter as base, except Root.

This works as a filter for each incoming call. The call needs to pass this filter in order to dispatch. Otherwise it will be rejected with CallFiltered. This can be bypassed via dispatch_bypass_filter which should only be accessible by root. The filter can be composed of sub-filters by nesting for example [frame_support::traits::InsideBoth], [frame_support::traits::TheseExcept] or [frame_support::traits::EverythingBut] et al. The default would be [frame_support::traits::Everything].

source

type BlockWeights: Get<BlockWeights>

Block & extrinsics weights: base values and limits.

source

type BlockLength: Get<BlockLength>

The maximum length of a block (in bytes).

source

type RuntimeOrigin

The RuntimeOrigin type used by dispatchable calls.

source

type RuntimeCall

The aggregated RuntimeCall type.

source

type RuntimeTask

The aggregated RuntimeTask type.

source

type Nonce: Parameter + Member + MaybeSerializeDeserialize + Debug + Default + MaybeDisplay + AtLeast32Bit + Copy + MaxEncodedLen

This stores the number of previous transactions associated with a sender account.

source

type Hash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaxEncodedLen

The output of the Hashing function.

source

type Hashing: Hash<Output = Self::Hash> + TypeInfo

The hashing system (algorithm) being used in the runtime (e.g. Blake2).

source

type AccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + MaxEncodedLen

The user account identifier type for the runtime.

source

type Lookup: StaticLookup<Target = Self::AccountId>

Converting trait to take a source type and convert to AccountId.

Used to define the type and conversion mechanism for referencing accounts in transactions. It’s perfectly reasonable for this to be an identity conversion (with the source type being AccountId), but other pallets (e.g. Indices pallet) may provide more functional/efficient alternatives.

source

type BlockHashCount

Maximum number of block number to block hash mappings to keep (oldest pruned first).

source

type DbWeight: Get<RuntimeDbWeight>

The weight of runtime database operations the runtime can invoke.

source

type Version: Get<RuntimeVersion>

Get the chain’s in-code version.

source

type PalletInfo

Provides information about the pallet setup in the runtime.

Expects the PalletInfo type that is being generated by construct_runtime! in the runtime.

For tests it is okay to use () as type, however it will provide “useless” data.

source

type AccountData: Member + FullCodec + Clone + Default + TypeInfo + MaxEncodedLen

Data to be associated with an account (other than nonce/transaction counter, which this pallet does regardless).

source

type OnNewAccount: OnNewAccount<Self::AccountId>

Handler for when a new account has just been created.

source

type OnKilledAccount: OnKilledAccount<Self::AccountId>

A function that is invoked when an account has been determined to be dead.

All resources should be cleaned up associated with the given account.

source

type SystemWeightInfo: WeightInfo

source

type SS58Prefix: Get<u16>

The designated SS58 prefix of this chain.

This replaces the “ss58Format” property declared in the chain spec. Reason is that the runtime should know about the prefix in order to make use of it as an identifier of the chain.

source

type OnSetCode

What to do if the runtime wants to change the code to something new.

The default (()) implementation is responsible for setting the correct storage entry and emitting corresponding event and log item. (see Pallet::update_code_in_storage). It’s unlikely that this needs to be customized, unless you are writing a parachain using Cumulus, where the actual code change is deferred.

source

type MaxConsumers: ConsumerLimits

The maximum number of consumers allowed on a single account.

source

type SingleBlockMigrations: OnRuntimeUpgrade

All migrations that should run in the next runtime upgrade.

These used to be formerly configured in Executive. Parachains need to ensure that running all these migrations in one block will not overflow the weight limit of a block. The migrations are run before the pallet on_runtime_upgrade hooks, just like the OnRuntimeUpgrade migrations.

source

type MultiBlockMigrator: MultiStepMigrator

The migrator that is used to run Multi-Block-Migrations.

Can be set to [pallet-migrations] or an alternative implementation of the interface. The diagram in frame_executive::block_flowchart explains when it runs.

source

type PreInherents: PreInherents

A callback that executes in every block directly before all inherents were applied.

See frame_executive::block_flowchart for a in-depth explanation when it runs.

source

type PostInherents: PostInherents

A callback that executes in every block directly after all inherents were applied.

See frame_executive::block_flowchart for a in-depth explanation when it runs.

source

type PostTransactions: PostTransactions

A callback that executes in every block directly after all transactions were applied.

See frame_executive::block_flowchart for a in-depth explanation when it runs.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl DefaultConfig for ParaChainDefaultConfig

It currently uses the same configuration as SolochainDefaultConfig.

§

type Nonce = <SolochainDefaultConfig as DefaultConfig>::Nonce

§

type Hash = <SolochainDefaultConfig as DefaultConfig>::Hash

§

type Hashing = <SolochainDefaultConfig as DefaultConfig>::Hashing

§

type AccountId = <SolochainDefaultConfig as DefaultConfig>::AccountId

§

type Lookup = <SolochainDefaultConfig as DefaultConfig>::Lookup

§

type MaxConsumers = <SolochainDefaultConfig as DefaultConfig>::MaxConsumers

§

type AccountData = <SolochainDefaultConfig as DefaultConfig>::AccountData

§

type OnNewAccount = <SolochainDefaultConfig as DefaultConfig>::OnNewAccount

§

type OnKilledAccount = <SolochainDefaultConfig as DefaultConfig>::OnKilledAccount

§

type SystemWeightInfo = <SolochainDefaultConfig as DefaultConfig>::SystemWeightInfo

§

type SS58Prefix = <SolochainDefaultConfig as DefaultConfig>::SS58Prefix

§

type Version = <SolochainDefaultConfig as DefaultConfig>::Version

§

type BlockWeights = <SolochainDefaultConfig as DefaultConfig>::BlockWeights

§

type BlockLength = <SolochainDefaultConfig as DefaultConfig>::BlockLength

§

type DbWeight = <SolochainDefaultConfig as DefaultConfig>::DbWeight

§

type RuntimeEvent = ()

§

type RuntimeOrigin = ()

§

type RuntimeCall = ()

§

type RuntimeTask = ()

§

type PalletInfo = ()

§

type BaseCallFilter = <SolochainDefaultConfig as DefaultConfig>::BaseCallFilter

§

type BlockHashCount = <SolochainDefaultConfig as DefaultConfig>::BlockHashCount

§

type OnSetCode = <SolochainDefaultConfig as DefaultConfig>::OnSetCode

§

type SingleBlockMigrations = <SolochainDefaultConfig as DefaultConfig>::SingleBlockMigrations

§

type MultiBlockMigrator = <SolochainDefaultConfig as DefaultConfig>::MultiBlockMigrator

§

type PreInherents = <SolochainDefaultConfig as DefaultConfig>::PreInherents

§

type PostInherents = <SolochainDefaultConfig as DefaultConfig>::PostInherents

§

type PostTransactions = <SolochainDefaultConfig as DefaultConfig>::PostTransactions

source§

impl DefaultConfig for RelayChainDefaultConfig

It currently uses the same configuration as SolochainDefaultConfig.

§

type Nonce = <SolochainDefaultConfig as DefaultConfig>::Nonce

§

type Hash = <SolochainDefaultConfig as DefaultConfig>::Hash

§

type Hashing = <SolochainDefaultConfig as DefaultConfig>::Hashing

§

type AccountId = <SolochainDefaultConfig as DefaultConfig>::AccountId

§

type Lookup = <SolochainDefaultConfig as DefaultConfig>::Lookup

§

type MaxConsumers = <SolochainDefaultConfig as DefaultConfig>::MaxConsumers

§

type AccountData = <SolochainDefaultConfig as DefaultConfig>::AccountData

§

type OnNewAccount = <SolochainDefaultConfig as DefaultConfig>::OnNewAccount

§

type OnKilledAccount = <SolochainDefaultConfig as DefaultConfig>::OnKilledAccount

§

type SystemWeightInfo = <SolochainDefaultConfig as DefaultConfig>::SystemWeightInfo

§

type SS58Prefix = <SolochainDefaultConfig as DefaultConfig>::SS58Prefix

§

type Version = <SolochainDefaultConfig as DefaultConfig>::Version

§

type BlockWeights = <SolochainDefaultConfig as DefaultConfig>::BlockWeights

§

type BlockLength = <SolochainDefaultConfig as DefaultConfig>::BlockLength

§

type DbWeight = <SolochainDefaultConfig as DefaultConfig>::DbWeight

§

type RuntimeEvent = ()

§

type RuntimeOrigin = ()

§

type RuntimeCall = ()

§

type RuntimeTask = ()

§

type PalletInfo = ()

§

type BaseCallFilter = <SolochainDefaultConfig as DefaultConfig>::BaseCallFilter

§

type BlockHashCount = <SolochainDefaultConfig as DefaultConfig>::BlockHashCount

§

type OnSetCode = <SolochainDefaultConfig as DefaultConfig>::OnSetCode

§

type SingleBlockMigrations = <SolochainDefaultConfig as DefaultConfig>::SingleBlockMigrations

§

type MultiBlockMigrator = <SolochainDefaultConfig as DefaultConfig>::MultiBlockMigrator

§

type PreInherents = <SolochainDefaultConfig as DefaultConfig>::PreInherents

§

type PostInherents = <SolochainDefaultConfig as DefaultConfig>::PostInherents

§

type PostTransactions = <SolochainDefaultConfig as DefaultConfig>::PostTransactions

source§

impl DefaultConfig for SolochainDefaultConfig

source§

impl DefaultConfig for TestDefaultConfig