-
Notifications
You must be signed in to change notification settings - Fork 346
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
Enable RefundSurplus and DepositAsset instructions for XCM Transactor #2283
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Agusrodri
added
B7-runtimenoteworthy
Changes should be noted in any runtime-upgrade release notes
D5-nicetohaveaudit⚠️
PR contains trivial changes to logic that should be properly reviewed.
D10-breaksdocs
Changes to code that require changes in documentation
breaking
Needs to be mentioned in breaking changes
labels
May 5, 2023
Agusrodri
added
breaking
Needs to be mentioned in breaking changes
and removed
breaking
Needs to be mentioned in breaking changes
labels
May 5, 2023
@Agusrodri this will need to be updated. I merged master but there are some compilation errors |
@crystalin yes, I think this PR will be closed in favor of a new one containing this and other necessary changes for the xcm-transactor precompile to be upgraded to V3. |
Closed in favor of #2338 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
B7-runtimenoteworthy
Changes should be noted in any runtime-upgrade release notes
breaking
Needs to be mentioned in breaking changes
D5-nicetohaveaudit⚠️
PR contains trivial changes to logic that should be properly reviewed.
D10-breaksdocs
Changes to code that require changes in documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Currently,
xcm-transactor
pallet and precompile don't allow senders to make usage ofRefundSurplus
andDepositAsset
instructions, which normally causes assets get trapped on the destination chain. This PR enables such functionality.Changes
transact_through_signed()
,transact_through_derivative()
andtransact_through_sovereign()
functions to accept an additional bool parameter (calledrefund
) that indicates ifRefundSurplus
andDepositAsset
instructions will be used. These instructions are included inside an appendix that will execute them at the end of the execution of the whole XCM message.transactThroughSignedRefund()
,transactThroughSignedMultilocationRefund()
,transactThroughDerivativeRefund()
andtransactThroughDerivativeMultilocationRefund()
functions toxcm-transactor
precompile V2. These functions receive the same parameters as the normal previous ones, but this time adding the appendix withRefundSurplus
andDepositAsset
behind the scenes. It was thought this way to not break any kind of existing compatibility.Notes
transact_through_derivative()
ortransact_through_sovereign()
, the remaining surplus will be refunded to the sovereign account.