-
Notifications
You must be signed in to change notification settings - Fork 647
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
claim_assets
doesn't work if the trapped asset can't be used to pay for execution fees.
#4433
Comments
Woof, just found this while researching for an upcoming token claimable airdrop for DOT holders that Dog wif dots (WIFD) is planning. Could I use this function for an embedded extrinsic function on our website to web3 login and click a claim your WIFD button to start the TX signature in the users wallet? Many thanks in advance, |
@dogwifdots This extrinsic is for claiming assets trapped during XCM execution. It's useful to get back your assets when an error occured. It's not for airdrops. |
Hey guys - I believe that this will resolve an issue we have with users and their trapped DED tokens. We are currently unable to claim for them because DED can't be used to pay for the execution - here are some example transactions that are currently trapped: https://hydration.subscan.io/extrinsic/4783346-2?tab=xcm_transfer https://assethub-polkadot.subscan.io/xcm_message/polkadot-bda8b962fd0fac0f8e977138929c402ea4fa85df https://hydradx.subscan.io/extrinsic/4783421-2?tab=xcm_transfer https://hydradx.subscan.io/extrinsic/4783421-2?tab=xcm_transfer |
So, what this issue says is actually incorrect. So @lolmcshizz this will not solve your issue. Those trapped assets can be claimed but only by the origin of the chain. The way of doing it would be to send an XCM to AssetHub from the root origin.
You would then need to do this You could also do a batch with many small XCMs. Another option is to send an XCM that calls the
|
Closing since this is not how the |
Hi @franciscoaguirre, unfortunately none of the suggested options seem to work. Example of trapped assets:
Got
Got assets trapped on AH (xcm success: no) |
Hello @green-jay, I tried the first extrinsic on chopsticks ( |
It helped to send the message successfully but the claim on AH still wasn't successful |
@green-jay, if you wish to collect similar events to propose a common referendum on Hydration for claiming assets, here’s an event shared with us by an affected user: https://hydration.subscan.io/xcm_message/polkadot-a9f9dabbc0fd2066b673a2ab0611fad88dc2e699 |
@green-jay I managed to make it work locally with chopsticks. For testing locally, I:
The thing I needed to change was increase the fees from |
@franciscoaguirre Why were the first two steps necessary? Chopsticks makes a local copy of the actual storage so the trapped assets should be already there? As well as 7,5M USDT on the sovereign account. Also the processing of the message shouldn't cost more than 1 USDT. To make sure I tried with 10 USDT but the processing failed again. Did you manage to claim any existing trapped assets? |
@green-jay Hmm, you're right, maybe I was using an old block or I just jumped the gun and added the storage before I saw it wasn't an issue. I agree processing shouldn't cost more than 1 USDT, but I did manage to claim the assets. Can you please share the errors you're getting? |
@franciscoaguirre Yeah XCM logs would definitely help. I added |
@green-jay You do need the wasm since the wasm for the live runtimes is built without logs to reduce its size. You can find it in the releases page: https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.8. Alternatively, you can always build it by going to the |
@franciscoaguirre release wasm didn't produce the log but after i built it without the --release flag and used debug wasm, logs are finally there :) We upgraded to safeXcmVersion 3. The error i'm getting using both extrinsics above is: |
@green-jay Weird that the claim didn't exist. I did load the trapped funds into storage, which probably is the only difference that explains why it worked for me. You could check storage before running the extrinsic and see if it's the same as on the live network |
@franciscoaguirre Yes, it is the same and i have been testing claiming in the past in Chopsticks so this should work. Maybe you could share more details about loading assets into the storage (did you use dev_setStorage or sth else?) How did the events look like after the successful claim? Did you see assets.issued for asset with id 30? Could you please try to test without injecting it? |
I'm using this extrinsic and the claim works: This is without putting anything in storage, you were right I didn't have to do that. I don't know why I got a |
@franciscoaguirre there has to be some difference in your setup from the live chain that allows this - is there anything beside sudo pallet? i asked other team member to simulate the tx and he also got the |
@franciscoaguirre We need to figure out whether the above is a real issue and in case it is solve it in xcmv5. Scenario: Someone sends two tokens in one xcm message, one is fee sufficient, one fee insufficient. The sufficient asset amount is too low to cover fee to process the message further and insufficient can't be used for fees. The funds then seem stuck as cannot be claimed as the holding can't be topped up. The fee insufficient asset can represent a large $ value. |
Even if the amount of the asset that can pay for fees is too low, you can always withdraw some assets for fees first. |
My polkadot-asset-hub config file: https://pastebin.com/iFCpDMAS This is with the extrinsic you sent me but running it with sudo. See how I get a |
@franciscoaguirre I am looking for some guidance on this XCM message that is much like what Green-Jay said. USDT and DED were sent from HydraDX to AssetHub, the USDT was not enough and both got trapped. How is it possible to claim the DED that was sent? https://hydration.subscan.io/xcm_message/polkadot-bda8b962fd0fac0f8e977138929c402ea4fa85df |
Hey @franciscoaguirre, i provided the log above. I see you are using overriden wasms, that can cause potentially different behaviour. This is the script i use to execute a referendum:
I'm using plain on-chain Hydration wasm and debug built plain AH wasm (just to see the log), nothing special there: |
@franciscoaguirre would you be able to take a look at this? I am having issues with trapped assets and when I ask for help they point me here saying when this is fixed I would be able to claim them. My trapped transaction is above. |
The
claim_assets
extrinsics claims in the simplest way possible, it just grabs the asset, uses it to pay execution fees, and deposits it on the beneficiary account.This assumes the asset can be used to pay for fees, which might not be the case, i.e. an NFT or a fungible token without a pool.
The extrinsic creates the following program:
It could be fixed by changing that to the following program:
We could probably pass in a
fees
parameter that could beNone
to use the same assets for fees.Sadly, this would be a breaking change.
We could add a new extrinsic
claim_assets_with
(orclaim_not_sufficient_assets
) that takes thisfees
parameter (not necessarily an option since we already have the other extrinsic).The text was updated successfully, but these errors were encountered: