From ede72573852e0de3a7ac04ba97607885aef800f0 Mon Sep 17 00:00:00 2001 From: Mario J Maurello Date: Tue, 6 Aug 2024 11:41:49 -0400 Subject: [PATCH 1/2] WIFD integration with Moonbeam --- packages/config/src/assets.ts | 6 +++++ packages/config/src/chains.ts | 10 +++++++++ packages/config/src/configs/moonbeam.ts | 16 ++++++++++++++ .../config/src/configs/polkadotAssetHub.ts | 22 ++++++++++++++++++- 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/packages/config/src/assets.ts b/packages/config/src/assets.ts index 2e11872e..3ba6356f 100644 --- a/packages/config/src/assets.ts +++ b/packages/config/src/assets.ts @@ -360,6 +360,11 @@ export const vmovr = new Asset({ originSymbol: 'vMOVR', }); +export const wifd = new Asset({ + key: 'wifd', + originSymbol: 'WIFD', +}); + export const xrt = new Asset({ key: 'xrt', originSymbol: 'XRT', @@ -448,6 +453,7 @@ export const assetsList: Asset[] = [ wbtc, weth, wftm, + wifd, xrt, ztg, ]; diff --git a/packages/config/src/chains.ts b/packages/config/src/chains.ts index 9dd0a939..3b6fd553 100644 --- a/packages/config/src/chains.ts +++ b/packages/config/src/chains.ts @@ -76,6 +76,7 @@ import { vmovr, wbtc, weth, + wifd, xrt, ztg, } from './assets'; @@ -1104,6 +1105,10 @@ export const moonbeam = new EvmParachain({ asset: apillon, id: '184218609779515850660274730699350567246', }, + { + asset: wifd, + id: '61295607754960722617854661686514597014', + }, ], ecosystem: Ecosystem.Polkadot, genesisHash: @@ -1729,6 +1734,11 @@ export const polkadotAssetHub = new Parachain({ id: 1024, palletInstance: 50, }, + { + asset: wifd, + id: 17, + palletInstance: 50, + }, ], ecosystem: Ecosystem.Polkadot, genesisHash: diff --git a/packages/config/src/configs/moonbeam.ts b/packages/config/src/configs/moonbeam.ts index 1f0d765e..55df6795 100644 --- a/packages/config/src/configs/moonbeam.ts +++ b/packages/config/src/configs/moonbeam.ts @@ -38,6 +38,7 @@ import { vmanta, wbtc, weth, + wifd, ztg, } from '../assets'; import { @@ -492,6 +493,21 @@ export const moonbeamConfig = new ChainConfig({ balance: BalanceBuilder().substrate().system().account(), }, }), + new AssetConfig({ + asset: wifd, + balance: BalanceBuilder().substrate().assets().account(), + contract: ContractBuilder().Xtokens().transferMultiCurrencies(), + destination: polkadotAssetHub, + destinationFee: { + amount: 0.2, + asset: usdt, + balance: BalanceBuilder().substrate().assets().account(), + }, + fee: { + asset: glmr, + balance: BalanceBuilder().substrate().system().account(), + }, + }), new AssetConfig({ asset: apillon, balance: BalanceBuilder().substrate().assets().account(), diff --git a/packages/config/src/configs/polkadotAssetHub.ts b/packages/config/src/configs/polkadotAssetHub.ts index 373bf78e..e1232812 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 { apillon, ded, dot, pink, stink, usdc, usdt } from '../assets'; +import { apillon, ded, dot, pink, stink, usdc, usdt, wifd } from '../assets'; import { moonbeam, polkadotAssetHub } from '../chains'; import { AssetConfig } from '../types/AssetConfig'; import { ChainConfig } from '../types/ChainConfig'; @@ -113,6 +113,26 @@ export const polkadotAssetHubConfig = new ChainConfig({ }, min: AssetMinBuilder().assets().asset(), }), + new AssetConfig({ + asset: wifd, + balance: BalanceBuilder().substrate().assets().account(), + destination: moonbeam, + destinationFee: { + amount: 0.03, + 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(), + }), new AssetConfig({ asset: apillon, balance: BalanceBuilder().substrate().assets().account(), From 13550ac3d15f651bf256d892f6c175bf86a4bd53 Mon Sep 17 00:00:00 2001 From: Mario J Maurello Date: Tue, 6 Aug 2024 11:42:30 -0400 Subject: [PATCH 2/2] add changeset --- .changeset/cyan-impalas-run.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cyan-impalas-run.md diff --git a/.changeset/cyan-impalas-run.md b/.changeset/cyan-impalas-run.md new file mode 100644 index 00000000..d68219ed --- /dev/null +++ b/.changeset/cyan-impalas-run.md @@ -0,0 +1,5 @@ +--- +'@moonbeam-network/xcm-config': patch +--- + +WIFD integration with Moonbeam