feat: more ctoken extensions opt compressible ctoken#2156
Merged
ananas-block merged 59 commits intomainfrom Jan 5, 2026
Merged
feat: more ctoken extensions opt compressible ctoken#2156ananas-block merged 59 commits intomainfrom
ananas-block merged 59 commits intomainfrom
Conversation
Contributor
|
Important Review skippedToo many files! 39 files out of 189 files are above the max files limit of 150. You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ananas-block
commented
Dec 31, 2025
| } | ||
|
|
||
| // Handle withheld_transfer_fee (always add, not overwrite) | ||
| if withheld_transfer_fee > 0 { |
Contributor
Author
There was a problem hiding this comment.
TODO: add comment:
Defensive so that it is always possible to compress and decompress ctoken accounts. It should not be possible to set withheld_transfer_fee to non zero.
8c0b2e7 to
3640e91
Compare
SwenSchaeferjohann
approved these changes
Jan 1, 2026
Comment on lines
+8
to
+18
| /// Calculates the size of a ctoken account based on which extensions are present. | ||
| /// | ||
| /// Note: Compression info is now embedded in the base struct (CTokenZeroCopyMeta), | ||
| /// so there's no separate compressible extension parameter. | ||
| /// | ||
| /// # Arguments | ||
| /// * `extensions` - Optional slice of extension configs | ||
| /// | ||
| /// # Returns | ||
| /// * `Ok(usize)` - The total account size in bytes | ||
| /// * `Err(ZeroCopyError)` - If extension size calculation fails |
Contributor
There was a problem hiding this comment.
is this still up2date?
Move compress-and-close tests to new compress_only/ directory: - all.rs: test_compress_and_close_ctoken_with_extensions - default_state.rs: test_create_ctoken_with_frozen_default_state - permanent_delegate.rs: test_compress_and_close_with_permanent_delegate - frozen.rs: test_compress_and_close_frozen - delegated.rs: delegate-related tests Add assert_mint_22_with_all_extensions helper to light-test-utils.
3640e91 to
89dde48
Compare
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.
No description provided.