From ca6992420f08731b2a683bfa893354b72a15848f Mon Sep 17 00:00:00 2001 From: Daniel Olano Date: Thu, 15 Aug 2024 16:16:37 +0200 Subject: [PATCH] Add "Spokesperson" proxy type to Kusama (#430) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A "Spokesperson" is a proxy type only allowed to make remarks in the name of the proxied account. Useful for DAOs with an account in the relay chain that need to make a statement. This will also allow the representative to act on behalf of the DAO in websites like subsquare/polkassembly to edit proposals for example. Co-authored-by: Bastian Köcher Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com> --- CHANGELOG.md | 1 + relay/kusama/src/lib.rs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d52bb145d..7ae025341e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - All runtimes: add `LocationToAccountApi` ([polkadot-fellows/runtimes#413](https://github.com/polkadot-fellows/runtimes/pull/413)) - Enable Agile Coretime on Polkadot ([polkadot-fellows/runtimes#401](https://github.com/polkadot-fellows/runtimes/pull/401)) - Add the Polkadot Coretime Chain runtime ([polkadot-fellows/runtimes#410](https://github.com/polkadot-fellows/runtimes/pull/410)) +- Kusama: Add a "Spokesperson" proxy type only allowed to send remarks ([polkadot-fellows/runtimes#430](https://github.com/polkadot-fellows/runtimes/pull/430)) - Add the Polkadot and Kusama Coretime Chain specs ([polkadot-fellows/runtimes#432](https://github.com/polkadot-fellows/runtimes/pull/432)) #### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322): diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index aa2c10cdc0..bb31116d06 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1037,6 +1037,8 @@ pub enum ProxyType { Society, #[codec(index = 8)] NominationPools, + #[codec(index = 9)] + Spokesperson, } impl Default for ProxyType { @@ -1135,6 +1137,11 @@ impl InstanceFilter for ProxyType { RuntimeCall::Slots(..) ), ProxyType::Society => matches!(c, RuntimeCall::Society(..)), + ProxyType::Spokesperson => matches!( + c, + RuntimeCall::System(frame_system::Call::remark { .. }) | + RuntimeCall::System(frame_system::Call::remark_with_event { .. }) + ), } } fn is_superset(&self, o: &Self) -> bool {