Trait frame_system::pallet::Config
source · pub trait Config: 'static + Eq + Clone {
Show 24 associated items
type BaseCallFilter: Contains<Self::Call>;
type BlockWeights: Get<BlockWeights>;
type BlockLength: Get<BlockLength>;
type Origin: Into<Result<RawOrigin<Self::AccountId>, Self::Origin>> + From<RawOrigin<Self::AccountId>> + Clone + OriginTrait<Call = Self::Call>;
type Call: Dispatchable + Debug;
type Index: Parameter + Member + MaybeSerializeDeserialize + Debug + Default + MaybeDisplay + AtLeast32Bit + Copy + MaxEncodedLen;
type BlockNumber: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + AtLeast32BitUnsigned + Default + Bounded + Copy + Hash + FromStr + MaybeMallocSizeOf + MaxEncodedLen + TypeInfo;
type Hash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaybeMallocSizeOf + MaxEncodedLen;
type Hashing: Hash<Output = Self::Hash> + TypeInfo;
type AccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + MaxEncodedLen;
type Lookup: StaticLookup<Target = Self::AccountId>;
type Header: Parameter + Header<Number = Self::BlockNumber, Hash = Self::Hash>;
type Event: Parameter + Member + From<Event<Self>> + Debug + IsType<<Self as Config>::Event>;
type BlockHashCount: Get<Self::BlockNumber>;
type DbWeight: Get<RuntimeDbWeight>;
type Version: Get<RuntimeVersion>;
type PalletInfo: 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: SetCode<Self>;
type MaxConsumers: ConsumerLimits;
}
Expand description
System configuration trait. Implemented by runtime.
Required Associated Types§
sourcetype BaseCallFilter: Contains<Self::Call>
type BaseCallFilter: Contains<Self::Call>
The basic call filter to use in Origin. All origins are built with this filter as base, except Root.
sourcetype BlockWeights: Get<BlockWeights>
type BlockWeights: Get<BlockWeights>
Block & extrinsics weights: base values and limits.
sourcetype BlockLength: Get<BlockLength>
type BlockLength: Get<BlockLength>
The maximum length of a block (in bytes).
sourcetype Origin: Into<Result<RawOrigin<Self::AccountId>, Self::Origin>> + From<RawOrigin<Self::AccountId>> + Clone + OriginTrait<Call = Self::Call>
type Origin: Into<Result<RawOrigin<Self::AccountId>, Self::Origin>> + From<RawOrigin<Self::AccountId>> + Clone + OriginTrait<Call = Self::Call>
The Origin
type used by dispatchable calls.
sourcetype Call: Dispatchable + Debug
type Call: Dispatchable + Debug
The aggregated Call
type.
sourcetype Index: Parameter + Member + MaybeSerializeDeserialize + Debug + Default + MaybeDisplay + AtLeast32Bit + Copy + MaxEncodedLen
type Index: Parameter + Member + MaybeSerializeDeserialize + Debug + Default + MaybeDisplay + AtLeast32Bit + Copy + MaxEncodedLen
Account index (aka nonce) type. This stores the number of previous transactions associated with a sender account.
sourcetype BlockNumber: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + AtLeast32BitUnsigned + Default + Bounded + Copy + Hash + FromStr + MaybeMallocSizeOf + MaxEncodedLen + TypeInfo
type BlockNumber: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + AtLeast32BitUnsigned + Default + Bounded + Copy + Hash + FromStr + MaybeMallocSizeOf + MaxEncodedLen + TypeInfo
The block number type used by the runtime.
sourcetype Hash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaybeMallocSizeOf + MaxEncodedLen
type Hash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaybeMallocSizeOf + MaxEncodedLen
The output of the Hashing
function.
sourcetype Hashing: Hash<Output = Self::Hash> + TypeInfo
type Hashing: Hash<Output = Self::Hash> + TypeInfo
The hashing system (algorithm) being used in the runtime (e.g. Blake2).
sourcetype AccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + MaxEncodedLen
type AccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + MaxEncodedLen
The user account identifier type for the runtime.
sourcetype Lookup: StaticLookup<Target = Self::AccountId>
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.
sourcetype Header: Parameter + Header<Number = Self::BlockNumber, Hash = Self::Hash>
type Header: Parameter + Header<Number = Self::BlockNumber, Hash = Self::Hash>
The block header.
sourcetype Event: Parameter + Member + From<Event<Self>> + Debug + IsType<<Self as Config>::Event>
type Event: Parameter + Member + From<Event<Self>> + Debug + IsType<<Self as Config>::Event>
The aggregated event type of the runtime.
sourcetype BlockHashCount: Get<Self::BlockNumber>
type BlockHashCount: Get<Self::BlockNumber>
Maximum number of block number to block hash mappings to keep (oldest pruned first).
sourcetype DbWeight: Get<RuntimeDbWeight>
type DbWeight: Get<RuntimeDbWeight>
The weight of runtime database operations the runtime can invoke.
sourcetype Version: Get<RuntimeVersion>
type Version: Get<RuntimeVersion>
Get the chain’s current version.
sourcetype PalletInfo: PalletInfo
type PalletInfo: 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.
sourcetype AccountData: Member + FullCodec + Clone + Default + TypeInfo + MaxEncodedLen
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).
sourcetype OnNewAccount: OnNewAccount<Self::AccountId>
type OnNewAccount: OnNewAccount<Self::AccountId>
Handler for when a new account has just been created.
sourcetype OnKilledAccount: OnKilledAccount<Self::AccountId>
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.
type SystemWeightInfo: WeightInfo
sourcetype SS58Prefix: Get<u16>
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.
sourcetype OnSetCode: SetCode<Self>
type OnSetCode: SetCode<Self>
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.
sourcetype MaxConsumers: ConsumerLimits
type MaxConsumers: ConsumerLimits
The maximum number of consumers allowed on a single account.