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§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype Scheduler: ScheduleNamed<BlockNumberFor<Self>, CallOf<Self>, Self::PalletsOrigin>
type Scheduler: ScheduleNamed<BlockNumberFor<Self>, CallOf<Self>, Self::PalletsOrigin>
The Scheduler.
sourcetype EnactmentPeriod: Get<BlockNumberFor<Self>>
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.
sourcetype VotingPeriod: Get<BlockNumberFor<Self>>
type VotingPeriod: Get<BlockNumberFor<Self>>
How often (in blocks) to check for new votes.
sourcetype FastTrackVotingPeriod: Get<BlockNumberFor<Self>>
type FastTrackVotingPeriod: Get<BlockNumberFor<Self>>
Minimum voting period allowed for a fast-track referendum.
sourcetype MinimumDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
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.
sourcetype MaxVotes: Get<u32>
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.
sourcetype MaxProposals: Get<u32>
type MaxProposals: Get<u32>
The maximum number of public proposals that can exist at any time.
sourcetype MaxDeposits: Get<u32>
type MaxDeposits: Get<u32>
The maximum number of deposits a public proposal may have at any time.
sourcetype FastTrackOrigin: EnsureOrigin<Self::RuntimeOrigin>
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.
sourcetype PalletsOrigin: From<RawOrigin<Self::AccountId>>
type PalletsOrigin: From<RawOrigin<Self::AccountId>>
Overarching type of all pallets origins.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype LaunchPeriod: Get<u64>
type LaunchPeriod: Get<u64>
Period from previous launch timestamp.
sourcetype TreasuryAccount: Get<Self::AccountId>
type TreasuryAccount: Get<Self::AccountId>
Account from which is transferred in spend_from_treasury
.
sourcetype TreasuryCurrency: Currency<Self::AccountId, Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type TreasuryCurrency: Currency<Self::AccountId, Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
Currency used in spend_from_treasury
.