Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIFD (Dog wif dots) integration with Moonbeam #318

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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