mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 14:35:40 +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:
@@ -36,10 +36,11 @@ use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
||||
ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds,
|
||||
IsChildSystemParachain, IsConcrete, MintLocation, SignedAccountId32AsNative,
|
||||
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||
ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeBodyTerminal,
|
||||
DescribeFamily, FixedWeightBounds, HashedDescription, IsChildSystemParachain, IsConcrete,
|
||||
MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
|
||||
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
|
||||
WithUniqueTopic,
|
||||
};
|
||||
use xcm_executor::XcmExecutor;
|
||||
|
||||
@@ -51,8 +52,14 @@ parameter_types! {
|
||||
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local);
|
||||
}
|
||||
|
||||
pub type LocationConverter =
|
||||
(ChildParachainConvertsVia<ParaId, AccountId>, AccountId32Aliases<ThisNetwork, AccountId>);
|
||||
pub type LocationConverter = (
|
||||
// We can convert a child parachain using the standard `AccountId` conversion.
|
||||
ChildParachainConvertsVia<ParaId, AccountId>,
|
||||
// We can directly alias an `AccountId32` into a local account.
|
||||
AccountId32Aliases<ThisNetwork, AccountId>,
|
||||
// Allow governance body to be used as a sovereign account.
|
||||
HashedDescription<AccountId, DescribeFamily<DescribeBodyTerminal>>,
|
||||
);
|
||||
|
||||
/// Our asset transactor. This is what allows us to interest with the runtime facilities from the
|
||||
/// point of view of XCM-only concepts like `MultiLocation` and `MultiAsset`.
|
||||
|
||||
Reference in New Issue
Block a user