Skip to content

Commit

Permalink
Enable DOT transfers between Polkadot Asset Hub and Moonbeam (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello authored Oct 22, 2024
1 parent 641334d commit 56e9b57
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-pillows-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moonbeam-network/xcm-config': patch
---

Enable DOT transfers between Polkadot Asset Hub and Moonbeam
20 changes: 18 additions & 2 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,22 @@ export const moonbeamConfig = new ChainConfig({
contract: ContractBuilder().Xtokens().transfer(),
destination: polkadot,
destinationFee: {
amount: 0.052,
amount: 0.01,
asset: dot,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: polkadotAssetHub,
destinationFee: {
amount: 0.01,
asset: dot,
balance: BalanceBuilder().substrate().assets().account(),
},
Expand Down Expand Up @@ -445,7 +460,8 @@ export const moonbeamConfig = new ChainConfig({
amount: 0.2,
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
destinationBalance: BalanceBuilder().substrate().system().account(),
// TODO uncomment when we apply dot as payment asset
// destinationBalance: BalanceBuilder().substrate().system().account(),
},
fee: {
asset: glmr,
Expand Down
18 changes: 18 additions & 0 deletions packages/config/src/configs/polkadotAssetHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ const xcmDeliveryFeeAmount = 0.036;

export const polkadotAssetHubConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
destination: moonbeam,
destinationFee: {
amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({
isAssetReserveChain: false,
}),
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().polkadotXcm().trasferAssets().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 56e9b57

Please sign in to comment.