Trait pallet_timestamp::pallet::Config
source · pub trait Config: Config {
type Moment: Parameter + Default + AtLeast32Bit + Scale<BlockNumberFor<Self>, Output = Self::Moment> + Copy + MaxEncodedLen + StaticTypeInfo;
type OnTimestampSet: OnTimestampSet<Self::Moment>;
type MinimumPeriod: Get<Self::Moment>;
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. The pallet configuration trait
Required Associated Types§
sourcetype Moment: Parameter + Default + AtLeast32Bit + Scale<BlockNumberFor<Self>, Output = Self::Moment> + Copy + MaxEncodedLen + StaticTypeInfo
type Moment: Parameter + Default + AtLeast32Bit + Scale<BlockNumberFor<Self>, Output = Self::Moment> + Copy + MaxEncodedLen + StaticTypeInfo
Type used for expressing timestamp.
sourcetype OnTimestampSet: OnTimestampSet<Self::Moment>
type OnTimestampSet: OnTimestampSet<Self::Moment>
Something which can be notified when the timestamp is set. Set this to ()
if not
needed.
sourcetype MinimumPeriod: Get<Self::Moment>
type MinimumPeriod: Get<Self::Moment>
The minimum period between blocks. Beware that this is different to the expected period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. e.g. For Aura, it will be double this period on default settings.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.