Skip to content

Commit 4f89e09

Browse files
committed
Migrate to Anchor 1.0, Rust LiteSVM tests with solana-kite 0.3.0
Replaces all TypeScript Anchor tests with Rust LiteSVM tests powered by solana-kite (https://crates.io/crates/solana-kite). Kite consolidates repeated test boilerplate — account creation, token minting, PDA derivation, balance assertions — into reusable functions. The result: 46 Rust test files averaging just 148 lines each, replacing ~13,700 lines of TypeScript tests and 109 per-project config files (package.json, tsconfig, pnpm-lock.yaml). No more per-project npm dependencies for Anchor tests. ### Anchor 1.0.0 (stable) - Migrate all 49 Anchor programs from 0.32.1 → 1.0.0 (stable, released 2026-04-02) - @coral-xyz/anchor → @anchor-lang/core in TypeScript - CpiContext::new() .to_account_info() → .key() in Rust - Transfer-hook: .map_err() wrappers for SPL 2.x→3.x ProgramError bridge - transfer-cost: upgraded SPL crates to Solana 3.x, Box<InterfaceAccount> for stack overflow - Compression: replaced mpl-bubblegum CPI with raw invoke() (no Solana 3.x release) ### Rust LiteSVM tests with solana-kite 0.3.0 - 46 Anchor programs now have Rust integration tests (~6,800 lines total) - solana-kite replaces hundreds of lines of duplicated setup code per test: create_funded_keypair, create_token_mint, mint_tokens_to_token_account, get_pda, get_token_balance — all one-liners instead of 20+ line helpers - Eliminates 109 per-project boilerplate files (package.json, tsconfig, pnpm-lock) - Net deletion: ~6,900 lines of TypeScript test code removed ### Repo cleanup - Configure biome, fix all lint errors - Remove yarn.lock (project uses pnpm) - Add pnpm/action-setup to CI workflows - Upgrade litesvm from 0.8.1 to 0.11.0 - Use 🤥 emoji for Pinocchio (lying face / growing nose) 691 files changed, +21,837 / -17,091
1 parent 85aa223 commit 4f89e09

691 files changed

Lines changed: 21837 additions & 17091 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/anchor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- main
99
- anchor-1.0
10+
- fix-biome-errors
1011
pull_request:
1112
types: [opened, synchronize, reopened]
1213
branches:

.github/workflows/rust.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
branches:
1111
- main
1212
- anchor-1.0
13+
- fix-biome-errors
1314
pull_request:
1415
types: [opened, synchronize, reopened]
1516
branches:

.github/workflows/solana-native.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches:
88
- main
9+
- fix-biome-errors
910
pull_request:
1011
types: [opened, synchronize, reopened]
1112
branches:
@@ -107,6 +108,7 @@ jobs:
107108
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
108109
steps:
109110
- uses: actions/checkout@v5
111+
- uses: pnpm/action-setup@v4
110112
- name: Use Node.js
111113
uses: actions/setup-node@v5
112114
with:
@@ -192,8 +194,7 @@ jobs:
192194
# Make the script executable
193195
chmod +x build_and_test.sh
194196
195-
# Install pnpm
196-
npm install --global pnpm
197+
# pnpm is already installed via pnpm/action-setup
197198
- name: Setup Solana Stable
198199
uses: heyAyushh/setup-solana@v5.9
199200
with:

.github/workflows/solana-pinocchio.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches:
88
- main
9+
- fix-biome-errors
910
pull_request:
1011
types: [opened, synchronize, reopened]
1112
branches:
@@ -107,6 +108,7 @@ jobs:
107108
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
108109
steps:
109110
- uses: actions/checkout@v5
111+
- uses: pnpm/action-setup@v4
110112
- name: Use Node.js
111113
uses: actions/setup-node@v5
112114
with:
@@ -192,8 +194,7 @@ jobs:
192194
# Make the script executable
193195
chmod +x build_and_test.sh
194196
195-
# Install pnpm
196-
npm install --global pnpm
197+
# pnpm is already installed via pnpm/action-setup
197198
- name: Setup Solana Stable
198199
uses: heyAyushh/setup-solana@v5.9
199200
with:

.github/workflows/typescript.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: TypeScript
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- fix-biome-errors
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
branches:
11+
- main
12+
13+
env:
14+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
15+
16+
jobs:
17+
biome:
18+
name: Biome check
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v5
22+
- uses: pnpm/action-setup@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: pnpm
27+
# --frozen-lockfile: fail if pnpm-lock.yaml is out of date
28+
# --ignore-workspace: only install root deps, not all 94 subprojects
29+
- run: pnpm install --frozen-lockfile --ignore-workspace
30+
- run: pnpm run check

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true
4+
}

0 commit comments

Comments
 (0)