diff --git a/runtime/bifrost-kusama/src/lib.rs b/runtime/bifrost-kusama/src/lib.rs index 6b0309880..8f98b9e83 100644 --- a/runtime/bifrost-kusama/src/lib.rs +++ b/runtime/bifrost-kusama/src/lib.rs @@ -33,7 +33,7 @@ pub use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ ConstU128, ConstU32, ConstU64, ConstU8, Contains, EqualPrivilegeOnly, Everything, - InstanceFilter, IsInVec, NeverEnsureOrigin, Nothing, Randomness, + InstanceFilter, IsInVec, Nothing, Randomness, }, weights::{ constants::{ @@ -84,7 +84,7 @@ use frame_support::{ sp_runtime::traits::{Convert, ConvertInto}, traits::{Currency, EitherOfDiverse, Get, Imbalance, LockIdentifier, OnUnbalanced}, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::{EnsureRoot, EnsureSigned, EnsureWithSuccess}; use hex_literal::hex; pub use node_primitives::{ traits::{ @@ -831,6 +831,7 @@ parameter_types! { pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); pub CuratorDepositMin: Balance = 1 * BNCS; pub CuratorDepositMax: Balance = 100 * BNCS; + pub const MaxBalance: Balance = 800_000 * BNCS; } type ApproveOrigin = EitherOfDiverse< @@ -840,7 +841,7 @@ type ApproveOrigin = EitherOfDiverse< impl pallet_treasury::Config for Runtime { type ApproveOrigin = ApproveOrigin; - type SpendOrigin = NeverEnsureOrigin; + type SpendOrigin = EnsureWithSuccess, AccountId, MaxBalance>; type Burn = Burn; type BurnDestination = (); type Currency = Balances; diff --git a/runtime/bifrost-polkadot/src/lib.rs b/runtime/bifrost-polkadot/src/lib.rs index d6a1e95c1..d57db76e1 100644 --- a/runtime/bifrost-polkadot/src/lib.rs +++ b/runtime/bifrost-polkadot/src/lib.rs @@ -36,8 +36,7 @@ pub use frame_support::{ match_types, parameter_types, traits::{ ConstU128, ConstU32, ConstU64, ConstU8, Contains, EqualPrivilegeOnly, Everything, - Imbalance, InstanceFilter, IsInVec, LockIdentifier, NeverEnsureOrigin, Nothing, - OnUnbalanced, Randomness, + Imbalance, InstanceFilter, IsInVec, LockIdentifier, Nothing, OnUnbalanced, Randomness, }, weights::{ constants::{ @@ -85,7 +84,7 @@ use frame_support::{ sp_runtime::traits::{Convert, ConvertInto}, traits::{Currency, EitherOfDiverse, Get}, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::{EnsureRoot, EnsureSigned, EnsureWithSuccess}; use hex_literal::hex; pub use node_primitives::{ traits::{ @@ -791,6 +790,7 @@ parameter_types! { pub const TipReportDepositBase: Balance = 1 * DOLLARS; pub const DataDepositPerByte: Balance = 1 * CENTS; pub const MaxApprovals: u32 = 100; + pub const MaxBalance: Balance = 800_000 * BNCS; } type ApproveOrigin = EitherOfDiverse< @@ -800,7 +800,7 @@ type ApproveOrigin = EitherOfDiverse< impl pallet_treasury::Config for Runtime { type ApproveOrigin = ApproveOrigin; - type SpendOrigin = NeverEnsureOrigin; + type SpendOrigin = EnsureWithSuccess, AccountId, MaxBalance>; type Burn = Burn; type BurnDestination = (); type Currency = Balances;