Skip to content

Commit

Permalink
Merge pull request #34 from galacticcouncil/pink-moonbeam-ah
Browse files Browse the repository at this point in the history
Add PINK Moonbeam<>AH
  • Loading branch information
nohaapav authored Mar 26, 2024
2 parents 28111f6 + 4124ef6 commit fa3d473
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
5 changes: 5 additions & 0 deletions packages/xcm-cfg/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ export const moonbeam = new EvmParachain({
metadataId: 0,
decimals: 6,
},
{
asset: pink,
id: '64174511183114006009298114091987195453',
decimals: 10,
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
27 changes: 25 additions & 2 deletions packages/xcm-cfg/src/configs/assethub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@moonbeam-network/xcm-config';

import { ded, dot, pink, usdc, usdt } from '../assets';
import { assetHub, hydraDX } from '../chains';
import { assetHub, hydraDX, moonbeam } from '../chains';
import { ExtrinsicBuilderV2 } from '../builders';

const xcmDeliveryFeeAmount = 0.036;
Expand Down Expand Up @@ -121,7 +121,30 @@ const toPolkadot: AssetConfig[] = [
}),
];

const toMoonbeam: AssetConfig[] = [
new AssetConfig({
asset: pink,
balance: BalanceBuilder().substrate().assets().account(),
destination: moonbeam,
destinationFee: {
amount: 0.03,
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
},
extrinsic: ExtrinsicBuilderV2()
.polkadotXcm()
.limitedReserveTransferAssets()
.X2(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().assets().asset(),
}),
]

export const assetHubConfig = new ChainConfig({
assets: [...toHydraDX, ...toPolkadot],
assets: [...toHydraDX, ...toPolkadot, ...toMoonbeam,],
chain: assetHub,
});
24 changes: 21 additions & 3 deletions packages/xcm-cfg/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import {
weth_mwh,
dot,
usdt,
usdc
usdc,
pink
} from '../assets';
import { hydraDX, moonbeam } from '../chains';
import { assetHub, hydraDX, moonbeam } from '../chains';

const toHydraDX: AssetConfig[] = [
new AssetConfig({
Expand Down Expand Up @@ -164,8 +165,25 @@ const toHydraDX: AssetConfig[] = [
// },
// }),
];
const toAssetHub: AssetConfig[] = [
new AssetConfig({
asset: pink,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
destination: assetHub,
destinationFee: {
amount: 0.11,
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
]

export const moonbeamConfig = new ChainConfig({
assets: [...toHydraDX],
assets: [...toHydraDX, ...toAssetHub],
chain: moonbeam,
});

0 comments on commit fa3d473

Please sign in to comment.