fix(spl): refactor get_rent function and replace slice_eq with Pubkey eq - #143
Merged
Conversation
dkcumming
approved these changes
Jan 6, 2026
dkcumming
left a comment
Collaborator
There was a problem hiding this comment.
Approving, but iirc the process of updating the spl_token specs was automated, so will this change need to be accounted for in p-token or is there some idea for how to preserve it?
jberthold
reviewed
Jan 7, 2026
Comment on lines
+971
to
+982
| assert_eq!(get_mint(&accounts[0]).mint_authority().unwrap().as_ref(), &instruction_data[1..33]); | ||
| let expected_mint_authority = | ||
| Pubkey::new_from_array(instruction_data[1..33].try_into().unwrap()); | ||
| assert_eq!( | ||
| *get_mint(&accounts[0]).mint_authority().unwrap(), | ||
| expected_mint_authority | ||
| ); |
Collaborator
There was a problem hiding this comment.
Maybe this code sequence could be a macro? (which of course introduces more differences to the respective code in p-token...)
Author
There was a problem hiding this comment.
Done! I'm using macro for now. And it may make it easier to check the consistency.
jberthold
approved these changes
Jan 7, 2026
dkcumming
pushed a commit
that referenced
this pull request
Jan 21, 2026
…ey eq (#143) This PR makes the following specs passed: - test_process_initialize_mint_freeze - test_process_initialize_mint_no_freeze - test_process_initialize_mint2_freeze - test_process_initialize_mint2_no_freeze
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.
This PR makes the following specs passed: