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<Self::BlockNumber, CallOf<Self, I>, PalletsOriginOf<Self>> + ScheduleNamed<Self::BlockNumber, CallOf<Self, I>, PalletsOriginOf<Self>>;
type Currency: ReservableCurrency<Self::AccountId>;
type SubmitOrigin: EnsureOrigin<Self::RuntimeOrigin, 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<Self::BlockNumber>;
type AlarmInterval: Get<Self::BlockNumber>;
type Tracks: Get<Vec<(<Self::Tracks as TracksInfo<BalanceOf<Self, I>, Self::BlockNumber>>::Id, TrackInfo<BalanceOf<Self, I>, Self::BlockNumber>)>> + TracksInfo<BalanceOf<Self, I>, Self::BlockNumber, RuntimeOrigin = <Self::RuntimeOrigin as OriginTrait>::PalletsOrigin>;
type Preimages: QueryPreimage + StorePreimage;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
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<Self::BlockNumber, CallOf<Self, I>, PalletsOriginOf<Self>> + ScheduleNamed<Self::BlockNumber, CallOf<Self, I>, PalletsOriginOf<Self>>
type Scheduler: ScheduleAnon<Self::BlockNumber, CallOf<Self, I>, PalletsOriginOf<Self>> + ScheduleNamed<Self::BlockNumber, CallOf<Self, I>, PalletsOriginOf<Self>>
The Scheduler.
sourcetype Currency: ReservableCurrency<Self::AccountId>
type Currency: ReservableCurrency<Self::AccountId>
Currency type for this pallet.
sourcetype SubmitOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::AccountId>
type SubmitOrigin: EnsureOrigin<Self::RuntimeOrigin, 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<Self::BlockNumber>
type UndecidingTimeout: Get<Self::BlockNumber>
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<Self::BlockNumber>
type AlarmInterval: Get<Self::BlockNumber>
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>, Self::BlockNumber>>::Id, TrackInfo<BalanceOf<Self, I>, Self::BlockNumber>)>> + TracksInfo<BalanceOf<Self, I>, Self::BlockNumber, RuntimeOrigin = <Self::RuntimeOrigin as OriginTrait>::PalletsOrigin>
type Tracks: Get<Vec<(<Self::Tracks as TracksInfo<BalanceOf<Self, I>, Self::BlockNumber>>::Id, TrackInfo<BalanceOf<Self, I>, Self::BlockNumber>)>> + TracksInfo<BalanceOf<Self, I>, Self::BlockNumber, RuntimeOrigin = <Self::RuntimeOrigin as OriginTrait>::PalletsOrigin>
Information concerning the different referendum tracks.
sourcetype Preimages: QueryPreimage + StorePreimage
type Preimages: QueryPreimage + StorePreimage
The preimage provider.