diff --git a/packages/config/src/types/AssetRoute.ts b/packages/config/src/types/AssetRoute.ts index 11467062..2edfbccd 100644 --- a/packages/config/src/types/AssetRoute.ts +++ b/packages/config/src/types/AssetRoute.ts @@ -6,7 +6,7 @@ import type { FeeConfigBuilder, MrlConfigBuilder, } from '@moonbeam-network/xcm-builder'; -import type { AnyChain, Asset } from '@moonbeam-network/xcm-types'; +import type { AnyChain, Asset, SetOptional } from '@moonbeam-network/xcm-types'; export interface AssetRouteConstructorParams { asset: Asset; @@ -21,6 +21,9 @@ export interface SourceConfig { chain: AnyChain; balance: BalanceConfigBuilder; fee?: FeeConfig; + destinationFee?: { + balance: BalanceConfigBuilder; + }; min?: AssetMinConfigBuilder; } @@ -36,7 +39,8 @@ export interface FeeConfig { extra?: number; } -export interface DestinationFeeConfig extends FeeConfig { +export interface DestinationFeeConfig + extends SetOptional { amount: number | FeeConfigBuilder; } diff --git a/packages/config/src/xcm-configs/acala.ts b/packages/config/src/xcm-configs/acala.ts index c6c4e9af..8a184bf2 100644 --- a/packages/config/src/xcm-configs/acala.ts +++ b/packages/config/src/xcm-configs/acala.ts @@ -15,6 +15,9 @@ export const acalaRoutes = new ChainRoutes({ asset: aca, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -22,7 +25,6 @@ export const acalaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: aca, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -36,6 +38,9 @@ export const acalaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().assetMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -43,7 +48,6 @@ export const acalaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: aseed, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -57,6 +61,9 @@ export const acalaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().assetMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -64,7 +71,6 @@ export const acalaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -78,6 +84,9 @@ export const acalaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().assetMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -85,7 +94,6 @@ export const acalaRoutes = new ChainRoutes({ fee: { amount: 0.005, asset: ldot, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/alphanetAssetHub.ts b/packages/config/src/xcm-configs/alphanetAssetHub.ts index 4351c564..277b28b8 100644 --- a/packages/config/src/xcm-configs/alphanetAssetHub.ts +++ b/packages/config/src/xcm-configs/alphanetAssetHub.ts @@ -20,6 +20,9 @@ export const alphanetAssetHubRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -27,7 +30,6 @@ export const alphanetAssetHubRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: tt1, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/alphanetRelay.ts b/packages/config/src/xcm-configs/alphanetRelay.ts index fcd0c3bb..3616cabc 100644 --- a/packages/config/src/xcm-configs/alphanetRelay.ts +++ b/packages/config/src/xcm-configs/alphanetRelay.ts @@ -14,6 +14,9 @@ export const alphanetRelayRoutes = new ChainRoutes({ asset: unit, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -21,7 +24,6 @@ export const alphanetRelayRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: unit, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/astar.ts b/packages/config/src/xcm-configs/astar.ts index 8a706d6f..396cd1ea 100644 --- a/packages/config/src/xcm-configs/astar.ts +++ b/packages/config/src/xcm-configs/astar.ts @@ -14,6 +14,9 @@ export const astarRoutes = new ChainRoutes({ asset: astr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const astarRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: astr, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -37,6 +39,9 @@ export const astarRoutes = new ChainRoutes({ asset: astr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -44,7 +49,6 @@ export const astarRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/bifrostKusama.ts b/packages/config/src/xcm-configs/bifrostKusama.ts index bf815b28..34b579a1 100644 --- a/packages/config/src/xcm-configs/bifrostKusama.ts +++ b/packages/config/src/xcm-configs/bifrostKusama.ts @@ -15,6 +15,9 @@ export const bifrostKusamaRoutes = new ChainRoutes({ asset: bnc, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -22,7 +25,6 @@ export const bifrostKusamaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -36,6 +38,9 @@ export const bifrostKusamaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -43,7 +48,6 @@ export const bifrostKusamaRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: movr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -57,6 +61,9 @@ export const bifrostKusamaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -64,7 +71,6 @@ export const bifrostKusamaRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -78,6 +84,9 @@ export const bifrostKusamaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -85,7 +94,6 @@ export const bifrostKusamaRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -99,6 +107,9 @@ export const bifrostKusamaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -106,7 +117,6 @@ export const bifrostKusamaRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/bifrostPolkadot.ts b/packages/config/src/xcm-configs/bifrostPolkadot.ts index 43fcce54..28f17692 100644 --- a/packages/config/src/xcm-configs/bifrostPolkadot.ts +++ b/packages/config/src/xcm-configs/bifrostPolkadot.ts @@ -25,6 +25,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ asset: bnc, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -32,7 +35,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -46,6 +48,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -53,7 +58,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -67,6 +71,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -74,7 +81,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -88,6 +94,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -95,7 +104,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -109,6 +117,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -116,7 +127,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: vdot, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -130,6 +140,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -137,7 +150,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -151,6 +163,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -158,7 +173,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -172,6 +186,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -179,7 +196,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -193,6 +209,9 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().currencyMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -200,7 +219,6 @@ export const bifrostPolkadotRoutes = new ChainRoutes({ fee: { amount: 0.05, asset: bnc, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/calamari.ts b/packages/config/src/xcm-configs/calamari.ts index 079e3dd4..80b9b094 100644 --- a/packages/config/src/xcm-configs/calamari.ts +++ b/packages/config/src/xcm-configs/calamari.ts @@ -15,6 +15,9 @@ export const calamariRoutes = new ChainRoutes({ asset: kma, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -22,7 +25,6 @@ export const calamariRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: kma, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -36,6 +38,9 @@ export const calamariRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonriver, @@ -43,7 +48,6 @@ export const calamariRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: movr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/centrifuge.ts b/packages/config/src/xcm-configs/centrifuge.ts index 1bc4b1b3..a524b411 100644 --- a/packages/config/src/xcm-configs/centrifuge.ts +++ b/packages/config/src/xcm-configs/centrifuge.ts @@ -14,6 +14,9 @@ export const centrifugeRoutes = new ChainRoutes({ asset: cfg, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const centrifugeRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: cfg, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/crustShadow.ts b/packages/config/src/xcm-configs/crustShadow.ts index b67b9465..ff22d447 100644 --- a/packages/config/src/xcm-configs/crustShadow.ts +++ b/packages/config/src/xcm-configs/crustShadow.ts @@ -14,6 +14,9 @@ export const crustShadowRoutes = new ChainRoutes({ asset: csm, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const crustShadowRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: csm, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -37,6 +39,9 @@ export const crustShadowRoutes = new ChainRoutes({ asset: csm, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonriver, @@ -44,7 +49,6 @@ export const crustShadowRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: movr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/darwinia.ts b/packages/config/src/xcm-configs/darwinia.ts index 4fb6b687..d72cd017 100644 --- a/packages/config/src/xcm-configs/darwinia.ts +++ b/packages/config/src/xcm-configs/darwinia.ts @@ -14,6 +14,9 @@ export const darwiniaRoutes = new ChainRoutes({ asset: ring, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const darwiniaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: ring, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/darwiniaCrab.ts b/packages/config/src/xcm-configs/darwiniaCrab.ts index f939770b..b798f434 100644 --- a/packages/config/src/xcm-configs/darwiniaCrab.ts +++ b/packages/config/src/xcm-configs/darwiniaCrab.ts @@ -14,6 +14,9 @@ export const darwiniaCrabRoutes = new ChainRoutes({ asset: crab, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const darwiniaCrabRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: crab, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/hydration.ts b/packages/config/src/xcm-configs/hydration.ts index b701da7f..a0d39805 100644 --- a/packages/config/src/xcm-configs/hydration.ts +++ b/packages/config/src/xcm-configs/hydration.ts @@ -14,6 +14,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: hdx, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: hdx, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -30,6 +32,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -37,7 +42,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -50,6 +54,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -57,7 +64,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -70,6 +76,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -77,7 +86,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -90,6 +98,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -97,7 +108,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -110,6 +120,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -117,7 +130,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -130,6 +142,9 @@ export const hydrationRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -137,7 +152,6 @@ export const hydrationRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/hydrationAlphanet.ts b/packages/config/src/xcm-configs/hydrationAlphanet.ts index 94a65218..f4db08f7 100644 --- a/packages/config/src/xcm-configs/hydrationAlphanet.ts +++ b/packages/config/src/xcm-configs/hydrationAlphanet.ts @@ -15,6 +15,9 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ asset: hdx, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -22,7 +25,6 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: hdx, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -31,6 +33,9 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbaseAlpha, @@ -38,7 +43,6 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: dev, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -51,6 +55,9 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbaseAlpha, @@ -58,7 +65,6 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: dev, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -71,6 +77,9 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ asset: hdx, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbaseAlpha, @@ -78,7 +87,6 @@ export const hydrationAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: dev, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/integritee.ts b/packages/config/src/xcm-configs/integritee.ts index f86b8451..34f97b02 100644 --- a/packages/config/src/xcm-configs/integritee.ts +++ b/packages/config/src/xcm-configs/integritee.ts @@ -14,6 +14,9 @@ export const integriteeRoutes = new ChainRoutes({ asset: teer, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const integriteeRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: teer, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/interlay.ts b/packages/config/src/xcm-configs/interlay.ts index 7752b9b2..308dbdaa 100644 --- a/packages/config/src/xcm-configs/interlay.ts +++ b/packages/config/src/xcm-configs/interlay.ts @@ -14,6 +14,9 @@ export const interlayRoutes = new ChainRoutes({ asset: intr, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const interlayRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: intr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const interlayRoutes = new ChainRoutes({ asset: intr, balance: BalanceBuilder().substrate().tokens().accounts(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -41,7 +46,6 @@ export const interlayRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: intr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -50,6 +54,9 @@ export const interlayRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -57,7 +64,6 @@ export const interlayRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/karura.ts b/packages/config/src/xcm-configs/karura.ts index d56fe2eb..864cca8b 100644 --- a/packages/config/src/xcm-configs/karura.ts +++ b/packages/config/src/xcm-configs/karura.ts @@ -15,6 +15,9 @@ export const karuraRoutes = new ChainRoutes({ asset: kar, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -22,7 +25,6 @@ export const karuraRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: kar, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -36,6 +38,9 @@ export const karuraRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().assetMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -43,7 +48,6 @@ export const karuraRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: aseed, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -57,6 +61,9 @@ export const karuraRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assetRegistry().assetMetadatas(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -64,7 +71,6 @@ export const karuraRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: movr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/khala.ts b/packages/config/src/xcm-configs/khala.ts index acd3760b..45574968 100644 --- a/packages/config/src/xcm-configs/khala.ts +++ b/packages/config/src/xcm-configs/khala.ts @@ -14,6 +14,9 @@ export const khalaRouts = new ChainRoutes({ asset: pha, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const khalaRouts = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: pha, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTransfer().transfer().here(), @@ -34,6 +36,9 @@ export const khalaRouts = new ChainRoutes({ asset: pha, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonriver, @@ -41,7 +46,6 @@ export const khalaRouts = new ChainRoutes({ fee: { amount: 0.001, asset: movr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTransfer().transfer().X2(), diff --git a/packages/config/src/xcm-configs/kintsugi.ts b/packages/config/src/xcm-configs/kintsugi.ts index 5e580b10..06aa24fe 100644 --- a/packages/config/src/xcm-configs/kintsugi.ts +++ b/packages/config/src/xcm-configs/kintsugi.ts @@ -14,6 +14,9 @@ export const kintsugiRoutes = new ChainRoutes({ asset: kint, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const kintsugiRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: kint, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const kintsugiRoutes = new ChainRoutes({ asset: kint, balance: BalanceBuilder().substrate().tokens().accounts(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -41,7 +46,6 @@ export const kintsugiRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: kint, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/kusama.ts b/packages/config/src/xcm-configs/kusama.ts index 943fe63c..7fcf2c70 100644 --- a/packages/config/src/xcm-configs/kusama.ts +++ b/packages/config/src/xcm-configs/kusama.ts @@ -19,6 +19,9 @@ export const kusamaRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), extra: 0.002, }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -26,7 +29,6 @@ export const kusamaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: ksm, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/kusamaAssetHub.ts b/packages/config/src/xcm-configs/kusamaAssetHub.ts index c278283f..88441033 100644 --- a/packages/config/src/xcm-configs/kusamaAssetHub.ts +++ b/packages/config/src/xcm-configs/kusamaAssetHub.ts @@ -23,6 +23,9 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonriver, @@ -30,7 +33,6 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: rmrk, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -48,6 +50,9 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonriver, @@ -55,7 +60,6 @@ export const kusamaAssetHubRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/litmus.ts b/packages/config/src/xcm-configs/litmus.ts index b6d68c50..2a9fb295 100644 --- a/packages/config/src/xcm-configs/litmus.ts +++ b/packages/config/src/xcm-configs/litmus.ts @@ -14,6 +14,9 @@ export const litmusRoutes = new ChainRoutes({ asset: lit, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const litmusRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: lit, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/mangataKusama.ts b/packages/config/src/xcm-configs/mangataKusama.ts index 152fb996..9587ef7b 100644 --- a/packages/config/src/xcm-configs/mangataKusama.ts +++ b/packages/config/src/xcm-configs/mangataKusama.ts @@ -14,6 +14,9 @@ export const mangataKusamaRoutes = new ChainRoutes({ asset: mgx, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const mangataKusamaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: mgx, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const mangataKusamaRoutes = new ChainRoutes({ asset: mgx, balance: BalanceBuilder().substrate().tokens().accounts(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -41,7 +46,6 @@ export const mangataKusamaRoutes = new ChainRoutes({ fee: { amount: 0.000008, asset: movr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/mantaParachain.ts b/packages/config/src/xcm-configs/mantaParachain.ts index 362ea278..7227998a 100644 --- a/packages/config/src/xcm-configs/mantaParachain.ts +++ b/packages/config/src/xcm-configs/mantaParachain.ts @@ -15,6 +15,9 @@ export const mantaParachainRoutes = new ChainRoutes({ asset: manta, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -22,7 +25,6 @@ export const mantaParachainRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: manta, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -36,6 +38,9 @@ export const mantaParachainRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -43,7 +48,6 @@ export const mantaParachainRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/moonbaseAlpha.ts b/packages/config/src/xcm-configs/moonbaseAlpha.ts index 02b49d91..4bd9d8b7 100644 --- a/packages/config/src/xcm-configs/moonbaseAlpha.ts +++ b/packages/config/src/xcm-configs/moonbaseAlpha.ts @@ -36,6 +36,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: turingAlphanet, @@ -43,7 +46,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -52,6 +54,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseBeta, @@ -59,7 +64,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -68,6 +72,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: pendulumAlphanet, @@ -75,7 +82,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.0000001, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -84,6 +90,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: picassoAlphanet, @@ -91,7 +100,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -104,6 +112,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseBeta, @@ -111,7 +122,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -141,6 +151,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: pendulumAlphanet, @@ -148,7 +161,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: ampe, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -161,6 +173,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: originTrailAlphanet, @@ -168,7 +183,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: otp, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -181,6 +195,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: picassoAlphanet, @@ -188,7 +205,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: atom, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -201,6 +217,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: picassoAlphanet, @@ -208,7 +227,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: pica, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -221,6 +239,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: alphanetAssetHub, @@ -228,7 +249,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 5, asset: tt1, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -241,6 +261,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: turingAlphanet, @@ -248,7 +271,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: tur, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -261,6 +283,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: alphanetRelay, @@ -268,7 +293,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.0506, asset: unit, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -281,6 +305,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydrationAlphanet, @@ -288,7 +315,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.1, asset: usdcwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -301,6 +327,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydrationAlphanet, @@ -308,7 +337,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: ftmwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -321,6 +349,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqAlphanet, @@ -328,7 +359,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: ftmwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -337,6 +367,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: hydrationAlphanet, @@ -344,7 +377,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -357,6 +389,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: hydrationAlphanet, @@ -364,7 +399,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.5, asset: hdx, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -373,6 +407,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: peaqAlphanet, @@ -380,7 +417,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -393,6 +429,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqAlphanet, @@ -400,7 +439,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: ftmwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -413,6 +451,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: peaqAlphanet, @@ -420,7 +461,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: agng, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -429,6 +469,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: peaqEvmAlphanet, @@ -436,7 +479,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -449,6 +491,9 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ asset: dev, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqEvmAlphanet, @@ -456,7 +501,6 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: ftmwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), diff --git a/packages/config/src/xcm-configs/moonbaseBeta.ts b/packages/config/src/xcm-configs/moonbaseBeta.ts index 3ebd7a31..a64afd6e 100644 --- a/packages/config/src/xcm-configs/moonbaseBeta.ts +++ b/packages/config/src/xcm-configs/moonbaseBeta.ts @@ -17,6 +17,9 @@ export const moonbaseBetaRoutes = new ChainRoutes({ asset: betaDEV, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -24,7 +27,6 @@ export const moonbaseBetaRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: dev, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -37,6 +39,9 @@ export const moonbaseBetaRoutes = new ChainRoutes({ asset: betaDEV, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -44,7 +49,6 @@ export const moonbaseBetaRoutes = new ChainRoutes({ fee: { amount: 0.002, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -57,6 +61,9 @@ export const moonbaseBetaRoutes = new ChainRoutes({ asset: betaDEV, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -64,7 +71,6 @@ export const moonbaseBetaRoutes = new ChainRoutes({ fee: { amount: 0.002, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -77,6 +83,9 @@ export const moonbaseBetaRoutes = new ChainRoutes({ asset: betaDEV, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -84,7 +93,6 @@ export const moonbaseBetaRoutes = new ChainRoutes({ fee: { amount: 0.002, asset: dev, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/moonbeam.ts b/packages/config/src/xcm-configs/moonbeam.ts index 3665617b..27cab464 100644 --- a/packages/config/src/xcm-configs/moonbeam.ts +++ b/packages/config/src/xcm-configs/moonbeam.ts @@ -72,6 +72,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: acala, @@ -79,7 +82,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -88,6 +90,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: astar, @@ -95,7 +100,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -104,6 +108,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: bifrostPolkadot, @@ -111,7 +118,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000001, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -120,6 +126,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: hydration, @@ -127,7 +136,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.05, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -136,6 +144,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: interlay, @@ -143,7 +154,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.05, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -152,6 +162,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: mantaParachain, @@ -159,7 +172,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.1, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -168,6 +180,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: parallel, @@ -175,7 +190,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000000032, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -184,6 +198,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: phala, @@ -191,7 +208,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -200,6 +216,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: pendulum, @@ -207,7 +226,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -216,6 +234,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: zeitgeist, @@ -223,7 +244,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.3, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -236,6 +256,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: acala, @@ -243,7 +266,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.032, asset: aca, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -256,6 +278,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: astar, @@ -263,7 +288,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.032, asset: astr, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -276,6 +300,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: acala, @@ -283,7 +310,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.256, asset: aseed, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -296,6 +322,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: bifrostPolkadot, @@ -303,7 +332,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.256, asset: bnc, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -316,6 +344,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: centrifuge, @@ -323,7 +354,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: cfg, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -336,6 +366,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadot, @@ -343,7 +376,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.052, asset: dot, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -356,6 +388,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: interlay, @@ -363,7 +398,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000064, asset: ibtc, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -376,6 +410,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: interlay, @@ -383,7 +420,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.748, asset: intr, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -396,6 +432,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: acala, @@ -403,7 +442,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: ldot, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -416,6 +454,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: mantaParachain, @@ -423,7 +464,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000001, asset: manta, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -436,6 +476,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { balance: BalanceBuilder().substrate().system().account(), @@ -443,7 +486,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.02, asset: nodl, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -456,6 +498,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: neuroweb, @@ -463,7 +508,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: neuro, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -476,6 +520,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: parallel, @@ -483,7 +530,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.064, asset: para, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -496,6 +542,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: pendulum, @@ -503,7 +552,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 1.01, asset: pen, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -516,6 +564,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: phala, @@ -523,7 +574,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.32, asset: pha, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -536,6 +586,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: darwinia, @@ -543,7 +596,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 4, asset: ring, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -556,6 +608,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -563,7 +618,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -576,6 +630,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -583,7 +640,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdc, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -596,6 +652,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -603,7 +662,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -616,6 +674,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -623,7 +684,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -636,6 +696,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -643,7 +706,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -656,6 +718,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -663,7 +728,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -676,6 +740,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: hydration, @@ -683,7 +750,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.6, asset: hdx, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -696,6 +762,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydration, @@ -703,7 +772,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: dai, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -716,6 +784,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydration, @@ -723,7 +794,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: usdcwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -736,6 +806,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: zeitgeist, @@ -743,7 +816,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.101, asset: usdcwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -756,6 +828,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydration, @@ -763,7 +838,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: usdtwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -776,6 +850,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostPolkadot, @@ -783,7 +860,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: vastr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -796,6 +872,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { balance: BalanceBuilder().substrate().tokens().accounts(), @@ -803,7 +882,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.0000001, asset: vdot, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -816,6 +894,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostPolkadot, @@ -823,7 +904,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: vfil, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -836,6 +916,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostPolkadot, @@ -843,7 +926,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: vglmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -856,6 +938,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostPolkadot, @@ -863,7 +948,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: vmanta, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -876,6 +960,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydration, @@ -883,7 +970,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.0000001, asset: wbtc, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -896,6 +982,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: hydration, @@ -903,7 +992,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000002, asset: weth, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -916,6 +1004,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostPolkadot, @@ -923,7 +1014,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: fil, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -936,6 +1026,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: zeitgeist, @@ -943,7 +1036,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: ztg, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -956,6 +1048,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: subsocial, @@ -963,7 +1058,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.1, asset: sub, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -976,6 +1070,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: bifrostPolkadot, @@ -983,7 +1080,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: bncs, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -992,6 +1088,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: peaqChain, @@ -999,7 +1098,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1012,6 +1110,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqChain, @@ -1019,7 +1120,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: usdcwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1032,6 +1132,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqChain, @@ -1039,7 +1142,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: usdtwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1052,6 +1154,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqChain, @@ -1059,7 +1164,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: dai, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1072,6 +1176,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqChain, @@ -1079,7 +1186,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000001, asset: weth, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1092,6 +1198,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqChain, @@ -1099,7 +1208,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000001, asset: wbtc, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1112,6 +1220,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: peaqChain, @@ -1119,7 +1230,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.1, asset: peaq, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -1128,6 +1238,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: peaqEvm, @@ -1135,7 +1248,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: glmr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -1148,6 +1260,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqEvm, @@ -1155,7 +1270,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: usdcwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -1168,6 +1282,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqEvm, @@ -1175,7 +1292,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: usdtwh, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -1188,6 +1304,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqEvm, @@ -1195,7 +1314,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: dai, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -1208,6 +1326,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqEvm, @@ -1215,7 +1336,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000001, asset: weth, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -1228,6 +1348,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: peaqEvm, @@ -1235,7 +1358,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.000001, asset: wbtc, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), @@ -1248,6 +1370,9 @@ export const moonbeamRoutes = new ChainRoutes({ asset: glmr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: polkadotAssetHub, @@ -1255,7 +1380,6 @@ export const moonbeamRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/moonriver.ts b/packages/config/src/xcm-configs/moonriver.ts index 4ec1614d..acdbd918 100644 --- a/packages/config/src/xcm-configs/moonriver.ts +++ b/packages/config/src/xcm-configs/moonriver.ts @@ -54,6 +54,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: bifrostKusama, @@ -61,7 +64,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0008544, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -70,6 +72,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: calamari, @@ -77,7 +82,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -86,6 +90,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: crustShadow, @@ -93,7 +100,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -102,6 +108,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: karura, @@ -109,7 +118,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -118,6 +126,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: khala, @@ -125,7 +136,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -134,6 +144,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: mangataKusama, @@ -141,7 +154,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.002, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -150,6 +162,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: shiden, @@ -157,7 +172,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0002, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -166,6 +180,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: turing, @@ -173,7 +190,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -182,6 +198,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: picasso, @@ -189,7 +208,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: movr, - balance: BalanceBuilder().substrate().system().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -202,6 +220,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: karura, @@ -209,7 +230,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.256, asset: aseed, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -222,6 +242,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: bifrostKusama, @@ -229,7 +252,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0256, asset: bnc, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -242,6 +264,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: darwiniaCrab, @@ -249,7 +274,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 4, asset: crab, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -262,6 +286,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: crustShadow, @@ -269,7 +296,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: csm, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -282,6 +308,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: karura, @@ -289,7 +318,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.032, asset: kar, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -302,6 +330,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: kintsugi, @@ -309,7 +340,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0000011, asset: kbtc, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -322,6 +352,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: kintsugi, @@ -329,7 +362,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.00084, asset: kint, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -342,6 +374,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: calamari, @@ -349,7 +384,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.000004, asset: kma, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -362,6 +396,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: kusama, @@ -369,7 +406,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.00168, asset: ksm, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -382,6 +418,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: litmus, @@ -389,7 +428,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0032, asset: lit, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -402,6 +440,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: mangataKusama, @@ -409,7 +450,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 5.5, asset: mgx, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -422,6 +462,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: khala, @@ -429,7 +472,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.32, asset: pha, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -442,6 +484,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: picasso, @@ -449,7 +494,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.001, asset: pica, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -462,6 +506,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: kusamaAssetHub, @@ -469,7 +516,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0000504, asset: rmrk, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -482,6 +528,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: shiden, @@ -489,7 +538,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.032, asset: sdn, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -502,6 +550,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: integritee, @@ -509,7 +560,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.004, asset: teer, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -522,6 +572,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: tinkernet, @@ -529,7 +582,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.4, asset: tnkr, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -542,6 +594,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: turing, @@ -549,7 +604,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.2, asset: tur, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -562,6 +616,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: kusamaAssetHub, @@ -569,7 +626,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.00504, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -582,6 +638,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: robonomics, @@ -589,7 +648,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.000032, asset: xrt, - balance: BalanceBuilder().substrate().assets().account(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -602,6 +660,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostKusama, @@ -609,7 +670,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: vbnc, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -622,6 +682,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostKusama, @@ -629,7 +692,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: vksm, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -642,6 +704,9 @@ export const moonriverRoutes = new ChainRoutes({ asset: movr, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: bifrostKusama, @@ -649,7 +714,6 @@ export const moonriverRoutes = new ChainRoutes({ fee: { amount: 0.00000001, asset: vmovr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), diff --git a/packages/config/src/xcm-configs/neuroweb.ts b/packages/config/src/xcm-configs/neuroweb.ts index 345eba45..5118e64b 100644 --- a/packages/config/src/xcm-configs/neuroweb.ts +++ b/packages/config/src/xcm-configs/neuroweb.ts @@ -14,6 +14,9 @@ export const neurowebRoutes = new ChainRoutes({ asset: neuro, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const neurowebRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: neuro, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/nodle.ts b/packages/config/src/xcm-configs/nodle.ts index 5c552240..f62892b5 100644 --- a/packages/config/src/xcm-configs/nodle.ts +++ b/packages/config/src/xcm-configs/nodle.ts @@ -14,6 +14,9 @@ export const nodleRoutes = new ChainRoutes({ asset: nodl, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const nodleRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: nodl, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/originTrailAlphanet.ts b/packages/config/src/xcm-configs/originTrailAlphanet.ts index 7f317fdd..5d642b2d 100644 --- a/packages/config/src/xcm-configs/originTrailAlphanet.ts +++ b/packages/config/src/xcm-configs/originTrailAlphanet.ts @@ -14,6 +14,9 @@ export const originTrailAlphanetRoutes = new ChainRoutes({ asset: otp, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -21,7 +24,6 @@ export const originTrailAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: otp, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/parallel.ts b/packages/config/src/xcm-configs/parallel.ts index 3c97289d..7b59e26e 100644 --- a/packages/config/src/xcm-configs/parallel.ts +++ b/packages/config/src/xcm-configs/parallel.ts @@ -14,6 +14,9 @@ export const parallelRoutes = new ChainRoutes({ asset: para, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const parallelRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: para, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -37,6 +39,9 @@ export const parallelRoutes = new ChainRoutes({ asset: para, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -44,7 +49,6 @@ export const parallelRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/peaq.ts b/packages/config/src/xcm-configs/peaq.ts index 04bfa39b..c752e24d 100644 --- a/packages/config/src/xcm-configs/peaq.ts +++ b/packages/config/src/xcm-configs/peaq.ts @@ -15,6 +15,9 @@ export const peaqRoutes = new ChainRoutes({ asset: peaq, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -22,7 +25,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: peaq, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -32,6 +34,9 @@ export const peaqRoutes = new ChainRoutes({ source: { balance: BalanceBuilder().substrate().assets().account(), min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -39,7 +44,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -53,6 +57,9 @@ export const peaqRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -60,7 +67,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -74,6 +80,9 @@ export const peaqRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -81,7 +90,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -95,6 +103,9 @@ export const peaqRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -102,7 +113,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -116,6 +126,9 @@ export const peaqRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -123,7 +136,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -137,6 +149,9 @@ export const peaqRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -144,7 +159,6 @@ export const peaqRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/peaqAlphanet.ts b/packages/config/src/xcm-configs/peaqAlphanet.ts index cd36584c..7d5390a0 100644 --- a/packages/config/src/xcm-configs/peaqAlphanet.ts +++ b/packages/config/src/xcm-configs/peaqAlphanet.ts @@ -15,6 +15,9 @@ export const peaqAlphanetRoutes = new ChainRoutes({ asset: agng, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -22,7 +25,6 @@ export const peaqAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: agng, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -32,6 +34,9 @@ export const peaqAlphanetRoutes = new ChainRoutes({ source: { balance: BalanceBuilder().substrate().assets().account(), min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -39,7 +44,6 @@ export const peaqAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: dev, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -53,6 +57,9 @@ export const peaqAlphanetRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -60,7 +67,6 @@ export const peaqAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: dev, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/peaqEvm.ts b/packages/config/src/xcm-configs/peaqEvm.ts index fab28b3e..2aede140 100644 --- a/packages/config/src/xcm-configs/peaqEvm.ts +++ b/packages/config/src/xcm-configs/peaqEvm.ts @@ -19,6 +19,9 @@ export const peaqEvmRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbeam, @@ -26,7 +29,6 @@ export const peaqEvmRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), @@ -40,6 +42,9 @@ export const peaqEvmRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbeam, @@ -47,7 +52,6 @@ export const peaqEvmRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -61,6 +65,9 @@ export const peaqEvmRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbeam, @@ -68,7 +75,6 @@ export const peaqEvmRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -82,6 +88,9 @@ export const peaqEvmRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbeam, @@ -89,7 +98,6 @@ export const peaqEvmRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -103,6 +111,9 @@ export const peaqEvmRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbeam, @@ -110,7 +121,6 @@ export const peaqEvmRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -124,6 +134,9 @@ export const peaqEvmRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbeam, @@ -131,7 +144,6 @@ export const peaqEvmRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), diff --git a/packages/config/src/xcm-configs/peaqEvmAlphanet.ts b/packages/config/src/xcm-configs/peaqEvmAlphanet.ts index da0e4244..ea9e804b 100644 --- a/packages/config/src/xcm-configs/peaqEvmAlphanet.ts +++ b/packages/config/src/xcm-configs/peaqEvmAlphanet.ts @@ -19,6 +19,9 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbaseAlpha, @@ -26,7 +29,6 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: dev, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transferMultiCurrencies(), @@ -40,6 +42,9 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().accountEvmTo32(), }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().evm().erc20(), + }, }, destination: { chain: moonbaseAlpha, @@ -47,7 +52,6 @@ export const peaqEvmAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: dev, - balance: BalanceBuilder().evm().erc20(), }, }, contract: ContractBuilder().Xtokens().transfer(), diff --git a/packages/config/src/xcm-configs/pendulum.ts b/packages/config/src/xcm-configs/pendulum.ts index a4c887f6..13ab88b3 100644 --- a/packages/config/src/xcm-configs/pendulum.ts +++ b/packages/config/src/xcm-configs/pendulum.ts @@ -14,6 +14,9 @@ export const pendulumRoutes = new ChainRoutes({ asset: pen, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const pendulumRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: pen, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const pendulumRoutes = new ChainRoutes({ asset: pen, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -41,7 +46,6 @@ export const pendulumRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/pendulumAlphanet.ts b/packages/config/src/xcm-configs/pendulumAlphanet.ts index ddd5fbd0..299e8e01 100644 --- a/packages/config/src/xcm-configs/pendulumAlphanet.ts +++ b/packages/config/src/xcm-configs/pendulumAlphanet.ts @@ -14,6 +14,9 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ asset: ampe, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -21,7 +24,6 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: ampe, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ asset: ampe, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbaseAlpha, @@ -41,7 +46,6 @@ export const pendulumAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: dev, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/phala.ts b/packages/config/src/xcm-configs/phala.ts index 468cd5cb..1c0bc68b 100644 --- a/packages/config/src/xcm-configs/phala.ts +++ b/packages/config/src/xcm-configs/phala.ts @@ -14,6 +14,9 @@ export const phalaRoutes = new ChainRoutes({ asset: pha, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const phalaRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: pha, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTransfer().transfer().here(), @@ -34,6 +36,9 @@ export const phalaRoutes = new ChainRoutes({ asset: pha, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -41,7 +46,6 @@ export const phalaRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTransfer().transfer().X2(), diff --git a/packages/config/src/xcm-configs/picasso.ts b/packages/config/src/xcm-configs/picasso.ts index 642e10f8..62469db1 100644 --- a/packages/config/src/xcm-configs/picasso.ts +++ b/packages/config/src/xcm-configs/picasso.ts @@ -14,6 +14,9 @@ export const picassoRoutes = new ChainRoutes({ asset: pica, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const picassoRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: pica, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const picassoRoutes = new ChainRoutes({ asset: pica, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -41,7 +46,6 @@ export const picassoRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: movr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/picassoAlphanet.ts b/packages/config/src/xcm-configs/picassoAlphanet.ts index 5f3ee7f6..e9ad4ab1 100644 --- a/packages/config/src/xcm-configs/picassoAlphanet.ts +++ b/packages/config/src/xcm-configs/picassoAlphanet.ts @@ -14,6 +14,9 @@ export const picassoAlphanetRoutes = new ChainRoutes({ asset: pica, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -21,7 +24,6 @@ export const picassoAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: pica, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const picassoAlphanetRoutes = new ChainRoutes({ asset: pica, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -41,7 +46,6 @@ export const picassoAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: pica, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -54,6 +58,9 @@ export const picassoAlphanetRoutes = new ChainRoutes({ asset: pica, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbaseAlpha, @@ -61,7 +68,6 @@ export const picassoAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: dev, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/polkadot.ts b/packages/config/src/xcm-configs/polkadot.ts index 877d8c50..7ad9165a 100644 --- a/packages/config/src/xcm-configs/polkadot.ts +++ b/packages/config/src/xcm-configs/polkadot.ts @@ -19,6 +19,9 @@ export const polkadotRoutes = new ChainRoutes({ balance: BalanceBuilder().substrate().system().account(), extra: 0.047, }, + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -26,7 +29,6 @@ export const polkadotRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: dot, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/polkadotAssetHub.ts b/packages/config/src/xcm-configs/polkadotAssetHub.ts index da00c959..f5baa08d 100644 --- a/packages/config/src/xcm-configs/polkadotAssetHub.ts +++ b/packages/config/src/xcm-configs/polkadotAssetHub.ts @@ -23,6 +23,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -30,7 +33,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -48,6 +50,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -55,7 +60,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: 0.03, asset: usdc, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -73,6 +77,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -80,7 +87,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: 0.03, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -98,6 +104,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -105,7 +114,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: 0.03, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -123,6 +131,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -130,7 +141,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: 0.03, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -148,6 +158,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -155,7 +168,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: 0.03, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -173,6 +185,9 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ extra, }, min: AssetMinBuilder().assets().asset(), + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonbeam, @@ -180,7 +195,6 @@ export const polkadotAssetHubRoutes = new ChainRoutes({ fee: { amount: 0.03, asset: usdt, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/robonomics.ts b/packages/config/src/xcm-configs/robonomics.ts index c04b28a8..3caa4e3f 100644 --- a/packages/config/src/xcm-configs/robonomics.ts +++ b/packages/config/src/xcm-configs/robonomics.ts @@ -14,6 +14,9 @@ export const robonomicsRoutes = new ChainRoutes({ asset: xrt, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const robonomicsRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: xrt, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/shiden.ts b/packages/config/src/xcm-configs/shiden.ts index 8e054629..7688cd26 100644 --- a/packages/config/src/xcm-configs/shiden.ts +++ b/packages/config/src/xcm-configs/shiden.ts @@ -14,6 +14,9 @@ export const shidenRoutes = new ChainRoutes({ asset: sdn, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const shidenRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: sdn, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -37,6 +39,9 @@ export const shidenRoutes = new ChainRoutes({ asset: sdn, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, }, destination: { chain: moonriver, @@ -44,7 +49,6 @@ export const shidenRoutes = new ChainRoutes({ fee: { amount: 0.0001, asset: movr, - balance: BalanceBuilder().substrate().assets().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/subsocial.ts b/packages/config/src/xcm-configs/subsocial.ts index 691bc50d..2e188bd1 100644 --- a/packages/config/src/xcm-configs/subsocial.ts +++ b/packages/config/src/xcm-configs/subsocial.ts @@ -14,6 +14,9 @@ export const subsocialRoutes = new ChainRoutes({ asset: sub, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const subsocialRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: sub, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() diff --git a/packages/config/src/xcm-configs/tinkernet.ts b/packages/config/src/xcm-configs/tinkernet.ts index 0e04b1db..3328f619 100644 --- a/packages/config/src/xcm-configs/tinkernet.ts +++ b/packages/config/src/xcm-configs/tinkernet.ts @@ -14,6 +14,9 @@ export const tinkernetRoutes = new ChainRoutes({ asset: tnkr, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const tinkernetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: tnkr, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/turing.ts b/packages/config/src/xcm-configs/turing.ts index 2bffd4ca..ad80f0b5 100644 --- a/packages/config/src/xcm-configs/turing.ts +++ b/packages/config/src/xcm-configs/turing.ts @@ -14,6 +14,9 @@ export const turingRoutes = new ChainRoutes({ asset: tur, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonriver, @@ -21,7 +24,6 @@ export const turingRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: tur, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -37,6 +39,9 @@ export const turingRoutes = new ChainRoutes({ asset: tur, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonriver, @@ -44,7 +49,6 @@ export const turingRoutes = new ChainRoutes({ fee: { amount: 0.00001, asset: movr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/turingAlphanet.ts b/packages/config/src/xcm-configs/turingAlphanet.ts index 2b2f596e..abf5145d 100644 --- a/packages/config/src/xcm-configs/turingAlphanet.ts +++ b/packages/config/src/xcm-configs/turingAlphanet.ts @@ -14,6 +14,9 @@ export const turingAlphanetRoutes = new ChainRoutes({ asset: tur, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbaseAlpha, @@ -21,7 +24,6 @@ export const turingAlphanetRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: tur, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder() @@ -37,6 +39,9 @@ export const turingAlphanetRoutes = new ChainRoutes({ asset: tur, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbaseAlpha, @@ -44,7 +49,6 @@ export const turingAlphanetRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: dev, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/config/src/xcm-configs/zeitgeist.ts b/packages/config/src/xcm-configs/zeitgeist.ts index 421606dc..38c45c65 100644 --- a/packages/config/src/xcm-configs/zeitgeist.ts +++ b/packages/config/src/xcm-configs/zeitgeist.ts @@ -14,6 +14,9 @@ export const zeitgeistRoutes = new ChainRoutes({ asset: ztg, source: { balance: BalanceBuilder().substrate().system().account(), + destinationFee: { + balance: BalanceBuilder().substrate().system().account(), + }, }, destination: { chain: moonbeam, @@ -21,7 +24,6 @@ export const zeitgeistRoutes = new ChainRoutes({ fee: { amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(), asset: ztg, - balance: BalanceBuilder().substrate().system().account(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), @@ -34,6 +36,9 @@ export const zeitgeistRoutes = new ChainRoutes({ asset: ztg, balance: BalanceBuilder().substrate().system().account(), }, + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -41,7 +46,6 @@ export const zeitgeistRoutes = new ChainRoutes({ fee: { amount: 0.04, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(), @@ -50,6 +54,9 @@ export const zeitgeistRoutes = new ChainRoutes({ asset: glmr, source: { balance: BalanceBuilder().substrate().tokens().accounts(), + destinationFee: { + balance: BalanceBuilder().substrate().tokens().accounts(), + }, }, destination: { chain: moonbeam, @@ -57,7 +64,6 @@ export const zeitgeistRoutes = new ChainRoutes({ fee: { amount: 0.01, asset: glmr, - balance: BalanceBuilder().substrate().tokens().accounts(), }, }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), diff --git a/packages/sdk/src/getTransferData/getSourceData.ts b/packages/sdk/src/getTransferData/getSourceData.ts index e5db0132..72665007 100644 --- a/packages/sdk/src/getTransferData/getSourceData.ts +++ b/packages/sdk/src/getTransferData/getSourceData.ts @@ -47,18 +47,28 @@ export async function getSourceData({ polkadot: sourcePolkadot, }) : balance; - // eslint-disable-next-line no-nested-ternary - const destinationFeeBalance = route.destination.fee.asset.isEqual(asset) - ? balance - : route.destination.fee.asset.isEqual(feeAsset) - ? feeBalance - : await getBalance({ - address: sourceAddress, - asset: source.getChainAsset(route.destination.fee.asset), - builder: route.destination.fee.balance, - chain: source, - polkadot: sourcePolkadot, - }); + + let destinationFeeBalance: AssetAmount; + + if (route.destination.fee.asset.isEqual(asset)) { + destinationFeeBalance = balance; + } else if (route.destination.fee.asset.isEqual(feeAsset)) { + destinationFeeBalance = feeBalance; + } else { + if (!route.source.destinationFee?.balance) { + throw new Error( + `BalanceBuilder must be defined for source.destinationFee.balance for AssetRoute`, + ); + } + + destinationFeeBalance = await getBalance({ + address: sourceAddress, + asset: source.getChainAsset(route.destination.fee.asset), + builder: route.source.destinationFee?.balance, + chain: source, + polkadot: sourcePolkadot, + }); + } const min = await getMin(route, sourcePolkadot); const { existentialDeposit } = sourcePolkadot; @@ -75,12 +85,14 @@ export async function getSourceData({ }); const contract = route.contract?.build({ - address: destinationAddress, - amount: balance.amount, - asset: asset.address || asset.getAssetId(), + asset: balance, destination: route.destination.chain as AnyParachain, - fee: destinationFee.amount, - feeAsset: destinationFee.address || destinationFee.getAssetId(), + destinationAddress, + destinationApi: destinationPolkadot.api, + fee: destinationFee, + source, + sourceAddress, + sourceApi: sourcePolkadot.api, }); const fee = await getFee({