-
Notifications
You must be signed in to change notification settings - Fork 0
chore: rename ctoken to light-token #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (31)
WalkthroughThis PR renames ctoken/CToken terminology to light-token/Token across documentation, code snippets, config, and sync scripts; updates module paths, type and function names, constants (e.g., Changes
Sequence Diagram(s)(omitted — changes are primarily renames, deletions, and doc/snippet edits with no new multi-component control flow) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
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.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
light-token/toolkits/for-dexs.mdx (1)
432-445: Inconsistent terminology in ASCII diagram.The integration flow diagram still uses "c-token" terminology (
User c-token ATA) which is inconsistent with the rest of the file that uses "light-token" terminology.Proposed fix
## Integration FlowDEX with light-token Support┌─────────────────────────────────────────────────────────────┐
│ │
│ DEPOSIT: │
-│ User c-token ATA ──unwrap()──► Pool SPL ATA │
+│ User light-token ATA ──unwrap()──► Pool SPL ATA │
│ │
│ SWAP: │
│ unwrap() ──► [swap instruction] ──► wrap() │
│ │
│ WITHDRAWAL: │
-│ Pool SPL ATA ──wrap()──► User c-token ATA │
+│ Pool SPL ATA ──wrap()──► User light-token ATA │
│ │
└─────────────────────────────────────────────────────────────┘light-token/interface-methods.mdx (1)
92-101: Inconsistent terminology: "c-token" should be "light-token".Lines 92 and 98 still reference "c-token" which is inconsistent with the rename objective of this PR.
📝 Suggested fix
-Create and initialize a new mint for SPL, Token-2022, or c-token. +Create and initialize a new mint for SPL, Token-2022, or light-token. ```typescript const { mint, transactionSignature } = await createMintInterface( rpc, payer, - mintAuthority, // Signer for c-token mints + mintAuthority, // Signer for light-token mints freezeAuthority, // or null 9 // decimals );</details> </blockquote></details> </blockquote></details>🤖 Fix all issues with AI agents
In `@learn/light-token-standard.mdx`: - Around line 228-230: Update the broken GitHub link to the token_struct.rs source in learn/light-token-standard.mdx by locating the current repository path for token_struct.rs (token-interface/src/state/token/token_struct.rs) in the Lightprotocol repo and replacing the hardcoded commit hash URL with a working one (either the correct commit hash or the branch-based blob/main URL) so the link resolves; verify the updated URL opens the token_struct.rs file in the browser and update the markdown link text if needed. In `@light-token/cookbook/create-ata.mdx`: - Around line 352-354: The documentation link labeled "here" in create-ata.mdx points to a non-existent GitHub path (create_ata2.rs) and returns 404; update that markdown link to the correct repository path (or remove/replace it) by locating the actual file in the light-protocol repo (search for create_ata2.rs or equivalent in sdk-tests/sdk-light-token-test/src) and replace the URL in the "Find the source code [here]" link so it points to the existing file or to the proper file name. In `@light-token/toolkits/for-streaming-mints.mdx`: - Around line 133-136: The code references an undefined snake_case variable light_token_program_id; replace it with the actual constant LIGHT_TOKEN_PROGRAM_ID or create a properly-typed local variable from that constant before comparison. Specifically, update the owner comparison in the loop to compare against LIGHT_TOKEN_PROGRAM_ID (or parse/convert LIGHT_TOKEN_PROGRAM_ID into a Pubkey/byte array named light_token_program_id if you need a different type) so the identifier and types match the existing constant and the owner comparison succeeds. In `@snippets/jsx/light-token-vs-spl-calculator.jsx`: - Around line 1-16: The component uses React hooks but misses the import for useState; add an import for useState from 'react' at the top of the file so the hooks used in LightTokenVsSplCalculator (useState, setNumAccounts, setShowCustomAccounts) resolve correctly, and ensure the import coexists with any other React imports if present. In `@snippets/setup/rust-install-dependencies.mdx`: - Line 5: The dependency line specifying the crate "light-token-types = \"0.1\"" is invalid because that version doesn't exist on crates.io; update the Cargo dependency to a correct published crate and version (or correct the crate name) by replacing the "light-token-types = \"0.1\"" entry with the verified crate name and a valid version string (or remove it if the crate is unpublished), ensuring the change is made where the dependency is declared (the light-token-types dependency line in the snippet).🧹 Nitpick comments (1)
snippets/jsx/token22-extensions-table.jsx (1)
59-121: Consistent rename across all filter conditions.All nine filter arrays are correctly updated to use
TokenTransferinstead of the previous naming.Optional: Consider extracting the duplicated filter array into a constant to improve maintainability:
♻️ Suggested refactor
+ // Instructions excluded from runtime-constrained extensions + const excludedTransferInstructions = ["transfer", "TokenTransfer", "Transfer2"]; + // Extensions with runtime constraints { name: "MintCloseAuthority", description: "-", instructions: allInstructions.filter( - (i) => !["transfer", "TokenTransfer", "Transfer2"].includes(i) + (i) => !excludedTransferInstructions.includes(i) ), }, // ... apply similarly to the other 8 extensions📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
cspell.jsonlearn/light-token-standard.mdxlight-token/cookbook/close-token-account.mdxlight-token/cookbook/create-ata.mdxlight-token/cookbook/create-mint.mdxlight-token/cookbook/create-token-account.mdxlight-token/cookbook/mint-to.mdxlight-token/cookbook/transfer-interface.mdxlight-token/interface-methods.mdxlight-token/toolkits/for-dexs.mdxlight-token/toolkits/for-launchpads.mdxlight-token/toolkits/for-payments.mdxlight-token/toolkits/for-streaming-mints.mdxlight-token/toolkits/for-streaming-tokens.mdxlight-token/toolkits/for-trading-apps.mdxlight-token/toolkits/for-wallets.mdxlight-token/welcome.mdxscripts/sync-docs.shsnippets/accounts-list/light-token-create-ata-accounts-list.mdxsnippets/code-snippets/compressed-token/create-mint/instruction.mdxsnippets/code-snippets/light-token/load-ata/action.mdxsnippets/code-snippets/light-token/load-ata/instruction.mdxsnippets/code-snippets/light-token/unwrap/instruction.mdxsnippets/code-snippets/light-token/wrap/action.mdxsnippets/code-snippets/light-token/wrap/instruction.mdxsnippets/jsx/light-token-vs-spl-calculator.jsxsnippets/jsx/token22-extensions-table.jsxsnippets/light-token-configure-rent.mdxsnippets/light-token-guides/client-custom-rent-config.mdxsnippets/setup/rust-install-dependencies.mdx🔇 Additional comments (98)
snippets/accounts-list/light-token-create-ata-accounts-list.mdx (1)
43-43: LGTM!The rename from
ctoken_program_idtolight_token_program_idis consistent with the broader SDK renaming effort and maintains terminology consistency throughout this documentation snippet.light-token/toolkits/for-streaming-tokens.mdx (2)
59-64: LGTM!The variable rename from
ctokenAtatotokenAtaand the updated comment are consistent with the PR's objective to rename "ctoken" terminology to "light-token". The changes are applied correctly to both the variable declaration and its usage in theloadAtacall.
113-119: LGTM!The same rename is consistently applied in the "Instruction" code example, with
tokenAtaused in both the variable declaration and thecreateLoadAtaInstructionscall. This maintains parity between the two code examples.snippets/jsx/token22-extensions-table.jsx (1)
21-21: LGTM!The rename from
CTokenTransfertoTokenTransferaligns with the PR's terminology standardization from "ctoken" to "light-token".snippets/light-token-configure-rent.mdx (2)
36-45: Documentation terminology is consistent with the rename.The tooltip and description text correctly reference "light token program PDA" which aligns with the broader ctoken → light-token terminology change.
2-2: The import path is invalid and will not compile.The crate
light_token_sdkdoes not exist in the Rust ecosystem, nor does the structCompressibleParamsInfosexist in any Light Protocol SDK crate. According to the Light Protocol documentation, the actual SDK crates arelight_compressed_token_sdk,light_ctoken_sdk, andlight_sdk.Update the import to use the correct crate and struct name from the actual Light Protocol SDK.
Likely an incorrect or invalid review comment.
cspell.json (1)
35-38: LGTM on the vocabulary update.The rename from
ctoken/ctokenstolighttoken/lighttokensaligns with the SDK rename.Note: The
cmint/cmintsentries (lines 37-38) still remain. Verify if these terms are still in use or if they should also be updated for consistency with the broader rename.snippets/code-snippets/compressed-token/create-mint/instruction.mdx (1)
14-25: LGTM!The
LIGHT_TOKEN_PROGRAM_IDconstant is correctly imported and used consistently in both the import statement and thefindProgramAddressSynccall.light-token/toolkits/for-launchpads.mdx (2)
220-230: LGTM!The
LIGHT_TOKEN_PROGRAM_IDimport and usage are consistent with the SDK rename.
517-517: LGTM!The CPI builder reference is correctly updated from
MintToCTokenCpitoMintToCpi, aligning with the SDK rename pattern.light-token/toolkits/for-wallets.mdx (4)
106-116: LGTM!The
LIGHT_TOKEN_PROGRAM_IDimport and usage are consistent with the SDK rename.
268-276: LGTM!The second occurrence of
LIGHT_TOKEN_PROGRAM_IDimport and usage is consistent.
400-432: LGTM!The variable rename from
ctokenAtatotokenAtaimproves clarity and aligns with the light-token terminology. All usages within the wrap example are consistent.
462-477: LGTM!The
tokenAtavariable naming is consistent throughout the unwrap example code.scripts/sync-docs.sh (1)
18-25: LGTM!The file mappings and source directory path are correctly updated to reflect the ctoken → light-token rename. The script logic remains sound.
light-token/toolkits/for-payments.mdx (4)
107-117: LGTM!The import and usage of
LIGHT_TOKEN_PROGRAM_IDare correctly updated from the previousCTOKEN_PROGRAM_ID.
225-236: LGTM!Consistent rename of the program ID constant in the second code block.
447-479: LGTM!Variable renames from
ctokenAtatotokenAtaare consistent throughout the wrap instruction and action helper examples.
509-524: LGTM!Variable renames for the unwrap section are consistent with the overall light-token terminology.
snippets/jsx/light-token-vs-spl-calculator.jsx (1)
138-138: LGTM!The display correctly references
tokenCostto match the renamed variable.light-token/toolkits/for-streaming-mints.mdx (2)
27-41: LGTM!The dependency and import renames are consistent with the ctoken → light-token migration.
217-217: LGTM!The doc comment correctly references "light token program".
light-token/toolkits/for-trading-apps.mdx (3)
274-290: LGTM!Variable rename from
ctokenAtatotokenAtaand the comment update to "light-token ATA" are consistent with the migration.
317-333: LGTM!The action helper section correctly uses
tokenAtaand updated comments for the light-token terminology.
363-382: LGTM!The unwrap instruction section consistently uses
tokenAtaand properly documents the light-token ATA as the source.learn/light-token-standard.mdx (1)
211-212: LGTM - Struct renamed to Token.The struct rename from
CTokentoTokenand the updated comment are consistent with the broader SDK rename.snippets/light-token-guides/client-custom-rent-config.mdx (4)
11-17: LGTM - Import paths and types updated correctly.The module paths have been updated from
light_ctoken_sdk::ctokentolight_token_sdk::token, and the type path fromlight_ctoken_typestolight_token_types.
19-26: LGTM - PDA helper functions renamed consistently.The PDA helper functions have been renamed from
ctoken_v1_*tolight_token_v1_*, maintaining consistency with the broader rename.
28-34: LGTM - CreateTokenAccount constructor usage updated.The instruction builder has been renamed from
CreateCTokenAccounttoCreateTokenAccount.
56-60: LGTM - Documentation text updated to Light Token terminology.The tooltip and description text have been updated to use "Light Token program PDA" consistently.
light-token/cookbook/create-mint.mdx (11)
11-12: LGTM - Snippet import references updated.The snippet imports have been updated to use the new
light-token-*naming convention.
35-35: LGTM - Program ID constant renamed.The constant has been renamed from
CTOKEN_PROGRAM_IDtoLIGHT_TOKEN_PROGRAM_ID.
90-90: LGTM - Import path updated to light_token_sdk.
116-119: LGTM - Import paths updated consistently.The imports have been updated from
light_ctoken_sdkandlight_ctoken_interfacetolight_token_sdkandlight_token_interface.
192-197: LGTM - Helper function paths updated.The
derive_cmint_compressed_addressandfind_cmint_addressfunctions are now correctly referenced fromlight_token_sdk::token.
281-287: LGTM - light_token_interface import updated.
320-320: LGTM - CreateCMintParams import path updated.
354-354: LGTM - SystemAccountInfos import path updated.
382-382: LGTM - CreateCMintCpi import paths updated consistently across all invoke examples.Also applies to: 403-403, 426-426
462-467: LGTM - Full code example imports updated.The imports in the full code example have been updated to use
light_token_sdk::token.
456-458: Source code link updated to new test path.The link has been updated from
sdk-ctoken-testtosdk-light-token-testand points to a valid resource.light-token/cookbook/create-token-account.mdx (11)
10-12: LGTM - Snippet import references updated.The snippet imports have been renamed from
CToken*toToken*naming convention.
31-42: LGTM - CreateTokenAccount usage documented correctly.The instruction builder has been renamed from
CreateCTokenAccounttoCreateTokenAccount.
62-63: LGTM - Import paths updated.The imports have been updated to
light_token_sdk::tokenandlight_token_interface::state::Token.
108-113: LGTM - Token state deserialization and assertions updated.The state type has been renamed from
CTokentoToken, and the deserialization and assertions are consistent.
150-155: LGTM - Helper function paths updated.The
derive_cmint_compressed_addressandfind_cmint_addressfunctions are correctly referenced fromlight_token_sdk::token.
243-256: LGTM - CreateTokenAccountCpi usage updated in invoke example.The CPI struct has been renamed from
CreateCTokenAccountCpitoCreateTokenAccountCpi.
261-273: LGTM - CreateTokenAccountCpi usage updated in invoke_signed example.
290-290: LGTM - Full code example import updated.The import has been updated to
light_token_sdk::token::{CompressibleParamsCpi, CreateTokenAccountCpi}.
305-305: LGTM - Comment updated to reference token module.
332-339: LGTM - CreateTokenAccountCpi usages in full code example updated consistently.Also applies to: 377-383
284-286: LGTM - Source code link updated to sdk-light-token-test. The GitHub link is valid and points to the correct file in the repository.light-token/cookbook/create-ata.mdx (13)
10-17: LGTM - Snippet import references updated.The snippet imports have been renamed from
CToken*toToken*naming convention.
84-95: LGTM - CreateAssociatedTokenAccount documentation updated.The instruction builder has been renamed from
CreateAssociatedCTokenAccounttoCreateAssociatedTokenAccount.
116-120: LGTM - Import paths updated.The imports have been updated to
light_token_sdk::tokenwithderive_token_ataandCreateAssociatedTokenAccount.
151-151: LGTM - ATA derivation helper renamed.The helper function has been renamed from
derive_ctoken_atatoderive_token_ata.
154-160: LGTM - CreateAssociatedTokenAccount usage updated.
169-174: LGTM - Token state deserialization and assertions updated.The state type has been renamed from
CTokentoToken.
210-216: LGTM - Helper function paths updated in create_compressed_mint.
288-288: LGTM - TokenConfigureRent snippet reference updated.
299-299: LGTM - PDA derivation note updated to use light_token_program_id.
308-321: LGTM - CreateAssociatedTokenAccountCpi usage updated in both invoke examples.The CPI struct has been renamed from
CreateAssociatedCTokenAccountCpitoCreateAssociatedTokenAccountCpi.Also applies to: 327-341
345-345: LGTM - TokenCreateATAAccountsList snippet reference updated.
358-358: LGTM - Full code example import updated.The import has been updated to
light_token_sdk::token::{CompressibleParamsCpi, CreateAssociatedTokenAccountCpi}.
395-405: LGTM - CreateAssociatedTokenAccountCpi usages in full code example updated consistently.Also applies to: 443-453
light-token/cookbook/mint-to.mdx (4)
1-90: LGTM!The imports, documentation text, and code examples are correctly updated to reflect the new
light_token_sdk::tokenmodule path andMintTo/MintToParamstype names. The terminology is consistent throughout.
121-258: LGTM!The test function rename (
test_mint_to_token), variable renames (token_account,token_state), and SDK usage (MintToParams::new,MintTo::new,Token::deserialize) are all consistent with the new naming convention.
486-496: LGTM!The source link correctly points to the new path
sdk-tests/sdk-light-token-test/src/mint_to.rsand the full code example imports are properly updated.
107-114: The naming convention appears correct and intentional. The "C" prefix inCreateCMintandCreateCMintParamsconsistently represents "Compressed" throughout the SDK, as evidenced by the function naming pattern (e.g.,create_compressed_mint) and corresponding types (CreateCMintCpi,CMintSystemAccountsList). This abbreviation is used specifically for Compressed Mint operations, while general operations likeMintTo/MintToParamsandCreateTokenAccountdo not carry this prefix. The naming is consistent across all cookbook files.light-token/cookbook/close-token-account.mdx (4)
26-36: LGTM!The code example correctly demonstrates the renamed
CloseTokenAccountbuilder and the newLIGHT_TOKEN_PROGRAM_IDconstant.
53-56: LGTM!Import paths correctly updated to
light_token_sdk::tokenmodule, and the state type is properly renamed fromCTokentoToken.
64-130: LGTM!Test function and variable names are consistently updated (
test_close_token_account,token_state), and all SDK usage reflects the new naming (CreateTokenAccount,CloseTokenAccount,Token::deserialize).
291-374: LGTM!The full code example correctly uses
CloseTokenAccountCpithroughout both handler functions, and the source link is updated to the new path.light-token/cookbook/transfer-interface.mdx (6)
124-130: LGTM!The import block correctly uses the new module path
light_token_sdk::tokenand renamed types (Transfer,TransferFromSpl,derive_token_ata,CreateAssociatedTokenAccount).
281-293: LGTM!The
TransferFromSplstruct usage correctly includes the renamed fielddestination_token_account(fromdestination_ctoken_account).
311-319: LGTM!The
Transferstruct is correctly used for light-token to light-token transfers.
361-371: LGTM!The CPI import path is correctly updated to
light_token_sdk::token::TransferInterfaceCpi.
434-443: LGTM!Source link correctly points to the new path
sdk-tests/sdk-light-token-test/src/transfer_interface.rsand imports are properly updated.
451-520: LGTM!The comments in the full code example are properly updated to reflect "Token" terminology instead of "CToken" (e.g., "Token -> Token transfer", "SPL or Token" account descriptions).
light-token/welcome.mdx (2)
81-81: LGTM!Component usage correctly updated to
<IntegrateLightTokenGuidesTable />.
12-17: LGTM!Component imports correctly updated to use the new naming convention (
LightTokenVsSplCalculator,IntegrateLightTokenGuidesTable). All imported files exist at the specified paths.light-token/toolkits/for-dexs.mdx (5)
81-88: LGTM!The Rust SDK dependency and imports are correctly updated to use
light-token-sdkand the new CPI types (TransferFromSplCpi,TransferToSplCpi).
109-125: LGTM!Variable name correctly updated from
ctokenAtatotokenAta, and the comment properly describes it as "user's light-token ATA".
174-195: LGTM!The Rust CPI example correctly uses
TransferToSplCpiwith the renamed fieldsource_token_account(fromsource_ctoken_account).
293-315: LGTM!The
TransferFromSplCpiusage correctly includes the renamed fielddestination_token_account.
338-350: LGTM!Variable names in the atomic swap example are correctly updated (
userInputToken,userOutputToken) with consistent naming throughout.light-token/interface-methods.mdx (6)
60-64: LGTM!The table updates correctly reflect the light-token terminology change with appropriate descriptions.
83-84: LGTM!The
TokenAccountSourceTypevalues are properly renamed fromctoken-hot/ctoken-coldtotoken-hot/token-cold.
322-362: LGTM!The
TransferSplToTokenCpisection is correctly renamed with updated:
- Section heading and description
- Field names (
destination_token_account)- Module import path (
light_token_sdk::token::TransferSplToTokenCpi)- Code example variable names
366-406: LGTM!The
TransferTokenToSplCpisection is properly updated with consistent field naming (source_token_account) and module paths.
410-412: LGTM!The
CreateAssociatedTokenAccountCpisection heading and description correctly use light-token terminology.
453-486: LGTM!The error type is correctly renamed from
CTokenSdkErrortoTokenSdkError, maintaining all error codes and descriptions.snippets/code-snippets/light-token/load-ata/action.mdx (1)
35-36: LGTM!The variable rename from
ctokenAtatolightTokenAtais consistent with the PR's terminology update, and the usage inloadAtais correctly updated.snippets/code-snippets/light-token/wrap/action.mdx (1)
45-48: LGTM!The variable rename to
lightTokenAtais consistent, and thewrapfunction call correctly uses the renamed variable as the destination.snippets/code-snippets/light-token/wrap/instruction.mdx (1)
44-56: LGTM!The variable rename to
lightTokenAtais applied consistently in both the declaration and usage withincreateWrapInstruction.snippets/code-snippets/light-token/unwrap/instruction.mdx (2)
36-37: LGTM!The variable is correctly renamed and used in the
loadAtacall to load compressed tokens to the hot balance.
53-54: LGTM!The
createUnwrapInstructioncorrectly useslightTokenAtaas the source account for the unwrap operation.snippets/code-snippets/light-token/load-ata/instruction.mdx (1)
36-36: LGTM!The variable rename from
ctokenAtatolightTokenAtais applied consistently at both the declaration and usage sites, aligning with the PR's terminology update from "ctoken" to "light-token".Also applies to: 41-41
✏️ Tip: You can disable this entire section by setting
review_detailstofalsein your review settings.
771f91a to
0a14b0e
Compare
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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
light-token/toolkits/for-dexs.mdx (1)
432-445: Inconsistent terminology in ASCII diagram.The diagram still uses "c-token ATA" at lines 437 and 443, while the rest of the file and PR consistently uses "light-token" terminology. Update these references for consistency.
📝 Suggested fix
DEX with light-token Support┌─────────────────────────────────────────────────────────────┐
│ │
│ DEPOSIT: │
-│ User c-token ATA ──unwrap()──► Pool SPL ATA │
+│ User light-token ATA ──unwrap()──► Pool SPL ATA │
│ │
│ SWAP: │
│ unwrap() ──► [swap instruction] ──► wrap() │
│ │
│ WITHDRAWAL: │
-│ Pool SPL ATA ──wrap()──► User c-token ATA │
+│ Pool SPL ATA ──wrap()──► User light-token ATA │
│ │
└─────────────────────────────────────────────────────────────┘light-token/cookbook/create-token-account.mdx (1)
92-93: Minor inconsistency in comment.Line 92 comment still uses "cToken" terminology. Consider updating to "light-token" or "Token" for consistency.
📝 Suggested fix
- // Step 2: Generate new keypair for the cToken account + // Step 2: Generate new keypair for the light-token account let account = Keypair::new();light-token/interface-methods.mdx (1)
92-101: Inconsistent terminology in createMintInterface section.Lines 92 and 98-99 still use "c-token" terminology while the rest of the file uses "light-token". Update for consistency.
📝 Suggested fix
-Create and initialize a new mint for SPL, Token-2022, or c-token. +Create and initialize a new mint for SPL, Token-2022, or light-token. ```typescript const { mint, transactionSignature } = await createMintInterface( rpc, payer, - mintAuthority, // Signer for c-token mints + mintAuthority, // Signer for light-token mints freezeAuthority, // or null 9 // decimals );
🤖 Fix all issues with AI agents
In `@light-token/cookbook/create-ata.mdx`:
- Around line 352-354: The markdown link labeled "here" in create-ata.mdx points
to a non-existent file create_ata2.rs; open the file create-ata.mdx, locate the
anchor text "here" (the Find the source code link) and either update its href to
the correct repository path for the intended source (replace
sdk-tests/sdk-light-token-test/src/create_ata2.rs with the actual file path/name
in the repo) or remove the sentence/link if that source no longer exists,
ensuring the visible text and URL are consistent.
In `@light-token/cookbook/transfer-interface.mdx`:
- Line 438: The link to transfer_interface.rs in transfer-interface.mdx is
broken because the path sdk-tests/sdk-light-token-test/src/transfer_interface.rs
does not exist; locate the correct file in the Lightprotocol repository (search
for transfer_interface.rs or equivalent under sdk-tests, sdk-light-token-test,
or sdk-light-token directories), then update the URL in the markdown to the
repository's correct relative path or raw GitHub URL pointing to that file
(replace the current
https://github.com/.../sdk-tests/sdk-light-token-test/src/transfer_interface.rs
with the actual path to transfer_interface.rs or the correct file name) so the
link resolves.
♻️ Duplicate comments (1)
snippets/setup/rust-install-dependencies.mdx (1)
5-5: Cratelight-token-typesversion "0.1" may not exist on crates.io.This was flagged in a previous review. The dependency rename aligns with PR objectives, but please verify the crate has been published to crates.io before merging to avoid build failures.
#!/bin/bash # Verify the crate exists on crates.io curl -s "https://crates.io/api/v1/crates/light-token-types" | jq '.crate.name, .crate.max_version, .errors'
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
cspell.jsonlearn/light-token-standard.mdxlight-token/cookbook/close-token-account.mdxlight-token/cookbook/create-ata.mdxlight-token/cookbook/create-mint.mdxlight-token/cookbook/create-token-account.mdxlight-token/cookbook/mint-to.mdxlight-token/cookbook/transfer-interface.mdxlight-token/interface-methods.mdxlight-token/toolkits/for-dexs.mdxlight-token/toolkits/for-launchpads.mdxlight-token/toolkits/for-payments.mdxlight-token/toolkits/for-streaming-mints.mdxlight-token/toolkits/for-streaming-tokens.mdxlight-token/toolkits/for-trading-apps.mdxlight-token/toolkits/for-wallets.mdxlight-token/welcome.mdxscripts/sync-docs.shsnippets/accounts-list/light-token-create-ata-accounts-list.mdxsnippets/code-snippets/compressed-token/create-mint/instruction.mdxsnippets/code-snippets/light-token/load-ata/action.mdxsnippets/code-snippets/light-token/load-ata/instruction.mdxsnippets/code-snippets/light-token/unwrap/instruction.mdxsnippets/code-snippets/light-token/wrap/action.mdxsnippets/code-snippets/light-token/wrap/instruction.mdxsnippets/jsx/light-token-vs-spl-calculator.jsxsnippets/jsx/token22-extensions-table.jsxsnippets/light-token-configure-rent.mdxsnippets/light-token-guides/client-custom-rent-config.mdxsnippets/setup/rust-install-dependencies.mdx
🚧 Files skipped from review as they are similar to previous changes (13)
- light-token/welcome.mdx
- snippets/accounts-list/light-token-create-ata-accounts-list.mdx
- snippets/code-snippets/light-token/load-ata/instruction.mdx
- light-token/toolkits/for-streaming-tokens.mdx
- light-token/toolkits/for-launchpads.mdx
- snippets/code-snippets/light-token/load-ata/action.mdx
- cspell.json
- light-token/cookbook/close-token-account.mdx
- scripts/sync-docs.sh
- snippets/jsx/light-token-vs-spl-calculator.jsx
- light-token/toolkits/for-payments.mdx
- light-token/toolkits/for-trading-apps.mdx
- light-token/toolkits/for-wallets.mdx
🔇 Additional comments (34)
snippets/code-snippets/compressed-token/create-mint/instruction.mdx (1)
14-14: LGTM!The rename from
CTOKEN_PROGRAM_IDtoLIGHT_TOKEN_PROGRAM_IDis consistent between the import and usage. The PDA derivation logic remains correct.Also applies to: 25-25
snippets/light-token-configure-rent.mdx (1)
2-2: LGTM!The import path update from
light_compressed_token_sdk::ctokentolight_token_sdk::tokenis consistent with the SDK rename. TheCompressibleParamsInfosstruct usage remains unchanged.snippets/jsx/token22-extensions-table.jsx (1)
21-21: LGTM!The rename from
CTokenTransfertoTokenTransferis consistently applied across thepinocchioInstructionsarray and all filter conditions for extensions with runtime constraints.Also applies to: 63-63, 70-70, 77-77, 84-84, 91-91, 98-98, 105-105, 112-112, 119-119
light-token/toolkits/for-streaming-mints.mdx (2)
27-27: LGTM!The dependency, import paths, and constant renames are consistent with the light-token migration. The
light-token-interfacecrate is correctly referenced in both Cargo.toml and the Rust imports.Also applies to: 36-37, 41-41
134-135: LGTM!The previous issue with the undefined variable has been properly addressed. The code now decodes
LIGHT_TOKEN_PROGRAM_IDinto a locallight_token_program_idvariable before comparison, which is the correct approach for comparing against theownerbytes.snippets/light-token-guides/client-custom-rent-config.mdx (3)
11-17: LGTM!The import path updates and type renames are consistent with the SDK migration:
light_ctoken_sdk::ctoken→light_token_sdk::tokenCreateCTokenAccount→CreateTokenAccount- PDA helpers renamed to
light_token_v1_*prefix
20-21: LGTM!The PDA helper function calls and
CreateTokenAccount::newinvocation are correctly updated to use the new naming convention.Also applies to: 28-28
56-58: LGTM!The tooltip and description text is correctly updated to "Light Token program PDA", maintaining consistency with the new terminology.
light-token/cookbook/transfer-interface.mdx (3)
12-14: LGTM!Import renames are consistent with the light-token terminology migration. The component names clearly indicate their purpose.
124-130: LGTM!Rust imports correctly reference the new
light_token_sdk::tokenmodule with renamed types:Transfer(wasTransferToken) andTransferFromSpl(wasTransferSplToToken).
361-370: LGTM!The
TransferInterfaceCpiimport and usage are correctly updated to the new module path.light-token/toolkits/for-dexs.mdx (3)
81-88: LGTM!Rust SDK imports and CPI type names are correctly updated to the new
light_token_sdk::tokenmodule withTransferFromSplCpiandTransferToSplCpi.
338-350: LGTM!Variable names (
userInputToken,userOutputToken) and comments are consistently updated to reflect the light-token terminology.
174-191: LGTM!The
TransferToSplCpistruct usage withsource_token_accountfield is correctly updated.light-token/cookbook/create-token-account.mdx (4)
10-12: LGTM!Import component names are correctly updated to the Token variants (
TokenCreateAccountsList,TokenConfigureRent,TokenClientPrerequisites).
62-63: LGTM!Rust imports correctly reference the new
light_token_sdk::tokenmodule andlight_token_interface::state::Tokentype.
108-112: LGTM!Token state deserialization and field assertions are correctly updated to use the renamed
Tokentype.
285-285: Link is valid and accessible.The GitHub URL returns HTTP 200, confirming the file exists at the referenced location.
light-token/cookbook/create-ata.mdx (3)
10-17: LGTM!Import component names are correctly updated to the Token variants.
116-120: LGTM!Rust imports correctly reference the new
light_token_sdk::tokenmodule withderive_token_ata,CreateAssociatedTokenAccount, andlight_token_interface::state::Token.
308-320: LGTM!
CreateAssociatedTokenAccountCpiusage is correctly updated with proper field names.light-token/interface-methods.mdx (6)
60-64: LGTM!Table descriptions correctly updated to use "light-token" terminology for programId, merkleContext, and mintContext fields.
83-84: LGTM!
TokenAccountSourceTypevalues correctly updated totoken-hotandtoken-cold.
322-362: LGTM!
TransferSplToTokenCpisection correctly documents the renamed struct withdestination_token_accountfield and updated import path.
366-406: LGTM!
TransferTokenToSplCpisection correctly documents the renamed struct withsource_token_accountfield and updated code example.
410-430: LGTM!
CreateAssociatedTokenAccountCpisection correctly renamed fromCreateAssociatedCTokenAccountCPI.
453-486: LGTM!Error type correctly renamed from
CTokenSdkErrortoTokenSdkError.light-token/cookbook/mint-to.mdx (1)
1-491: LGTM! Comprehensive rename from ctoken to light-token terminology.The file consistently updates:
- Import paths (
light_token_sdk::token,light_token_interface)- Type names (
MintTo,MintToParams,MintToCpi,Token,CreateTokenAccount)- Variable names (
token_account,token_accounts,token_state)- Test function name (
test_mint_to_token)- Source code link to
sdk-light-token-testNote: The
CMintnaming (e.g.,CreateCMint,derive_cmint_compressed_address) is correctly preserved as it refers to "Compressed Mint" rather than "CToken".light-token/cookbook/create-mint.mdx (1)
1-737: LGTM! Consistent rename to light-token terminology.The file properly updates:
- Import paths to
light_token_sdk::tokenandlight_token_interface- Program ID reference to
LIGHT_TOKEN_PROGRAM_ID(line 35)- Prerequisite imports (
TokenClientPrerequisites,TokenTsClientPrerequisites)- Source code link to
sdk-light-token-test(line 457)The
CreateCMint*naming is correctly preserved as it refers to "Compressed Mint" operations.learn/light-token-standard.mdx (2)
211-212: LGTM! Token struct name correctly updated.The rename from
CTokentoTokenand the corresponding comment update align with the PR objectives for consistent light-token terminology.
227-230: Source code links updated to main branch.The links now point to the
mainbranch instead of a specific commit hash. This is more maintainable but means the links may show different code as the repository evolves. This trade-off is acceptable for documentation.snippets/code-snippets/light-token/wrap/action.mdx (1)
45-48: LGTM! Variable rename aligns with light-token terminology.The rename from
ctokenAtatolightTokenAtaimproves consistency with the broader naming convention changes in this PR.snippets/code-snippets/light-token/wrap/instruction.mdx (1)
44-44: LGTM!The variable rename from
ctokenAtatolightTokenAtais consistent and aligns with the SDK rename. The declaration on line 44 and its usage on line 56 are both updated correctly.Also applies to: 56-56
snippets/code-snippets/light-token/unwrap/instruction.mdx (1)
36-37: LGTM!The variable rename from
ctokenAtatolightTokenAtais applied consistently across all three usages: declaration (line 36),loadAtacall (line 37), andcreateUnwrapInstructioncall (line 54). This aligns with the naming in the wrap instruction snippet.Also applies to: 54-54
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
32a3d3a to
1736a0d
Compare
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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
light-token/cookbook/create-token-account.mdx (1)
92-93: Stale comment references old naming.The comment at line 92 still mentions "cToken account" but should be updated to match the new terminology (e.g., "Token account" or "light-token account").
📝 Suggested fix
- // Step 2: Generate new keypair for the cToken account + // Step 2: Generate new keypair for the token account
🤖 Fix all issues with AI agents
In `@light-token/cookbook/create-ata.mdx`:
- Around line 351-354: Update the markdown link inside the Info block in
create-ata.mdx: replace the incorrect filename create_ata2.rs with create_ata.rs
so the URL becomes
https://github.com/Lightprotocol/light-protocol/blob/main/sdk-tests/sdk-light-token-test/src/create_ata.rs;
ensure only the filename part of the link is changed and the rest of the URL and
surrounding Info block remain unchanged.
In `@light-token/cookbook/mint-to.mdx`:
- Around line 488-491: The link in mint-to.mdx points to a non-existent file
(sdk-tests/sdk-light-token-test/src/mint_to.rs) causing a 404; locate the
correct source file in the light-protocol repo (search for mint_to.rs or the
mint_to test under sdk-tests or sdk-light-token-test) and update the markdown
link in the Info block to the accurate path/branch or to the appropriate file in
the sdk-light-token-test crate (reference the mint-to.mdx file and the
mint_to.rs test name to find and replace the broken URL).
In `@snippets/jsx/light-token-vs-spl-calculator.jsx`:
- Around line 1-3: Remove the extra blank line after the import statement to
satisfy Prettier; specifically edit the module containing the import "import {
useState } from 'react';" (in light-token-vs-spl-calculator.jsx) and ensure
there is no trailing empty line immediately following that import so the file is
formatted without the extra blank line flagged by CI.
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
cspell.jsonlearn/light-token-standard.mdxlight-token/cookbook/close-token-account.mdxlight-token/cookbook/create-ata.mdxlight-token/cookbook/create-mint.mdxlight-token/cookbook/create-token-account.mdxlight-token/cookbook/mint-to.mdxlight-token/cookbook/transfer-interface.mdxlight-token/interface-methods.mdxlight-token/toolkits/for-dexs.mdxlight-token/toolkits/for-launchpads.mdxlight-token/toolkits/for-payments.mdxlight-token/toolkits/for-streaming-mints.mdxlight-token/toolkits/for-streaming-tokens.mdxlight-token/toolkits/for-trading-apps.mdxlight-token/toolkits/for-wallets.mdxlight-token/welcome.mdxscripts/sync-docs.shsnippets/accounts-list/light-token-create-ata-accounts-list.mdxsnippets/code-snippets/compressed-token/create-mint/instruction.mdxsnippets/code-snippets/light-token/load-ata/action.mdxsnippets/code-snippets/light-token/load-ata/instruction.mdxsnippets/code-snippets/light-token/unwrap/instruction.mdxsnippets/code-snippets/light-token/wrap/action.mdxsnippets/code-snippets/light-token/wrap/instruction.mdxsnippets/jsx/light-token-vs-spl-calculator.jsxsnippets/jsx/token22-extensions-table.jsxsnippets/light-token-configure-rent.mdxsnippets/light-token-guides/client-custom-rent-config.mdxsnippets/setup/rust-install-dependencies.mdx
💤 Files with no reviewable changes (4)
- light-token/toolkits/for-launchpads.mdx
- light-token/toolkits/for-trading-apps.mdx
- light-token/toolkits/for-dexs.mdx
- light-token/interface-methods.mdx
🚧 Files skipped from review as they are similar to previous changes (9)
- snippets/code-snippets/light-token/wrap/instruction.mdx
- learn/light-token-standard.mdx
- snippets/jsx/token22-extensions-table.jsx
- light-token/toolkits/for-streaming-tokens.mdx
- snippets/code-snippets/light-token/unwrap/instruction.mdx
- snippets/code-snippets/light-token/load-ata/instruction.mdx
- snippets/setup/rust-install-dependencies.mdx
- light-token/cookbook/transfer-interface.mdx
- snippets/code-snippets/light-token/wrap/action.mdx
🧰 Additional context used
🧬 Code graph analysis (1)
snippets/jsx/light-token-vs-spl-calculator.jsx (3)
snippets/jsx/token-account-compressed-vs-spl.jsx (5)
ACCOUNT_STORAGE_OVERHEAD(5-5)LAMPORTS_PER_BYTE(6-6)DATA_LEN(7-7)LAMPORTS_PER_SOL(9-9)formatSOL(23-31)snippets/jsx/solana-rent-calculator.jsx (2)
ACCOUNT_STORAGE_OVERHEAD(4-4)LAMPORTS_PER_BYTE(5-5)snippets/jsx/compressible-rent-calculator.jsx (2)
DATA_LEN(8-8)LAMPORTS_PER_SOL(13-13)
🪛 GitHub Actions: CI
snippets/jsx/light-token-vs-spl-calculator.jsx
[warning] 1-1: Code style issues found by Prettier. Run 'prettier --write' to fix.
🔇 Additional comments (40)
snippets/code-snippets/light-token/load-ata/action.mdx (1)
35-36: LGTM!The variable rename from
ctokenAtatolightTokenAtais consistent with the PR's broader renaming effort and accurately reflects the Light Token terminology. Both declaration and usage are updated correctly.snippets/light-token-configure-rent.mdx (1)
1-9: LGTM!The import path update from
light_compressed_token_sdk::ctokentolight_token_sdk::tokencorrectly reflects the SDK rename. The documentation table content (lines 36, 42) already uses "light token program" terminology, maintaining consistency throughout the file.snippets/code-snippets/compressed-token/create-mint/instruction.mdx (1)
14-14: LGTM!The constant rename from
CTOKEN_PROGRAM_IDtoLIGHT_TOKEN_PROGRAM_IDis applied consistently in both the import statement and its usage infindProgramAddressSync. This aligns with the SDK rename fromlight-ctoken-sdktolight-token-sdk.Also applies to: 25-25
light-token/toolkits/for-wallets.mdx (4)
106-116: LGTM!The import and usage of
LIGHT_TOKEN_PROGRAM_IDare correctly updated to match the SDK rename.
268-276: LGTM!Consistent rename of
LIGHT_TOKEN_PROGRAM_IDimport and usage in the idempotent ATA creation example.
400-432: LGTM!Variable rename from
ctokenAtatotokenAtais applied consistently across both the instruction and action helper examples, including the updated comment on line 429.
462-477: LGTM!The
tokenAtavariable rename is consistently applied throughout the unwrap instruction example. The flow correctly demonstrates unwrapping from a light-token ATA to an SPL ATA.light-token/toolkits/for-payments.mdx (5)
107-117: LGTM!The import and usage of
LIGHT_TOKEN_PROGRAM_IDare consistent and correctly applied to the instruction creation.
225-236: LGTM!Consistent with the Receive Payments section—rename correctly applied.
447-460: LGTM!Variable rename from
ctokenAtatotokenAtais consistent and correctly used in the wrap instruction.
476-479: LGTM!Comment and variable rename are consistent. The
wrapfunction call correctly uses the renamedtokenAtavariable.
509-531: LGTM!Variable rename is consistent across all usages within the unwrap instruction code block.
snippets/light-token-guides/client-custom-rent-config.mdx (3)
19-34: LGTM!The struct and PDA helper function usage correctly reflects the renamed imports. The
CreateTokenAccount::new()invocation with chained.instruction()call follows the expected builder pattern.
56-58: LGTM!The tooltip and description text correctly updated to reference "Light Token program PDA", maintaining consistency with the code changes above.
11-17: Code uses non-existent SDK module paths and imports.The imports reference
light_token_sdk::tokenandlight_token_types, but the actual light-protocol SDK useslight_ctoken_sdk(Rust:light_ctoken_sdk). The light-protocol repository has not renamed the cToken terminology to token as of January 2026, andlight_token_sdkdoes not exist as a crate. Update the imports to use the actual SDK module names (light_ctoken_sdk::ctoken,light_ctoken_types, etc.) or verify the SDK changes against the current light-protocol repository state.Likely an incorrect or invalid review comment.
snippets/accounts-list/light-token-create-ata-accounts-list.mdx (1)
43-43: LGTM!The derivation path correctly updated to use
light_token_program_id, consistent with the PR-wide rename fromCTOKEN_PROGRAM_IDtoLIGHT_TOKEN_PROGRAM_ID.cspell.json (1)
35-38: LGTM with a minor observation.The vocabulary entries correctly updated to
lighttoken/lighttokens. Note thatcmint/cmintsentries on lines 37-38 are retained—verify this is intentional if the "cmint" terminology is also being renamed to "light-mint" elsewhere in the codebase.snippets/jsx/light-token-vs-spl-calculator.jsx (1)
11-19: LGTM!The constant and variable renames (
LIGHT_TOKEN_DEFAULT_CREATION_COST,tokenCost) are consistent throughout, and the calculations correctly use the renamed values.light-token/welcome.mdx (1)
12-12: LGTM!The import and component usage renames are consistent with the PR-wide migration from
CTokentoLightTokenterminology.Also applies to: 17-17, 81-81
scripts/sync-docs.sh (1)
17-25: LGTM!The FILE_MAP and SOURCE_DIR are correctly configured. All five target documentation files exist in
light-token/cookbook/:
- ✓ create-mint.mdx
- ✓ create-token-account.mdx
- ✓ create-ata.mdx
- ✓ close-token-account.mdx
- ✓ transfer-interface.mdx
The script will sync from the external light-protocol repository's
sdk-tests/sdk-light-token-test/srcdirectory to the documentation targets as intended.light-token/toolkits/for-streaming-mints.mdx (2)
134-135: Previous issue addressed correctly.The variable name mismatch has been fixed by properly decoding the constant into a local variable for comparison. The
bs58::decodeapproach correctly converts the base58-encoded program ID string to bytes for comparison withowner.
27-42: Dependency and import renames look correct.The changes from
light-ctoken-interfacetolight-token-interfaceandCTOKEN_PROGRAM_IDtoLIGHT_TOKEN_PROGRAM_IDare consistent with the PR objectives.light-token/cookbook/close-token-account.mdx (3)
53-56: Import renames are consistent.The imports have been correctly updated from
light_ctoken_sdk::ctokentolight_token_sdk::token, with types renamed appropriately (CloseTokenAccount,CreateTokenAccount,LIGHT_TOKEN_PROGRAM_ID).
105-107: State type rename is correct.The
CTokenstate type has been properly renamed toTokenand the deserialization usage is consistent.
294-296: Source code link is valid.The referenced file
sdk-tests/sdk-light-token-test/src/close.rsexists in the light-protocol repository and contains valid Rust source code for the close account handler implementation.light-token/cookbook/create-ata.mdx (2)
116-120: Import renames are consistent.The imports have been correctly updated from
light_ctoken_sdk::ctokentolight_token_sdk::token, with function and type renames (derive_token_ata,CreateAssociatedTokenAccount,Token).
286-302: Component and terminology updates are consistent.The component references (
<TokenConfigureRent />) and terminology in the note (light_token_program_id) are correctly updated to use the new naming convention.light-token/cookbook/mint-to.mdx (3)
107-114: Import renames are consistent and comprehensive.The imports have been correctly updated from
light_ctoken_sdk::ctokentolight_token_sdk::token, and all type renames (MintTo,MintToParams,CreateTokenAccount,Token) are properly applied.
144-158: Variable renames are consistent.The variable
token_account(previouslyctoken_account) and related references have been properly renamed throughout the test function.
505-538: Program Guide type and function renames are consistent.The instruction data struct (
MintToData), CPI builder (MintToCpi), and handler function (process_mint_to) have been properly renamed from their ctoken equivalents. Comments and documentation are updated accordingly.light-token/cookbook/create-mint.mdx (4)
116-119: Import renames are consistent.The imports have been correctly updated from
light_ctoken_sdk::ctokentolight_token_sdk::tokenand fromlight_ctoken_interfacetolight_token_interface. TheCreateCMintnaming is preserved as expected since "CMint" refers to "compressed mint" rather than "ctoken mint".
281-287: Interface import paths are correct.The
light_token_interfaceimports for extension types and state are properly updated from the previouslight_ctoken_interfacepaths.
462-467: Verify re-export consistency forExtensionInstructionData.The full code example imports
ExtensionInstructionDatafromlight_token_sdk::token(line 464), while the earlier Program Guide section imports it fromlight_token_interface::instructions::extensions(lines 281-284). Both may be valid if the SDK re-exports the interface type, but please verify this is intentional and that both import paths resolve to the same type.
455-458: The source code link at line 457 is correct and accessible.light-token/cookbook/create-token-account.mdx (6)
10-13: LGTM!Import paths and component names are consistently updated to follow the new
light-tokennaming convention.
33-43: LGTM!The SDK import and
CreateTokenAccountbuilder usage are correctly updated to reflect the new naming convention.
97-112: LGTM!The test code correctly uses the renamed
CreateTokenAccountbuilder andTokenstate type with consistent variable naming (token_state).
240-276: LGTM!Both
invokeandinvoke_signedCPI examples are consistently updated to useCreateTokenAccountCpifrom the newlight_token_sdk::tokenmodule.
288-391: LGTM!The full code example is thoroughly updated with consistent use of
CreateTokenAccountCpiand appropriate comment updates referencing the "token module".
283-286: Source code link is valid.The GitHub link pointing to
sdk-tests/sdk-light-token-test/src/create_token_account.rsis correct and resolves successfully.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| import { useState } from 'react'; | ||
|
|
||
|
|
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.
Address Prettier formatting issue flagged by CI.
The pipeline reports a formatting issue. The extra blank line at line 3 is likely the cause.
🧹 Suggested fix
import { useState } from 'react';
-
export const LightTokenVsSplCalculator = () => {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { useState } from 'react'; | |
| import { useState } from 'react'; | |
🧰 Tools
🪛 GitHub Actions: CI
[warning] 1-1: Code style issues found by Prettier. Run 'prettier --write' to fix.
🤖 Prompt for AI Agents
In `@snippets/jsx/light-token-vs-spl-calculator.jsx` around lines 1 - 3, Remove
the extra blank line after the import statement to satisfy Prettier;
specifically edit the module containing the import "import { useState } from
'react';" (in light-token-vs-spl-calculator.jsx) and ensure there is no trailing
empty line immediately following that import so the file is formatted without
the extra blank line flagged by CI.
Update docs to match SDK rename from light-protocol/light-protocol#2167: - light-ctoken-sdk → light-token-sdk - CToken → Token, MintToCToken → MintTo, etc. - CTOKEN_PROGRAM_ID → LIGHT_TOKEN_PROGRAM_ID - Variable names: ctokenAta → tokenAta - Update sync-docs.sh paths
1736a0d to
808790b
Compare
Update docs to match SDK rename from light-protocol/light-protocol#2167
Changes:
light-ctoken-sdk→light-token-sdkCToken→Token,MintToCToken→MintTo, etc.CTOKEN_PROGRAM_ID→LIGHT_TOKEN_PROGRAM_IDctokenAta→tokenAtasync-docs.shpathsSummary by CodeRabbit
Refactor
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.