-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sui-framework] Remove "delegate" and replace with
stake
(#9059)
This does a large rename of "delegation/delegate" (etc) to the equivalent "stake" name, e.g., `request_add_delegation` becomes `request_add_stake`. ## Move ### Entry functions renamed (all within `sui_system.move`): ``` request_add_delegation ~> request_add_stake request_add_delegation_mul_coin ~> request_add_stake_mul_coin request_add_delegation_with_locked_coin ~> request_add_stake_with_locked_coin request_add_delegation_with_mul_locked_coin ~> request_add_stake_with_mul_locked_coin request_withdraw_delegation ~> request_withdraw_stake ``` ### Move Object fields ``` StakingPool::pending_delegation ~> pending_stake StakedSui::delegation_activation_epoch ~> stake_activation_epoch ``` ### Sui types This renames a couple sui types since they no longer made sense to be called what they were: ``` DelegatedStake ~> Stake DelegationStatus ~> StakeStatus ``` This then performs the core set of renamings to make the system happy with this. So there are still a number of functions in Rust and Typescript that will contain their old delegation name. Note that on the typescript side we keep DelegatedStake since (1) there was already a type called Stake (which meant something else) and in the context that I could see it being used it appeared as though DelegatedStake really did mean "this is my stake that I have delegated to this validator." ## Test Plan Make sure existing tests still pass. --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [X] user-visible impact - [X] breaking change for a client SDKs - [X] breaking change for FNs (FN binary must upgrade) - [X] breaking change for validators or node operators (must upgrade binaries) - [X] breaking change for on-chain data layout - [X] necessitate either a data wipe or data migration ### Release notes
- Loading branch information
Showing
48 changed files
with
790 additions
and
787 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"@mysten/bcs": minor | ||
"@mysten/ledgerjs-hw-app-sui": minor | ||
"@mysten/sui.js": minor | ||
"@mysten/wallet-adapter-all-wallets": minor | ||
"@mysten/wallet-adapter-base": minor | ||
"@mysten/wallet-adapter-unsafe-burner": minor | ||
"@mysten/wallet-adapter-wallet-standard": minor | ||
"@mysten/wallet-kit": minor | ||
"@mysten/wallet-kit-core": minor | ||
"@mysten/wallet-standard": minor | ||
--- | ||
|
||
This changes almost all occurences of "delegate", "delegation" (and various capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument names, RPC endpoints, Move functions, and object fields have been updated with this new naming convention. |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.