Trait democracy::pallet::Config

source ·
pub trait Config: Config + Sized {
Show 18 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type Scheduler: ScheduleNamed<BlockNumberFor<Self>, CallOf<Self>, Self::PalletsOrigin>; type Preimages: QueryPreimage + StorePreimage; type Currency: ReservableCurrency<Self::AccountId>; type EnactmentPeriod: Get<BlockNumberFor<Self>>; type VotingPeriod: Get<BlockNumberFor<Self>>; type FastTrackVotingPeriod: Get<BlockNumberFor<Self>>; type MinimumDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type MaxVotes: Get<u32>; type MaxProposals: Get<u32>; type MaxDeposits: Get<u32>; type FastTrackOrigin: EnsureOrigin<Self::RuntimeOrigin>; type PalletsOrigin: From<RawOrigin<Self::AccountId>>; type WeightInfo: WeightInfo; type UnixTime: UnixTime; type LaunchPeriod: Get<u64>; type TreasuryAccount: Get<Self::AccountId>; type TreasuryCurrency: Currency<Self::AccountId, Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
}
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 RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type Scheduler: ScheduleNamed<BlockNumberFor<Self>, CallOf<Self>, Self::PalletsOrigin>

The Scheduler.

source

type Preimages: QueryPreimage + StorePreimage

The Preimage provider.

source

type Currency: ReservableCurrency<Self::AccountId>

Currency type for this pallet.

source

type EnactmentPeriod: Get<BlockNumberFor<Self>>

The period between a proposal being approved and enacted.

It should generally be a little more than the unstake period to ensure that voting stakers have an opportunity to remove themselves from the system in the case where they are on the losing side of a vote.

source

type VotingPeriod: Get<BlockNumberFor<Self>>

How often (in blocks) to check for new votes.

source

type FastTrackVotingPeriod: Get<BlockNumberFor<Self>>

Minimum voting period allowed for a fast-track referendum.

source

type MinimumDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

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

source

type MaxVotes: Get<u32>

The maximum number of votes for an account.

Also used to compute weight, an overly big value can lead to extrinsic with very big weight.

source

type MaxProposals: Get<u32>

The maximum number of public proposals that can exist at any time.

source

type MaxDeposits: Get<u32>

The maximum number of deposits a public proposal may have at any time.

source

type FastTrackOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin from which the next majority-carries (or more permissive) referendum may be tabled to vote according to the FastTrackVotingPeriod asynchronously in a similar manner to the emergency origin. It retains its threshold method.

source

type PalletsOrigin: From<RawOrigin<Self::AccountId>>

Overarching type of all pallets origins.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type UnixTime: UnixTime

Unix time

source

type LaunchPeriod: Get<u64>

Period from previous launch timestamp.

source

type TreasuryAccount: Get<Self::AccountId>

Account from which is transferred in spend_from_treasury.

source

type TreasuryCurrency: Currency<Self::AccountId, Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

Currency used in spend_from_treasury.

Implementors§