cli: Properly support token-2022 mints#171
Merged
joncinque merged 1 commit intosolana-program:mainfrom Apr 23, 2025
Merged
Conversation
2501babe
previously approved these changes
Apr 15, 2025
2501babe
reviewed
Apr 15, 2025
Comment on lines
+63
to
+65
|
|
||
| spl-token create-token --program-2022 "$mint_keyfile" | ||
|
|
Member
There was a problem hiding this comment.
this ux and the corresponding "fall back to tokenkeg" rather than adding a cli flag is clever
Contributor
Author
|
@2501babe can I get another approval here? I had to rebase |
2501babe
previously approved these changes
Apr 22, 2025
Member
|
approved then saw the previous automerge required another rebase but i did it (taking a chance on the github web editor! lmao) so it should just require your approve now |
#### Problem Although the stake pool program allows for mints on token-2022, the CLI still does not. #### Summary of changes A few changes: * use spl-token-2022 for instruction creators * allow for the token program id to be spl_token::id() or spl_token_2022::id() * derive ATAs with the token program id * use the token program id stored on the stake pool * during pool creation, return a helpful error if the mint is configured incorrectly * add a test script using token-2022
joncinque
commented
Apr 22, 2025
Contributor
Author
joncinque
left a comment
There was a problem hiding this comment.
I can't approve because it's my own pull request 🙃 so I just redid the rebase -- can you approve one more time?
2501babe
approved these changes
Apr 23, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Although the stake pool program allows for mints on token-2022, the CLI still does not.
Summary of changes
A few changes: