diff --git a/.changeset/serious-ants-shout.md b/.changeset/serious-ants-shout.md new file mode 100644 index 00000000..4670249b --- /dev/null +++ b/.changeset/serious-ants-shout.md @@ -0,0 +1,5 @@ +--- +'@moonbeam-network/xcm-config': patch +--- + +Fix Asset Hub memecoins asset ordering in fee calculation diff --git a/packages/config/src/configs/polkadotAssetHub.ts b/packages/config/src/configs/polkadotAssetHub.ts index f1b5a6aa..17f281ba 100644 --- a/packages/config/src/configs/polkadotAssetHub.ts +++ b/packages/config/src/configs/polkadotAssetHub.ts @@ -62,9 +62,10 @@ export const polkadotAssetHubConfig = new ChainConfig({ balance: BalanceBuilder().substrate().assets().account(), destination: moonbeam, destinationFee: { - amount: FeeBuilder() - .xcmPaymentApi() - .xcmPaymentFee({ isAssetReserveChain: false }), + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + shouldTransferAssetPrecedeAsset: true, + }), asset: usdt, balance: BalanceBuilder().substrate().assets().account(), }, @@ -84,9 +85,10 @@ export const polkadotAssetHubConfig = new ChainConfig({ balance: BalanceBuilder().substrate().assets().account(), destination: moonbeam, destinationFee: { - amount: FeeBuilder() - .xcmPaymentApi() - .xcmPaymentFee({ isAssetReserveChain: false }), + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + shouldTransferAssetPrecedeAsset: true, + }), asset: usdt, balance: BalanceBuilder().substrate().assets().account(), }, @@ -128,9 +130,10 @@ export const polkadotAssetHubConfig = new ChainConfig({ balance: BalanceBuilder().substrate().assets().account(), destination: moonbeam, destinationFee: { - amount: FeeBuilder() - .xcmPaymentApi() - .xcmPaymentFee({ isAssetReserveChain: false }), + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + shouldTransferAssetPrecedeAsset: true, + }), asset: usdt, balance: BalanceBuilder().substrate().assets().account(), }, @@ -150,9 +153,10 @@ export const polkadotAssetHubConfig = new ChainConfig({ balance: BalanceBuilder().substrate().assets().account(), destination: moonbeam, destinationFee: { - amount: FeeBuilder() - .xcmPaymentApi() - .xcmPaymentFee({ isAssetReserveChain: false }), + amount: FeeBuilder().xcmPaymentApi().xcmPaymentFee({ + isAssetReserveChain: false, + shouldTransferAssetPrecedeAsset: true, + }), asset: usdt, balance: BalanceBuilder().substrate().assets().account(), },