Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
green-jay committed Feb 16, 2024
1 parent 1996839 commit f2f6dae
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 64 deletions.
6 changes: 6 additions & 0 deletions packages/xcm-cfg/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ export const moonbeam = new EvmParachain({
metadataId: 0,
decimals: 6,
},
{
asset: usdc,
id: '166377000701797186346254371275954761085',
metadataId: 0,
decimals: 6,
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
21 changes: 1 addition & 20 deletions packages/xcm-cfg/src/configs/assethub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,6 @@ const toHydraDX: AssetConfig[] = [
},
min: AssetMinBuilder().assets().asset(),
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
destination: hydraDX,
destinationFee: {
amount: 0.02,
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder()
.polkadotXcm()
.limitedReserveTransferAssets()
.X1(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assets().asset(),
}),
];

const toPolkadot: AssetConfig[] = [
Expand All @@ -79,7 +60,7 @@ const toPolkadot: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
destination: polkadot,
destinationFee: {
amount: 0.02,
amount: 0.003,
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
Expand Down
12 changes: 6 additions & 6 deletions packages/xcm-cfg/src/configs/astar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().assets().account(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
balance: BalanceBuilder().substrate().tokens().accounts(),
amount: 0.044306118,
asset: astr,
balance: BalanceBuilder().substrate().system().account(),
},
fee: {
asset: astr,
Expand All @@ -40,9 +40,9 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().assets().account(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
balance: BalanceBuilder().substrate().tokens().accounts(),
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: astr,
Expand Down
4 changes: 2 additions & 2 deletions packages/xcm-cfg/src/configs/bifrost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.0013,
asset: hdx,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
Expand Down
54 changes: 27 additions & 27 deletions packages/xcm-cfg/src/configs/hydraDX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,6 @@ const toAssetHub: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: assetHub,
destinationFee: {
amount: 0.02,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
},
}),
];

const toAstar: AssetConfig[] = [
Expand Down Expand Up @@ -173,7 +158,7 @@ const toAstar: AssetConfig[] = [
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
Expand All @@ -184,8 +169,8 @@ const toAstar: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: astar,
destinationFee: {
amount: 0.004,
asset: astr,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
Expand Down Expand Up @@ -313,11 +298,11 @@ const toInterlay: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: interlay,
destinationFee: {
amount: 0.0019213457,
asset: intr,
amount: 0.002,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
Expand All @@ -328,8 +313,8 @@ const toInterlay: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: interlay,
destinationFee: {
amount: 0.0019213457,
asset: intr,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
Expand Down Expand Up @@ -433,11 +418,11 @@ const toMoonbeam: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.001,
amount: 0.003,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
Expand All @@ -463,8 +448,23 @@ const toMoonbeam: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.04,
asset: glmr,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 1.4,
asset: usdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
Expand Down
8 changes: 4 additions & 4 deletions packages/xcm-cfg/src/configs/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
amount: 0.002,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
Expand All @@ -54,8 +54,8 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
Expand Down
24 changes: 20 additions & 4 deletions packages/xcm-cfg/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
wbtc_mwh,
weth_mwh,
dot,
usdt
usdt,
usdc
} from '../assets';
import { hydraDX, moonbeam } from '../chains';

Expand Down Expand Up @@ -122,7 +123,7 @@ const toHydraDX: AssetConfig[] = [
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destinationFee: {
amount: 0.02,
amount: 0.002,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
Expand All @@ -137,8 +138,23 @@ const toHydraDX: AssetConfig[] = [
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdc,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destinationFee: {
amount: 1.4,
asset: usdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
fee: {
Expand Down
2 changes: 1 addition & 1 deletion packages/xcm-cfg/src/configs/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const toAssetHub: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
destination: assetHub,
destinationFee: {
amount: 0.001,
amount: 0.00014,
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
Expand Down

0 comments on commit f2f6dae

Please sign in to comment.