From 08b8ab421e5e82555ee12b26d07a3be32e529cb6 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Tue, 17 Jan 2023 14:20:14 +0100 Subject: [PATCH] Enable treasury.spend by Root origin for Polkadot network before Gov2 (#6490) * Enable treasury.spend by Root origin * EnsureRoot -> EnsureRootWithSuccess --- runtime/polkadot/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 086f713ae0db..44a1b31d6b5d 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -833,6 +833,7 @@ parameter_types! { pub const MaxKeys: u32 = 10_000; pub const MaxPeerInHeartbeats: u32 = 10_000; pub const MaxPeerDataEncodingSize: u32 = 1_000; + pub const RootSpendOriginMaxAmount: Balance = Balance::MAX; } type ApproveOrigin = EitherOfDiverse< @@ -856,7 +857,7 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = Bounties; type MaxApprovals = MaxApprovals; type WeightInfo = weights::pallet_treasury::WeightInfo; - type SpendOrigin = frame_support::traits::NeverEnsureOrigin; + type SpendOrigin = frame_system::EnsureRootWithSuccess; } parameter_types! {