-
Notifications
You must be signed in to change notification settings - Fork 82
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
Feat: allow creating and funding XCC sub-accounts from external NEAR accounts #735
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
birchmd
added
C-enhancement
Category: New feature or request
A-engine
Area: purely engine EVM related
labels
Mar 23, 2023
birchmd
requested review from
hskang9,
RomanHodulak and
aleksuss
as code owners
March 23, 2023 19:53
aleksuss
approved these changes
Mar 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good
joshuajbouw
approved these changes
Mar 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like the version tracking and if deploys need to be made. Good work. Thanks for the tests.
joshuajbouw
suggested changes
Mar 31, 2023
birchmd
force-pushed
the
feat/birchmd/fund-xcc-account
branch
from
March 31, 2023 13:40
a2406c4
to
597114b
Compare
joshuajbouw
approved these changes
Apr 5, 2023
Merged
birchmd
added a commit
that referenced
this pull request
Apr 5, 2023
…accounts (#735) * Feat: allow creating and funding XCC sub-accounts from external NEAR accounts * Add test for using XCC without bridging wNEAR * Add fund_xcc_sub_account support to standalone engine * Avoid panics
joshuajbouw
added a commit
that referenced
this pull request
Apr 5, 2023
## [2.9.0] 2023-04-05 ### Added - Enabled XCC for mainnet release by [@birchmd]. ([#694]) - Added `set_owner` contract method which sets the owner of the contract by [@hskang9]. ([#690]) - New variant of submit function `submit_with_args` which accepts additional arguments along with the transaction such as the max gas price a user is ready to pay by [@aleksuss]. ([#696]) - Added the ability to create and fund XCC sub-accounts from external NEAR accounts by [@birchmd]. ([#735]) ### Changes - Replaced `rjson` with `serde_json` by [@aleksuss]. ([#677]) - Changed owner intended contract methods to now require owner or the contract itself by [@hskang9]. ([#676]) ### Fixes - Fixed nonce incorrectly being incremented on an out of fund failure by [@joshuajbouw]. ([#671]) - Fixed a check in promise results before executing cross contract calls (XCC) callbacks by [@birchmd]. ([#693]) - Fixed a reachable panic in `receive_erc20_tokens` by [@0x3bfc]. ([#709]) - Fixed a lack of minimum size checks when instantiating a new `EthGas` object by [@lempire123]. ([#722]) - Fixed a lack of division by 0 checks in `EthGas::Div()` by [@lempire123]. ([#718]) - Fixed the validation of the return of `exports:storage_remove` by [@0x3bfc]. ([#712]) - Fixed missing account validations of NEAR account IDs by [@0x3bfc]. ([#703]) - Fixed a reachable panic in the `exitToNear` and `exitToEthereum` precompiles if the input amount is greater than 1^128 when cast from a `U256` to `u128` by [@0x3bfc]. ([#681]) - Fixed a reachable panic in `modExp` due to arithmetic overflow by [@0x3bfc]. ([#688]) - Fixed the ability attaching values to Aurora specific precompiles, this no longer is possible, by [@0x3bfc]. ([#714]) - Fixed a return error if an ecrecover signature length is not exactly 65 by [@0x3bfc]. ([#717]) - Fixed size checks on input array passed to `exitToNear` and `exitToEthereum` precompiles by [@0x3bfc]. ([#684]) - Fixed missing gas costs in `exitToNear` and `exitToEthereum` precompiles by [@lempire123]. ([#687]) - Fixed a reachable panic due to out of memory in the `modExp` precompile by [@0x3bfc]. ([#689]) - Fixed an assurance that the `sender_id` has a balance greater than the amount in `ft_transfer_call` by [@0x3bfc]. ([#708]) - Fixed returning `0x` when a length cannot be cast as `usize` instead of returning an error in the `modExp` precompile by [@birchmd]. ([#737]) - Miscellaneous minor fixes by [@0x3bfc]. ([#738]) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Leandro Casuso Montero <[email protected]> Co-authored-by: Michael Birch <[email protected]> Co-authored-by: Alexey Lapitsky <[email protected]> Co-authored-by: Oleksandr Anyshchenko <[email protected]> Co-authored-by: Alexey Lapitsky <[email protected]> Co-authored-by: Hyungsuk Kang <[email protected]> Co-authored-by: Ahmed Ali <[email protected]> Co-authored-by: lempire123 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Description
The purpose of this PR is to add a new function to the Engine for creating XCC sub-accounts that are funded from an external Near account. The reason this is useful is because it allows the XCC feature to be used in an instance of the Engine where the wNEAR token has not been bridged (this is not the case on mainnet
aurora
, but could be the case on other Engine instances).Note: this allows creating XCC accounts without requiring the Engine to know about wNEAR, but if a user wants to attach NEAR to their cross-contract calls then then Engine (and that user) will still need wNEAR. This should not be too much of a limitation since many things can be done on Near without spending the base token.
Testing
One new XCC test to show this works to create a sub-account and use it for XCC in an Engine where wNEAR is not bridged.