Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit ef5c615

Browse files
config foreign assets transactor
1 parent d0f7e3e commit ef5c615

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
//! soon.
2525
use super::{
2626
AccountId, AllPalletsWithSystem, AssetId as AssetIdPalletAssets, Assets, Balance, Balances,
27-
ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
28-
WeightToFee, XcmpQueue,
27+
ForeignAssets, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent,
28+
RuntimeOrigin, WeightToFee, XcmpQueue,
2929
};
3030
use core::marker::PhantomData;
3131
use frame_support::{
@@ -49,7 +49,7 @@ use xcm_builder::{
4949
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex,
5050
ConvertedConcreteId, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry,
5151
EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset,
52-
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
52+
NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
5353
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
5454
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
5555
WithComputedOrigin, WithUniqueTopic,
@@ -111,8 +111,30 @@ pub type FungiblesTransactor = FungiblesAdapter<
111111
CheckingAccount,
112112
>;
113113

114+
/// `AssetId/Balance` converter for `TrustBackedAssets`
115+
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
116+
Nothing,
117+
Balance,
118+
>;
119+
120+
/// Means for transacting foreign assets from different global consensus.
121+
pub type ForeignFungiblesTransactor = FungiblesAdapter<
122+
// Use this fungibles implementation:
123+
ForeignAssets,
124+
// Use this currency when it is a fungible asset matching the given location or name:
125+
ForeignAssetsConvertedConcreteId,
126+
// Convert an XCM MultiLocation into a local account id:
127+
LocationToAccountId,
128+
// Our chain's account ID type (we can't get away without mentioning it explicitly):
129+
AccountId,
130+
// We dont need to check teleports here.
131+
NoChecking,
132+
// The account to use for tracking teleports.
133+
CheckingAccount,
134+
>;
135+
114136
/// Means for transacting assets on this chain.
115-
pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor);
137+
pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor);
116138

117139
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
118140
/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can

0 commit comments

Comments
 (0)