diff --git a/packages/xcm-cfg/src/chains.ts b/packages/xcm-cfg/src/chains.ts index 94386baa..a0fe7a2c 100644 --- a/packages/xcm-cfg/src/chains.ts +++ b/packages/xcm-cfg/src/chains.ts @@ -220,6 +220,19 @@ export const assetHub = new Parachain({ id: 1984, min: 0.7, palletInstance: 50, + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 50, + }, + { + GeneralIndex: 1984, + }, + ], + }, + }, }, { asset: usdc, @@ -227,16 +240,15 @@ export const assetHub = new Parachain({ id: 1337, min: 0.7, palletInstance: 50, - }, - { - asset: myth, - decimals: 18, xcmLocation: { - parents: 1, + parents: 0, interior: { - X1: [ + X2: [ { - Parachain: 3369, + PalletInstance: 50, + }, + { + GeneralIndex: 1337, }, ], }, @@ -247,24 +259,91 @@ export const assetHub = new Parachain({ decimals: 10, id: 23, palletInstance: 50, + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 50, + }, + { + GeneralIndex: 23, + }, + ], + }, + }, }, { asset: ded, decimals: 10, id: 30, palletInstance: 50, + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 50, + }, + { + GeneralIndex: 30, + }, + ], + }, + }, }, { asset: dota, decimals: 4, id: 18, palletInstance: 50, + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 50, + }, + { + GeneralIndex: 18, + }, + ], + }, + }, }, { asset: wud, decimals: 10, id: 31337, palletInstance: 50, + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 50, + }, + { + GeneralIndex: 31337, + }, + ], + }, + }, + }, + // foreign assets + { + asset: myth, + decimals: 18, + xcmLocation: { + parents: 1, + interior: { + X1: [ + { + Parachain: 3369, + }, + ], + }, + }, }, ], ecosystem: Ecosystem.Polkadot, @@ -1435,62 +1514,233 @@ export const moonbeam = new EvmParachain({ asset: glmr, id: '0x0000000000000000000000000000000000000802', min: 0.1, + xcmLocation: { + parents: 0, + interior: { + X1: [ + { + PalletInstance: 10, + }, + ], + }, + }, }, { asset: dai_mwh, decimals: 18, id: '0x06e605775296e851FF43b4dAa541Bb0984E9D6fD', + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 110, + }, + { + AccountKey20: { + network: null, + key: '0x06e605775296e851ff43b4daa541bb0984e9d6fd', + }, + }, + ], + }, + }, }, { asset: usdc_mwh, decimals: 6, id: '0x931715FEE2d06333043d11F658C8CE934aC61D0c', + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 110, + }, + { + AccountKey20: { + network: null, + key: '0x931715FEE2d06333043d11F658C8CE934aC61D0c', + }, + }, + ], + }, + }, }, { asset: usdt_mwh, decimals: 6, id: '0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f', + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 110, + }, + { + AccountKey20: { + network: null, + key: '0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f', + }, + }, + ], + }, + }, }, { asset: wbtc_mwh, decimals: 8, id: '0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D', + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 110, + }, + { + AccountKey20: { + network: null, + key: '0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D', + }, + }, + ], + }, + }, }, { asset: weth_mwh, decimals: 18, id: '0xab3f0245B83feB11d15AAffeFD7AD465a59817eD', - }, - { - asset: usdc, - decimals: 6, - id: '0xFFfffffF7D2B0B761Af01Ca8e25242976ac0aD7D', + xcmLocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: 110, + }, + { + AccountKey20: { + network: null, + key: '0xab3f0245B83feB11d15AAffeFD7AD465a59817eD', + }, + }, + ], + }, + }, }, // xc-20 assets { asset: aca, decimals: 12, id: '224821240862170613278369189818311486111', + xcmLocation: { + parents: 1, + interior: { + X2: [ + { + Parachain: 2000, + }, + { + GeneralKey: { + length: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000000', + }, + }, + ], + }, + }, }, { asset: dot, decimals: 10, id: '42259045809535163221576417993425387648', + xcmLocation: { + parents: 1, + interior: 'Here', + }, }, { asset: hdx, decimals: 12, id: '69606720909260275826784788104880799692', + xcmLocation: { + parents: 1, + interior: { + X2: [ + { + Parachain: 2034, + }, + { + GeneralIndex: 0, + }, + ], + }, + }, }, { asset: pink, decimals: 10, id: '64174511183114006009298114091987195453', + xcmLocation: { + parents: 1, + interior: { + X3: [ + { + Parachain: 1000, + }, + { + PalletInstance: 50, + }, + { + GeneralIndex: 23, + }, + ], + }, + }, + }, + { + asset: usdc, + decimals: 6, + id: '166377000701797186346254371275954761085', + xcmLocation: { + parents: 1, + interior: { + X3: [ + { + Parachain: 1000, + }, + { + PalletInstance: 50, + }, + { + GeneralIndex: 1337, + }, + ], + }, + }, }, { asset: usdt, decimals: 6, id: '311091173110107856861649819128533077277', + xcmLocation: { + parents: 1, + interior: { + X3: [ + { + Parachain: 1000, + }, + { + PalletInstance: 50, + }, + { + GeneralIndex: 1984, + }, + ], + }, + }, }, ], ecosystem: Ecosystem.Polkadot, diff --git a/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts b/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts index 0cc24747..6e3def43 100644 --- a/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts +++ b/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts @@ -101,13 +101,13 @@ const toAssetHub: AssetRoute[] = [ new AssetRoute({ source: { asset: usdc, - balance: BalanceBuilder().evm().erc20(), + balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, destinationFee: { - balance: BalanceBuilder().evm().erc20(), + balance: BalanceBuilder().substrate().assets().account(), }, }, destination: {