Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add registrar proxy (#1296)
Browse files Browse the repository at this point in the history
* Add registrar proxy

* Add proxy filter for registrar for polkadot and westend

* Renaming + allow batch calls for Kusama

* Add batch calls for other chains
  • Loading branch information
chevdor authored Jul 1, 2020
1 parent 40861d1 commit c6b29c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ pub enum ProxyType {
NonTransfer,
Governance,
Staking,
IdentityJudgement,
}
impl Default for ProxyType { fn default() -> Self { Self::Any } }
impl InstanceFilter<Call> for ProxyType {
Expand Down Expand Up @@ -857,6 +858,10 @@ impl InstanceFilter<Call> for ProxyType {
ProxyType::Staking => matches!(c,
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 {
Expand Down
5 changes: 5 additions & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ pub enum ProxyType {
Governance,
Staking,
SudoBalances,
IdentityJudgement,
}
impl Default for ProxyType { fn default() -> Self { Self::Any } }
impl InstanceFilter<Call> for ProxyType {
Expand Down Expand Up @@ -862,6 +863,10 @@ impl InstanceFilter<Call> for ProxyType {
Call::Utility(..) => true,
_ => false,
},
ProxyType::IdentityJudgement => matches!(c,
Call::Identity(identity::Call::provide_judgement(..))
| Call::Utility(utility::Call::batch(..))
)
}
}
fn is_superset(&self, o: &Self) -> bool {
Expand Down
5 changes: 5 additions & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ pub enum ProxyType {
NonTransfer,
Staking,
SudoBalances,
IdentityJudgement,
}
impl Default for ProxyType { fn default() -> Self { Self::Any } }
impl InstanceFilter<Call> for ProxyType {
Expand Down Expand Up @@ -632,6 +633,10 @@ impl InstanceFilter<Call> for ProxyType {
Call::Utility(..) => true,
_ => false,
},
ProxyType::IdentityJudgement => matches!(c,
Call::Identity(identity::Call::provide_judgement(..))
| Call::Utility(utility::Call::batch(..))
)
}
}
fn is_superset(&self, o: &Self) -> bool {
Expand Down

0 comments on commit c6b29c7

Please sign in to comment.