Skip to content

chore: renaming in js#2316

Open
SwenSchaeferjohann wants to merge 15 commits intomainfrom
swen/renames
Open

chore: renaming in js#2316
SwenSchaeferjohann wants to merge 15 commits intomainfrom
swen/renames

Conversation

@SwenSchaeferjohann
Copy link
Contributor

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (83)
  • .github/workflows/js-v2.yml is excluded by none and included by none
  • js/compressed-token/CHANGELOG.md is excluded by none and included by none
  • js/compressed-token/package.json is excluded by none and included by none
  • js/compressed-token/src/constants.ts is excluded by none and included by none
  • js/compressed-token/src/index.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/create-associated-light-token.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/create-ata-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/decompress-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/decompress-mint.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/get-or-create-ata-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/index.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/load-ata.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/mint-to-compressed.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/mint-to-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/transfer-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/unwrap.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/update-metadata.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/update-mint.ts is excluded by none and included by none
  • js/compressed-token/src/v3/actions/wrap.ts is excluded by none and included by none
  • js/compressed-token/src/v3/assert-v2-only.ts is excluded by none and included by none
  • js/compressed-token/src/v3/ata-utils.ts is excluded by none and included by none
  • js/compressed-token/src/v3/derivation.ts is excluded by none and included by none
  • js/compressed-token/src/v3/errors.ts is excluded by none and included by none
  • js/compressed-token/src/v3/get-account-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/create-associated-light-token.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/create-ata-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/create-decompress-interface-instruction.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/create-load-accounts-params.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/create-mint.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/decompress-mint.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/freeze-thaw.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/index.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/load-ata.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/mint-to-compressed.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/mint-to-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/mint-to.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/transfer-interface.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/unwrap.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/update-metadata.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/update-mint.ts is excluded by none and included by none
  • js/compressed-token/src/v3/instructions/wrap.ts is excluded by none and included by none
  • js/compressed-token/src/v3/layout/index.ts is excluded by none and included by none
  • js/compressed-token/src/v3/layout/layout-mint-action.ts is excluded by none and included by none
  • js/compressed-token/src/v3/layout/layout-mint.ts is excluded by none and included by none
  • js/compressed-token/src/v3/layout/layout-transfer2.ts is excluded by none and included by none
  • js/compressed-token/src/v3/layout/serde.ts is excluded by none and included by none
  • js/compressed-token/src/v3/unified/index.ts is excluded by none and included by none
  • js/compressed-token/src/v3/utils/estimate-tx-size.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/compress.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/compressible-load.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/create-associated-light-token.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/create-ata-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/create-mint-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/decompress.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/decompress2.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/freeze-thaw-ctoken.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/get-account-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/get-mint-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/get-or-create-ata-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/load-ata-combined.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/load-ata-freeze.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/load-ata-spl-t22.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/load-ata-standard.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/load-ata-unified.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/mint-to-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/mint-to-light-token.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/mint-to.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/multi-cold-inputs-batching.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/multi-cold-inputs.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/payment-flows.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/transfer-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/unwrap.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/v3-interface-migration.test.ts is excluded by none and included by none
  • js/compressed-token/tests/e2e/wrap.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/decompress-interface-version.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/delegate-merge-semantics.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/estimate-tx-size.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/get-associated-token-address-interface.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/layout-mint-action.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/layout-serde.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/layout-transfer2.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/load-transfer-cu.test.ts is excluded by none and included by none
  • js/compressed-token/tests/unit/parse-account-fields.test.ts is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch swen/renames

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.

@SwenSchaeferjohann SwenSchaeferjohann marked this pull request as ready for review February 27, 2026 18:24
@ananas-block
Copy link
Contributor

[Warning] "c-token" in JSDoc of brand-new freeze-thaw.ts

File: src/v3/instructions/freeze-thaw.ts (lines 18, 25, 29-30, 51, 58, 62-63)

New file uses "c-token" 8 times in JSDoc despite being added on the rename branch. Should say "light-token".

@ananas-block
Copy link
Contributor

[Warning] CHANGELOG incomplete -- only documents decompressInterface removal

File: CHANGELOG.md

Does not document the many other breaking changes:

  • All CToken -> LightToken renames (createAssociatedCTokenAccountInstruction, CTokenConfig, parseCTokenHot, parseCTokenCold, mintToCToken, etc.)
  • Removed exports (createLoadAccountsParams, calculateCompressibleLoadComputeUnits, associated types)
  • New freeze/thaw instructions
  • Removed layout/serde module

