diff --git a/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts b/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts index 62c6ecfc..be54da10 100644 --- a/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts +++ b/packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts @@ -1,5 +1,8 @@ /* eslint-disable sort-keys */ -import { ExtrinsicConfigBuilder } from '../../ExtrinsicBuilder.interfaces'; +import { + ExtrinsicConfigBuilder, + Parents, +} from '../../ExtrinsicBuilder.interfaces'; import { ExtrinsicConfig } from '../../ExtrinsicConfig'; import { getPolkadotXcmExtrinsicArgs, @@ -10,7 +13,7 @@ const pallet = 'polkadotXcm'; export function polkadotXcm() { return { - limitedReserveTransferAssets: () => { + limitedReserveTransferAssets: (parents: Parents = 0) => { const func = 'limitedReserveTransferAssets'; return { @@ -27,7 +30,7 @@ export function polkadotXcm() { { id: { Concrete: { - parents: 0, + parents, interior: 'Here', }, }, diff --git a/packages/config/src/configs/polkadotAssetHub.ts b/packages/config/src/configs/polkadotAssetHub.ts index e1232812..fbbf256c 100644 --- a/packages/config/src/configs/polkadotAssetHub.ts +++ b/packages/config/src/configs/polkadotAssetHub.ts @@ -13,6 +13,25 @@ const xcmDeliveryFeeAmount = 0.036; export const polkadotAssetHubConfig = new ChainConfig({ assets: [ + new AssetConfig({ + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + destination: moonbeam, + destinationFee: { + amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + }, + extrinsic: ExtrinsicBuilder() + .polkadotXcm() + .limitedReserveTransferAssets(1) + .here(), + fee: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + xcmDeliveryFeeAmount, + }, + }), new AssetConfig({ asset: usdt, balance: BalanceBuilder().substrate().assets().account(),