Skip to content

Commit

Permalink
-wip- add dot from asset hub to moonbeam config
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Sep 4, 2024
1 parent 9328741 commit 9baa2f4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* eslint-disable sort-keys */
import { ExtrinsicConfigBuilder } from '../../ExtrinsicBuilder.interfaces';
import {
ExtrinsicConfigBuilder,
Parents,
} from '../../ExtrinsicBuilder.interfaces';
import { ExtrinsicConfig } from '../../ExtrinsicConfig';
import {
getPolkadotXcmExtrinsicArgs,
Expand All @@ -10,7 +13,7 @@ const pallet = 'polkadotXcm';

export function polkadotXcm() {
return {
limitedReserveTransferAssets: () => {
limitedReserveTransferAssets: (parents: Parents = 0) => {
const func = 'limitedReserveTransferAssets';

return {
Expand All @@ -27,7 +30,7 @@ export function polkadotXcm() {
{
id: {
Concrete: {
parents: 0,
parents,
interior: 'Here',
},
},
Expand Down
19 changes: 19 additions & 0 deletions packages/config/src/configs/polkadotAssetHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ const xcmDeliveryFeeAmount = 0.036;

export const polkadotAssetHubConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
destination: moonbeam,
destinationFee: {
amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(),
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder()
.polkadotXcm()
.limitedReserveTransferAssets(1)
.here(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
}),
new AssetConfig({
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down

0 comments on commit 9baa2f4

Please sign in to comment.