mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 04:31:02 +00:00
allow governance body on parachain to have sovereign account (#1291)
The goal is to allow Fellowship on Collective chain to have a sovereign account on Polkadot so that we can add it as an identity registrar. This will allow Fellows origin to be able to provide judgements for Fellowship members. This currently allow any body on any parachain including non system parachains to have sovereign account. I cannot think of any reason why that may be an issue but let me know if I should change it to filter only system parachains. [This](https://gist.github.com/xlc/ec61bfa4e9f6d62da27d30141ad2c72b) is the testing script. Original PR: https://github.com/paritytech/polkadot/pull/7518
This commit is contained in:
@@ -86,11 +86,22 @@ impl DescribeLocation for DescribeAccountKey20Terminal {
|
||||
|
||||
pub type DescribeAccountIdTerminal = (DescribeAccountId32Terminal, DescribeAccountKey20Terminal);
|
||||
|
||||
pub struct DescribeBodyTerminal;
|
||||
impl DescribeLocation for DescribeBodyTerminal {
|
||||
fn describe_location(l: &MultiLocation) -> Option<Vec<u8>> {
|
||||
match (l.parents, &l.interior) {
|
||||
(0, X1(Plurality { id, part })) => Some((b"Body", id, part).encode()),
|
||||
_ => return None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub type DescribeAllTerminal = (
|
||||
DescribeTerminus,
|
||||
DescribePalletTerminal,
|
||||
DescribeAccountId32Terminal,
|
||||
DescribeAccountKey20Terminal,
|
||||
DescribeBodyTerminal,
|
||||
);
|
||||
|
||||
pub struct DescribeFamily<DescribeInterior>(PhantomData<DescribeInterior>);
|
||||
|
||||
Reference in New Issue
Block a user