Skip to content

Commit

Permalink
added ParaRegistration proxy to Polkadot and Kusama
Browse files Browse the repository at this point in the history
  • Loading branch information
SBalaguer committed Dec 24, 2024
1 parent 2e73a6c commit 9d573d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,8 @@ pub enum ProxyType {
NominationPools,
#[codec(index = 9)]
Spokesperson,
#[codec(index = 10)]
ParaRegistration,
}

impl Default for ProxyType {
Expand Down Expand Up @@ -1247,6 +1249,12 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::System(frame_system::Call::remark { .. }) |
RuntimeCall::System(frame_system::Call::remark_with_event { .. })
),
ProxyType::ParaRegistration => matches!(
c,
RuntimeCall::Registrar(paras_registrar::Call::reserve { .. }) |
RuntimeCall::Registrar(paras_registrar::Call::register { .. }) |
RuntimeCall::Proxy(pallet_proxy::Call::remove_proxy { .. })
),
}
}
fn is_superset(&self, o: &Self) -> bool {
Expand Down
7 changes: 7 additions & 0 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ pub enum ProxyType {
CancelProxy = 6,
Auction = 7,
NominationPools = 8,
ParaRegistration = 9,
}

#[cfg(test)]
Expand Down Expand Up @@ -1121,6 +1122,12 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Registrar(..) |
RuntimeCall::Slots(..)
),
ProxyType::ParaRegistration => matches!(
c,
RuntimeCall::Registrar(paras_registrar::Call::reserve { .. }) |
RuntimeCall::Registrar(paras_registrar::Call::register { .. }) |
RuntimeCall::Proxy(pallet_proxy::Call::remove_proxy { .. })
),
}
}
fn is_superset(&self, o: &Self) -> bool {
Expand Down

0 comments on commit 9d573d0

Please sign in to comment.