Skip to content

Conversation

@ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Jan 12, 2026


  1. Crate Renames (Root Cargo.toml)

  2. light-ctoken-interface -> light-token-interface

  3. light-ctoken-sdk -> light-token-sdk

  4. light-ctoken-types -> light-token-types

  5. sdk-ctoken-test -> sdk-light-token-test


  1. program-libs/token-interface (26 renamings)

Structs:
5. CToken -> Token
6. MintToCTokenAction -> MintToAction
7. ZCToken<'a> -> ZToken<'a>
8. ZCTokenMut<'a> -> ZTokenMut<'a>
9. CompressedTokenConfig -> TokenConfig
10. CTokenZeroCopyMeta -> TokenZeroCopyMeta
11. ZCTokenZeroCopyMeta<'a> -> ZTokenZeroCopyMeta<'a>
12. ZCTokenZeroCopyMetaMut<'a> -> ZTokenZeroCopyMetaMut<'a>

Enums:
13. CTokenError -> TokenError

Constants:
14. CTOKEN_PROGRAM_ID -> LIGHT_TOKEN_PROGRAM_ID

Functions:
15. with_mint_to_ctoken() -> with_mint_to()
16. compress_and_close_ctoken() -> compress_and_close()
17. compress_ctoken() -> compress()
18. decompress_ctoken() -> decompress()
19. calculate_ctoken_account_size() -> calculate_token_account_size()
20. is_ctoken_account() -> is_token_account()

Modules:
21. mod ctoken -> mod token
22. mod ctoken_struct -> mod token_struct
23. mod mint_to_ctoken -> mod mint_to
24. mod create_ctoken_account -> mod create_token_account


  1. program-libs/compressible (5 renamings)

Functions:
25. ctoken_v1() -> light_token_v1()
26. new_ctoken() -> new_light_token()
27. ctoken_v1_config_pda() -> light_token_v1_config_pda()
28. ctoken_v1_compression_authority_pda() -> light_token_v1_compression_authority_pda()
29. ctoken_v1_rent_sponsor_pda() -> light_token_v1_rent_sponsor_pda()


  1. sdk-libs/token-sdk (70+ renamings)

Structs:
30. ApproveCToken -> Approve
31. ApproveCTokenChecked -> ApproveChecked
32. ApproveCTokenCheckedCpi -> ApproveCheckedCpi
33. ApproveCTokenCpi -> ApproveCpi
34. BurnCToken -> Burn
35. BurnCTokenChecked -> BurnChecked
36. BurnCTokenCheckedCpi -> BurnCheckedCpi
37. BurnCTokenCpi -> BurnCpi
38. CTokenMintTo -> MintTo
39. CTokenMintToChecked -> MintToChecked
40. CTokenMintToCheckedCpi -> MintToCheckedCpi
41. CTokenMintToCpi -> MintToCpi
42. CloseCTokenAccount -> CloseAccount
43. CloseCTokenAccountCpi -> CloseAccountCpi
44. CreateAssociatedCTokenAccount -> CreateAssociatedTokenAccount
45. CreateAssociatedCTokenAccountCpi -> CreateAssociatedAccountCpi
46. CreateCTokenAccount -> CreateTokenAccount
47. CreateCTokenAccountCpi -> CreateTokenAccountCpi
48. DecompressToCtoken -> Decompress
49. FreezeCToken -> Freeze
50. FreezeCTokenCpi -> FreezeCpi
51. RevokeCToken -> Revoke
52. RevokeCTokenCpi -> RevokeCpi
53. ThawCToken -> Thaw
54. ThawCTokenCpi -> ThawCpi
55. TransferCToken -> Transfer
56. TransferCTokenChecked -> TransferChecked
57. TransferCTokenCheckedCpi -> TransferCheckedCpi
58. TransferCTokenCpi -> TransferCpi
59. TransferCTokenToSpl -> TransferToSpl
60. TransferCTokenToSplCpi -> TransferToSplCpi
61. TransferSplToCtoken -> TransferFromSpl
62. TransferSplToCtokenCpi -> TransferFromSplCpi
63. CTokenDefaultAccounts -> TokenDefaultAccounts
64. CreateCMintParams -> CreateMintParams
65. CreateCMint -> CreateMint
66. CreateCMintCpiWriteParams -> CreateMintCpiWriteParams
67. CreateCMintCpi -> CreateMintCpi
68. DecompressCMint -> DecompressMint
69. DecompressCMintCpi -> DecompressMintCpi

Constants:
70. CTOKEN_CPI_AUTHORITY -> LIGHT_TOKEN_CPI_AUTHORITY
71. CTOKEN_PROGRAM_ID -> LIGHT_TOKEN_PROGRAM_ID

Functions:
72. create_associated_ctoken_account() -> create_associated_token_account()
73. create_associated_ctoken_account_idempotent() -> create_associated_token_account_idempotent()
74. derive_ctoken_ata() -> derive_token_ata()
75. get_associated_ctoken_address() -> get_associated_token_address()
76. get_associated_ctoken_address_and_bump() -> get_associated_token_address_and_bump()
77. derive_cmint_compressed_address() -> derive_mint_compressed_address()
78. derive_cmint_from_spl_mint() -> derive_mint_from_spl_mint()
79. find_cmint_address() -> find_mint_address()
80. with_cmint() -> with_mint()
81. with_compressible_cmint() -> with_compressible_mint()

Struct Field Renames:
82. source_ctoken_account -> source (in TransferToSpl/TransferToSplCpi)
83. destination_ctoken_account -> destination (in TransferFromSpl/TransferFromSplCpi/Decompress)

