Skip to content

Commit

Permalink
Add "Spokesperson" proxy type to Kusama (#430)
Browse files Browse the repository at this point in the history
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 <git@kchr.de>
Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 15, 2024
1 parent ab0f42d commit ca69924
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 7 additions & 0 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,8 @@ pub enum ProxyType {
Society,
#[codec(index = 8)]
NominationPools,
#[codec(index = 9)]
Spokesperson,
}

impl Default for ProxyType {
Expand Down Expand Up @@ -1135,6 +1137,11 @@ impl InstanceFilter<RuntimeCall> 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 {
Expand Down

0 comments on commit ca69924

Please sign in to comment.