From a8f6aae65c57911ac793ac215d1f366445326369 Mon Sep 17 00:00:00 2001 From: green-jay Date: Thu, 12 Dec 2024 15:06:43 +0100 Subject: [PATCH] Add vdot --- .changeset/cool-bulldogs-fail.md | 5 +++++ .../xcm-cfg/src/chains/polkadot/moonbeam.ts | 22 +++++++++++++++++++ .../src/configs/polkadot/hydration/index.ts | 19 ++++++++++++++++ .../src/configs/polkadot/moonbeam/index.ts | 2 ++ 4 files changed, 48 insertions(+) create mode 100644 .changeset/cool-bulldogs-fail.md diff --git a/.changeset/cool-bulldogs-fail.md b/.changeset/cool-bulldogs-fail.md new file mode 100644 index 00000000..4dab2f00 --- /dev/null +++ b/.changeset/cool-bulldogs-fail.md @@ -0,0 +1,5 @@ +--- +'@galacticcouncil/xcm-cfg': minor +--- + +vdot diff --git a/packages/xcm-cfg/src/chains/polkadot/moonbeam.ts b/packages/xcm-cfg/src/chains/polkadot/moonbeam.ts index 1b137e34..e02d6155 100644 --- a/packages/xcm-cfg/src/chains/polkadot/moonbeam.ts +++ b/packages/xcm-cfg/src/chains/polkadot/moonbeam.ts @@ -16,6 +16,7 @@ import { usdc_mwh, usdt, usdt_mwh, + vdot, wbtc_mwh, weth_mwh, } from '../../assets'; @@ -286,6 +287,27 @@ export const moonbeam = new EvmParachain({ }, }, }, + { + asset: vdot, + decimals: 10, + id: '29085784439601774464560083082574142143', + xcmLocation: { + parents: 1, + interior: { + X2: [ + { + Parachain: 2030, + }, + { + GeneralKey: { + length: 2, + data: '0x0900000000000000000000000000000000000000000000000000000000000000', + }, + }, + ], + }, + }, + }, ], ecosystem: Ecosystem.Polkadot, evmChain: evmChain, diff --git a/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts b/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts index a4d66758..70839b99 100644 --- a/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts +++ b/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts @@ -768,6 +768,25 @@ const toMoonbeam: AssetRoute[] = [ }, extrinsic: ExtrinsicBuilder().xTokens().transfer(), }), + new AssetRoute({ + source: { + asset: vdot, + balance: balance(), + fee: fee(), + destinationFee: { + balance: balance(), + }, + }, + destination: { + chain: moonbeam, + asset: vdot, + fee: { + amount: 0.05, + asset: vdot, + }, + }, + extrinsic: ExtrinsicBuilder().xTokens().transfer(), + }), toMoonbeamErc20Template(dai_mwh), toMoonbeamErc20Template(usdc_mwh), toMoonbeamErc20Template(usdt_mwh), diff --git a/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts b/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts index 6e3def43..c746df7a 100644 --- a/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts +++ b/packages/xcm-cfg/src/configs/polkadot/moonbeam/index.ts @@ -12,6 +12,7 @@ import { usdc_mwh, usdt, usdt_mwh, + vdot, wbtc_mwh, weth_mwh, } from '../../../assets'; @@ -46,6 +47,7 @@ const toHydration: AssetRoute[] = [ }), toHydrationXcTemplate(hdx, 0.6), toHydrationXcTemplate(dot, 0.1), + toHydrationXcTemplate(vdot, 0.05), toHydrationErc20Template(dai_mwh, 0.004), toHydrationErc20Template(usdc_mwh, 0.004), toHydrationErc20Template(usdt_mwh, 0.004),