diff --git a/packages/xcm/src/assets.ts b/packages/xcm/src/assets.ts index ee12c0bc..adf203db 100644 --- a/packages/xcm/src/assets.ts +++ b/packages/xcm/src/assets.ts @@ -3,34 +3,34 @@ import { aca, astr, bnc, cfg, dai, dot, glmr, hdx, ibtc, usdt, wbtc, weth, ztg } export { aca, astr, bnc, cfg, dot, glmr, hdx, ibtc, usdt, ztg }; -export const daiAcala = new Asset({ +export const dai_awh = new Asset({ ...dai, - key: 'dai-acala', + key: 'dai_awh', }); -export const daiMoonbeam = new Asset({ +export const dai_mwh = new Asset({ ...dai, - key: 'dai-moonbeam', + key: 'dai_mwh', }); -export const wethAcala = new Asset({ +export const weth_awh = new Asset({ ...weth, - key: 'weth-acala', + key: 'weth_awh', }); -export const wethMoonbeam = new Asset({ +export const weth_mwh = new Asset({ ...weth, - key: 'weth-moonbeam', + key: 'weth_mwh', }); -export const wbtcAcala = new Asset({ +export const wbtc_awh = new Asset({ ...wbtc, - key: 'wbtc-acala', + key: 'wbtc_awh', }); -export const wbtcMoonbeam = new Asset({ +export const wbtc_mwh = new Asset({ ...wbtc, - key: 'wbtc-moonbeam', + key: 'wbtc_mwh', }); export const assets: Asset[] = [ @@ -38,17 +38,17 @@ export const assets: Asset[] = [ astr, cfg, bnc, - daiAcala, - daiMoonbeam, + dai_awh, + dai_mwh, dot, glmr, hdx, ibtc, usdt, - wbtcAcala, - wbtcMoonbeam, - wethAcala, - wethMoonbeam, + wbtc_awh, + wbtc_mwh, + weth_awh, + weth_mwh, ztg, ]; diff --git a/packages/xcm/src/chains.ts b/packages/xcm/src/chains.ts index 84a15c95..0b528b4f 100644 --- a/packages/xcm/src/chains.ts +++ b/packages/xcm/src/chains.ts @@ -1,4 +1,4 @@ -import { AnyChain, Ecosystem, EvmParachain, Parachain } from '@moonbeam-network/xcm-types'; +import { AnyChain, EvmParachain, Parachain } from '@moonbeam-network/xcm-types'; import { acala as defaultAcala, astar as defaultAstar, @@ -17,17 +17,17 @@ import { astr, bnc, cfg, - daiAcala, - daiMoonbeam, + dai_awh, + dai_mwh, dot, glmr, hdx, ibtc, usdt, - wbtcAcala, - wbtcMoonbeam, - wethAcala, - wethMoonbeam, + wbtc_awh, + wbtc_mwh, + weth_awh, + weth_mwh, ztg, } from './assets'; @@ -40,17 +40,17 @@ export const acala = new Parachain({ metadataId: { NativeAssetId: { Token: aca.originSymbol } }, }, { - asset: daiAcala, + asset: dai_awh, balanceId: '0x54a37a01cd75b616d63e0ab665bffdb0143c52ae', id: { Erc20: '0x54a37a01cd75b616d63e0ab665bffdb0143c52ae' }, }, { - asset: wbtcAcala, + asset: wbtc_awh, balanceId: '0xc80084af223c8b598536178d9361dc55bfda6818', id: { Erc20: '0xc80084af223c8b598536178d9361dc55bfda6818' }, }, { - asset: wethAcala, + asset: weth_awh, balanceId: '0x5a4d6acdc4e3e5ab15717f407afe957f7a242578', id: { Erc20: '0x5a4d6acdc4e3e5ab15717f407afe957f7a242578' }, }, @@ -104,7 +104,6 @@ export const centrifuge = new Parachain({ export const hydraDX = new Parachain({ ...defaultHydraDx, key: 'hydradx', - //ws: 'wss://hydradx-rpc.dwellir.com', assetsData: [ { asset: astr, @@ -123,11 +122,11 @@ export const hydraDX = new Parachain({ id: 5, }, { - asset: daiAcala, + asset: dai_awh, id: 2, }, { - asset: daiMoonbeam, + asset: dai_mwh, id: 18, }, { @@ -150,19 +149,19 @@ export const hydraDX = new Parachain({ palletInstance: 50, }, { - asset: wbtcAcala, + asset: wbtc_awh, id: 3, }, { - asset: wbtcMoonbeam, + asset: wbtc_mwh, id: 19, }, { - asset: wethAcala, + asset: weth_awh, id: 4, }, { - asset: wethMoonbeam, + asset: weth_mwh, id: 20, }, { @@ -188,7 +187,7 @@ export const moonbeam = new EvmParachain({ ...defaultMoonbeam, assetsData: [ { - asset: daiMoonbeam, + asset: dai_mwh, id: '0x06e605775296e851FF43b4dAa541Bb0984E9D6fD', metadataId: 0, }, @@ -202,12 +201,12 @@ export const moonbeam = new EvmParachain({ id: '69606720909260275826784788104880799692', }, { - asset: wbtcMoonbeam, + asset: wbtc_mwh, id: '0xE57eBd2d67B462E9926e04a8e33f01cD0D64346D', metadataId: 0, }, { - asset: wethMoonbeam, + asset: weth_mwh, id: '0xab3f0245B83feB11d15AAffeFD7AD465a59817eD', metadataId: 0, }, diff --git a/packages/xcm/src/configs/acala.ts b/packages/xcm/src/configs/acala.ts index ce3140cd..1a7dba41 100644 --- a/packages/xcm/src/configs/acala.ts +++ b/packages/xcm/src/configs/acala.ts @@ -1,7 +1,7 @@ import { BalanceBuilder } from '@moonbeam-network/xcm-builder'; import { AssetConfig, ChainConfig } from '@moonbeam-network/xcm-config'; -import { daiAcala, wbtcAcala, wethAcala } from '../assets'; +import { dai_awh, wbtc_awh, weth_awh } from '../assets'; import { hydraDX, acala } from '../chains'; import { ExtrinsicBuilderV3 } from '../builders'; @@ -12,36 +12,36 @@ const toEvmAddress = async (api: any, address: string) => { const toHydraDX: AssetConfig[] = [ new AssetConfig({ - asset: daiAcala, + asset: dai_awh, balance: BalanceBuilder().evm().erc20(), destination: hydraDX, destinationFee: { amount: 0.002926334210356268, - asset: daiAcala, + asset: dai_awh, balance: BalanceBuilder().evm().erc20(), }, extrinsic: ExtrinsicBuilderV3().xTokens().transfer(), //toEvmAddress, }), new AssetConfig({ - asset: wbtcAcala, + asset: wbtc_awh, balance: BalanceBuilder().evm().erc20(), destination: hydraDX, destinationFee: { amount: 0.00000006, - asset: wbtcAcala, + asset: wbtc_awh, balance: BalanceBuilder().evm().erc20(), }, extrinsic: ExtrinsicBuilderV3().xTokens().transfer(), //toEvmAddress, }), new AssetConfig({ - asset: wethAcala, + asset: weth_awh, balance: BalanceBuilder().evm().erc20(), destination: hydraDX, destinationFee: { amount: 0.000000956965470918, - asset: wethAcala, + asset: weth_awh, balance: BalanceBuilder().evm().erc20(), }, extrinsic: ExtrinsicBuilderV3().xTokens().transfer(), diff --git a/packages/xcm/src/configs/hydraDX.ts b/packages/xcm/src/configs/hydraDX.ts index d73eb8c7..6406d371 100644 --- a/packages/xcm/src/configs/hydraDX.ts +++ b/packages/xcm/src/configs/hydraDX.ts @@ -5,17 +5,17 @@ import { astr, bnc, cfg, - daiAcala, - daiMoonbeam, + dai_awh, + dai_mwh, dot, glmr, hdx, ibtc, usdt, - wbtcAcala, - wbtcMoonbeam, - wethAcala, - wethMoonbeam, + wbtc_awh, + wbtc_mwh, + weth_awh, + weth_mwh, ztg, } from '../assets'; import { acala, assetHub, astar, bifrost, centrifuge, hydraDX, interlay, moonbeam, zeitgeist } from '../chains'; @@ -23,34 +23,34 @@ import { ExtrinsicBuilderV3 } from '../builders'; const toAcala: AssetConfig[] = [ new AssetConfig({ - asset: daiAcala, + asset: dai_awh, balance: BalanceBuilder().substrate().tokens().accounts(), destination: acala, destinationFee: { amount: 0.00092696, - asset: daiAcala, + asset: dai_awh, balance: BalanceBuilder().substrate().tokens().accounts(), }, extrinsic: ExtrinsicBuilderV3().xTokens().transfer(), }), new AssetConfig({ - asset: wbtcAcala, + asset: wbtc_awh, balance: BalanceBuilder().substrate().tokens().accounts(), destination: acala, destinationFee: { amount: 0.00000004, - asset: wbtcAcala, + asset: wbtc_awh, balance: BalanceBuilder().substrate().tokens().accounts(), }, extrinsic: ExtrinsicBuilderV3().xTokens().transfer(), }), new AssetConfig({ - asset: wethAcala, + asset: weth_awh, balance: BalanceBuilder().substrate().tokens().accounts(), destination: acala, destinationFee: { amount: 0.000000687004, - asset: wethAcala, + asset: weth_awh, balance: BalanceBuilder().substrate().tokens().accounts(), }, extrinsic: ExtrinsicBuilderV3().xTokens().transfer(), @@ -151,7 +151,7 @@ const toMoonbeam: AssetConfig[] = [ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }), new AssetConfig({ - asset: daiMoonbeam, + asset: dai_mwh, balance: BalanceBuilder().substrate().tokens().accounts(), destination: moonbeam, destinationFee: { @@ -166,7 +166,7 @@ const toMoonbeam: AssetConfig[] = [ }, }), new AssetConfig({ - asset: wbtcMoonbeam, + asset: wbtc_mwh, balance: BalanceBuilder().substrate().tokens().accounts(), destination: moonbeam, destinationFee: { @@ -181,7 +181,7 @@ const toMoonbeam: AssetConfig[] = [ }, }), new AssetConfig({ - asset: wethMoonbeam, + asset: weth_mwh, balance: BalanceBuilder().substrate().tokens().accounts(), destination: moonbeam, destinationFee: { diff --git a/packages/xcm/src/configs/moonbeam.ts b/packages/xcm/src/configs/moonbeam.ts index 14a905a3..987089a1 100644 --- a/packages/xcm/src/configs/moonbeam.ts +++ b/packages/xcm/src/configs/moonbeam.ts @@ -1,7 +1,7 @@ import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder'; import { AssetConfig, ChainConfig } from '@moonbeam-network/xcm-config'; -import { daiMoonbeam, glmr, hdx, wbtcMoonbeam, wethMoonbeam } from '../assets'; +import { dai_mwh, glmr, hdx, wbtc_mwh, weth_mwh } from '../assets'; import { hydraDX, moonbeam } from '../chains'; const toHydraDX: AssetConfig[] = [ @@ -21,13 +21,13 @@ const toHydraDX: AssetConfig[] = [ }, }), new AssetConfig({ - asset: daiMoonbeam, + asset: dai_mwh, balance: BalanceBuilder().evm().erc20(), contract: ContractBuilder().Xtokens().transfer(), destination: hydraDX, destinationFee: { amount: 0.004, - asset: daiMoonbeam, + asset: dai_mwh, balance: BalanceBuilder().evm().erc20(), }, fee: { @@ -36,13 +36,13 @@ const toHydraDX: AssetConfig[] = [ }, }), new AssetConfig({ - asset: wbtcMoonbeam, + asset: wbtc_mwh, balance: BalanceBuilder().evm().erc20(), contract: ContractBuilder().Xtokens().transfer(), destination: hydraDX, destinationFee: { amount: 0.0000001, - asset: wbtcMoonbeam, + asset: wbtc_mwh, balance: BalanceBuilder().evm().erc20(), }, fee: { @@ -51,13 +51,13 @@ const toHydraDX: AssetConfig[] = [ }, }), new AssetConfig({ - asset: wethMoonbeam, + asset: weth_mwh, balance: BalanceBuilder().evm().erc20(), contract: ContractBuilder().Xtokens().transfer(), destination: hydraDX, destinationFee: { amount: 0.000002, - asset: wethMoonbeam, + asset: weth_mwh, balance: BalanceBuilder().evm().erc20(), }, fee: {