Skip to content

Commit

Permalink
feat(collectives-westend-runtime): add aliasers
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoaguirre committed Dec 9, 2024
1 parent f62b6dd commit 83abd9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ use xcm_builder::{
ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, AliasChildLocation,
AliasOriginRootUsingFilter,
};
use xcm_executor::XcmExecutor;

Expand Down Expand Up @@ -191,6 +192,13 @@ pub type WaivedLocations = (
/// - DOT with the parent Relay Chain and sibling parachains.
pub type TrustedTeleporters = ConcreteAssetFromSystem<WndLocation>;

/// We allow locations to alias into their own child locations, as well as
/// AssetHub to alias into anything.
pub type Aliasers = (
AliasChildLocation,
AliasOriginRootUsingFilter<AssetHub, Everything>,
);

pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
Expand Down Expand Up @@ -227,7 +235,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type Aliasers = Aliasers;
type TransactionalProcessor = FrameTransactionalProcessor;
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/westend/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use xcm_builder::{
FungibleAdapter, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation,
OriginToPluralityVoice, SendXcmFeeToAccount, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, AliasChildLocation,
};
use xcm_executor::XcmExecutor;

Expand Down

0 comments on commit 83abd9d

Please sign in to comment.