pub trait Config<I: 'static = ()>: Config + Sized {
Show 17 associated items type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + From<Call<Self, I>> + IsType<<Self as Config>::RuntimeCall> + From<Call<Self>>; type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>; type WeightInfo: WeightInfo; type Scheduler: ScheduleAnon<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>> + ScheduleNamed<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>>; type Currency: ReservableCurrency<Self::AccountId>; type SubmitOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, PalletsOriginOf<Self>, Success = Self::AccountId>; type CancelOrigin: EnsureOrigin<Self::RuntimeOrigin>; type KillOrigin: EnsureOrigin<Self::RuntimeOrigin>; type Slash: OnUnbalanced<NegativeImbalanceOf<Self, I>>; type Votes: AtLeast32BitUnsigned + Copy + Parameter + Member + MaxEncodedLen; type Tally: VoteTally<Self::Votes, TrackIdOf<Self, I>> + Clone + Codec + Eq + Debug + TypeInfo + MaxEncodedLen; type SubmissionDeposit: Get<BalanceOf<Self, I>>; type MaxQueued: Get<u32>; type UndecidingTimeout: Get<BlockNumberFor<Self>>; type AlarmInterval: Get<BlockNumberFor<Self>>; type Tracks: Get<Vec<(<Self::Tracks as TracksInfo<BalanceOf<Self, I>, BlockNumberFor<Self>>>::Id, TrackInfo<BalanceOf<Self, I>, BlockNumberFor<Self>>)>> + TracksInfo<BalanceOf<Self, I>, BlockNumberFor<Self>, RuntimeOrigin = <Self::RuntimeOrigin as OriginTrait>::PalletsOrigin>; type Preimages: QueryPreimage + StorePreimage;
}
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.

Required Associated Types§

source

type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + From<Call<Self, I>> + IsType<<Self as Config>::RuntimeCall> + From<Call<Self>>

source

type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type Scheduler: ScheduleAnon<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>> + ScheduleNamed<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>>

The Scheduler.

source

type Currency: ReservableCurrency<Self::AccountId>

Currency type for this pallet.

source

type SubmitOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, PalletsOriginOf<Self>, Success = Self::AccountId>

Origin from which proposals may be submitted.

source

type CancelOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin from which any vote may be cancelled.

source

type KillOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin from which any vote may be killed.

source

type Slash: OnUnbalanced<NegativeImbalanceOf<Self, I>>

Handler for the unbalanced reduction when slashing a preimage deposit.

source

type Votes: AtLeast32BitUnsigned + Copy + Parameter + Member + MaxEncodedLen

The counting type for votes. Usually just balance.

source

type Tally: VoteTally<Self::Votes, TrackIdOf<Self, I>> + Clone + Codec + Eq + Debug + TypeInfo + MaxEncodedLen

The tallying type.

source

type SubmissionDeposit: Get<BalanceOf<Self, I>>

The minimum amount to be used as a deposit for a public referendum proposal.

source

type MaxQueued: Get<u32>

Maximum size of the referendum queue for a single track.

source

type UndecidingTimeout: Get<BlockNumberFor<Self>>

The number of blocks after submission that a referendum must begin being decided by. Once this passes, then anyone may cancel the referendum.

source

type AlarmInterval: Get<BlockNumberFor<Self>>

Quantization level for the referendum wakeup scheduler. A higher number will result in fewer storage reads/writes needed for smaller voters, but also result in delays to the automatic referendum status changes. Explicit servicing instructions are unaffected.

source

type Tracks: Get<Vec<(<Self::Tracks as TracksInfo<BalanceOf<Self, I>, BlockNumberFor<Self>>>::Id, TrackInfo<BalanceOf<Self, I>, BlockNumberFor<Self>>)>> + TracksInfo<BalanceOf<Self, I>, BlockNumberFor<Self>, RuntimeOrigin = <Self::RuntimeOrigin as OriginTrait>::PalletsOrigin>

Information concerning the different referendum tracks.

source

type Preimages: QueryPreimage + StorePreimage

The preimage provider.

Implementors§