Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
allow KSM from Statemint
  • Loading branch information
apopiak committed Jan 20, 2022
commit 827235e87eaae60c45bf03da0847ba2312d5ee0f
12 changes: 10 additions & 2 deletions polkadot-parachains/rococo-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ use xcm_builder::{
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, Case,
};
use xcm_executor::{Config, XcmExecutor};

Expand Down Expand Up @@ -391,9 +391,17 @@ parameter_types! {
// Statemint's Assets pallet index
pub StatemintAssetsPalletLocation: MultiLocation =
MultiLocation::new(1, X2(Parachain(1000), PalletInstance(50)));
pub KsmFilter: MultiAssetFilter = MultiAssetFilter::Wild(WildMultiAsset::AllOf{ id: (1, Here).into(), fun: WildFungibility::Fungible });
pub KsmFromStatemint: (MultiAssetFilter, MultiLocation) = (
KsmFilter::get(), StatemintLocation::get()
);
}

pub type Reserves = (NativeAsset, AssetsFrom<StatemintLocation>);
pub type Reserves = (
NativeAsset,
AssetsFrom<StatemintLocation>,
Case<KsmFromStatemint>,
);

pub struct XcmConfig;
impl Config for XcmConfig {
Expand Down