Introduce Tinkernet multisig XCM configs to Kusama/Rococo through xcm-builder (#7165)

* Introduce Tinkernet multisig XCM configs

* fmt fix

* overflow handling, comments, clippy fixes

* Adding Tinkernet XCM configs to xcm-builder

* switching spaces to tab

* remove derivation.rs in favor of location_conversion.rs

* replace hardcoded literals with constants

* autoformat

* Fix for the unit test

* replacing expect with an error and renaming constants

* Resolving clippy warning

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Gabriel Facco de Arruda
2023-06-28 19:42:25 +02:00
committed by GitHub
parent 3a10a29df5
commit af99520569
7 changed files with 124 additions and 8 deletions
+7 -2
View File
@@ -41,8 +41,9 @@ use xcm_builder::{
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
SovereignSignedViaLocation, TakeWeightCredit, TinkernetMultisigAsAccountId,
TinkernetMultisigAsNative, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds,
WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::traits::WithOriginFilter;
@@ -70,6 +71,8 @@ pub type SovereignAccountOf = (
ChildParachainConvertsVia<ParaId, AccountId>,
// We can directly alias an `AccountId32` into a local account.
AccountId32Aliases<ThisNetwork, AccountId>,
// We can derive a local account from a Tinkernet XCMultisig MultiLocation.
TinkernetMultisigAsAccountId<AccountId>,
);
/// Our asset transactor. This is what allows us to interest with the runtime facilities from the point of
@@ -99,6 +102,8 @@ type LocalOriginConverter = (
SignedAccountId32AsNative<ThisNetwork, RuntimeOrigin>,
// A system child parachain, expressed as a Superuser, converts to the `Root` origin.
ChildSystemParachainAsSuperuser<ParaId, RuntimeOrigin>,
// Converts a Tinkernet XCMultisig MultiLocation into a `Signed` origin.
TinkernetMultisigAsNative<RuntimeOrigin>,
);
parameter_types! {