Skip to content

Commit

Permalink
Remove unnecesary LocationToAccountId
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Dec 16, 2024
1 parent 1588a3f commit bda7c82
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions solo-chains/runtime/dancelight/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ use {
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FixedWeightBounds,
FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsChildSystemParachain,
IsConcrete, MintLocation, OriginToPluralityVoice, ParentIsPreset, SendXcmFeeToAccount,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
IsConcrete, MintLocation, OriginToPluralityVoice, SendXcmFeeToAccount,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin,
WithUniqueTopic, XcmFeeManagerFromComponents,
},
xcm_executor::XcmExecutor,
};
Expand Down Expand Up @@ -117,23 +117,6 @@ pub type XcmRouter = WithUniqueTopic<
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
>;

/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
/// `Transact` in order to determine the dispatch Origin.
pub type LocationToAccountId = (
// The parent (Relay-chain) origin converts to the default `AccountId`.
ParentIsPreset<AccountId>,
// Sibling parachain origins convert to AccountId via the `ParaId::into`.
SiblingParachainConvertsVia<polkadot_parachain_primitives::primitives::Sibling, AccountId>,
// If we receive a Location of type AccountKey20, just generate a native account
AccountId32Aliases<RelayNetwork, AccountId>,
// Generate remote accounts according to polkadot standards
xcm_builder::HashedDescription<
AccountId,
xcm_builder::DescribeFamily<xcm_builder::DescribeAllTerminal>,
>,
);

parameter_types! {
pub Star: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(TokenLocation::get()) });
pub AssetHub: Location = Parachain(ASSET_HUB_ID).into_location();
Expand Down

0 comments on commit bda7c82

Please sign in to comment.