From fefc9c97e9cec86477c25112d55b7c034adbb807 Mon Sep 17 00:00:00 2001 From: green-jay Date: Wed, 10 Jan 2024 17:45:19 +0100 Subject: [PATCH] hydra-bifrost dot --- packages/xcm-cfg/src/chains.ts | 6 ++++++ packages/xcm-cfg/src/configs/bifrost.ts | 17 ++++++++++++++++- packages/xcm-cfg/src/configs/hydraDX.ts | 15 +++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/packages/xcm-cfg/src/chains.ts b/packages/xcm-cfg/src/chains.ts index 8b7032ed..ba5debe6 100644 --- a/packages/xcm-cfg/src/chains.ts +++ b/packages/xcm-cfg/src/chains.ts @@ -124,6 +124,12 @@ export const bifrost = new Parachain({ metadataId: { VToken2: 0 }, decimals: 10, }, + { + asset: dot, + id: { Token2: 0 }, + metadataId: { Token2: 0 }, + decimals: 10, + }, ], ecosystem: Ecosystem.Polkadot, genesisHash: diff --git a/packages/xcm-cfg/src/configs/bifrost.ts b/packages/xcm-cfg/src/configs/bifrost.ts index adb125c4..e99a2b15 100644 --- a/packages/xcm-cfg/src/configs/bifrost.ts +++ b/packages/xcm-cfg/src/configs/bifrost.ts @@ -4,7 +4,7 @@ import { } from '@moonbeam-network/xcm-builder'; import { AssetConfig, ChainConfig } from '@moonbeam-network/xcm-config'; -import { bnc, vdot } from '../assets'; +import { bnc, vdot, dot } from '../assets'; import { bifrost, hydraDX } from '../chains'; const toHydraDX: AssetConfig[] = [ @@ -34,6 +34,21 @@ const toHydraDX: AssetConfig[] = [ balance: BalanceBuilder().substrate().system().account(), } }), + new AssetConfig({ + asset: dot, + balance: BalanceBuilder().substrate().tokens().accounts(), + destination: hydraDX, + destinationFee: { + amount: 0.0007, + asset: dot, + balance: BalanceBuilder().substrate().tokens().accounts(), + }, + extrinsic: ExtrinsicBuilder().xTokens().transfer(), + fee: { + asset: bnc, + balance: BalanceBuilder().substrate().system().account(), + } + }), ]; export const bifrostConfig = new ChainConfig({ diff --git a/packages/xcm-cfg/src/configs/hydraDX.ts b/packages/xcm-cfg/src/configs/hydraDX.ts index e0cafd27..f89b7c42 100644 --- a/packages/xcm-cfg/src/configs/hydraDX.ts +++ b/packages/xcm-cfg/src/configs/hydraDX.ts @@ -182,6 +182,21 @@ const toBifrost: AssetConfig[] = [ balance: BalanceBuilder().substrate().system().account(), }, }), + new AssetConfig({ + asset: dot, + balance: BalanceBuilder().substrate().tokens().accounts(), + destination: bifrost, + destinationFee: { + amount: 0.000469417452, + asset: dot, + balance: BalanceBuilder().substrate().tokens().accounts(), + }, + extrinsic: ExtrinsicBuilder().xTokens().transfer(), + fee: { + asset: hdx, + balance: BalanceBuilder().substrate().system().account(), + }, + }), ]; const toCentrifuge: AssetConfig[] = [