Trait pallet_treasury::pallet::Config
source · pub trait Config<I: 'static = ()>: Config {
Show 16 associated items
type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>;
type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self, I>>;
type ProposalBond: Get<Permill>;
type ProposalBondMinimum: Get<BalanceOf<Self, I>>;
type ProposalBondMaximum: Get<Option<BalanceOf<Self, I>>>;
type SpendPeriod: Get<BlockNumberFor<Self>>;
type Burn: Get<Permill>;
type PalletId: Get<PalletId>;
type BurnDestination: OnUnbalanced<NegativeImbalanceOf<Self, I>>;
type WeightInfo: WeightInfo;
type SpendFunds: SpendFunds<Self, I>;
type MaxApprovals: Get<u32>;
type SpendOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = BalanceOf<Self, I>>;
}
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 Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>
type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>
The staking balance.
sourcetype ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which approvals must come.
sourcetype RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>
type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which rejections must come.
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype OnSlash: OnUnbalanced<NegativeImbalanceOf<Self, I>>
type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self, I>>
Handler for the unbalanced decrease when slashing for a rejected proposal or bounty.
sourcetype ProposalBond: Get<Permill>
type ProposalBond: Get<Permill>
Fraction of a proposal’s value that should be bonded in order to place the proposal. An accepted proposal gets these back. A rejected proposal does not.
sourcetype ProposalBondMinimum: Get<BalanceOf<Self, I>>
type ProposalBondMinimum: Get<BalanceOf<Self, I>>
Minimum amount of funds that should be placed in a deposit for making a proposal.
sourcetype ProposalBondMaximum: Get<Option<BalanceOf<Self, I>>>
type ProposalBondMaximum: Get<Option<BalanceOf<Self, I>>>
Maximum amount of funds that should be placed in a deposit for making a proposal.
sourcetype SpendPeriod: Get<BlockNumberFor<Self>>
type SpendPeriod: Get<BlockNumberFor<Self>>
Period between successive spends.
sourcetype PalletId: Get<PalletId>
type PalletId: Get<PalletId>
The treasury’s pallet id, used for deriving its sovereign account ID.
sourcetype BurnDestination: OnUnbalanced<NegativeImbalanceOf<Self, I>>
type BurnDestination: OnUnbalanced<NegativeImbalanceOf<Self, I>>
Handler for the unbalanced decrease when treasury funds are burned.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype SpendFunds: SpendFunds<Self, I>
type SpendFunds: SpendFunds<Self, I>
Runtime hooks to external pallet using treasury to compute spend funds.
sourcetype MaxApprovals: Get<u32>
type MaxApprovals: Get<u32>
The maximum number of approvals that can wait in the spending queue.
NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
sourcetype SpendOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = BalanceOf<Self, I>>
type SpendOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = BalanceOf<Self, I>>
The origin required for approving spends from the treasury outside of the proposal
process. The Success
value is the maximum amount that this origin is allowed to
spend at a time.