diff --git a/packages/config/src/xcm-configs/moonbaseAlpha.ts b/packages/config/src/xcm-configs/moonbaseAlpha.ts index d092fea6..0a12c8b8 100644 --- a/packages/config/src/xcm-configs/moonbaseAlpha.ts +++ b/packages/config/src/xcm-configs/moonbaseAlpha.ts @@ -1,4 +1,8 @@ -import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder'; +import { + AssetMinBuilder, + BalanceBuilder, + ContractBuilder, +} from '@moonbeam-network/xcm-builder'; import { agng, alan, @@ -243,6 +247,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ amount: 5, asset: tt1, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -419,6 +424,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ amount: 0.00000001, asset: dev, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -442,6 +448,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ amount: 0.01, asset: ftmwh, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -484,6 +491,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ amount: 0.00000001, asset: dev, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, @@ -507,6 +515,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({ amount: 0.01, asset: ftmwh, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, diff --git a/packages/config/src/xcm-configs/moonbeam.ts b/packages/config/src/xcm-configs/moonbeam.ts index 7a04ae50..c969dcc3 100644 --- a/packages/config/src/xcm-configs/moonbeam.ts +++ b/packages/config/src/xcm-configs/moonbeam.ts @@ -23,7 +23,6 @@ import { ldot, manta, neuro, - nodl, peaq, pen, pha, @@ -86,6 +85,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.01, asset: glmr, }, + min: AssetMinBuilder().assetRegistry().assetMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -124,6 +124,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.000001, asset: glmr, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -181,6 +182,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.1, asset: glmr, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -307,6 +309,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.256, asset: aseed, }, + min: AssetMinBuilder().assetRegistry().assetMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -468,6 +471,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.001, asset: ldot, }, + min: AssetMinBuilder().assetRegistry().assetMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -606,6 +610,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.02, asset: usdt, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -629,6 +634,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.02, asset: usdc, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -870,6 +876,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: vastr, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -893,6 +900,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.0000001, asset: vdot, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -916,6 +924,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00000001, asset: vfil, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -939,6 +948,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00000001, asset: vglmr, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -962,6 +972,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00000001, asset: vmanta, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1031,6 +1042,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00000001, asset: fil, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1100,6 +1112,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.0001, asset: bncs, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1119,6 +1132,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00000001, asset: glmr, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1142,6 +1156,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: usdcwh, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1165,6 +1180,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: usdtwh, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1188,6 +1204,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: dai, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1211,6 +1228,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.000001, asset: weth, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1234,6 +1252,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.000001, asset: wbtc, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -1276,6 +1295,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00000001, asset: glmr, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, @@ -1299,6 +1319,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: usdcwh, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, @@ -1322,6 +1343,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: usdtwh, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, @@ -1345,6 +1367,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.00001, asset: dai, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, @@ -1368,6 +1391,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.000001, asset: weth, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, @@ -1391,6 +1415,7 @@ export const moonbeamRoutes = new ChainRoutes({ amount: 0.000001, asset: wbtc, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transferWithEvmTo32(), }, diff --git a/packages/config/src/xcm-configs/moonriver.ts b/packages/config/src/xcm-configs/moonriver.ts index 7e21134f..04218017 100644 --- a/packages/config/src/xcm-configs/moonriver.ts +++ b/packages/config/src/xcm-configs/moonriver.ts @@ -1,4 +1,8 @@ -import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder'; +import { + AssetMinBuilder, + BalanceBuilder, + ContractBuilder, +} from '@moonbeam-network/xcm-builder'; import { aseed, bnc, @@ -64,6 +68,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.0008544, asset: movr, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -83,6 +88,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.001, asset: movr, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -121,6 +127,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.001, asset: movr, }, + min: AssetMinBuilder().assetRegistry().assetMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -219,29 +226,6 @@ export const moonriverRoutes = new ChainRoutes({ }, contract: ContractBuilder().Xtokens().transfer(), }, - { - source: { - asset: movr, - balance: BalanceBuilder().substrate().assets().account(), - fee: { - asset: movr, - balance: BalanceBuilder().substrate().system().account(), - }, - destinationFee: { - balance: BalanceBuilder().substrate().assets().account(), - }, - }, - destination: { - asset: movr, - chain: karura, - balance: BalanceBuilder().substrate().tokens().accounts(), - fee: { - amount: 0.256, - asset: aseed, - }, - }, - contract: ContractBuilder().Xtokens().transfer(), - }, { source: { asset: bnc, @@ -334,6 +318,30 @@ export const moonriverRoutes = new ChainRoutes({ }, contract: ContractBuilder().Xtokens().transfer(), }, + { + source: { + asset: aseed, + balance: BalanceBuilder().substrate().assets().account(), + fee: { + asset: movr, + balance: BalanceBuilder().substrate().system().account(), + }, + destinationFee: { + balance: BalanceBuilder().substrate().assets().account(), + }, + }, + destination: { + asset: aseed, + chain: karura, + balance: BalanceBuilder().substrate().tokens().accounts(), + fee: { + amount: 0.256, + asset: aseed, + }, + min: AssetMinBuilder().assetRegistry().assetMetadatas(), + }, + contract: ContractBuilder().Xtokens().transfer(), + }, { source: { asset: kbtc, @@ -515,6 +523,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.0000504, asset: rmrk, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -630,6 +639,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.00504, asset: usdt, }, + min: AssetMinBuilder().assets().asset(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -676,6 +686,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.0001, asset: vbnc, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -699,6 +710,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.0001, asset: vksm, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), }, @@ -722,6 +734,7 @@ export const moonriverRoutes = new ChainRoutes({ amount: 0.00000001, asset: vmovr, }, + min: AssetMinBuilder().assetRegistry().currencyMetadatas(), }, contract: ContractBuilder().Xtokens().transfer(), },