-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add create-stake command to solana-tokens CLI #17550
Conversation
Hold off on reviewing. The implementation can be simpler and I'll play with integrating this functionality into one of the existing commands. |
ack |
Codecov Report
@@ Coverage Diff @@
## master #17550 +/- ##
=========================================
- Coverage 82.7% 82.6% -0.2%
=========================================
Files 428 427 -1
Lines 119963 119345 -618
=========================================
- Hits 99324 98638 -686
- Misses 20639 20707 +68 |
@CriesofCarrots @danpaul000, ready for review. Something to consider: we could merge the |
@CriesofCarrots @danpaul000, wdyt? |
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.
Generally looks good, but one missing cli Arg.
For now, I'm thinking we should just let separate things be separate.
Agreed, I like the commands being explicit, although I do think distribute-stake
is a little ambiguous now. Fine for now, though.
automerge label removed due to a CI failure |
* Add create-stake command to solana-tokens CLI * Add --unlocked-sol arg Thanks @CriesofCarrots! (cherry picked from commit 1b7f877)
* Add create-stake command to solana-tokens CLI * Add --unlocked-sol arg Thanks @CriesofCarrots! (cherry picked from commit 1b7f877) Co-authored-by: Greg Fitzgerald <greg@solana.com>
Problem
When we created the
solana-tokens
CLI, we only had locked up tokens and so thedistribute-stake
command requires a source stake account to split up and a lockup authority signer to change the target accounts' lockup dates. Now that we have unlocked tokens, it is tedious to manually move tokens into stake accounts just sosolana-tokens
can split them. Instead, it can skip the split and just create the stake accounts directly.Summary of Changes
Add
create-stake
command tosolana-tokens
CLI. It uses the--from
System account to both send therecipient
SOL for fees and to fund the new stake accounts. Unlike thedistribute-stake
stake command, it does not require a source stake account or a lockup authority signer.