Parameter Renames (compressible/decompress_runtime.rs):
84. ctoken_program -> token_program
85. ctoken_rent_sponsor -> token_rent_sponsor
86. ctoken_cpi_authority -> token_cpi_authority
87. ctoken_config -> token_config
88. ctoken_accounts -> token_accounts
89. ctoken_signer_seeds -> token_signer_seeds
90. ctoken_ix -> token_ix

Local Variable Renames:
91. source_is_ctoken -> source_is_light_token
92. dest_is_ctoken -> dest_is_light_token
93. wrap_spl_to_ctoken_account -> wrap_from_spl
94. ctoken_account -> unwrap_to_destination

Files:
95. create_cmint.rs -> create_mint.rs
96. decompress_cmint.rs -> decompress_mint.rs
97. transfer_token.rs -> transfer.rs
98. transfer_token_checked.rs -> transfer_checked.rs
99. transfer_spl_to_token.rs -> transfer_from_spl.rs
100. transfer_token_to_spl.rs -> transfer_to_spl.rs

Modules:
101. mod create_cmint -> mod create_mint
102. mod decompress_cmint -> mod decompress_mint


  1. sdk-libs/token-types (1 renaming)

Functions:
103. ctoken_program() -> light_token_program()


  1. sdk-libs/token-client (5 renamings)

Files:
104. ctoken_transfer.rs -> transfer.rs

Modules:
105. mod ctoken_transfer -> mod transfer

Functions:
106. transfer_ctoken() -> transfer_token()
107. create_transfer_ctoken_instruction() -> create_transfer_token_instruction()
108. spl_to_ctoken_transfer() -> spl_to_light_token_transfer()
109. transfer_ctoken_to_spl() -> transfer_light_token_to_spl()


  1. sdk-libs/macros (9 renamings)

Functions:
110. generate_ctoken_account_variant_enum() -> generate_token_account_variant_enum()
111. generate_ctoken_seed_provider_implementation() -> generate_token_seed_provider_implementation()

Generated Identifiers:
112. ctoken_rent_sponsor -> token_rent_sponsor
113. ctoken_program -> token_program
114. ctoken_cpi_authority -> token_cpi_authority
115. ctoken_config -> token_config
116. ctoken_accounts -> token_accounts
117. is_packed_ctoken -> is_packed_token
118. CTokenSeedProvider -> TokenSeedProvider


  1. program-tests/ (directory/CI rename)

Test target:
119. --test ctoken -> --test light_token


  1. Removed Files/Types (MintToCtoken functionality)
  • MintToCToken (removed)
  • MintToCTokenCpi (removed)
  • MintToCTokenCpiWrite (removed)
  • MintToCTokenCpiWriteCpi (removed)
  • MintToCTokenCpiWriteParams (removed)
  • MintToCTokenParams (removed)
  • sdk-ctoken-test/src/mint_to_ctoken.rs (removed)
  • sdk-ctoken-test/tests/test_mint_to_ctoken.rs (removed)

ananas-block and others added 4 commits January 12, 2026 21:13
Phase 1 of ctoken to light-token rename:

- Rename crate: light-ctoken-interface -> light-token-interface
- Rename directory: program-libs/ctoken-interface -> program-libs/token-interface
- Rename internal directories: src/state/ctoken -> src/state/token
- Rename types:
  - CToken -> Token
  - CTokenError -> TokenError
  - CTokenZeroCopyMeta -> TokenZeroCopyMeta
  - CompressedTokenConfig -> TokenConfig
  - ZCToken -> ZToken
  - ZCTokenMut -> ZTokenMut
- Rename constants:
  - CTOKEN_PROGRAM_ID -> LIGHT_TOKEN_PROGRAM_ID
- Rename functions:
  - is_ctoken_account -> is_token_account
  - calculate_ctoken_account_size -> calculate_token_account_size
  - with_mint_to_ctoken -> with_mint_to_token
  - compress_ctoken -> compress_token
  - decompress_ctoken -> decompress_token
- Rename Action variant: MintToCToken -> MintToToken
- Update all imports across the codebase
- Update comment in extensions/mod.rs to reference light-token-interface instead of ctoken-types
- Update SDK documentation in CLAUDE.md to reference light-token-interface and token-sdk instead of ctoken-types and ctoken-sdk
- Both programs still compile successfully after renaming

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of ctoken to light-token rename:

- Rename crate: light-ctoken-types -> light-token-types
- Rename directory: sdk-libs/ctoken-types -> sdk-libs/token-types
- Update all imports across the codebase:
  - light-ctoken-types -> light-token-types (Cargo.toml)
  - light_ctoken_types -> light_token_types (Rust code)
- Update workspace Cargo.toml dependency
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Important

Review skipped

Too many files!

65 files out of 215 files are above the max files limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jorrit/chore-rename-ctoken-light-token2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Rename source_ctoken_account -> source in TransferToSpl
- Rename destination_ctoken_account -> destination in TransferFromSpl, Decompress
- Rename ctoken_ prefixed params in decompress_runtime.rs to token_
- Rename local vars: source_is_ctoken -> source_is_light_token
- Update lib.rs doc table with correct type names
- Fix CI workflow to use --test light_token instead of --test ctoken
@ananas-block ananas-block merged commit bda52c3 into main Jan 14, 2026
32 of 33 checks passed
@ananas-block ananas-block deleted the jorrit/chore-rename-ctoken-light-token2 branch January 14, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants