Unverified Commit be1d2987 authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by GitHub
Browse files

new proxy for auctions, crowdloans, registrar, slots (#3683)

parent e76207c0
Pipeline #154972 passed with stages
in 40 minutes and 54 seconds
...@@ -979,6 +979,7 @@ pub enum ProxyType { ...@@ -979,6 +979,7 @@ pub enum ProxyType {
Staking, Staking,
IdentityJudgement, IdentityJudgement,
CancelProxy, CancelProxy,
Auction,
} }
impl Default for ProxyType { impl Default for ProxyType {
fn default() -> Self { fn default() -> Self {
...@@ -1056,6 +1057,10 @@ impl InstanceFilter<Call> for ProxyType { ...@@ -1056,6 +1057,10 @@ impl InstanceFilter<Call> for ProxyType {
ProxyType::CancelProxy => { ProxyType::CancelProxy => {
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..)))
}, },
ProxyType::Auction => matches!(
c,
Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..)
),
} }
} }
fn is_superset(&self, o: &Self) -> bool { fn is_superset(&self, o: &Self) -> bool {
......
...@@ -1038,6 +1038,7 @@ parameter_types! { ...@@ -1038,6 +1038,7 @@ parameter_types! {
pub enum ProxyType { pub enum ProxyType {
Any, Any,
CancelProxy, CancelProxy,
Auction,
} }
impl Default for ProxyType { impl Default for ProxyType {
fn default() -> Self { fn default() -> Self {
...@@ -1050,6 +1051,10 @@ impl InstanceFilter<Call> for ProxyType { ...@@ -1050,6 +1051,10 @@ impl InstanceFilter<Call> for ProxyType {
ProxyType::Any => true, ProxyType::Any => true,
ProxyType::CancelProxy => ProxyType::CancelProxy =>
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))), matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))),
ProxyType::Auction => matches!(
c,
Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..)
),
} }
} }
fn is_superset(&self, o: &Self) -> bool { fn is_superset(&self, o: &Self) -> bool {
......
...@@ -662,6 +662,7 @@ pub enum ProxyType { ...@@ -662,6 +662,7 @@ pub enum ProxyType {
SudoBalances, SudoBalances,
IdentityJudgement, IdentityJudgement,
CancelProxy, CancelProxy,
Auction,
} }
impl Default for ProxyType { impl Default for ProxyType {
fn default() -> Self { fn default() -> Self {
...@@ -728,6 +729,10 @@ impl InstanceFilter<Call> for ProxyType { ...@@ -728,6 +729,10 @@ impl InstanceFilter<Call> for ProxyType {
ProxyType::CancelProxy => { ProxyType::CancelProxy => {
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..))) matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement(..)))
}, },
ProxyType::Auction => matches!(
c,
Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..)
),
} }
} }
fn is_superset(&self, o: &Self) -> bool { fn is_superset(&self, o: &Self) -> bool {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment