From 9d573d02bcb9f5e98a224ec60e7fb694fffd74ae Mon Sep 17 00:00:00 2001 From: Santiago Balaguer Date: Tue, 24 Dec 2024 11:47:18 +0100 Subject: [PATCH 1/4] added ParaRegistration proxy to Polkadot and Kusama --- relay/kusama/src/lib.rs | 8 ++++++++ relay/polkadot/src/lib.rs | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 7649d2df0f..3ee6c00e53 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1143,6 +1143,8 @@ pub enum ProxyType { NominationPools, #[codec(index = 9)] Spokesperson, + #[codec(index = 10)] + ParaRegistration, } impl Default for ProxyType { @@ -1247,6 +1249,12 @@ impl InstanceFilter 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 { diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 7008b5bd75..f37a9f0a80 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1007,6 +1007,7 @@ pub enum ProxyType { CancelProxy = 6, Auction = 7, NominationPools = 8, + ParaRegistration = 9, } #[cfg(test)] @@ -1121,6 +1122,12 @@ impl InstanceFilter 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 { From 7970f684c3895235393bf56f6964176a80f9808a Mon Sep 17 00:00:00 2001 From: Santiago Balaguer Date: Tue, 24 Dec 2024 11:52:19 +0100 Subject: [PATCH 2/4] added CHANGELOG entry --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fe06d9544..f7da854e63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added -- Location conversion tests for relays and parachains ([polkadot-fellows/runtimes#487](https://github.com/polkadot-fellows/runtimes/pull/487)) +- Location conversion tests for relays and parachains ([polkadot-fellows/runtimes#516](https://github.com/polkadot-fellows/runtimes/issues/516)) + +- ParaRegistration proxy for Polkadot and Kusama ([polkadot-fellows/runtimes#520](https://github.com/polkadot-fellows/runtimes/pull/520)) ### Changed From 6dd4c511112578f13a5c906bccbfae6516e93da8 Mon Sep 17 00:00:00 2001 From: Santiago Balaguer Date: Tue, 24 Dec 2024 14:39:14 +0100 Subject: [PATCH 3/4] added utilites pallet and edited CHANGELOG --- CHANGELOG.md | 2 +- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7da854e63..be87516972 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added -- Location conversion tests for relays and parachains ([polkadot-fellows/runtimes#516](https://github.com/polkadot-fellows/runtimes/issues/516)) +- Location conversion tests for relays and parachains ([polkadot-fellows/runtimes#487](https://github.com/polkadot-fellows/runtimes/pull/487)) - ParaRegistration proxy for Polkadot and Kusama ([polkadot-fellows/runtimes#520](https://github.com/polkadot-fellows/runtimes/pull/520)) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 3ee6c00e53..6d200a2e32 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1253,6 +1253,7 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::Registrar(paras_registrar::Call::reserve { .. }) | RuntimeCall::Registrar(paras_registrar::Call::register { .. }) | + RuntimeCall::Utility(..) | RuntimeCall::Proxy(pallet_proxy::Call::remove_proxy { .. }) ), } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index f37a9f0a80..5da9ddf092 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1126,6 +1126,7 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::Registrar(paras_registrar::Call::reserve { .. }) | RuntimeCall::Registrar(paras_registrar::Call::register { .. }) | + RuntimeCall::Utility(..) | RuntimeCall::Proxy(pallet_proxy::Call::remove_proxy { .. }) ), } From 282a51bef707aaefd5391da339fe42afa4fb37ce Mon Sep 17 00:00:00 2001 From: Santiago Balaguer Date: Thu, 26 Dec 2024 10:28:15 +0100 Subject: [PATCH 4/4] added only batch calls from utility pallet --- relay/kusama/src/lib.rs | 4 +++- relay/polkadot/src/lib.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 6d200a2e32..5252cf8728 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1253,7 +1253,9 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::Registrar(paras_registrar::Call::reserve { .. }) | RuntimeCall::Registrar(paras_registrar::Call::register { .. }) | - RuntimeCall::Utility(..) | + RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | + RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) | RuntimeCall::Proxy(pallet_proxy::Call::remove_proxy { .. }) ), } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 5da9ddf092..4bd27abc7d 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1126,7 +1126,9 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::Registrar(paras_registrar::Call::reserve { .. }) | RuntimeCall::Registrar(paras_registrar::Call::register { .. }) | - RuntimeCall::Utility(..) | + RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | + RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) | RuntimeCall::Proxy(pallet_proxy::Call::remove_proxy { .. }) ), }