mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
add EnsureWithSuccess (#12775)
* add EnsureWithSuccess * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * add docs Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -44,7 +44,7 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::{
|
||||
limits::{BlockLength, BlockWeights},
|
||||
EnsureRoot, EnsureRootWithSuccess, EnsureSigned,
|
||||
EnsureRoot, EnsureRootWithSuccess, EnsureSigned, EnsureWithSuccess,
|
||||
};
|
||||
pub use node_primitives::{AccountId, Signature};
|
||||
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
|
||||
@@ -1076,6 +1076,7 @@ parameter_types! {
|
||||
pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry");
|
||||
pub const MaximumReasonLength: u32 = 300;
|
||||
pub const MaxApprovals: u32 = 100;
|
||||
pub const MaxBalance: Balance = Balance::max_value();
|
||||
}
|
||||
|
||||
impl pallet_treasury::Config for Runtime {
|
||||
@@ -1100,7 +1101,7 @@ impl pallet_treasury::Config for Runtime {
|
||||
type SpendFunds = Bounties;
|
||||
type WeightInfo = pallet_treasury::weights::SubstrateWeight<Runtime>;
|
||||
type MaxApprovals = MaxApprovals;
|
||||
type SpendOrigin = frame_support::traits::NeverEnsureOrigin<u128>;
|
||||
type SpendOrigin = EnsureWithSuccess<EnsureRoot<AccountId>, AccountId, MaxBalance>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user