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
+10 -4
View File
@@ -40,8 +40,8 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
WithUniqueTopic,
TakeWeightCredit, TinkernetMultisigAsAccountId, TinkernetMultisigAsNative,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
@@ -53,8 +53,12 @@ parameter_types! {
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local);
}
pub type LocationConverter =
(ChildParachainConvertsVia<ParaId, AccountId>, AccountId32Aliases<ThisNetwork, AccountId>);
pub type LocationConverter = (
ChildParachainConvertsVia<ParaId, AccountId>,
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
/// view of XCM-only concepts like `MultiLocation` and `MultiAsset`.
@@ -83,6 +87,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! {