-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implicit account creation (#3251)
This PR implements near/NEPs#71 It contains a bunch of boilerplate code to pass the protocol version to VM and tests. Logical changes: - Bumps protocol version to 35 - Post protocol version, when a transfer action is executed on the 64-length hex like account ID as a single action in a transaction, it creates a new account if the account doesn't exist and add the ED25519 public key from the account ID hex representation. - If a CreateAccount action attempts to create 64-length hex like account, it fails. - Refunds don't automatically create accounts, because refunds are free and we don't want some type of abuse. NOTE: Account deletion with beneficiary creates a refund, so it'll not create a new account. - `TransferAction` fee cost on such 64-len hex accounts include `CreateAction` and `AddFullAccessKey` costs - The fee is also updated when calling a promise. - `VMLogic::new` change is backward compatible until we release a new `near-sdk` version. So it shouldn't break master after pushing it. - Bump `near-vm-*` versions to `2.2.0`. TODO: - [x] Add integration test for transfer from promise - [x] Add migration test for transfer to 64len - [x] Uncomment `VMLogic::new` for `near-sdk` `MockedBlockchain` ## Test plan: - CI - Added integration test and migration test
- Loading branch information
Evgeny Kuzyakov
authored
Sep 2, 2020
1 parent
9c4f8d4
commit 9d759ad
Showing
51 changed files
with
922 additions
and
151 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Oops, something went wrong.