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

Asset Hub DOT integration with Moonbeam #376

Merged
merged 1 commit into from
Oct 22, 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/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