Skip to content

Commit 8638f00

Browse files
committed
test(compression): scaffold cutils + cnft-vault for LiteSVM (build fix, fixtures, dev-deps, cargo-test script)
1 parent e5b7fd6 commit 8638f00

12 files changed

Lines changed: 74 additions & 4 deletions

File tree

compression/cnft-vault/anchor/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ cluster = "devnet"
1515
wallet = "~/.config/solana/id.json"
1616

1717
[scripts]
18-
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
18+
test = "cargo test"

compression/cnft-vault/anchor/programs/cnft-vault/Cargo.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,18 @@ anchor-lang = "1.0.0"
2525
# which is incompatible with Anchor 1.0's solana 3.x types. CPI calls are built manually
2626
# using raw invoke_signed() with hardcoded program IDs and discriminators.
2727
borsh = "1"
28-
ahash = "=0.8.7"
2928

3029
[lints.rust]
3130
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
31+
32+
[dev-dependencies]
33+
litesvm = "0.11.0"
34+
solana-instruction = "3.0.0"
35+
solana-keypair = "3.0.1"
36+
solana-pubkey = "3.0.0"
37+
solana-transaction = "3.0.0"
38+
solana-account = "3.0.0"
39+
solana-native-token = "3.0.0"
40+
solana-signer = "3.0.0"
41+
solana-message = "3.0.0"
42+
solana-keccak-hasher = "3.0.0"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Test fixtures — mainnet program binaries
2+
3+
These `.so` files are the compiled on-chain programs the cNFT-burn test CPIs
4+
into, dumped from Solana **mainnet-beta** so [LiteSVM](https://github.com/LiteSVM/litesvm)
5+
can load them locally (LiteSVM only bundles System/Token/Token-2022/ATA). They
6+
are the real programs — not modified — so accounts they create/verify behave
7+
exactly as on mainnet.
8+
9+
| File | Program | Program ID | Source | Dumped (UTC) | Slot |
10+
|------|---------|------------|--------|--------------|------|
11+
| `mpl_bubblegum.so` | Metaplex Bubblegum (cNFTs) | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | mainnet-beta | 2026-06-05 | 424532091 |
12+
| `spl_account_compression.so` | SPL Account Compression | `cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK` | mainnet-beta | 2026-06-05 | 424532091 |
13+
| `spl_noop.so` | SPL Noop (log wrapper) | `noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV` | mainnet-beta | 2026-06-05 | 424532091 |
14+
15+
## Refreshing
16+
17+
These are point-in-time snapshots. To re-dump (e.g. after an upstream program
18+
upgrade), update the date/slot above and run:
19+
20+
```bash
21+
solana program dump BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY mpl_bubblegum.so -u https://api.mainnet-beta.solana.com
22+
solana program dump cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK spl_account_compression.so -u https://api.mainnet-beta.solana.com
23+
solana program dump noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV spl_noop.so -u https://api.mainnet-beta.solana.com
24+
```
1.27 MB
Binary file not shown.
Binary file not shown.
40.1 KB
Binary file not shown.

compression/cutils/anchor/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ cluster = "devnet"
1515
wallet = "~/.config/solana/test.json"
1616

1717
[scripts]
18-
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
18+
test = "cargo test"

compression/cutils/anchor/programs/cutils/Cargo.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,18 @@ anchor-lang = "1.0.0"
2828
borsh = "1"
2929
sha2 = "0.10"
3030
sha3 = "0.10"
31-
ahash = "=0.8.7"
3231

3332
[lints.rust]
3433
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
34+
35+
[dev-dependencies]
36+
litesvm = "0.11.0"
37+
solana-instruction = "3.0.0"
38+
solana-keypair = "3.0.1"
39+
solana-pubkey = "3.0.0"
40+
solana-transaction = "3.0.0"
41+
solana-account = "3.0.0"
42+
solana-native-token = "3.0.0"
43+
solana-signer = "3.0.0"
44+
solana-message = "3.0.0"
45+
solana-keccak-hasher = "3.0.0"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Test fixtures — mainnet program binaries
2+
3+
These `.so` files are the compiled on-chain programs the cNFT-burn test CPIs
4+
into, dumped from Solana **mainnet-beta** so [LiteSVM](https://github.com/LiteSVM/litesvm)
5+
can load them locally (LiteSVM only bundles System/Token/Token-2022/ATA). They
6+
are the real programs — not modified — so accounts they create/verify behave
7+
exactly as on mainnet.
8+
9+
| File | Program | Program ID | Source | Dumped (UTC) | Slot |
10+
|------|---------|------------|--------|--------------|------|
11+
| `mpl_bubblegum.so` | Metaplex Bubblegum (cNFTs) | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | mainnet-beta | 2026-06-05 | 424532091 |
12+
| `spl_account_compression.so` | SPL Account Compression | `cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK` | mainnet-beta | 2026-06-05 | 424532091 |
13+
| `spl_noop.so` | SPL Noop (log wrapper) | `noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV` | mainnet-beta | 2026-06-05 | 424532091 |
14+
15+
## Refreshing
16+
17+
These are point-in-time snapshots. To re-dump (e.g. after an upstream program
18+
upgrade), update the date/slot above and run:
19+
20+
```bash
21+
solana program dump BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY mpl_bubblegum.so -u https://api.mainnet-beta.solana.com
22+
solana program dump cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK spl_account_compression.so -u https://api.mainnet-beta.solana.com
23+
solana program dump noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV spl_noop.so -u https://api.mainnet-beta.solana.com
24+
```
1.27 MB
Binary file not shown.

0 commit comments

Comments
 (0)