Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6e7627e
fix rebase
ananas-block Dec 18, 2025
2557765
fix tests
ananas-block Dec 18, 2025
642a91e
test: add compression only cmint scenario
ananas-block Dec 18, 2025
81a6213
test: add compression only restricted spl mint scenario
ananas-block Dec 18, 2025
f02f496
fix decompress full test
ananas-block Dec 18, 2025
c4f1036
fix lint
ananas-block Dec 18, 2025
ed4b4ff
rebase cleanup and small fixes
ananas-block Dec 18, 2025
ee05c33
fix ci tests
ananas-block Dec 18, 2025
d518b09
cleanup
ananas-block Dec 18, 2025
6c82d88
fix: forester test
ananas-block Dec 19, 2025
7bf49ca
feat: sdk support approve, revoke, freeze, thaw
ananas-block Dec 19, 2025
7dd114f
stash freeze thaw!
ananas-block Dec 20, 2025
fb03f4c
fix: cmint decompress validations
ananas-block Dec 20, 2025
8ee1ef9
feat: add decompress cmint sdk and test
ananas-block Dec 20, 2025
4afc2bc
test: burn ctokens
ananas-block Dec 20, 2025
0313fc1
test: ctoken mint to
ananas-block Dec 20, 2025
4e5d9a6
feat: add freeze thaw program ownership check, test: spl mint freeze …
ananas-block Dec 20, 2025
c67fade
feat: transfer checked
ananas-block Dec 20, 2025
dc4bb53
test: transfer checked
ananas-block Dec 20, 2025
c164f8f
stash add decimals to compressible extension
ananas-block Dec 20, 2025
497b806
stash decimals in ctoken account implemented sdk ctoken tests green
ananas-block Dec 21, 2025
b890ba9
stash ctoken type refactor
ananas-block Dec 21, 2025
6953639
stash CompressedMint CompressionInfo refactor
ananas-block Dec 21, 2025
bf57562
adapted token program
ananas-block Dec 21, 2025
1f6b8a4
fix tests
ananas-block Dec 21, 2025
b534c24
fix integration tests
ananas-block Dec 21, 2025
4f96800
fix: failing tests
ananas-block Dec 22, 2025
f0e71dc
self review fixes and cleanup
ananas-block Dec 22, 2025
555bc0c
refactor: consolidate t22 extensions into light-ctoken-interface
ananas-block Dec 22, 2025
cdda3a4
cleanup
ananas-block Dec 22, 2025
33becb3
doc: create token pool, add token pool
ananas-block Dec 23, 2025
cf73caf
stash extension docs
ananas-block Dec 24, 2025
690a0b4
security: add separate derivation for restricted mint spl interace pdas
ananas-block Dec 24, 2025
cf9f441
feat: support restricted mints add token pool
ananas-block Dec 25, 2025
4f55464
test: approve, revoke, freeze, thaw
ananas-block Dec 25, 2025
187be31
stash pre extension test reorg
ananas-block Dec 26, 2025
fe4110c
refactor: split extensions.rs into compress_only directory
ananas-block Dec 26, 2025
9ee6443
stash
ananas-block Dec 28, 2025
3bc9aed
stash tests
ananas-block Dec 28, 2025
2aa93ee
fix feedback
ananas-block Dec 28, 2025
030db50
update docs
ananas-block Dec 28, 2025
66761e5
feat: add claim from cmint
ananas-block Dec 29, 2025
490b38b
revert ctoken interface
ananas-block Dec 29, 2025
572f68e
refactored program
ananas-block Dec 29, 2025
34769c5
fix compile errors
ananas-block Dec 29, 2025
746ae00
fix tests
ananas-block Dec 30, 2025
d968099
handle ata compress and close
ananas-block Dec 30, 2025
0632d68
simplify init account
ananas-block Dec 30, 2025
0be5ef1
cleanup
ananas-block Dec 30, 2025
31e6e64
feat: freeze compressed token accounts
ananas-block Dec 30, 2025
5baa692
fix: revert compressed token account type matching based on tree type
ananas-block Dec 30, 2025
e25c965
fix freeze tests
ananas-block Dec 30, 2025
786a559
chore: add freeze docs and tests
ananas-block Dec 30, 2025
7151c9c
chore: update pinocchio token program to throw error on is native
ananas-block Dec 30, 2025
a820496
add wrapped sol doc
ananas-block Dec 30, 2025
8075731
fix tests
ananas-block Dec 31, 2025
cdac8e8
chore: make js sdk compatible with breaking changes
ananas-block Jan 5, 2026
89dde48
fix forester and tests
ananas-block Jan 5, 2026
9d90f63
cleanup
ananas-block Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
54 changes: 54 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,57 @@ Format and clippy checks across the entire codebase.
- **`program-tests/`**: Integration tests requiring Solana runtime, depend on `light-test-utils`
- **`sdk-tests/`**: SDK-specific integration tests
- **Special case**: `zero-copy-derive-test` in `program-tests/` only to break cyclic dependencies

### Test Assertion Pattern

When testing account state, use borsh deserialization with a single `assert_eq` against an expected reference account:

```rust
use borsh::BorshDeserialize;
use light_ctoken_types::state::{
AccountState, CToken, ExtensionStruct, PausableAccountExtension,
PermanentDelegateAccountExtension,
};

// Deserialize the account
let ctoken = CToken::deserialize(&mut &account.data[..])
.expect("Failed to deserialize CToken account");

// Extract runtime-specific values from deserialized account
let compression_info = ctoken
.extensions
.as_ref()
.and_then(|exts| {
exts.iter().find_map(|e| match e {
ExtensionStruct::Compressible(info) => Some(info.clone()),
_ => None,
})
})
.expect("Should have Compressible extension");

// Build expected account for comparison
let expected_ctoken = CToken {
mint: mint_pubkey.to_bytes().into(),
owner: payer.pubkey().to_bytes().into(),
amount: 0,
delegate: None,
state: AccountState::Frozen,
is_native: None,
delegated_amount: 0,
close_authority: None,
extensions: Some(vec![
ExtensionStruct::Compressible(compression_info),
ExtensionStruct::PausableAccount(PausableAccountExtension),
ExtensionStruct::PermanentDelegateAccount(PermanentDelegateAccountExtension),
]),
};

// Single assert comparing full account state
assert_eq!(ctoken, expected_ctoken, "CToken account should match expected");
```

**Benefits:**
- Type-safe assertions using actual struct fields instead of magic byte offsets
- Maintainable - if account layout changes, deserialization handles it
- Readable - clear field names vs `account.data[108]`
- Single assertion point for the entire account state
Loading
Loading