Open albertov19 opened 6 months ago
Might be same underlying issue described in https://github.com/paritytech/polkadot-sdk/issues/2123?
Assets are sorted when going from vec<Asset>
to Assets
, so the order in which you add them in PJS might not be same final order and feeAssetItem = 0
might actually be pointing to the other asset.
The "asset idx" API is bad and we should just change it to explicitly specify the asset instead of an index in the list.
Still, that doesn't explain how it'd fail with wasm: unreachable instructions...
Yeah, I think the problem feels relatable to that described in #2123. Although I was reporting it from a more user-centric perspective, I could not find it when looking for it.
When will #2129 hit AssetHub?
Thanks for the quick answer
We should still investigate and see what is with the wasm error, afaict if the only problem is using wrong asset for paying fees, then transfer should fail with not enough fees not unreachable instructions
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
We are testing doing a transfer from Polkadot AssetHub to Moonbeam (using Chopsticks), and we noticed the weirdest issue.
When transferring two assets (in this case, it was PINK and USDT, the latter to be used as the
feeAssetItem
), whenever USDT is set as an asset0
and thefeeAssetItem = 0
, the call would fail withwasm: unreachable instructions...
.Nevertheless, if you switch the asset order (leaving everything else the same, amounts, etc) and set
feeAssetItem = 1
, it works 🤯 .Steps to reproduce
To replicate, you can run Asset-Hub, Moonbeam and Polkadot with Chopsticks using the following AssetHub configuration file:
The following call fails (Assets(0) = USDT,
feeAssetItem = 0
):The following call succeeds (Assets(1) = USDT,
feeAssetItem = 1
)