Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

allow Treasurer to manage treasury #6340

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/kusama/src/governance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod origins;
pub use origins::{
pallet_custom_origins, AuctionAdmin, Fellows, FellowshipAdmin, FellowshipExperts,
FellowshipInitiates, FellowshipMasters, GeneralAdmin, LeaseAdmin, ReferendumCanceller,
ReferendumKiller, Spender, StakingAdmin, WhitelistedCaller,
ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller,
};
mod tracks;
pub use tracks::TracksInfo;
Expand Down
2 changes: 2 additions & 0 deletions runtime/kusama/src/governance/origins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pub mod pallet_custom_origins {
}
decl_unit_ensures!(
StakingAdmin,
Treasurer,
FellowshipAdmin,
GeneralAdmin,
AuctionAdmin,
Expand Down Expand Up @@ -173,6 +174,7 @@ pub mod pallet_custom_origins {
SmallSpender = 10 * GRAND,
MediumSpender = 100 * GRAND,
BigSpender = 1_000 * GRAND,
Treasurer = Balance::MAX,
}
}

Expand Down
4 changes: 2 additions & 2 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub mod xcm_config;
pub mod governance;
use governance::{
old::CouncilCollective, pallet_custom_origins, AuctionAdmin, GeneralAdmin, LeaseAdmin,
StakingAdmin, TreasurySpender,
StakingAdmin, TreasurySpender, Treasurer,
};

#[cfg(test)]
Expand Down Expand Up @@ -633,7 +633,7 @@ parameter_types! {
impl pallet_treasury::Config for Runtime {
type PalletId = TreasuryPalletId;
type Currency = Balances;
type ApproveOrigin = EnsureRoot<AccountId>;
type ApproveOrigin = EitherOf<EnsureRoot<AccountId>, Treasurer>;
type RejectOrigin = EnsureRoot<AccountId>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Treasurer should also be able to reject. Let me know if I should update this as well.

type RuntimeEvent = RuntimeEvent;
type OnSlash = Treasury;
Expand Down