Skip to content

Commit

Permalink
Add PEN token to MultiLocation (and viceversa) conversions in XCM config
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanS98 committed Oct 27, 2023
1 parent d8626d4 commit 9d646f6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion runtime/pendulum/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use polkadot_parachain::primitives::Sibling;
use polkadot_runtime_common::impls::ToAuthor;
use runtime_common::parachains::polkadot::asset_hub;
use sp_runtime::traits::Convert;
use xcm::latest::{prelude::*, Weight as XCMWeight};
use xcm::{latest::{prelude::*, Weight as XCMWeight}};
use xcm_builder::{
AccountId32Aliases, AllowUnpaidExecutionFrom, ConvertedConcreteId, EnsureXcmOrigin,
FixedWeightBounds, FungiblesAdapter, NoChecking, ParentIsPreset, RelayChainAsNative,
Expand Down Expand Up @@ -76,6 +76,7 @@ impl Convert<CurrencyId, Option<MultiLocation>> for CurrencyIdConvert {
)),
_ => None,
},
CurrencyId::Native => Some(MultiLocation::new(1, X2(Parachain(ParachainInfo::parachain_id().into()), PalletInstance(10)))),
_ => None,
}
}
Expand All @@ -95,6 +96,14 @@ impl Convert<MultiLocation, Option<CurrencyId>> for CurrencyIdConvert {
GeneralIndex(asset_hub::USDT_ASSET_ID),
),
} => Some(CurrencyId::XCM(XCM_ASSET_ASSETHUB_USDT)),
MultiLocation {
parents: 1,
interior:
X2(
Parachain(id),
PalletInstance(10),
),
} if id == u32::from(ParachainInfo::parachain_id()) => Some(CurrencyId::Native),
_ => None,
}
}
Expand Down

0 comments on commit 9d646f6

Please sign in to comment.