diff --git a/packages/config/src/assets.ts b/packages/config/src/assets.ts index 63c77261..904e47cb 100644 --- a/packages/config/src/assets.ts +++ b/packages/config/src/assets.ts @@ -85,6 +85,11 @@ export const dai = new Asset({ originSymbol: 'DAI', }); +export const ded = new Asset({ + key: 'ded', + originSymbol: 'DED', +}); + export const fil = new Asset({ key: 'fil', originSymbol: 'FIL', @@ -348,6 +353,7 @@ export const assetsList: Asset[] = [ crab, csm, dai, + ded, dev, dot, eq, diff --git a/packages/config/src/chains.ts b/packages/config/src/chains.ts index bceeeb81..23b7a720 100644 --- a/packages/config/src/chains.ts +++ b/packages/config/src/chains.ts @@ -18,6 +18,7 @@ import { crab, csm, dai, + ded, dev, dot, eq, @@ -792,6 +793,10 @@ export const moonbeam = new EvmParachain({ id: '0x06e605775296e851FF43b4dAa541Bb0984E9D6fD', metadataId: 0, // no metadata for ERC20 tokens }, + { + asset: ded, + id: '124463719055550872076363892993240202694', + }, { asset: dot, id: '42259045809535163221576417993425387648', @@ -1286,6 +1291,11 @@ export const polkadotAssetHub = new Parachain({ id: 1984, palletInstance: 50, }, + { + asset: ded, + id: 30, + palletInstance: 50, + }, { asset: dot, // NOTE: no meta for native token diff --git a/packages/config/src/configs/moonbeam.ts b/packages/config/src/configs/moonbeam.ts index 357c92f1..72d9d552 100644 --- a/packages/config/src/configs/moonbeam.ts +++ b/packages/config/src/configs/moonbeam.ts @@ -6,6 +6,7 @@ import { bnc, cfg, dai, + ded, dot, eq, eqd, @@ -499,6 +500,21 @@ export const moonbeamConfig = new ChainConfig({ balance: BalanceBuilder().substrate().system().account(), }, }), + new AssetConfig({ + asset: ded, + balance: BalanceBuilder().substrate().assets().account(), + contract: ContractBuilder().Xtokens().transferMultiCurrencies(), + destination: polkadotAssetHub, + destinationFee: { + amount: 0.7, // TODO + asset: ded, // TODO + balance: BalanceBuilder().substrate().assets().account(), + }, + fee: { + asset: glmr, + balance: BalanceBuilder().substrate().system().account(), + }, + }), new AssetConfig({ asset: hdx, balance: BalanceBuilder().substrate().assets().account(), diff --git a/packages/config/src/configs/polkadotAssetHub.ts b/packages/config/src/configs/polkadotAssetHub.ts index 357b8d9f..e8aeaf49 100644 --- a/packages/config/src/configs/polkadotAssetHub.ts +++ b/packages/config/src/configs/polkadotAssetHub.ts @@ -4,7 +4,7 @@ import { ExtrinsicBuilder, FeeBuilder, } from '@moonbeam-network/xcm-builder'; -import { dot, pink, usdc, usdt } from '../assets'; +import { ded, dot, pink, usdc, usdt } from '../assets'; import { moonbeam, polkadotAssetHub } from '../chains'; import { AssetConfig } from '../types/AssetConfig'; import { ChainConfig } from '../types/ChainConfig'; @@ -73,6 +73,26 @@ export const polkadotAssetHubConfig = new ChainConfig({ }, min: AssetMinBuilder().assets().asset(), }), + new AssetConfig({ + asset: ded, + balance: BalanceBuilder().substrate().assets().account(), + destination: moonbeam, + destinationFee: { + amount: 0.03, // TODO + asset: usdt, + balance: BalanceBuilder().substrate().assets().account(), + }, + extrinsic: ExtrinsicBuilder() + .polkadotXcm() + .limitedReserveTransferAssets() + .X2(), + fee: { + asset: dot, + balance: BalanceBuilder().substrate().system().account(), + xcmDeliveryFeeAmount, + }, + min: AssetMinBuilder().assets().asset(), + }), ], chain: polkadotAssetHub, });