-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow an AppMsgStake tx to change the address of a staked app (#1585)
The patch implements [PIP-35](https://forum.pokt.network/t/pip-35-introduce-a-secure-way-to-transfer-a-staked-app-to-a-new-account/4806), allowing the existing AppMsgStake transaction to change the address of a staked app. This enables us to *transfer* the existing app slot from one to a new account without unstaking. To make this operation easier, this patch also introduces a new command `app transfer`. ## Description <!-- reviewpad:summarize:start --> ### Summary generated by Reviewpad on 15 Dec 23 11:53 UTC This pull request includes changes in multiple files. Here is a summary of the changes: 1. The file `appStateChanges_test.go` has changes related to application state changes and transfers. The changes include the addition of new import statements, test functions, and helper functions. 2. The file `types.go` has changes related to the `MsgStake` type. The changes involve adding a new method `IsValidTransfer` to check for a special case in the `MsgStake` type where ownership transfer is being done. 3. The file `codec.go` has changes related to the support of an "App Transfer" feature. The changes include adding a constant and a new function for checking if a certain upgrade has occurred. 4. The file `expectedKeepers.go` has changes related to the addition of a new interface `AppKeeper`. 5. The file `keeper.go` has changes that involve adding a new field to the `Keeper` struct. 6. The file `baseapp.go` has changes that include formatting changes in the package comment and modifications in the `DeliverTx` function. 7. The file `app.go` has changes related to the assignment of a field in the `app.accountKeeper` object. 8. The file `auth.go` has changes that include adding comments and conditions for non-custodial and output address editor upgrades. 9. The file `common_test.go` has changes that involve importing packages, renaming a package, and adding/modifying functions. 10. The file `appStateChanges.go` has changes related to the validation and transfer functionality of applications. 11. The file `txUtil.go` has changes that add a new function for transferring an application. 12. The file `app/cmd/cli/app.go` has changes related to the addition of a new command for transferring the ownership of a staked app. 13. The file `keeper.go` has changes that add a new method for checking if a message is for transferring ownership. 14. The file `handler.go` has changes that include import statements, function parameter modifications, and logic for transferring application ownership. These are the summaries of the changes in each file. Let me know if you have any specific questions or need further information regarding these changes. <!-- reviewpad:summarize:end -->
- Loading branch information
Showing
14 changed files
with
479 additions
and
52 deletions.
There are no files selected for viewing
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.