From 85bf7f808da3e70fc4d518a63c991bef9921f7c0 Mon Sep 17 00:00:00 2001 From: Ankan Date: Thu, 9 Mar 2023 00:00:50 +0100 Subject: [PATCH 1/2] add proxy for nomination pools --- runtime/kusama/src/lib.rs | 8 ++++++++ runtime/polkadot/src/lib.rs | 8 ++++++++ runtime/westend/src/lib.rs | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index fb61273892e1..3578945cfd77 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -951,6 +951,7 @@ pub enum ProxyType { CancelProxy, Auction, Society, + NominationPools, } impl Default for ProxyType { @@ -1044,6 +1045,13 @@ impl InstanceFilter for ProxyType { RuntimeCall::FastUnstake(..) ) }, + ProxyType::NominationPools => { + matches!( + c, + RuntimeCall::NominationPools(..) | + RuntimeCall::Utility(..) + ) + }, ProxyType::IdentityJudgement => matches!( c, RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index b5ddb16a2800..8ada6a0fe3ee 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1103,6 +1103,7 @@ pub enum ProxyType { IdentityJudgement = 5, CancelProxy = 6, Auction = 7, + NominationPools = 8, } #[cfg(test)] @@ -1207,6 +1208,13 @@ impl InstanceFilter for ProxyType { RuntimeCall::FastUnstake(..) ) }, + ProxyType::NominationPools => { + matches!( + c, + RuntimeCall::NominationPools(..) | + RuntimeCall::Utility(..) + ) + }, ProxyType::IdentityJudgement => matches!( c, RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index d7274fa6f9f2..71593b450b40 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -763,6 +763,7 @@ pub enum ProxyType { IdentityJudgement, CancelProxy, Auction, + NominationPools, } impl Default for ProxyType { fn default() -> Self { @@ -822,6 +823,13 @@ impl InstanceFilter for ProxyType { RuntimeCall::FastUnstake(..) ) }, + ProxyType::NominationPools => { + matches!( + c, + RuntimeCall::NominationPools(..) | + RuntimeCall::Utility(..) + ) + }, ProxyType::SudoBalances => match c { RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: ref x }) => { matches!(x.as_ref(), &RuntimeCall::Balances(..)) From e87d2bff829ec10bb61d0ce45eae34d13e4e3d94 Mon Sep 17 00:00:00 2001 From: Ankan Date: Thu, 9 Mar 2023 00:01:39 +0100 Subject: [PATCH 2/2] fmt --- runtime/kusama/src/lib.rs | 6 +----- runtime/polkadot/src/lib.rs | 6 +----- runtime/westend/src/lib.rs | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 3578945cfd77..beb5658e4ebe 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1046,11 +1046,7 @@ impl InstanceFilter for ProxyType { ) }, ProxyType::NominationPools => { - matches!( - c, - RuntimeCall::NominationPools(..) | - RuntimeCall::Utility(..) - ) + matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) }, ProxyType::IdentityJudgement => matches!( c, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 8ada6a0fe3ee..cf91cb97daf5 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1209,11 +1209,7 @@ impl InstanceFilter for ProxyType { ) }, ProxyType::NominationPools => { - matches!( - c, - RuntimeCall::NominationPools(..) | - RuntimeCall::Utility(..) - ) + matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) }, ProxyType::IdentityJudgement => matches!( c, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 71593b450b40..d689b9abf72d 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -824,11 +824,7 @@ impl InstanceFilter for ProxyType { ) }, ProxyType::NominationPools => { - matches!( - c, - RuntimeCall::NominationPools(..) | - RuntimeCall::Utility(..) - ) + matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) }, ProxyType::SudoBalances => match c { RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: ref x }) => {