mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 12:58:05 +00:00
Council as SpendOrigin (#6877)
This commit is contained in:
@@ -41,13 +41,13 @@ use frame_election_provider_support::{generate_solution_type, onchain, Sequentia
|
||||
use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::{
|
||||
ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||
ConstU32, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||
PrivilegeCmp, WithdrawReasons,
|
||||
},
|
||||
weights::ConstantMultiplier,
|
||||
PalletId, RuntimeDebug,
|
||||
};
|
||||
use frame_system::EnsureRoot;
|
||||
use frame_system::{EnsureRoot, EnsureWithSuccess};
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use pallet_session::historical as session_historical;
|
||||
@@ -826,6 +826,7 @@ parameter_types! {
|
||||
pub const MaxPeerInHeartbeats: u32 = 10_000;
|
||||
pub const MaxPeerDataEncodingSize: u32 = 1_000;
|
||||
pub const RootSpendOriginMaxAmount: Balance = Balance::MAX;
|
||||
pub const CouncilSpendOriginMaxAmount: Balance = Balance::MAX;
|
||||
}
|
||||
|
||||
type ApproveOrigin = EitherOfDiverse<
|
||||
@@ -849,7 +850,14 @@ impl pallet_treasury::Config for Runtime {
|
||||
type SpendFunds = Bounties;
|
||||
type MaxApprovals = MaxApprovals;
|
||||
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
|
||||
type SpendOrigin = frame_system::EnsureRootWithSuccess<AccountId, RootSpendOriginMaxAmount>;
|
||||
type SpendOrigin = EitherOf<
|
||||
frame_system::EnsureRootWithSuccess<AccountId, RootSpendOriginMaxAmount>,
|
||||
EnsureWithSuccess<
|
||||
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 3, 5>,
|
||||
AccountId,
|
||||
CouncilSpendOriginMaxAmount,
|
||||
>,
|
||||
>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user