-
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
Add XCM Transactor precompile V3 - [Moonbase only] #2338
Merged
Merged
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.
breaking
Needs to be mentioned in breaking changes
labels
Jun 8, 2023
Coverage generated "Thu Aug 24 18:18:19 UTC 2023": Master coverage: 87.39% |
Agusrodri
force-pushed
the
agustin-xcm-transactor-v3
branch
from
August 7, 2023 16:24
303e35e
to
ca349d3
Compare
…am-foundation/moonbeam into agustin-xcm-transactor-v3
TODO: remove the new precompile from Moonriver and Moonbeam and enable it only on Moonbase for testing purposes. Edit: done in eefddd3 |
librelois
reviewed
Aug 23, 2023
librelois
reviewed
Aug 23, 2023
librelois
reviewed
Aug 24, 2023
librelois
approved these changes
Aug 24, 2023
LGTM, I left a suggestion to reduce boilerplate code, but not mandatory |
Agusrodri
changed the title
XCM Transactor precompile V3
XCM Transactor precompile V3 [Moonbase only]
Aug 25, 2023
grw-ms
pushed a commit
that referenced
this pull request
Aug 28, 2023
* progress * add unit tests and fix integration tests * barrier * add refund xcm_tests to runtimes * fmt * add precompile to runtimes * fix precompile existence * add xcm-transactor precompile interface * add xcm-transactor precompile interface * delete old ForeignChainAliasAccount from tests * enable XCM Transactor precompile V3 only on Moonbase * reserve address for XCM Transactor precompile V3 * use then() syntax for appendix * reduce boilerplate code
noandrea
changed the title
XCM Transactor precompile V3 [Moonbase only]
Add XCM Transactor precompile V3 - [Moonbase only]
Aug 30, 2023
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.
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.
This PR introduces a new version of the
xcm-transactor
precompile, more specifically the version number three (V3) of it.Support for Weights V2
This version, includes a new
Weight
struct that allows users to indicate how much weight to spent in terms of bothref_time
andproof_size
components. When users make use of it, thisWeight
struct is properly encoded and decoded (for solidity language to understand the information) allowing to send the correct data to thexcm-transactor
pallet.Support for RefundSurplus instruction
Another feature that is introduced with this version, is the possibility of using
RefundSurplus
XCM instruction to properly refund the user with the extra weight that was not used during the execution of an XCM message in the destination chain.Some considerations to take into account at the moment of using this feature:
true
through the bool parameterrefund
in the corresponding functions.transactThroughDerivative()
ortransactThroughDerivativeMultilocation()
functions, the remaining surplus will be refunded to the origin chain's sovereign account on the destination chain.transactThroughSigned()
ortransactThroughSignedMultilocation()
functions, the remaining surplus will be refunded back to the user's derivative account on the destination chain. Note that the destination chain must implement its own MultiLocation based derivation mechanism for this process to work as expected.