Skip to content

Commit

Permalink
Add Polkadot and Polkadot Asset hub delivery fees (#209)
Browse files Browse the repository at this point in the history
* add Polkadot and Polkadot Asset hub delivery fees

* add changeset

* update USDC fees
  • Loading branch information
mmaurello authored Feb 26, 2024
1 parent 387ce33 commit debc7c9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-lies-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moonbeam-network/xcm-config': patch
---

Add Polkadot and Polkadot Asset Hub delivery fees
6 changes: 4 additions & 2 deletions packages/config/src/configs/kusamaAssetHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { kusamaAssetHub, moonriver } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

const xcmDeliveryFeeAmount = 0.0015;

export const kusamaAssetHubConfig = new ChainConfig({
assets: [
new AssetConfig({
Expand All @@ -27,7 +29,7 @@ export const kusamaAssetHubConfig = new ChainConfig({
fee: {
asset: ksm,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount: 0.0015,
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().assets().asset(),
}),
Expand All @@ -47,7 +49,7 @@ export const kusamaAssetHubConfig = new ChainConfig({
fee: {
asset: ksm,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount: 0.0015,
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().assets().asset(),
}),
Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/configs/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export const polkadotConfig = new ChainConfig({
.xcmPallet()
.limitedReserveTransferAssets(0)
.here(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount: 0.047,
},
}),
],
chain: polkadot,
Expand Down
6 changes: 5 additions & 1 deletion packages/config/src/configs/polkadotAssetHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { moonbeam, polkadotAssetHub } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

const xcmDeliveryFeeAmount = 0.036;

export const polkadotAssetHubConfig = new ChainConfig({
assets: [
new AssetConfig({
Expand All @@ -27,6 +29,7 @@ export const polkadotAssetHubConfig = new ChainConfig({
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().assets().asset(),
}),
Expand All @@ -35,7 +38,7 @@ export const polkadotAssetHubConfig = new ChainConfig({
balance: BalanceBuilder().substrate().assets().account(),
destination: moonbeam,
destinationFee: {
amount: 0.02,
amount: 0.03,
asset: usdc,
balance: BalanceBuilder().substrate().assets().account(),
},
Expand All @@ -46,6 +49,7 @@ export const polkadotAssetHubConfig = new ChainConfig({
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
xcmDeliveryFeeAmount,
},
min: AssetMinBuilder().assets().asset(),
}),
Expand Down

0 comments on commit debc7c9

Please sign in to comment.