Add registrar proxy (#1296)

* Add registrar proxy

* Add proxy filter for registrar for polkadot and westend

* Renaming + allow batch calls for Kusama

* Add batch calls for other chains
This commit is contained in:
Chevdor
2020-07-01 15:36:54 +02:00
committed by GitHub
parent bba14546ab
commit 3b357fadd5
3 changed files with 15 additions and 0 deletions
+5
View File
@@ -799,6 +799,7 @@ pub enum ProxyType {
NonTransfer, NonTransfer,
Governance, Governance,
Staking, Staking,
IdentityJudgement,
} }
impl Default for ProxyType { fn default() -> Self { Self::Any } } impl Default for ProxyType { fn default() -> Self { Self::Any } }
impl InstanceFilter<Call> for ProxyType { impl InstanceFilter<Call> for ProxyType {
@@ -857,6 +858,10 @@ impl InstanceFilter<Call> for ProxyType {
ProxyType::Staking => matches!(c, ProxyType::Staking => matches!(c,
Call::Staking(..) | Call::Utility(..) Call::Staking(..) | Call::Utility(..)
), ),
ProxyType::IdentityJudgement => matches!(c,
Call::Identity(identity::Call::provide_judgement(..))
| Call::Utility(utility::Call::batch(..))
)
} }
} }
fn is_superset(&self, o: &Self) -> bool { fn is_superset(&self, o: &Self) -> bool {
+5
View File
@@ -806,6 +806,7 @@ pub enum ProxyType {
Governance, Governance,
Staking, Staking,
SudoBalances, SudoBalances,
IdentityJudgement,
} }
impl Default for ProxyType { fn default() -> Self { Self::Any } } impl Default for ProxyType { fn default() -> Self { Self::Any } }
impl InstanceFilter<Call> for ProxyType { impl InstanceFilter<Call> for ProxyType {
@@ -862,6 +863,10 @@ impl InstanceFilter<Call> for ProxyType {
Call::Utility(..) => true, Call::Utility(..) => true,
_ => false, _ => false,
}, },
ProxyType::IdentityJudgement => matches!(c,
Call::Identity(identity::Call::provide_judgement(..))
| Call::Utility(utility::Call::batch(..))
)
} }
} }
fn is_superset(&self, o: &Self) -> bool { fn is_superset(&self, o: &Self) -> bool {
+5
View File
@@ -581,6 +581,7 @@ pub enum ProxyType {
NonTransfer, NonTransfer,
Staking, Staking,
SudoBalances, SudoBalances,
IdentityJudgement,
} }
impl Default for ProxyType { fn default() -> Self { Self::Any } } impl Default for ProxyType { fn default() -> Self { Self::Any } }
impl InstanceFilter<Call> for ProxyType { impl InstanceFilter<Call> for ProxyType {
@@ -632,6 +633,10 @@ impl InstanceFilter<Call> for ProxyType {
Call::Utility(..) => true, Call::Utility(..) => true,
_ => false, _ => false,
}, },
ProxyType::IdentityJudgement => matches!(c,
Call::Identity(identity::Call::provide_judgement(..))
| Call::Utility(utility::Call::batch(..))
)
} }
} }
fn is_superset(&self, o: &Self) -> bool { fn is_superset(&self, o: &Self) -> bool {