Skip to content

Commit

Permalink
WIFD (Dog wif dots) integration with Moonbeam (#318)
Browse files Browse the repository at this point in the history
* WIFD integration with Moonbeam

* add changeset
  • Loading branch information
mmaurello authored Aug 7, 2024
1 parent 2d7cf7a commit a2a1889
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cyan-impalas-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moonbeam-network/xcm-config': patch
---

WIFD integration with Moonbeam
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -448,6 +453,7 @@ export const assetsList: Asset[] = [
wbtc,
weth,
wftm,
wifd,
xrt,
ztg,
];
Expand Down
10 changes: 10 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import {
vmovr,
wbtc,
weth,
wifd,
xrt,
ztg,
} from './assets';
Expand Down Expand Up @@ -1104,6 +1105,10 @@ export const moonbeam = new EvmParachain({
asset: apillon,
id: '184218609779515850660274730699350567246',
},
{
asset: wifd,
id: '61295607754960722617854661686514597014',
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down Expand Up @@ -1729,6 +1734,11 @@ export const polkadotAssetHub = new Parachain({
id: 1024,
palletInstance: 50,
},
{
asset: wifd,
id: 17,
palletInstance: 50,
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
16 changes: 16 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
vmanta,
wbtc,
weth,
wifd,
ztg,
} from '../assets';
import {
Expand Down Expand Up @@ -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(),
Expand Down
22 changes: 21 additions & 1 deletion packages/config/src/configs/polkadotAssetHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit a2a1889

Please sign in to comment.