diff --git a/.vscode/settings.json b/.vscode/settings.json index 3f07b82c..761b6f50 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,6 +8,7 @@ "aseed", "astar", "ausd", + "axlusdc", "biomejs", "bncs", "composablenodes", @@ -90,14 +91,14 @@ "xfer", "xtokens" ], - "editor.defaultFormatter": "rvest.vs-code-prettier-eslint", + "editor.defaultFormatter": "biomejs.biome", "editor.formatOnPaste": false, "editor.formatOnType": false, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", "typescript.preferences.importModuleSpecifier": "relative", "editor.codeActionsOnSave": { - "source.organizeImports": "explicit", - "source.fixAll.eslint": "explicit" + "quickfix.biome": "explicit", + "source.organizeImports.biome": "explicit" } } diff --git a/examples/mrl-simple/index.ts b/examples/mrl-simple/index.ts index ece96acc..590636c3 100644 --- a/examples/mrl-simple/index.ts +++ b/examples/mrl-simple/index.ts @@ -2,9 +2,7 @@ import { Mrl } from '@moonbeam-network/mrl'; import { fantomTestnet, ftmwh, - moonbeam, - peaqChain, - polkadot, + peaqAlphanet, } from '@moonbeam-network/xcm-config'; import { Keyring } from '@polkadot/api'; import { cryptoWaitReady } from '@polkadot/util-crypto'; @@ -28,7 +26,7 @@ if (!EVM_PRIVATE_KEY || !POLKADOT_PRIVATE_KEY) { const account = privateKeyToAccount(EVM_PRIVATE_KEY as Address); const walletClient = createWalletClient({ account, - chain: moonbeam.getViemChain(), + chain: fantomTestnet.getViemChain(), transport: http(), }); @@ -38,7 +36,7 @@ console.log(`\nEVM address: ${account.address}`); await cryptoWaitReady(); const keyring = new Keyring({ - ss58Format: polkadot.ss58Format, + ss58Format: peaqAlphanet.ss58Format, type: 'sr25519', }); const pair = keyring.createFromUri(POLKADOT_PRIVATE_KEY); @@ -55,7 +53,7 @@ main() async function main() { const data = await Mrl() .setSource(fantomTestnet) - .setDestination(peaqChain) + .setDestination(peaqAlphanet) .setAsset(ftmwh) .setAddresses({ sourceAddress: account.address, diff --git a/packages/config/src/ConfigService/ConfigService.test.ts b/packages/config/src/ConfigService/ConfigService.test.ts index d77660e9..789da130 100644 --- a/packages/config/src/ConfigService/ConfigService.test.ts +++ b/packages/config/src/ConfigService/ConfigService.test.ts @@ -205,11 +205,12 @@ describe('config service', () => { chain: hydration, routes: [ { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { diff --git a/packages/config/src/ConfigService/ConfigService.ts b/packages/config/src/ConfigService/ConfigService.ts index cfe4ab00..837e672f 100644 --- a/packages/config/src/ConfigService/ConfigService.ts +++ b/packages/config/src/ConfigService/ConfigService.ts @@ -51,7 +51,7 @@ export class ConfigService { .filter((routes) => routes.chain.ecosystem === ecosystem) .map((routes) => routes.getRoutes()) .flat(2) - .map((route) => route.asset), + .map((route) => route.source.asset), ), ).sort((a, b) => a.key.localeCompare(b.key)); } diff --git a/packages/config/src/mrl-configs/fantomTestnet.ts b/packages/config/src/mrl-configs/fantomTestnet.ts index 441d666a..4f3756df 100644 --- a/packages/config/src/mrl-configs/fantomTestnet.ts +++ b/packages/config/src/mrl-configs/fantomTestnet.ts @@ -1,5 +1,5 @@ import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder'; -import { dev, ftmwh } from '../assets'; +import { dev, ftm, ftmwh } from '../assets'; import { fantomTestnet, peaqAlphanet } from '../chains'; import { ChainRoutes } from '../types/ChainRoutes'; @@ -7,14 +7,16 @@ export const fantomTestnetRoutes = new ChainRoutes({ chain: fantomTestnet, routes: [ { - asset: ftmwh, source: { + asset: ftm, balance: BalanceBuilder().evm().native(), destinationFee: { + asset: ftm, balance: BalanceBuilder().evm().native(), }, }, destination: { + asset: ftmwh, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/types/AssetRoute.ts b/packages/config/src/types/AssetRoute.ts index dff705ec..0fb2947d 100644 --- a/packages/config/src/types/AssetRoute.ts +++ b/packages/config/src/types/AssetRoute.ts @@ -9,7 +9,6 @@ import type { import type { AnyChain, Asset, SetOptional } from '@moonbeam-network/xcm-types'; export interface AssetRouteConstructorParams { - asset: Asset; source: SourceConfig; destination: DestinationConfig; contract?: ContractConfigBuilder; @@ -18,10 +17,12 @@ export interface AssetRouteConstructorParams { } export interface SourceConfig { + asset: Asset; chain: AnyChain; balance: BalanceConfigBuilder; fee?: FeeConfig; destinationFee?: { + asset?: Asset; balance: BalanceConfigBuilder; }; min?: AssetMinConfigBuilder; @@ -55,8 +56,6 @@ export interface MoonChainFeeConfig extends FeeConfig { } export class AssetRoute { - readonly asset: Asset; - readonly source: SourceConfig; readonly destination: DestinationConfig; @@ -68,14 +67,12 @@ export class AssetRoute { readonly mrl?: MrlConfig; constructor({ - asset, source, destination, contract, extrinsic, mrl, }: AssetRouteConstructorParams) { - this.asset = asset; this.source = source; this.destination = destination; this.contract = contract; diff --git a/packages/config/src/types/ChainRoutes.ts b/packages/config/src/types/ChainRoutes.ts index f1922522..35046e9e 100644 --- a/packages/config/src/types/ChainRoutes.ts +++ b/packages/config/src/types/ChainRoutes.ts @@ -23,14 +23,14 @@ export class ChainRoutes { constructor({ chain, routes }: ChainRoutesConstructorParams) { this.chain = chain; this.#routes = new Map( - routes.map(({ asset, source, destination, contract, extrinsic }) => [ - `${asset.key}-${destination.chain.key}`, + routes.map(({ source, destination, contract, extrinsic, mrl }) => [ + `${source.asset.key}-${destination.chain.key}`, new AssetRoute({ - asset, source: { ...source, chain }, destination, contract, extrinsic, + mrl, }), ]), ); @@ -43,7 +43,7 @@ export class ChainRoutes { getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[] { const key = getKey(keyOrAsset); - return this.getRoutes().filter((cfg) => cfg.asset.key === key); + return this.getRoutes().filter((route) => route.source.asset.key === key); } getAssetDestinations(keyOrAsset: string | AnyAsset): AnyChain[] { @@ -56,8 +56,8 @@ export class ChainRoutes { const key = getKey(keyOrChain); return this.getRoutes() - .filter((cfg) => cfg.destination.chain.key === key) - .map((cfg) => cfg.asset); + .filter((route) => route.destination.chain.key === key) + .map((route) => route.source.asset); } getAssetRoute( diff --git a/packages/config/src/xcm-configs/acala.ts b/packages/config/src/xcm-configs/acala.ts index 8a184bf2..d0d42e88 100644 --- a/packages/config/src/xcm-configs/acala.ts +++ b/packages/config/src/xcm-configs/acala.ts @@ -12,14 +12,15 @@ export const acalaRoutes = new ChainRoutes({ chain: acala, routes: [ { - asset: aca, source: { + asset: aca, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: aca, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const acalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: aseed, source: { + asset: aseed, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: aca, @@ -43,6 +44,7 @@ export const acalaRoutes = new ChainRoutes({ }, }, destination: { + asset: aseed, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -53,8 +55,8 @@ export const acalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: aca, @@ -66,6 +68,7 @@ export const acalaRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -76,8 +79,8 @@ export const acalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: ldot, source: { + asset: ldot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: aca, @@ -89,6 +92,7 @@ export const acalaRoutes = new ChainRoutes({ }, }, destination: { + asset: ldot, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/alphanetAssetHub.ts b/packages/config/src/xcm-configs/alphanetAssetHub.ts index 277b28b8..b27c9514 100644 --- a/packages/config/src/xcm-configs/alphanetAssetHub.ts +++ b/packages/config/src/xcm-configs/alphanetAssetHub.ts @@ -12,8 +12,8 @@ export const alphanetAssetHubRoutes = new ChainRoutes({ chain: alphanetAssetHub, routes: [ { - asset: tt1, source: { + asset: tt1, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: unit, @@ -25,6 +25,7 @@ export const alphanetAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: tt1, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/alphanetRelay.ts b/packages/config/src/xcm-configs/alphanetRelay.ts index e7b72532..7bc8590f 100644 --- a/packages/config/src/xcm-configs/alphanetRelay.ts +++ b/packages/config/src/xcm-configs/alphanetRelay.ts @@ -11,14 +11,15 @@ export const alphanetRelayRoutes = new ChainRoutes({ chain: alphanetRelay, routes: [ { - asset: unit, source: { + asset: unit, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: unit, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/astar.ts b/packages/config/src/xcm-configs/astar.ts index 396cd1ea..8e8b121b 100644 --- a/packages/config/src/xcm-configs/astar.ts +++ b/packages/config/src/xcm-configs/astar.ts @@ -11,14 +11,15 @@ export const astarRoutes = new ChainRoutes({ chain: astar, routes: [ { - asset: astr, source: { + asset: astr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: astr, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const astarRoutes = new ChainRoutes({ .here(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: astr, @@ -44,6 +45,7 @@ export const astarRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/bifrostKusama.ts b/packages/config/src/xcm-configs/bifrostKusama.ts index 34b579a1..492df67c 100644 --- a/packages/config/src/xcm-configs/bifrostKusama.ts +++ b/packages/config/src/xcm-configs/bifrostKusama.ts @@ -12,14 +12,15 @@ export const bifrostKusamaRoutes = new ChainRoutes({ chain: bifrostKusama, routes: [ { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: bnc, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -43,6 +44,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -53,8 +55,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: vbnc, source: { + asset: vbnc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -66,6 +68,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: vbnc, chain: moonriver, balance: BalanceBuilder().evm().erc20(), fee: { @@ -76,8 +79,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vksm, source: { + asset: vksm, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -89,6 +92,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: vksm, chain: moonriver, balance: BalanceBuilder().evm().erc20(), fee: { @@ -99,8 +103,8 @@ export const bifrostKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vmovr, source: { + asset: vmovr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -112,6 +116,7 @@ export const bifrostKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: vmovr, chain: moonriver, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/bifrostPolkadot.ts b/packages/config/src/xcm-configs/bifrostPolkadot.ts index 28f17692..3c67ebab 100644 --- a/packages/config/src/xcm-configs/bifrostPolkadot.ts +++ b/packages/config/src/xcm-configs/bifrostPolkadot.ts @@ -22,14 +22,15 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ chain: bifrostPolkadot, routes: [ { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: bnc, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -40,8 +41,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: fil, source: { + asset: fil, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -53,6 +54,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: fil, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -63,8 +65,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -76,6 +78,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -86,8 +89,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: vastr, source: { + asset: vastr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -99,6 +102,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vastr, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -109,8 +113,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vdot, source: { + asset: vdot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -122,6 +126,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vdot, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -132,8 +137,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: vfil, source: { + asset: vfil, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -145,6 +150,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vfil, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -155,8 +161,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vglmr, source: { + asset: vglmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -168,6 +174,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vglmr, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -178,8 +185,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: vmanta, source: { + asset: vmanta, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -191,6 +198,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: vmanta, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -201,8 +209,8 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: bncs, source: { + asset: bncs, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: bnc, @@ -214,6 +222,7 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: bncs, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/calamari.ts b/packages/config/src/xcm-configs/calamari.ts index 80b9b094..e27475d0 100644 --- a/packages/config/src/xcm-configs/calamari.ts +++ b/packages/config/src/xcm-configs/calamari.ts @@ -12,14 +12,15 @@ export const calamariRoutes = new ChainRoutes({ chain: calamari, routes: [ { - asset: kma, source: { + asset: kma, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: kma, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const calamariRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: kma, @@ -43,6 +44,7 @@ export const calamariRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/centrifuge.ts b/packages/config/src/xcm-configs/centrifuge.ts index a524b411..317df5b2 100644 --- a/packages/config/src/xcm-configs/centrifuge.ts +++ b/packages/config/src/xcm-configs/centrifuge.ts @@ -11,14 +11,15 @@ export const centrifugeRoutes = new ChainRoutes({ chain: centrifuge, routes: [ { - asset: cfg, source: { + asset: cfg, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: cfg, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/crustShadow.ts b/packages/config/src/xcm-configs/crustShadow.ts index ff22d447..d021e625 100644 --- a/packages/config/src/xcm-configs/crustShadow.ts +++ b/packages/config/src/xcm-configs/crustShadow.ts @@ -11,14 +11,15 @@ export const crustShadowRoutes = new ChainRoutes({ chain: crustShadow, routes: [ { - asset: csm, source: { + asset: csm, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: csm, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const crustShadowRoutes = new ChainRoutes({ .here(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: csm, @@ -44,6 +45,7 @@ export const crustShadowRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/darwinia.ts b/packages/config/src/xcm-configs/darwinia.ts index d72cd017..aaf20e3c 100644 --- a/packages/config/src/xcm-configs/darwinia.ts +++ b/packages/config/src/xcm-configs/darwinia.ts @@ -11,14 +11,15 @@ export const darwiniaRoutes = new ChainRoutes({ chain: darwinia, routes: [ { - asset: ring, source: { + asset: ring, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: ring, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/darwiniaCrab.ts b/packages/config/src/xcm-configs/darwiniaCrab.ts index b798f434..bd819f4f 100644 --- a/packages/config/src/xcm-configs/darwiniaCrab.ts +++ b/packages/config/src/xcm-configs/darwiniaCrab.ts @@ -11,14 +11,15 @@ export const darwiniaCrabRoutes = new ChainRoutes({ chain: darwiniaCrab, routes: [ { - asset: crab, source: { + asset: crab, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: crab, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/hydration.ts b/packages/config/src/xcm-configs/hydration.ts index 56bff8c9..496c01ff 100644 --- a/packages/config/src/xcm-configs/hydration.ts +++ b/packages/config/src/xcm-configs/hydration.ts @@ -11,14 +11,15 @@ export const hydrationRoutes = new ChainRoutes({ chain: hydration, routes: [ { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: hdx, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,14 +30,15 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -47,8 +49,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -59,6 +61,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -69,8 +72,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -81,6 +84,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -91,8 +95,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -103,6 +107,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -113,8 +118,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -125,6 +130,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -135,8 +141,8 @@ export const hydrationRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -147,6 +153,7 @@ export const hydrationRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/hydrationAlphanet.ts b/packages/config/src/xcm-configs/hydrationAlphanet.ts index f4db08f7..3e944ec3 100644 --- a/packages/config/src/xcm-configs/hydrationAlphanet.ts +++ b/packages/config/src/xcm-configs/hydrationAlphanet.ts @@ -12,14 +12,15 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ chain: hydrationAlphanet, routes: [ { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: hdx, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,14 +31,15 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -48,8 +50,8 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -60,6 +62,7 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -70,8 +73,8 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: hdx, @@ -82,6 +85,7 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/integritee.ts b/packages/config/src/xcm-configs/integritee.ts index 34f97b02..aed013f7 100644 --- a/packages/config/src/xcm-configs/integritee.ts +++ b/packages/config/src/xcm-configs/integritee.ts @@ -11,14 +11,15 @@ export const integriteeRoutes = new ChainRoutes({ chain: integritee, routes: [ { - asset: teer, source: { + asset: teer, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: teer, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/interlay.ts b/packages/config/src/xcm-configs/interlay.ts index 308dbdaa..52ff61cd 100644 --- a/packages/config/src/xcm-configs/interlay.ts +++ b/packages/config/src/xcm-configs/interlay.ts @@ -11,14 +11,15 @@ export const interlayRoutes = new ChainRoutes({ chain: interlay, routes: [ { - asset: intr, source: { + asset: intr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: intr, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const interlayRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: ibtc, source: { + asset: ibtc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: intr, @@ -41,6 +42,7 @@ export const interlayRoutes = new ChainRoutes({ }, }, destination: { + asset: ibtc, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -51,14 +53,15 @@ export const interlayRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/karura.ts b/packages/config/src/xcm-configs/karura.ts index 864cca8b..1b91cb5d 100644 --- a/packages/config/src/xcm-configs/karura.ts +++ b/packages/config/src/xcm-configs/karura.ts @@ -12,14 +12,15 @@ export const karuraRoutes = new ChainRoutes({ chain: karura, routes: [ { - asset: kar, source: { + asset: kar, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: kar, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const karuraRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: aseed, source: { + asset: aseed, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: kar, @@ -43,6 +44,7 @@ export const karuraRoutes = new ChainRoutes({ }, }, destination: { + asset: aseed, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -53,8 +55,8 @@ export const karuraRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: kar, @@ -66,6 +68,7 @@ export const karuraRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/khala.ts b/packages/config/src/xcm-configs/khala.ts index 45574968..73665cd3 100644 --- a/packages/config/src/xcm-configs/khala.ts +++ b/packages/config/src/xcm-configs/khala.ts @@ -11,14 +11,15 @@ export const khalaRouts = new ChainRoutes({ chain: khala, routes: [ { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pha, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const khalaRouts = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTransfer().transfer().here(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: pha, @@ -41,6 +42,7 @@ export const khalaRouts = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/kintsugi.ts b/packages/config/src/xcm-configs/kintsugi.ts index 06aa24fe..32f77853 100644 --- a/packages/config/src/xcm-configs/kintsugi.ts +++ b/packages/config/src/xcm-configs/kintsugi.ts @@ -11,14 +11,15 @@ export const kintsugiRoutes = new ChainRoutes({ chain: kintsugi, routes: [ { - asset: kint, source: { + asset: kint, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: kint, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const kintsugiRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: kbtc, source: { + asset: kbtc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: kint, @@ -41,6 +42,7 @@ export const kintsugiRoutes = new ChainRoutes({ }, }, destination: { + asset: kbtc, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/kusama.ts b/packages/config/src/xcm-configs/kusama.ts index 65e5dd6d..af98970d 100644 --- a/packages/config/src/xcm-configs/kusama.ts +++ b/packages/config/src/xcm-configs/kusama.ts @@ -11,8 +11,8 @@ export const kusamaRoutes = new ChainRoutes({ chain: kusama, routes: [ { - asset: ksm, source: { + asset: ksm, balance: BalanceBuilder().substrate().system().account(), fee: { asset: ksm, @@ -24,6 +24,7 @@ export const kusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: ksm, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/kusamaAssetHub.ts b/packages/config/src/xcm-configs/kusamaAssetHub.ts index 88441033..88353cc6 100644 --- a/packages/config/src/xcm-configs/kusamaAssetHub.ts +++ b/packages/config/src/xcm-configs/kusamaAssetHub.ts @@ -14,8 +14,8 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ chain: kusamaAssetHub, routes: [ { - asset: rmrk, source: { + asset: rmrk, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: ksm, @@ -28,6 +28,7 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: rmrk, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -41,8 +42,8 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: ksm, @@ -55,6 +56,7 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/mangataKusama.ts b/packages/config/src/xcm-configs/mangataKusama.ts index 9587ef7b..ba379f8f 100644 --- a/packages/config/src/xcm-configs/mangataKusama.ts +++ b/packages/config/src/xcm-configs/mangataKusama.ts @@ -11,14 +11,15 @@ export const mangataKusamaRoutes = new ChainRoutes({ chain: mangataKusama, routes: [ { - asset: mgx, source: { + asset: mgx, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: mgx, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const mangataKusamaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: mgx, @@ -41,6 +42,7 @@ export const mangataKusamaRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/mantaParachain.ts b/packages/config/src/xcm-configs/mantaParachain.ts index 7227998a..3fb4b4f2 100644 --- a/packages/config/src/xcm-configs/mantaParachain.ts +++ b/packages/config/src/xcm-configs/mantaParachain.ts @@ -12,14 +12,15 @@ export const mantaParachainRoutes = new ChainRoutes({ chain: mantaParachain, routes: [ { - asset: manta, source: { + asset: manta, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: manta, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const mantaParachainRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: manta, @@ -43,6 +44,7 @@ export const mantaParachainRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/moonbaseAlpha.ts b/packages/config/src/xcm-configs/moonbaseAlpha.ts index 4bd9d8b7..16ca63ce 100644 --- a/packages/config/src/xcm-configs/moonbaseAlpha.ts +++ b/packages/config/src/xcm-configs/moonbaseAlpha.ts @@ -33,14 +33,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ chain: moonbaseAlpha, routes: [ { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: turingAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -51,14 +52,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: moonbaseBeta, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -69,14 +71,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: pendulumAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -87,14 +90,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: picassoAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -105,8 +109,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: alan, source: { + asset: alan, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -117,6 +121,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: alan, chain: moonbaseBeta, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -144,8 +149,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ // }, // }), { - asset: ampe, source: { + asset: ampe, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -156,6 +161,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ampe, chain: pendulumAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -166,8 +172,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: otp, source: { + asset: otp, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -178,6 +184,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: otp, chain: originTrailAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -188,8 +195,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: atom, source: { + asset: atom, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -200,6 +207,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: atom, chain: picassoAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -210,8 +218,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -222,6 +230,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: pica, chain: picassoAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -232,8 +241,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tt1, source: { + asset: tt1, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -244,6 +253,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: tt1, chain: alphanetAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -254,8 +264,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -266,6 +276,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: tur, chain: turingAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -276,8 +287,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: unit, source: { + asset: unit, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -288,6 +299,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: unit, chain: alphanetRelay, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -298,8 +310,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -310,6 +322,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -320,8 +333,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -332,6 +345,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -342,8 +356,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -354,6 +368,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -364,14 +379,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -382,8 +398,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -394,6 +410,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: hdx, chain: hydrationAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -404,14 +421,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -422,8 +440,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -434,6 +452,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: peaqAlphanet, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -444,8 +463,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: agng, source: { + asset: agng, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dev, @@ -456,6 +475,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: agng, chain: peaqAlphanet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -466,14 +486,15 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: dev, chain: peaqEvmAlphanet, balance: BalanceBuilder().evm().erc20(), fee: { @@ -484,8 +505,8 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: dev, @@ -496,6 +517,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: peaqEvmAlphanet, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/moonbaseBeta.ts b/packages/config/src/xcm-configs/moonbaseBeta.ts index a64afd6e..98b21662 100644 --- a/packages/config/src/xcm-configs/moonbaseBeta.ts +++ b/packages/config/src/xcm-configs/moonbaseBeta.ts @@ -10,8 +10,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ chain: moonbaseBeta, routes: [ { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -22,6 +22,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -32,8 +33,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: alan, source: { + asset: alan, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -44,6 +45,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: alan, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -54,8 +56,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -66,6 +68,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -76,8 +79,8 @@ export const moonbaseBetaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: betaDEV, @@ -88,6 +91,7 @@ export const moonbaseBetaRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/moonbeam.ts b/packages/config/src/xcm-configs/moonbeam.ts index 61816bfa..12c7f2e3 100644 --- a/packages/config/src/xcm-configs/moonbeam.ts +++ b/packages/config/src/xcm-configs/moonbeam.ts @@ -70,14 +70,15 @@ export const moonbeamRoutes = new ChainRoutes({ chain: moonbeam, routes: [ { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: acala, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -88,14 +89,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: astar, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -106,14 +108,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -124,14 +127,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -142,14 +146,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: interlay, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -160,14 +165,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: mantaParachain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -178,14 +184,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: parallel, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -196,14 +203,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: phala, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -214,14 +222,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: pendulum, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -232,14 +241,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: zeitgeist, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -250,8 +260,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: aca, source: { + asset: aca, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -262,6 +272,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: aca, chain: acala, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -272,8 +283,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: astr, source: { + asset: astr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -284,6 +295,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: astr, chain: astar, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -294,8 +306,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: aseed, source: { + asset: aseed, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -306,6 +318,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: aseed, chain: acala, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -316,8 +329,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -328,6 +341,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: bnc, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -338,8 +352,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: cfg, source: { + asset: cfg, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -350,6 +364,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: cfg, chain: centrifuge, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -360,8 +375,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dot, source: { + asset: dot, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -372,6 +387,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dot, chain: polkadot, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -382,8 +398,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ibtc, source: { + asset: ibtc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -394,6 +410,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ibtc, chain: interlay, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -404,8 +421,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: intr, source: { + asset: intr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -416,6 +433,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: intr, chain: interlay, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -426,8 +444,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ldot, source: { + asset: ldot, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -438,6 +456,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ldot, chain: acala, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -448,8 +467,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: manta, source: { + asset: manta, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -460,6 +479,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: manta, chain: mantaParachain, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -470,8 +490,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: nodl, source: { + asset: nodl, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -482,6 +502,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: nodl, balance: BalanceBuilder().substrate().system().account(), chain: nodle, fee: { @@ -492,8 +513,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: neuro, source: { + asset: neuro, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -504,6 +525,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: neuro, chain: neuroweb, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -514,8 +536,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: para, source: { + asset: para, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -526,6 +548,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: para, chain: parallel, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -536,8 +559,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pen, source: { + asset: pen, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -548,6 +571,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: pen, chain: pendulum, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -558,8 +582,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -570,6 +594,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: pha, chain: phala, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -580,8 +605,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ring, source: { + asset: ring, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -592,6 +617,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ring, chain: darwinia, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -602,8 +628,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -614,6 +640,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -624,8 +651,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdc, source: { + asset: usdc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -636,6 +663,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdc, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -646,8 +674,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pink, source: { + asset: pink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -658,6 +686,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: pink, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -668,8 +697,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: ded, source: { + asset: ded, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -680,6 +709,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ded, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -690,8 +720,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: stink, source: { + asset: stink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -702,6 +732,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: stink, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -712,8 +743,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: apillon, source: { + asset: apillon, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -724,6 +755,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: apillon, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -734,8 +766,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: hdx, source: { + asset: hdx, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -746,6 +778,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: hdx, chain: hydration, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -756,8 +789,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -768,6 +801,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -778,8 +812,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -790,6 +824,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -800,8 +835,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -812,6 +847,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: zeitgeist, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -822,8 +858,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -834,6 +870,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -844,8 +881,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vastr, source: { + asset: vastr, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -856,6 +893,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vastr, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -866,8 +904,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vdot, source: { + asset: vdot, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -878,6 +916,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vdot, balance: BalanceBuilder().substrate().tokens().accounts(), chain: bifrostPolkadot, fee: { @@ -888,8 +927,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vfil, source: { + asset: vfil, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -900,6 +939,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vfil, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -910,8 +950,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vglmr, source: { + asset: vglmr, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -922,6 +962,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vglmr, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -932,8 +973,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vmanta, source: { + asset: vmanta, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -944,6 +985,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: vmanta, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -954,8 +996,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -966,6 +1008,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -976,8 +1019,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -988,6 +1031,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: hydration, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -998,8 +1042,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: fil, source: { + asset: fil, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1010,6 +1054,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: fil, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -1020,8 +1065,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ztg, source: { + asset: ztg, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1032,6 +1077,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: ztg, chain: zeitgeist, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -1042,8 +1088,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: sub, source: { + asset: sub, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1054,6 +1100,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: sub, chain: subsocial, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -1064,8 +1111,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: bncs, source: { + asset: bncs, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1076,6 +1123,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: bncs, chain: bifrostPolkadot, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -1086,14 +1134,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1104,8 +1153,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1116,6 +1165,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1126,8 +1176,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1138,6 +1188,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1148,8 +1199,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1160,6 +1211,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1170,8 +1222,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1182,6 +1234,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1192,8 +1245,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1204,6 +1257,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: peaqChain, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1214,8 +1268,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: peaq, source: { + asset: peaq, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1226,6 +1280,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: peaq, chain: peaqChain, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -1236,14 +1291,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: glmr, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1254,8 +1310,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1266,6 +1322,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1276,8 +1333,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1288,6 +1345,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1298,8 +1356,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1310,6 +1368,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1320,8 +1379,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1332,6 +1391,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1342,8 +1402,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: glmr, @@ -1354,6 +1414,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: peaqEvm, balance: BalanceBuilder().evm().erc20(), fee: { @@ -1364,8 +1425,8 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, { - asset: wifd, source: { + asset: wifd, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: glmr, @@ -1376,6 +1437,7 @@ export const moonbeamRoutes = new ChainRoutes({ }, }, destination: { + asset: wifd, chain: polkadotAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -1386,14 +1448,15 @@ export const moonbeamRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: axlusdc, source: { + asset: axlusdc, balance: BalanceBuilder().evm().erc20(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: axlusdc, chain: pendulum, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { diff --git a/packages/config/src/xcm-configs/moonriver.ts b/packages/config/src/xcm-configs/moonriver.ts index 2de54c47..7e21134f 100644 --- a/packages/config/src/xcm-configs/moonriver.ts +++ b/packages/config/src/xcm-configs/moonriver.ts @@ -49,14 +49,15 @@ export const moonriverRoutes = new ChainRoutes({ chain: moonriver, routes: [ { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -67,14 +68,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: calamari, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -85,14 +87,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: crustShadow, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -103,14 +106,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: karura, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -121,14 +125,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: khala, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -139,14 +144,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: mangataKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -157,14 +163,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: shiden, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -175,14 +182,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: turing, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -193,14 +201,15 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: movr, chain: picasso, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -211,8 +220,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: aseed, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -223,6 +232,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: karura, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -233,8 +243,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: bnc, source: { + asset: bnc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -245,6 +255,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: bnc, chain: bifrostKusama, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -255,8 +266,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: crab, source: { + asset: crab, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -267,6 +278,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: crab, chain: darwiniaCrab, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -277,8 +289,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: csm, source: { + asset: csm, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -289,6 +301,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: csm, chain: crustShadow, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -299,8 +312,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kar, source: { + asset: kar, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -311,6 +324,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kar, chain: karura, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -321,8 +335,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kbtc, source: { + asset: kbtc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -333,6 +347,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kbtc, chain: kintsugi, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -343,8 +358,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kint, source: { + asset: kint, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -355,6 +370,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kint, chain: kintsugi, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -365,8 +381,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: kma, source: { + asset: kma, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -377,6 +393,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: kma, chain: calamari, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -387,8 +404,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: ksm, source: { + asset: ksm, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -399,6 +416,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: ksm, chain: kusama, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -409,8 +427,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: mgx, source: { + asset: mgx, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -421,6 +439,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: mgx, chain: mangataKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -431,8 +450,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -443,6 +462,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: pha, chain: khala, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -453,8 +473,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -465,6 +485,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: pica, chain: picasso, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -475,8 +496,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: rmrk, source: { + asset: rmrk, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -487,6 +508,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: rmrk, chain: kusamaAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -497,8 +519,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: sdn, source: { + asset: sdn, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -509,6 +531,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: sdn, chain: shiden, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -519,8 +542,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: teer, source: { + asset: teer, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -531,6 +554,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: teer, chain: integritee, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -541,8 +565,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tnkr, source: { + asset: tnkr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -553,6 +577,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: tnkr, chain: tinkernet, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -563,8 +588,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -575,6 +600,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: tur, chain: turing, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -585,8 +611,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -597,6 +623,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: kusamaAssetHub, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -607,8 +634,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: xrt, source: { + asset: xrt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: movr, @@ -619,6 +646,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: xrt, chain: robonomics, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -629,8 +657,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vbnc, source: { + asset: vbnc, balance: BalanceBuilder().evm().erc20(), fee: { asset: movr, @@ -641,6 +669,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: vbnc, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -651,8 +680,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vksm, source: { + asset: vksm, balance: BalanceBuilder().evm().erc20(), fee: { asset: movr, @@ -663,6 +692,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: vksm, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { @@ -673,8 +703,8 @@ export const moonriverRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: vmovr, source: { + asset: vmovr, balance: BalanceBuilder().evm().erc20(), fee: { asset: movr, @@ -685,6 +715,7 @@ export const moonriverRoutes = new ChainRoutes({ }, }, destination: { + asset: vmovr, chain: bifrostKusama, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { diff --git a/packages/config/src/xcm-configs/neuroweb.ts b/packages/config/src/xcm-configs/neuroweb.ts index 5118e64b..9f54aa30 100644 --- a/packages/config/src/xcm-configs/neuroweb.ts +++ b/packages/config/src/xcm-configs/neuroweb.ts @@ -11,14 +11,15 @@ export const neurowebRoutes = new ChainRoutes({ chain: neuroweb, routes: [ { - asset: neuro, source: { + asset: neuro, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: neuro, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/nodle.ts b/packages/config/src/xcm-configs/nodle.ts index f62892b5..0dd07a2b 100644 --- a/packages/config/src/xcm-configs/nodle.ts +++ b/packages/config/src/xcm-configs/nodle.ts @@ -11,14 +11,15 @@ export const nodleRoutes = new ChainRoutes({ chain: nodle, routes: [ { - asset: nodl, source: { + asset: nodl, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: nodl, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/originTrailAlphanet.ts b/packages/config/src/xcm-configs/originTrailAlphanet.ts index 5d642b2d..b8c4a9c3 100644 --- a/packages/config/src/xcm-configs/originTrailAlphanet.ts +++ b/packages/config/src/xcm-configs/originTrailAlphanet.ts @@ -11,14 +11,15 @@ export const originTrailAlphanetRoutes = new ChainRoutes({ chain: originTrailAlphanet, routes: [ { - asset: otp, source: { + asset: otp, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: otp, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/parallel.ts b/packages/config/src/xcm-configs/parallel.ts index 7b59e26e..f43c6847 100644 --- a/packages/config/src/xcm-configs/parallel.ts +++ b/packages/config/src/xcm-configs/parallel.ts @@ -11,14 +11,15 @@ export const parallelRoutes = new ChainRoutes({ chain: parallel, routes: [ { - asset: para, source: { + asset: para, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: para, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const parallelRoutes = new ChainRoutes({ .X2(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: para, @@ -44,6 +45,7 @@ export const parallelRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/peaq.ts b/packages/config/src/xcm-configs/peaq.ts index edb9c367..c32527cd 100644 --- a/packages/config/src/xcm-configs/peaq.ts +++ b/packages/config/src/xcm-configs/peaq.ts @@ -12,14 +12,15 @@ export const peaqRoutes = new ChainRoutes({ chain: peaqChain, routes: [ { - asset: peaq, source: { + asset: peaq, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: peaq, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), min: AssetMinBuilder().assets().asset(), destinationFee: { @@ -39,6 +40,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -49,8 +51,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -62,6 +64,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -72,8 +75,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -85,6 +88,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -95,8 +99,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -108,6 +112,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -118,8 +123,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -131,6 +136,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -141,8 +147,8 @@ export const peaqRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: peaq, @@ -154,6 +160,7 @@ export const peaqRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/peaqAlphanet.ts b/packages/config/src/xcm-configs/peaqAlphanet.ts index 7d5390a0..16adf200 100644 --- a/packages/config/src/xcm-configs/peaqAlphanet.ts +++ b/packages/config/src/xcm-configs/peaqAlphanet.ts @@ -12,14 +12,15 @@ export const peaqAlphanetRoutes = new ChainRoutes({ chain: peaqAlphanet, routes: [ { - asset: agng, source: { + asset: agng, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: agng, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -30,8 +31,8 @@ export const peaqAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().assets().account(), min: AssetMinBuilder().assets().asset(), destinationFee: { @@ -39,6 +40,7 @@ export const peaqAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -49,8 +51,8 @@ export const peaqAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: agng, @@ -62,6 +64,7 @@ export const peaqAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/peaqEvm.ts b/packages/config/src/xcm-configs/peaqEvm.ts index 1cadc0e1..b1099291 100644 --- a/packages/config/src/xcm-configs/peaqEvm.ts +++ b/packages/config/src/xcm-configs/peaqEvm.ts @@ -11,8 +11,8 @@ export const peaqEvmRoutes = new ChainRoutes({ chain: peaqEvm, routes: [ { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -24,6 +24,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -34,8 +35,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -47,6 +48,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -57,8 +59,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: dai, source: { + asset: dai, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -70,6 +72,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: dai, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -80,8 +83,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: wbtc, source: { + asset: wbtc, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -93,6 +96,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: wbtc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -103,8 +107,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: weth, source: { + asset: weth, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -116,6 +120,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: weth, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -126,8 +131,8 @@ export const peaqEvmRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: usdtwh, source: { + asset: usdtwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: peaq, @@ -139,6 +144,7 @@ export const peaqEvmRoutes = new ChainRoutes({ }, }, destination: { + asset: usdtwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/peaqEvmAlphanet.ts b/packages/config/src/xcm-configs/peaqEvmAlphanet.ts index ea9e804b..b4dc0cb5 100644 --- a/packages/config/src/xcm-configs/peaqEvmAlphanet.ts +++ b/packages/config/src/xcm-configs/peaqEvmAlphanet.ts @@ -11,8 +11,8 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ chain: peaqEvmAlphanet, routes: [ { - asset: ftmwh, source: { + asset: ftmwh, balance: BalanceBuilder().evm().erc20(), fee: { asset: agng, @@ -24,6 +24,7 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: ftmwh, chain: moonbaseAlpha, balance: BalanceBuilder().evm().erc20(), fee: { @@ -34,8 +35,8 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ contract: ContractBuilder().Xtokens().transferMultiCurrencies(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().evm().erc20(), fee: { asset: agng, @@ -47,6 +48,7 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/pendulum.ts b/packages/config/src/xcm-configs/pendulum.ts index 7b1c3cf5..93742002 100644 --- a/packages/config/src/xcm-configs/pendulum.ts +++ b/packages/config/src/xcm-configs/pendulum.ts @@ -11,14 +11,15 @@ export const pendulumRoutes = new ChainRoutes({ chain: pendulum, routes: [ { - asset: pen, source: { + asset: pen, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pen, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const pendulumRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pen, @@ -41,6 +42,7 @@ export const pendulumRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { @@ -51,8 +53,8 @@ export const pendulumRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: axlusdc, source: { + asset: axlusdc, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pen, @@ -63,6 +65,7 @@ export const pendulumRoutes = new ChainRoutes({ }, }, destination: { + asset: axlusdc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { diff --git a/packages/config/src/xcm-configs/pendulumAlphanet.ts b/packages/config/src/xcm-configs/pendulumAlphanet.ts index 299e8e01..fb3d50a9 100644 --- a/packages/config/src/xcm-configs/pendulumAlphanet.ts +++ b/packages/config/src/xcm-configs/pendulumAlphanet.ts @@ -11,14 +11,15 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ chain: pendulumAlphanet, routes: [ { - asset: ampe, source: { + asset: ampe, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: ampe, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: ampe, @@ -41,6 +42,7 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/phala.ts b/packages/config/src/xcm-configs/phala.ts index 1c0bc68b..98c79132 100644 --- a/packages/config/src/xcm-configs/phala.ts +++ b/packages/config/src/xcm-configs/phala.ts @@ -11,14 +11,15 @@ export const phalaRoutes = new ChainRoutes({ chain: phala, routes: [ { - asset: pha, source: { + asset: pha, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pha, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const phalaRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTransfer().transfer().here(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: pha, @@ -41,6 +42,7 @@ export const phalaRoutes = new ChainRoutes({ }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/picasso.ts b/packages/config/src/xcm-configs/picasso.ts index 62469db1..b4161eaf 100644 --- a/packages/config/src/xcm-configs/picasso.ts +++ b/packages/config/src/xcm-configs/picasso.ts @@ -11,14 +11,15 @@ export const picassoRoutes = new ChainRoutes({ chain: picasso, routes: [ { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pica, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const picassoRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pica, @@ -41,6 +42,7 @@ export const picassoRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/picassoAlphanet.ts b/packages/config/src/xcm-configs/picassoAlphanet.ts index e9ad4ab1..d5a182d1 100644 --- a/packages/config/src/xcm-configs/picassoAlphanet.ts +++ b/packages/config/src/xcm-configs/picassoAlphanet.ts @@ -11,14 +11,15 @@ export const picassoAlphanetRoutes = new ChainRoutes({ chain: picassoAlphanet, routes: [ { - asset: pica, source: { + asset: pica, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: pica, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const picassoAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: atom, source: { + asset: atom, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pica, @@ -41,6 +42,7 @@ export const picassoAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: atom, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -51,8 +53,8 @@ export const picassoAlphanetRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: pica, @@ -63,6 +65,7 @@ export const picassoAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/polkadot.ts b/packages/config/src/xcm-configs/polkadot.ts index 8e96f887..8706112f 100644 --- a/packages/config/src/xcm-configs/polkadot.ts +++ b/packages/config/src/xcm-configs/polkadot.ts @@ -11,8 +11,8 @@ export const polkadotRoutes = new ChainRoutes({ chain: polkadot, routes: [ { - asset: dot, source: { + asset: dot, balance: BalanceBuilder().substrate().system().account(), fee: { asset: dot, @@ -24,6 +24,7 @@ export const polkadotRoutes = new ChainRoutes({ }, }, destination: { + asset: dot, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/polkadotAssetHub.ts b/packages/config/src/xcm-configs/polkadotAssetHub.ts index f5baa08d..38f6bd68 100644 --- a/packages/config/src/xcm-configs/polkadotAssetHub.ts +++ b/packages/config/src/xcm-configs/polkadotAssetHub.ts @@ -14,8 +14,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ chain: polkadotAssetHub, routes: [ { - asset: usdt, source: { + asset: usdt, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -28,6 +28,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: usdt, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -41,8 +42,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: usdc, source: { + asset: usdc, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -55,6 +56,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: usdc, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -68,8 +70,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: pink, source: { + asset: pink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -82,6 +84,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: pink, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -95,8 +98,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: ded, source: { + asset: ded, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -109,6 +112,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: ded, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -122,8 +126,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: stink, source: { + asset: stink, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -136,6 +140,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: stink, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -149,8 +154,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: apillon, source: { + asset: apillon, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -163,6 +168,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: apillon, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -176,8 +182,8 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ .X2(), }, { - asset: wifd, source: { + asset: wifd, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: dot, @@ -190,6 +196,7 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ }, }, destination: { + asset: wifd, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/robonomics.ts b/packages/config/src/xcm-configs/robonomics.ts index 3caa4e3f..315c71ba 100644 --- a/packages/config/src/xcm-configs/robonomics.ts +++ b/packages/config/src/xcm-configs/robonomics.ts @@ -11,14 +11,15 @@ export const robonomicsRoutes = new ChainRoutes({ chain: robonomics, routes: [ { - asset: xrt, source: { + asset: xrt, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: xrt, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/shiden.ts b/packages/config/src/xcm-configs/shiden.ts index 7688cd26..9c122e17 100644 --- a/packages/config/src/xcm-configs/shiden.ts +++ b/packages/config/src/xcm-configs/shiden.ts @@ -11,14 +11,15 @@ export const shidenRoutes = new ChainRoutes({ chain: shiden, routes: [ { - asset: sdn, source: { + asset: sdn, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: sdn, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const shidenRoutes = new ChainRoutes({ .here(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().assets().account(), fee: { asset: sdn, @@ -44,6 +45,7 @@ export const shidenRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/subsocial.ts b/packages/config/src/xcm-configs/subsocial.ts index 2e188bd1..0e32140d 100644 --- a/packages/config/src/xcm-configs/subsocial.ts +++ b/packages/config/src/xcm-configs/subsocial.ts @@ -11,14 +11,15 @@ export const subsocialRoutes = new ChainRoutes({ chain: subsocial, routes: [ { - asset: sub, source: { + asset: sub, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: sub, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/tinkernet.ts b/packages/config/src/xcm-configs/tinkernet.ts index 3328f619..327708f5 100644 --- a/packages/config/src/xcm-configs/tinkernet.ts +++ b/packages/config/src/xcm-configs/tinkernet.ts @@ -11,14 +11,15 @@ export const tinkernetRoutes = new ChainRoutes({ chain: tinkernet, routes: [ { - asset: tnkr, source: { + asset: tnkr, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: tnkr, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { diff --git a/packages/config/src/xcm-configs/turing.ts b/packages/config/src/xcm-configs/turing.ts index ad80f0b5..98f43c5a 100644 --- a/packages/config/src/xcm-configs/turing.ts +++ b/packages/config/src/xcm-configs/turing.ts @@ -11,14 +11,15 @@ export const turingRoutes = new ChainRoutes({ chain: turing, routes: [ { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: tur, chain: moonriver, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const turingRoutes = new ChainRoutes({ .X1(), }, { - asset: movr, source: { + asset: movr, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: tur, @@ -44,6 +45,7 @@ export const turingRoutes = new ChainRoutes({ }, }, destination: { + asset: movr, chain: moonriver, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/turingAlphanet.ts b/packages/config/src/xcm-configs/turingAlphanet.ts index abf5145d..c70091ae 100644 --- a/packages/config/src/xcm-configs/turingAlphanet.ts +++ b/packages/config/src/xcm-configs/turingAlphanet.ts @@ -11,14 +11,15 @@ export const turingAlphanetRoutes = new ChainRoutes({ chain: turingAlphanet, routes: [ { - asset: tur, source: { + asset: tur, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: tur, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -32,8 +33,8 @@ export const turingAlphanetRoutes = new ChainRoutes({ .X1(), }, { - asset: dev, source: { + asset: dev, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: tur, @@ -44,6 +45,7 @@ export const turingAlphanetRoutes = new ChainRoutes({ }, }, destination: { + asset: dev, chain: moonbaseAlpha, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/config/src/xcm-configs/zeitgeist.ts b/packages/config/src/xcm-configs/zeitgeist.ts index bfa304ab..588e0aaf 100644 --- a/packages/config/src/xcm-configs/zeitgeist.ts +++ b/packages/config/src/xcm-configs/zeitgeist.ts @@ -11,14 +11,15 @@ export const zeitgeistRoutes = new ChainRoutes({ chain: zeitgeist, routes: [ { - asset: ztg, source: { + asset: ztg, balance: BalanceBuilder().substrate().system().account(), destinationFee: { balance: BalanceBuilder().substrate().system().account(), }, }, destination: { + asset: ztg, chain: moonbeam, balance: BalanceBuilder().substrate().assets().account(), fee: { @@ -29,8 +30,8 @@ export const zeitgeistRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transfer(), }, { - asset: usdcwh, source: { + asset: usdcwh, balance: BalanceBuilder().substrate().tokens().accounts(), fee: { asset: ztg, @@ -41,6 +42,7 @@ export const zeitgeistRoutes = new ChainRoutes({ }, }, destination: { + asset: usdcwh, chain: moonbeam, balance: BalanceBuilder().evm().erc20(), fee: { @@ -51,14 +53,15 @@ export const zeitgeistRoutes = new ChainRoutes({ extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), }, { - asset: glmr, source: { + asset: glmr, balance: BalanceBuilder().substrate().tokens().accounts(), destinationFee: { balance: BalanceBuilder().substrate().tokens().accounts(), }, }, destination: { + asset: glmr, chain: moonbeam, balance: BalanceBuilder().substrate().system().account(), fee: { diff --git a/packages/mrl/src/getTransferData/getMoonChainData.ts b/packages/mrl/src/getTransferData/getMoonChainData.ts index b6417d4e..c426a73a 100644 --- a/packages/mrl/src/getTransferData/getMoonChainData.ts +++ b/packages/mrl/src/getTransferData/getMoonChainData.ts @@ -20,12 +20,12 @@ export async function getMoonChainData({ }: GetMoonChainDataParams): Promise { if (!route.mrl) { throw new Error( - `MRL config is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MRL config is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } const moonChain = getMoonChain(route.source.chain); - const asset = moonChain.getChainAsset(route.asset); + const asset = moonChain.getChainAsset(route.source.asset); const isDestinationMoonChain = route.destination.chain.isEqual(moonChain); if (isDestinationMoonChain) { diff --git a/packages/mrl/src/getTransferData/getSourceData.ts b/packages/mrl/src/getTransferData/getSourceData.ts index 6f0aa956..0ed0a5c1 100644 --- a/packages/mrl/src/getTransferData/getSourceData.ts +++ b/packages/mrl/src/getTransferData/getSourceData.ts @@ -38,13 +38,13 @@ export async function getSourceData({ }: GetSourceDataParams): Promise { if (!route.mrl) { throw new Error( - `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } const source = route.source.chain; const destination = route.destination.chain; - const asset = source.getChainAsset(route.asset); + const asset = source.getChainAsset(route.source.asset); const feeAsset = route.source.fee ? source.getChainAsset(route.source.fee.asset) : asset; diff --git a/packages/mrl/src/getTransferData/getTransferData.ts b/packages/mrl/src/getTransferData/getTransferData.ts index 323641bf..4622d002 100644 --- a/packages/mrl/src/getTransferData/getTransferData.ts +++ b/packages/mrl/src/getTransferData/getTransferData.ts @@ -41,7 +41,7 @@ export async function getTransferData({ }: GetTransferDataParams): Promise { if (!route.mrl) { throw new Error( - `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } @@ -54,6 +54,7 @@ export async function getTransferData({ const destinationFee = convertToChainDecimals({ asset: destinationData.fee, chain: route.source.chain, + targetAsset: route.source.destinationFee?.asset, }); const sourceData = await getSourceData({ @@ -108,7 +109,7 @@ export async function getTransferData({ const bigintAmount = toBigInt(amount, sourceData.balance.decimals); const asset = AssetAmount.fromChainAsset( - route.source.chain.getChainAsset(route.asset), + route.source.chain.getChainAsset(route.source.asset), { amount: bigintAmount }, ); diff --git a/packages/mrl/src/getTransferData/getTransferData.utils.ts b/packages/mrl/src/getTransferData/getTransferData.utils.ts index 82c2cca0..f4cc199d 100644 --- a/packages/mrl/src/getTransferData/getTransferData.utils.ts +++ b/packages/mrl/src/getTransferData/getTransferData.utils.ts @@ -103,7 +103,7 @@ export async function buildTransfer({ }: BuildTransferParams) { if (!route.mrl) { throw new Error( - `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.asset.originSymbol}`, + `MrlConfigBuilder is not defined for source chain ${route.source.chain.name} and asset ${route.source.asset.originSymbol}`, ); } diff --git a/packages/sdk/src/getTransferData/getDestinationData.ts b/packages/sdk/src/getTransferData/getDestinationData.ts index a6896abd..c64c615b 100644 --- a/packages/sdk/src/getTransferData/getDestinationData.ts +++ b/packages/sdk/src/getTransferData/getDestinationData.ts @@ -17,7 +17,7 @@ export async function getDestinationData({ destinationAddress, }: GetDestinationDataParams): Promise { const destination = route.destination.chain; - const asset = destination.getChainAsset(route.asset); + const asset = destination.getChainAsset(route.destination.asset); const balance = await getBalance({ address: destinationAddress, asset, diff --git a/packages/sdk/src/getTransferData/getSourceData.ts b/packages/sdk/src/getTransferData/getSourceData.ts index 8e5865b6..1ad2e258 100644 --- a/packages/sdk/src/getTransferData/getSourceData.ts +++ b/packages/sdk/src/getTransferData/getSourceData.ts @@ -38,7 +38,7 @@ export async function getSourceData({ const destination = route.destination.chain as AnyParachain; const [sourcePolkadot, destinationPolkadot] = await PolkadotService.createMulti([source, destination]); - const asset = source.getChainAsset(route.asset); + const asset = source.getChainAsset(route.source.asset); const feeAsset = route.source.fee ? source.getChainAsset(route.source.fee.asset) : asset; @@ -182,7 +182,9 @@ export async function getAssetsBalances({ routes, }: GetAssetsBalancesParams): Promise { const uniqueRoutes = routes.reduce((acc: AssetRoute[], route: AssetRoute) => { - if (!acc.some((a: AssetRoute) => a.asset.isEqual(route.asset))) { + if ( + !acc.some((a: AssetRoute) => a.source.asset.isEqual(route.source.asset)) + ) { // biome-ignore lint/performance/noAccumulatingSpread: I think this is fine here return [route, ...acc]; } @@ -194,7 +196,7 @@ export async function getAssetsBalances({ uniqueRoutes.map(async (route: AssetRoute) => getBalance({ address, - asset: chain.getChainAsset(route.asset), + asset: chain.getChainAsset(route.source.asset), builder: route.source.balance, chain, }), diff --git a/packages/sdk/src/getTransferData/getTransferData.ts b/packages/sdk/src/getTransferData/getTransferData.ts index 41be9ce6..15dbfce5 100644 --- a/packages/sdk/src/getTransferData/getTransferData.ts +++ b/packages/sdk/src/getTransferData/getTransferData.ts @@ -33,6 +33,7 @@ export async function getTransferData({ const destinationFee = convertToChainDecimals({ asset: destinationData.fee, chain: route.source.chain, + targetAsset: route.source.destinationFee?.asset, }); const sourceData = await getSourceData({ @@ -69,7 +70,7 @@ export async function getTransferData({ const destination = route.destination.chain as AnyParachain; const bigintAmount = toBigInt(amount, sourceData.balance.decimals); const asset = AssetAmount.fromChainAsset( - route.source.chain.getChainAsset(route.asset), + route.source.chain.getChainAsset(route.source.asset), { amount: bigintAmount }, ); const [sourcePolkadot, destinationPolkadot] = diff --git a/packages/sdk/src/getTransferData/getTransferData.utils.ts b/packages/sdk/src/getTransferData/getTransferData.utils.ts index e9088a80..a8d1d40b 100644 --- a/packages/sdk/src/getTransferData/getTransferData.utils.ts +++ b/packages/sdk/src/getTransferData/getTransferData.utils.ts @@ -193,16 +193,18 @@ export async function getDestinationFee({ export interface ConvertToChainDecimalsParams { asset: AssetAmount; chain: AnyChain; + targetAsset?: Asset; } export function convertToChainDecimals({ asset, chain, + targetAsset, }: ConvertToChainDecimalsParams): AssetAmount { - const targetAsset = chain.getChainAsset(asset); + const chainAsset = chain.getChainAsset(targetAsset ?? asset); - return AssetAmount.fromChainAsset(targetAsset, { - amount: asset.convertDecimals(targetAsset.decimals).amount, + return AssetAmount.fromChainAsset(chainAsset, { + amount: asset.convertDecimals(chainAsset.decimals).amount, }); }