From 9207dafca0bc4b35475e8e83d80a133b25bb86a6 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 9 Apr 2026 22:07:17 +0000 Subject: [PATCH 1/5] Remove stale branch triggers and unused env var from CI workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove 'anchor-1.0' and 'fix-biome-errors' from push branch triggers — these branches are stale and CI should only trigger on 'main'. Remove FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 env var from all workflows. Despite the comments, this is not a real GitHub Actions feature and has no effect on which Node.js runtime actions use. --- .github/workflows/anchor.yml | 6 ------ .github/workflows/rust.yml | 8 -------- .github/workflows/solana-native.yml | 5 ----- .github/workflows/solana-pinocchio.yml | 5 ----- .github/workflows/typescript.yml | 4 ---- 5 files changed, 28 deletions(-) diff --git a/.github/workflows/anchor.yml b/.github/workflows/anchor.yml index 9b606c95d..cc57adbf3 100644 --- a/.github/workflows/anchor.yml +++ b/.github/workflows/anchor.yml @@ -6,8 +6,6 @@ on: push: branches: - main - - anchor-1.0 - - fix-biome-errors pull_request: types: [opened, synchronize, reopened] branches: @@ -17,10 +15,6 @@ env: MAX_JOBS: 64 MIN_PROJECTS_PER_JOB: 4 MIN_PROJECTS_FOR_MATRIX: 4 - # Force all JavaScript-based actions to use Node.js 24 runtime. - # Node.js 20 actions are deprecated and will stop working June 2026. - # This catches composite actions whose internal dependencies still reference @v4. - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: changes: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 479939a96..b8d7aea81 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,19 +9,11 @@ on: push: branches: - main - - anchor-1.0 - - fix-biome-errors pull_request: types: [opened, synchronize, reopened] branches: - main -env: - # Force all JavaScript-based actions to use Node.js 24 runtime. - # Node.js 20 actions are deprecated and will stop working June 2026. - # This catches composite actions whose internal dependencies still reference @v4. - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - # A workflow run is made up of one or more jobs, which run in parallel by default # Each job runs in a runner environment specified by runs-on jobs: diff --git a/.github/workflows/solana-native.yml b/.github/workflows/solana-native.yml index 8433af85f..7e820450b 100644 --- a/.github/workflows/solana-native.yml +++ b/.github/workflows/solana-native.yml @@ -6,7 +6,6 @@ on: push: branches: - main - - fix-biome-errors pull_request: types: [opened, synchronize, reopened] branches: @@ -16,10 +15,6 @@ env: MAX_JOBS: 64 MIN_PROJECTS_PER_JOB: 4 MIN_PROJECTS_FOR_MATRIX: 4 - # Force all JavaScript-based actions to use Node.js 24 runtime. - # Node.js 20 actions are deprecated and will stop working June 2026. - # This catches composite actions whose internal dependencies still reference @v4. - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: changes: diff --git a/.github/workflows/solana-pinocchio.yml b/.github/workflows/solana-pinocchio.yml index 2ec668298..fcaed4480 100644 --- a/.github/workflows/solana-pinocchio.yml +++ b/.github/workflows/solana-pinocchio.yml @@ -6,7 +6,6 @@ on: push: branches: - main - - fix-biome-errors pull_request: types: [opened, synchronize, reopened] branches: @@ -16,10 +15,6 @@ env: MAX_JOBS: 64 MIN_PROJECTS_PER_JOB: 4 MIN_PROJECTS_FOR_MATRIX: 4 - # Force all JavaScript-based actions to use Node.js 24 runtime. - # Node.js 20 actions are deprecated and will stop working June 2026. - # This catches composite actions whose internal dependencies still reference @v4. - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: changes: diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index b87e3d482..a22a19fcb 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -4,15 +4,11 @@ on: push: branches: - main - - fix-biome-errors pull_request: types: [opened, synchronize, reopened] branches: - main -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - jobs: biome: name: Biome check From 198f89b7ab87958290d9fc89a8fcf9e697f2bd64 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 9 Apr 2026 22:07:36 +0000 Subject: [PATCH 2/5] Use pnpm/action-setup in anchor workflow All other workflows already use pnpm/action-setup@v4 to install pnpm. The anchor workflow was the odd one out, using 'npm i -g pnpm' instead. Switch to the proper action for consistency and to get pnpm caching support. --- .github/workflows/anchor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/anchor.yml b/.github/workflows/anchor.yml index cc57adbf3..13e1c073f 100644 --- a/.github/workflows/anchor.yml +++ b/.github/workflows/anchor.yml @@ -104,18 +104,20 @@ jobs: failed_projects: ${{ steps.set-failed.outputs.failed_projects }} steps: - uses: actions/checkout@v5 + - uses: pnpm/action-setup@v4 + with: + version: 10 - uses: heyAyushh/setup-anchor@v4.999 with: anchor-version: 0.32.1 solana-cli-version: stable - - name: Display Versions and Install pnpm + - name: Display Versions run: | solana -V # it's okay to use --force in github action since all programs are tested in isolation solana-keygen new --no-bip39-passphrase --force rustc -V anchor -V - npm i -g pnpm - name: Build and Test env: TOTAL_PROJECTS: ${{ needs.changes.outputs.total_projects }} From 8597315a853f3008fa983a8d2c1b5752ce7fce13 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 9 Apr 2026 22:07:53 +0000 Subject: [PATCH 3/5] Run anchor build before pnpm install in anchor CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build step generates IDL files and TypeScript types that the test dependencies need. Running pnpm install first means those generated files aren't available during dependency resolution/linking. Reorder to: anchor build → pnpm install → anchor test --skip-build. Also pass --skip-build to anchor test since the program is already built, avoiding a redundant rebuild. --- .github/workflows/anchor.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/anchor.yml b/.github/workflows/anchor.yml index 13e1c073f..c9213863e 100644 --- a/.github/workflows/anchor.yml +++ b/.github/workflows/anchor.yml @@ -128,25 +128,26 @@ jobs: echo "Building and Testing $project" cd "$project" || return 1 - # Install dependencies first - if ! pnpm install --frozen-lockfile; then - echo "::error::pnpm install failed for $project" - echo "$project: pnpm install failed" >> $GITHUB_WORKSPACE/failed_projects.txt + # Build first — generates IDL and types that pnpm install/tests need + if ! anchor build; then + echo "::error::anchor build failed for $project" + echo "$project: anchor build failed" >> $GITHUB_WORKSPACE/failed_projects.txt + rm -rf target cd - > /dev/null return 1 fi - # Run anchor build - if ! anchor build; then - echo "::error::anchor build failed for $project" - echo "$project: anchor build failed" >> $GITHUB_WORKSPACE/failed_projects.txt + # Install dependencies (after build so generated types are available) + if ! pnpm install --frozen-lockfile; then + echo "::error::pnpm install failed for $project" + echo "$project: pnpm install failed" >> $GITHUB_WORKSPACE/failed_projects.txt rm -rf target cd - > /dev/null return 1 fi - # Run anchor test - if ! anchor test; then + # Run anchor test (--skip-build since we already built above) + if ! anchor test --skip-build; then echo "::error::anchor test failed for $project" echo "$project: anchor test failed" >> $GITHUB_WORKSPACE/failed_projects.txt rm -rf target node_modules From 36b01c9ae7e8ca367540c79032b6932d1fd6ed07 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 9 Apr 2026 22:08:05 +0000 Subject: [PATCH 4/5] Fix missing trailing newline in .ghaignore POSIX text files should end with a newline. The missing newline could cause issues with tools that concatenate or process the file line by line (e.g. the grep/tr pipeline in the CI workflows). --- .github/.ghaignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/.ghaignore b/.github/.ghaignore index bcff41972..b2da530d8 100644 --- a/.github/.ghaignore +++ b/.github/.ghaignore @@ -64,4 +64,4 @@ tokens/escrow/steel tokens/pda-mint-authority/steel tokens/spl-token-minter/steel tokens/token-swap/steel -tokens/transfer-tokens/steel \ No newline at end of file +tokens/transfer-tokens/steel From a075e9f774ca95e3332d43e04b9481626f120a13 Mon Sep 17 00:00:00 2001 From: mikemaccana-edwardbot Date: Fri, 10 Apr 2026 15:24:17 +0000 Subject: [PATCH 5/5] docs: replace collapsible sections with flat headings in README --- README.md | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index e19d4b286..41fb73459 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ This repo contains Solana onchain programs (referred to as 'Smart Contracts' in > ⚠️ This repository uses **pnpm** as the default package manager. > Ensure pnpm is installed before running any examples. - Each folder includes examples for one or more of the following: - `anchor` - Written using [Anchor](https://www.anchor-lang.com/), the most popular framework for Solana development, which uses Rust. @@ -27,14 +26,10 @@ Each folder includes examples for one or more of the following: Build and test commands are the same as native examples. Run `pnpm test` to execute tests. - **If a given example is missing, please send us a PR to add it!** Our aim is to have every example available in every option. We'd also love to see more programs involving staking, wrapped tokens, oracles, compression and VRF. Follow the [contributing guidelines](./CONTRIBUTING.md) to keep things consistent. ## The example programs - -
- Basics - +## Basics ### Hello world [Hello World on Solana! A minimal program that logs a greeting.](./basics/hello-solana/README.md) @@ -124,11 +119,7 @@ How to store state that changes size in Solana. [Send SOL between two accounts.](./basics/transfer-sol/README.md) [anchor](./basics/transfer-sol/anchor) [native](./basics/transfer-sol/native) [pinocchio](./basics/transfer-sol/pinocchio) - -
-
- Tokens - +## Tokens ### Creating tokens [Create a token on Solana with a token symbol and icon.](./tokens/create-token/README.md) @@ -170,13 +161,7 @@ Allow two users to swap digital assets with each other, each getting 100% of wha [Create liquidity pools to allow trading of new digital assets and allows users that provide liquidity to be rewarded by creating an Automated Market Maker.](./tokens/token-swap/README.md) [anchor](./tokens/token-swap/anchor) - -
- -
- - Token Extensions - +## Token Extensions ### Basics - create token mints, mint tokens, and transfer tokens with Token Extensions Create token mints, mint tokens, and transfer tokens using Token Extensions. @@ -254,12 +239,7 @@ Create tokens that remain under the control of an account, even when transferred Create tokens with an inbuilt transfer fee. [anchor](./tokens/token-2022/transfer-fee/anchor) [native](./tokens/token-2022/transfer-fee/native) - -
-
- -Compression - +## Compression ### Cnft-burn Burn compressed NFTs. @@ -277,19 +257,11 @@ Store Metaplex compressed NFTs inside a PDA. Work with Metaplex compressed NFTs. [anchor](./compression/cutils/anchor) - -
- -
- -Oracles - +## Oracles ### pyth Use a data source for offchain data (called an Oracle) to perform activities onchain. [anchor](./oracles/pyth/anchor) -
- ---