Trait pallet_referenda::pallet::Config
source · 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>, Hasher = Self::Hashing> + ScheduleNamed<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>, Hasher = Self::Hashing>;
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<H = Self::Hashing> + 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§
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>
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype Scheduler: ScheduleAnon<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>, Hasher = Self::Hashing> + ScheduleNamed<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>, Hasher = Self::Hashing>
type Scheduler: ScheduleAnon<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>, Hasher = Self::Hashing> + ScheduleNamed<BlockNumberFor<Self>, CallOf<Self, I>, PalletsOriginOf<Self>, Hasher = Self::Hashing>
The Scheduler.
sourcetype SubmitOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, PalletsOriginOf<Self>, Success = Self::AccountId>
type SubmitOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, PalletsOriginOf<Self>, Success = Self::AccountId>
Origin from which proposals may be submitted.
sourcetype CancelOrigin: EnsureOrigin<Self::RuntimeOrigin>
type CancelOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which any vote may be cancelled.
sourcetype KillOrigin: EnsureOrigin<Self::RuntimeOrigin>
type KillOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which any vote may be killed.
sourcetype Slash: OnUnbalanced<NegativeImbalanceOf<Self, I>>
type Slash: OnUnbalanced<NegativeImbalanceOf<Self, I>>
Handler for the unbalanced reduction when slashing a preimage deposit.
sourcetype Votes: AtLeast32BitUnsigned + Copy + Parameter + Member + MaxEncodedLen
type Votes: AtLeast32BitUnsigned + Copy + Parameter + Member + MaxEncodedLen
The counting type for votes. Usually just balance.
sourcetype Tally: VoteTally<Self::Votes, TrackIdOf<Self, I>> + Clone + Codec + Eq + Debug + TypeInfo + MaxEncodedLen
type Tally: VoteTally<Self::Votes, TrackIdOf<Self, I>> + Clone + Codec + Eq + Debug + TypeInfo + MaxEncodedLen
The tallying type.
sourcetype SubmissionDeposit: Get<BalanceOf<Self, I>>
type SubmissionDeposit: Get<BalanceOf<Self, I>>
The minimum amount to be used as a deposit for a public referendum proposal.
sourcetype UndecidingTimeout: Get<BlockNumberFor<Self>>
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.
sourcetype AlarmInterval: Get<BlockNumberFor<Self>>
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.
sourcetype 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 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.