Proxy for Nomination Pools (#6846)

* add proxy for nomination pools

* fmt

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Ankan
2023-03-27 22:47:28 +02:00
committed by GitHub
parent 96ed979732
commit 465460abf9
3 changed files with 12 additions and 0 deletions
+4
View File
@@ -940,6 +940,7 @@ pub enum ProxyType {
CancelProxy,
Auction,
Society,
NominationPools,
}
impl Default for ProxyType {
@@ -1024,6 +1025,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::FastUnstake(..)
)
},
ProxyType::NominationPools => {
matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..))
},
ProxyType::IdentityJudgement => matches!(
c,
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
+4
View File
@@ -924,6 +924,7 @@ pub enum ProxyType {
IdentityJudgement = 5,
CancelProxy = 6,
Auction = 7,
NominationPools = 8,
}
#[cfg(test)]
@@ -1034,6 +1035,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::FastUnstake(..)
)
},
ProxyType::NominationPools => {
matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..))
},
ProxyType::IdentityJudgement => matches!(
c,
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
+4
View File
@@ -765,6 +765,7 @@ pub enum ProxyType {
IdentityJudgement,
CancelProxy,
Auction,
NominationPools,
}
impl Default for ProxyType {
fn default() -> Self {
@@ -824,6 +825,9 @@ impl InstanceFilter<RuntimeCall> 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(..))