mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 12:31:03 +00:00
Nomination pool configurations can be managed by custom origin (#3959)
closes https://github.com/paritytech/polkadot-sdk/issues/3894 Allows Nomination Pool configuration to be set by a custom origin instead of root. In runtimes, we would set this to be `StakingAdmin`, same as for pallet-staking. --------- Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
@@ -1657,6 +1657,9 @@ pub mod pallet {
|
||||
|
||||
/// The maximum length, in bytes, that a pools metadata maybe.
|
||||
type MaxMetadataLen: Get<u32>;
|
||||
|
||||
/// The origin that can manage pool configurations.
|
||||
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>;
|
||||
}
|
||||
|
||||
/// The sum of funds across all pools.
|
||||
@@ -2495,7 +2498,7 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
/// Update configurations for the nomination pools. The origin for this call must be
|
||||
/// Root.
|
||||
/// [`Config::AdminOrigin`].
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
@@ -2516,7 +2519,7 @@ pub mod pallet {
|
||||
max_members_per_pool: ConfigOp<u32>,
|
||||
global_max_commission: ConfigOp<Perbill>,
|
||||
) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
T::AdminOrigin::ensure_origin(origin)?;
|
||||
|
||||
macro_rules! config_op_exp {
|
||||
($storage:ty, $op:ident) => {
|
||||
|
||||
Reference in New Issue
Block a user