Trait pallet_collective::pallet::Config
source · pub trait Config<I: 'static = ()>: Config {
Show 13 associated items
type RuntimeOrigin: From<RawOrigin<Self::AccountId, I>>;
type Proposal: Parameter + Dispatchable<RuntimeOrigin = <Self as Config<I>>::RuntimeOrigin, PostInfo = PostDispatchInfo> + From<Call<Self>> + GetDispatchInfo;
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type MotionDuration: Get<BlockNumberFor<Self>>;
type MaxProposals: Get<ProposalIndex>;
type MaxMembers: Get<MemberCount>;
type DefaultVote: DefaultVote;
type WeightInfo: WeightInfo;
type SetMembersOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>;
type MaxProposalWeight: Get<Weight>;
type DisapproveOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>;
type KillOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>;
type Consideration: MaybeConsideration<Self::AccountId, u32>;
}
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§
sourcetype RuntimeOrigin: From<RawOrigin<Self::AccountId, I>>
type RuntimeOrigin: From<RawOrigin<Self::AccountId, I>>
The runtime origin type.
sourcetype Proposal: Parameter + Dispatchable<RuntimeOrigin = <Self as Config<I>>::RuntimeOrigin, PostInfo = PostDispatchInfo> + From<Call<Self>> + GetDispatchInfo
type Proposal: Parameter + Dispatchable<RuntimeOrigin = <Self as Config<I>>::RuntimeOrigin, PostInfo = PostDispatchInfo> + From<Call<Self>> + GetDispatchInfo
The runtime call dispatch type.
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The runtime event type.
sourcetype MotionDuration: Get<BlockNumberFor<Self>>
type MotionDuration: Get<BlockNumberFor<Self>>
The time-out for council motions.
sourcetype MaxProposals: Get<ProposalIndex>
type MaxProposals: Get<ProposalIndex>
Maximum number of proposals allowed to be active in parallel.
sourcetype MaxMembers: Get<MemberCount>
type MaxMembers: Get<MemberCount>
The maximum number of members supported by the pallet. Used for weight estimation.
NOTE:
- Benchmarks will need to be re-run and weights adjusted if this changes.
- This pallet assumes that dependents keep to the limit without enforcing it.
sourcetype DefaultVote: DefaultVote
type DefaultVote: DefaultVote
Default vote strategy of this collective.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype SetMembersOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
type SetMembersOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
Origin allowed to set collective members
sourcetype MaxProposalWeight: Get<Weight>
type MaxProposalWeight: Get<Weight>
The maximum weight of a dispatch call that can be proposed and executed.
sourcetype DisapproveOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
type DisapproveOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
Origin from which a proposal in any status may be disapproved without associated cost for a proposer.
sourcetype KillOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
type KillOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
Origin from which any malicious proposal may be killed with associated cost for a proposer.
The associated cost is set by Config::Consideration
and can be none.
sourcetype Consideration: MaybeConsideration<Self::AccountId, u32>
type Consideration: MaybeConsideration<Self::AccountId, u32>
Mechanism to assess the necessity of some cost for publishing and storing a proposal.
The footprint is defined as proposal_count
, which reflects the total number of active
proposals in the system, excluding the one currently being proposed. The cost may vary
based on this count.
Note: If the resulting deposits are excessively high and cause benchmark failures,
consider using a constant cost (e.g., crate::deposit::Constant
) equal to the minimum
balance under the runtime-benchmarks
feature.