Also uses "c-token" terminology in the new entry (line 6).

@ananas-block
Copy link
Contributor

[Warning] Test filename uses old naming: freeze-thaw-ctoken.test.ts

File: tests/e2e/freeze-thaw-ctoken.test.ts

Should be freeze-thaw-light-token.test.ts to match the rename effort.

@ananas-block
Copy link
Contributor

[Warning] Misleading test name: "partial freeze" tests full freeze

File: tests/e2e/freeze-thaw-ctoken.test.ts (lines 646-700)

Test named should throw "Insufficient" when requested amount exceeds unfrozen balance (partial freeze) actually freezes all 600 tokens (not partial). The "Insufficient" assertion is never reached because the frozen check fires first. Either implement the actual partial-freeze scenario or rename the test to match what it actually tests.

@ananas-block
Copy link
Contributor

[Warning] Unused addressTreeInfo in 10 test cases

File: tests/e2e/create-associated-light-token.test.ts (10 locations)

const addressTreeInfo = getDefaultAddressTreeInfo() is assigned but never referenced in every test case. Remove all 10 instances and the getDefaultAddressTreeInfo import.

@ananas-block
Copy link
Contributor

[Warning] Unused imports in mint-to-light-token.test.ts

File: tests/e2e/mint-to-light-token.test.ts

  • ComputeBudgetProgram (line 6) is imported but never used
  • findMintAddress (line 22) is imported but never used

@ananas-block
Copy link
Contributor

[Warning] Magic byte offsets in tests instead of structured deserialization

Files:

  • tests/e2e/freeze-thaw-ctoken.test.ts (lines 48-58)
  • tests/e2e/load-ata-freeze.test.ts (lines 64-80)
  • tests/e2e/decompress2.test.ts (~line 101)

Using info.data[108] and info.data.readBigUInt64LE(64) instead of structured deserialization. The helpers getLightTokenState and getLightTokenBalance are duplicated across two files. Should use parseLightTokenHot from get-account-interface instead, and extract to a shared test helper if raw parsing is needed.

@ananas-block
Copy link
Contributor

[Warning] Unified index missing freeze/thaw exports

File: src/v3/unified/index.ts

createLightTokenFreezeAccountInstruction and createLightTokenThawAccountInstruction are exported from top-level index.ts but missing from the unified index. This breaks the pattern where the unified index is a superset of available instructions.

@ananas-block
Copy link
Contributor

[Warning] Incomplete TLV extension parser

File: src/v3/instructions/create-decompress-interface-instruction.ts (lines 93-100)

parseCompressedOnlyFromTlv SIZES record only covers discriminants 29, 30, 31. Any other extension discriminant causes a silent null return. Consider logging a warning or throwing for unknown discriminants to make the failure mode explicit rather than silent.

const SIZES: Record<number, number | undefined> = {
    29: 8,
    30: 1,
    31: 17,
};
const size = SIZES[disc];
if (size === undefined) return null; // silently fails for unknown extensions

@ananas-block
Copy link
Contributor

[Nit] Redundant assertNotFrozen double-call

File: src/v3/instructions/load-ata.ts (line 189 and line 280)

assertNotFrozen is called once in createLoadAtaInstructions and again in _buildLoadBatches. The interface cannot become "more frozen" between the two calls. Remove one (preferably keep the one in _buildLoadBatches since it's also called from other paths).

@ananas-block
Copy link
Contributor

[Nit] Redundant spread property

File: src/v3/actions/transfer-interface.ts (~line 72)

owner: options?.owner after ...options spread is a no-op since owner is already included in the spread.

@ananas-block
Copy link
Contributor

[Nit] Duplicate imports from same module

File: tests/e2e/create-associated-light-token.test.ts (lines 17-18)

Two separate imports from ../../src/v3/derivation -- combine into one:

import { getAssociatedLightTokenAddress, findMintAddress } from '../../src/v3/derivation';

@ananas-block
Copy link
Contributor

[Nit] Unexplained 1-second sleep in test

File: tests/e2e/create-associated-light-token.test.ts (line 480)

Bare await new Promise(resolve => setTimeout(resolve, 1000)) without justification. Use proper transaction confirmation or remove.

@ananas-block
Copy link
Contributor

[Nit] Hardcoded program ID strings in tests

File: tests/e2e/create-associated-light-token.test.ts (lines 68, 316, 322, 530)

Uses literal 'cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m' instead of LIGHT_TOKEN_PROGRAM_ID.toBase58(). Using the constant protects against future program ID changes and is more self-documenting.

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.

2 participants