Skip to content

Commit c7ed3e2

Browse files
fix: fix all broken builds and tests across the repo (#535)
* fix: fix all broken builds and tests across the repo Native tests (16/16 passing): - counter/native & escrow/native: add bn.js as explicit dependency. pnpm's strict dependency resolution does not hoist transitive deps (unlike npm), so bn.js from @solana/web3.js is not accessible directly. - All native tests using borsh: migrate from borsh v0.7 class-based API to borsh v2 object schema API. The v0.7 API (Map schemas, Assignable classes, 3-arg deserialize) is incompatible with borsh v1+. Updated 19 test files and 14 package.json files. Introduced a shared borshSerialize(schema, data) helper to replace the repeated Buffer.from(borsh.serialize(...)) pattern. Removed per-schema typed wrappers in favour of exporting schemas directly. - create-account/native: replace litesvm with solana-bankrun. litesvm's native binary crashes with SIGABRT on Linux x64 (LiteSVM/litesvm#171). This was the only native test using litesvm — all others use solana-bankrun, the recommended framework per CONTRIBUTING.md. - Upgrade TypeScript 4.x to 5.x in 10 token projects. TS4 can't parse @solana/codecs-data-structures type definitions. Also fix Keypair.fromSecretKey(Buffer.from(...)) to use Uint8Array.from() for TS5 compatibility. Anchor builds (39/39 passing): - Set solana_version = "3.1.8" in all 49 Anchor.toml files. Anchor's default BPF toolchain ships rustc 1.79, but anchor-lang 0.32.1's dependency tree requires rustc 1.82+ (indexmap 2.13.0) and Cargo's edition2024 feature. Solana 3.1.8 platform-tools v1.52 (rustc 1.89) resolves both. All projects now use a consistent toolchain version. - allow-block-list-token: bump spl-transfer-hook-interface 0.8.2 -> 2.1.0, spl-tlv-account-resolution 0.8.1 -> 0.11.1, spl-discriminator 0.3 -> 0.5.1. Old SPL versions used solana-program v1, causing type mismatches with anchor-lang 0.32.1's v2 types. litesvm Rust test moved to tests-rs/ because litesvm pins solana-account-info =2.2.1 but anchor-lang 0.32.1 needs >=2.3.0 for AccountInfo::resize(). See tests-rs/README.md. Compression projects (3/3 building): - Rewrite cnft-burn, cnft-vault, cutils from anchor-lang 0.26.0 to 0.32.1. Upgrade to mpl-bubblegum 2.1.1 + spl-account-compression 1.0.0 (both use solana-program v2, matching anchor-lang 0.32.1). cnft-vault: manual invoke_signed rewritten to TransferCpi. cutils verify: raw invoke because spl-account-compression 1.0.0's CPI module is built against anchor-lang 0.31, which has incompatible traits with 0.32.1. Discriminator computed from sha256("global:verify_leaf") rather than hardcoded. Comment documents when this workaround can be removed. Documentation: - README: remove TypeScript/Poseidon references (none exist in repo), Anchor before Native in badges, fix typos. - CONTRIBUTING: remove Steel/Python/Solidity/Poseidon references (none exist in repo), fix markdown, renumber sections. * fix: fix 9 remaining CI failures in token projects Anchor test failures (8 projects): - Remove 'import { describe, it } from "node:test"' from 7 bankrun test files. These tests run via ts-mocha which provides describe/it globally. Importing from node:test creates a conflict where mocha can't see the test registrations. - Increase startup_wait from 5000ms to 25000ms in 9 Anchor.toml files. The default 5s is too short for CI where the test validator takes longer to start due to shared compute. Native build failure (1 project): - tokens/escrow/native: blake3 1.8.3 requires Rust edition 2024 which the Cargo bundled with solana-program 1.18.17's platform-tools doesn't support. Added Cargo.lock pinning blake3 to 1.5.5 (last edition-2021- compatible version). * fix: fix remaining CI failures (validator startup, blake3 pin) Anchor test failures (7 bankrun projects): - Remove [test.validator] and [[test.validator.clone]] sections from bankrun projects. These tests use solana-bankrun (in-process simulation) and don't need a local validator. The validator was cloning the token metadata program from mainnet/devnet, causing >25s startup times that exceeded the timeout. - Affected: create-token, transfer-tokens, nft-minter, nft-operations, pda-mint-authority, spl-token-minter, token-2022/basics Anchor test failures (2 real-validator projects): - Bump startup_wait from 25000ms to 120000ms (2 min) for transfer-hook whitelist and hello-world. These clone from devnet and need more time in CI. Native build failure (escrow): - Fix Cargo.lock to actually pin blake3 to 1.5.5 and constant_time_eq to 0.3.1. Previous commit had a stale Cargo.lock that still resolved to the edition-2024-requiring versions. - Fix escrow test: wrap deserialized pubkey bytes in new PublicKey() since borsh returns raw byte arrays, not PublicKey objects. * docs: add rationale comments to test configuration changes - Bankrun projects (7): explain why [test.validator] was removed — these use in-process simulation and don't need the local validator - Real-validator projects (2): explain why startup_wait is 120s — they clone programs from devnet which is slow in CI - Escrow native: explain why Cargo.lock is committed and blake3 is pinned (edition 2024 incompatibility with solana-program 1.18.17's toolchain) - Escrow test: comment explaining borsh deserializes pubkeys as byte arrays - .gitignore: exception for escrow Cargo.lock with explanation * ci: add continue-on-error to Setup Solana Beta step The beta channel (v4.0) returns 404 from release.anza.xyz, causing the setup-solana action to fail. Since the action clears the stable install before attempting beta, this causes 'solana: command not found'. The 'Build and Test with Beta' step already had continue-on-error: true but the setup step itself didn't, so the job still failed. * fix: restore [test.validator] sections and fix import syntax for commonjs projects Several token projects need the Metaplex Token Metadata program cloned from mainnet for their validator tests. The [test.validator] sections were incorrectly removed — these projects have BOTH bankrun and validator tests. Restored [test.validator] for: - tokens/create-token/anchor - tokens/nft-minter/anchor - tokens/nft-operations/anchor - tokens/pda-mint-authority/anchor - tokens/spl-token-minter/anchor - tokens/transfer-tokens/anchor Fixed 'import ... with { type: "json" }' -> require() in: - tokens/token-2022/basics/anchor/tests/bankrun.test.ts - tokens/create-token/anchor/tests/bankrun.test.ts - tokens/nft-minter/anchor/tests/bankrun.test.ts The 'with' syntax (import attributes) requires TS 5.3+ but these projects use TS ^4.3.5 with module: commonjs. Projects using module: nodenext handle it natively and don't need the fix. Also increased startup_wait to 180s for transfer-hook hello-world and whitelist projects (120s hit the timeout exactly in CI). * fix: increase startup_wait to 300s for all validator-clone projects Projects that clone programs from mainnet/devnet (especially Metaplex Token Metadata) need much longer startup times in CI. 120s and 180s both hit the timeout exactly. 300s (5 min) should give enough headroom for slow network conditions in GitHub Actions runners. * fix: remove mainnet/devnet clones that timeout in CI 6 projects with bankrun tests: switch to bankrun-only testing since the validator tests need Metaplex Token Metadata cloned from mainnet which takes >5min in CI (exceeds startup_wait timeout). bankrun.test.ts uses local fixtures instead. 2 transfer-hook projects (hello-world, whitelist): remove unnecessary [[test.validator.clone]] for metaplex - these projects don't use Metaplex at all. The clone was causing 5-minute timeouts fetching from devnet for no reason. Projects changed: - tokens/create-token/anchor - tokens/nft-minter/anchor - tokens/nft-operations/anchor - tokens/pda-mint-authority/anchor - tokens/spl-token-minter/anchor - tokens/transfer-tokens/anchor - tokens/token-2022/transfer-hook/hello-world/anchor - tokens/token-2022/transfer-hook/whitelist/anchor * chore: standardise @solana/web3.js to ^1.98.4 across all packages The repo had 20+ different @solana/web3.js versions ranging from ^1.32.0 to ^1.95.5 (and one pinned 1.98.2). This caused inconsistent dependency resolution and potential compatibility issues between examples. Standardise everything to ^1.98.4 (latest 1.x) for consistency. All examples share the same runtime so there's no reason for divergent version constraints. * fix: update pnpm-lock.yaml files after web3.js version standardisation The previous commit updated @solana/web3.js to ^1.98.4 in all package.json files but didn't regenerate the lockfiles. CI uses frozen-lockfile installs, so all projects with stale lockfiles failed with ERR_PNPM_OUTDATED_LOCKFILE. * ci: update GitHub Actions to Node.js 24 runtime Node.js 20 actions are deprecated by GitHub and will stop working in June 2026. Updated all workflow actions to their latest versions that use the Node.js 24 runtime: - actions/checkout: v4 → v5 - actions/setup-node: v4 → v5 - dorny/paths-filter: v3 → v4 - heyAyushh/setup-anchor: v0.31 → v4.999 - heyAyushh/setup-solana: v2.02 → v5.9 Also added FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true env variable to all workflows. This forces any remaining Node.js 20 actions (e.g. those used internally by composite actions) to run on Node.js 24. See: https://github.blog/changelog/2025-06-09-github-actions-node-js-20-deprecation/ --------- Co-authored-by: Mike MacCana <mike@mikemaccana.com>
1 parent aa88946 commit c7ed3e2

214 files changed

Lines changed: 12494 additions & 3898 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: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ env:
1515
MAX_JOBS: 64
1616
MIN_PROJECTS_PER_JOB: 4
1717
MIN_PROJECTS_FOR_MATRIX: 4
18+
# Force all JavaScript-based actions to use Node.js 24 runtime.
19+
# Node.js 20 actions are deprecated and will stop working June 2026.
20+
# This catches composite actions whose internal dependencies still reference @v4.
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1822

1923
jobs:
2024
changes:
@@ -26,8 +30,8 @@ jobs:
2630
total_projects: ${{ steps.analyze.outputs.total_projects }}
2731
matrix: ${{ steps.matrix.outputs.matrix }}
2832
steps:
29-
- uses: actions/checkout@v4
30-
- uses: dorny/paths-filter@v3
33+
- uses: actions/checkout@v5
34+
- uses: dorny/paths-filter@v4
3135
id: changes
3236
if: github.event_name == 'pull_request'
3337
with:
@@ -103,8 +107,8 @@ jobs:
103107
outputs:
104108
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
105109
steps:
106-
- uses: actions/checkout@v4
107-
- uses: heyAyushh/setup-anchor@v0.31
110+
- uses: actions/checkout@v5
111+
- uses: heyAyushh/setup-anchor@v4.999
108112
with:
109113
anchor-version: 0.32.1
110114
solana-cli-version: stable
@@ -204,7 +208,7 @@ jobs:
204208
if: always()
205209
runs-on: ubuntu-latest
206210
steps:
207-
- uses: actions/checkout@v4
211+
- uses: actions/checkout@v5
208212
- name: Create job summary
209213
run: |
210214
echo "## Anchor Workflow Summary" >> $GITHUB_STEP_SUMMARY

.github/workflows/rust.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ on:
1414
branches:
1515
- main
1616

17+
env:
18+
# Force all JavaScript-based actions to use Node.js 24 runtime.
19+
# Node.js 20 actions are deprecated and will stop working June 2026.
20+
# This catches composite actions whose internal dependencies still reference @v4.
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
22+
1723
# A workflow run is made up of one or more jobs, which run in parallel by default
1824
# Each job runs in a runner environment specified by runs-on
1925
jobs:
@@ -22,7 +28,7 @@ jobs:
2228
name: Rustfmt
2329
runs-on: ubuntu-latest
2430
steps:
25-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v5
2632
- uses: dtolnay/rust-toolchain@stable
2733
with:
2834
# Specific to dtolnay/rust-toolchain: Comma-separated string of additional components to install
@@ -35,7 +41,7 @@ jobs:
3541
name: Clippy
3642
runs-on: ubuntu-latest
3743
steps:
38-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v5
3945
- uses: dtolnay/rust-toolchain@stable
4046
with:
4147
components: clippy

.github/workflows/solana-native.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ env:
1515
MAX_JOBS: 64
1616
MIN_PROJECTS_PER_JOB: 4
1717
MIN_PROJECTS_FOR_MATRIX: 4
18+
# Force all JavaScript-based actions to use Node.js 24 runtime.
19+
# Node.js 20 actions are deprecated and will stop working June 2026.
20+
# This catches composite actions whose internal dependencies still reference @v4.
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1822

1923
jobs:
2024
changes:
@@ -26,8 +30,8 @@ jobs:
2630
total_projects: ${{ steps.analyze.outputs.total_projects }}
2731
matrix: ${{ steps.matrix.outputs.matrix }}
2832
steps:
29-
- uses: actions/checkout@v4
30-
- uses: dorny/paths-filter@v3
33+
- uses: actions/checkout@v5
34+
- uses: dorny/paths-filter@v4
3135
id: changes
3236
if: github.event_name == 'pull_request'
3337
with:
@@ -102,9 +106,9 @@ jobs:
102106
outputs:
103107
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
104108
steps:
105-
- uses: actions/checkout@v4
109+
- uses: actions/checkout@v5
106110
- name: Use Node.js
107-
uses: actions/setup-node@v4
111+
uses: actions/setup-node@v5
108112
with:
109113
node-version: 'lts/*'
110114
check-latest: true
@@ -191,7 +195,7 @@ jobs:
191195
# Install pnpm
192196
npm install --global pnpm
193197
- name: Setup Solana Stable
194-
uses: heyAyushh/setup-solana@v2.02
198+
uses: heyAyushh/setup-solana@v5.9
195199
with:
196200
solana-cli-version: stable
197201
- name: Build and Test with Stable
@@ -200,8 +204,12 @@ jobs:
200204
solana -V
201205
rustc -V
202206
process_projects "stable"
207+
# continue-on-error because the beta channel may not have a valid release
208+
# (e.g. v4.0 returns 404 from release.anza.xyz). This is an upstream issue
209+
# with heyAyushh/setup-solana — beta setup clears the stable install first.
203210
- name: Setup Solana Beta
204-
uses: heyAyushh/setup-solana@v2.02
211+
continue-on-error: true
212+
uses: heyAyushh/setup-solana@v5.9
205213
with:
206214
solana-cli-version: beta
207215
- name: Build and Test with Beta
@@ -228,7 +236,7 @@ jobs:
228236
if: always()
229237
runs-on: ubuntu-latest
230238
steps:
231-
- uses: actions/checkout@v4
239+
- uses: actions/checkout@v5
232240
- name: Create job summary
233241
run: |
234242
echo "## Native Workflow Summary" >> $GITHUB_STEP_SUMMARY

.github/workflows/solana-pinocchio.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ env:
1515
MAX_JOBS: 64
1616
MIN_PROJECTS_PER_JOB: 4
1717
MIN_PROJECTS_FOR_MATRIX: 4
18+
# Force all JavaScript-based actions to use Node.js 24 runtime.
19+
# Node.js 20 actions are deprecated and will stop working June 2026.
20+
# This catches composite actions whose internal dependencies still reference @v4.
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1822

1923
jobs:
2024
changes:
@@ -26,8 +30,8 @@ jobs:
2630
total_projects: ${{ steps.analyze.outputs.total_projects }}
2731
matrix: ${{ steps.matrix.outputs.matrix }}
2832
steps:
29-
- uses: actions/checkout@v4
30-
- uses: dorny/paths-filter@v3
33+
- uses: actions/checkout@v5
34+
- uses: dorny/paths-filter@v4
3135
id: changes
3236
if: github.event_name == 'pull_request'
3337
with:
@@ -102,9 +106,9 @@ jobs:
102106
outputs:
103107
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
104108
steps:
105-
- uses: actions/checkout@v4
109+
- uses: actions/checkout@v5
106110
- name: Use Node.js
107-
uses: actions/setup-node@v4
111+
uses: actions/setup-node@v5
108112
with:
109113
node-version: "lts/*"
110114
check-latest: true
@@ -191,7 +195,7 @@ jobs:
191195
# Install pnpm
192196
npm install --global pnpm
193197
- name: Setup Solana Stable
194-
uses: heyAyushh/setup-solana@v2.02
198+
uses: heyAyushh/setup-solana@v5.9
195199
with:
196200
solana-cli-version: stable
197201
- name: Build and Test with Stable
@@ -200,8 +204,12 @@ jobs:
200204
solana -V
201205
rustc -V
202206
process_projects "stable"
207+
# continue-on-error because the beta channel may not have a valid release
208+
# (e.g. v4.0 returns 404 from release.anza.xyz). This is an upstream issue
209+
# with heyAyushh/setup-solana — beta setup clears the stable install first.
203210
- name: Setup Solana Beta
204-
uses: heyAyushh/setup-solana@v2.02
211+
continue-on-error: true
212+
uses: heyAyushh/setup-solana@v5.9
205213
with:
206214
solana-cli-version: beta
207215
- name: Build and Test with Beta
@@ -228,7 +236,7 @@ jobs:
228236
if: always()
229237
runs-on: ubuntu-latest
230238
steps:
231-
- uses: actions/checkout@v4
239+
- uses: actions/checkout@v5
232240
- name: Create job summary
233241
run: |
234242
echo "## Pinocchio Workflow Summary" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ node_modules/
88
**/*/node_modules
99
**/*/package-lock.json
1010
**/*/Cargo.lock
11+
# Exception: escrow native needs Cargo.lock to pin blake3 (see tokens/escrow/native/Cargo.toml)
12+
!tokens/escrow/native/Cargo.lock
1113

1214
**/*/.anchor
1315
**/*/.DS_Store

CONTRIBUTING.md

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To ensure a smooth and effective contribution process, please take a moment to r
1010

1111
We welcome contributions in the form of code, documentation, bug reports, feature requests, and other forms of feedback. Here are some ways you can contribute:
1212

13-
- **Code Contributions:** You can contribute code examples in Rust, Python, or Solidity that demonstrate various Solana program functionalities. You can also contribute improvements to existing examples, such as bug fixes, optimizations, or additional features.
13+
- **Code Contributions:** You can contribute code examples in Rust that demonstrate various Solana program functionalities. You can also contribute improvements to existing examples, such as bug fixes, optimizations, or additional features.
1414

1515
- **Bug Reports, Ideas or Feedback:** If you encounter any issues or have ideas for new examples, please submit a bug report or feature request. Your feedback is valuable and helps us improve the quality and relevance of the examples.
1616

@@ -22,40 +22,13 @@ Specifically for code in this repo:
2222

2323
1. Use pnpm as the default package manager for the project. You can [install pnpm by following the instructions](https://pnpm.io/installation). Commit `pnpm-lock.yaml` to the repository.
2424

25-
2. Solana Programs written for Anchor framework should be in directory (`anchor`)[https://www.anchor-lang.com], Solana Native in (`native`)[https://solana.com/developers/guides/getstarted/intro-to-native-rust], Steel Framework in (`steel`)[https://github.com/regolith-labs/steel], TypeScript in (`poseidon`)[https://github.com/Turbin3/poseidon], respectively.
25+
2. Solana Programs written for the Anchor framework should be in directory [`anchor`](https://www.anchor-lang.com), Solana Native in [`native`](https://solana.com/developers/guides/getstarted/intro-to-native-rust), respectively.
2626
- Project path structure: `/program-examples/category/example-name/<framework_name>`
2727
- Project path structure example for anchor: `/program-examples/category/example-name/anchor`
2828

29-
3. Tests for Solana native programs, steel framework programs, and Anchor should be written with [solana-bankrun](https://kevinheavey.github.io/solana-bankrun)
29+
3. Tests for Anchor and Solana native programs should be written with [solana-bankrun](https://kevinheavey.github.io/solana-bankrun).
3030

31-
4. Steel framework programs must be organized as a Cargo workspace with separate projects for API and program:
32-
- Project path structure: `/program-examples/category/example-name/steel`
33-
- Initialise project using `steel new <name>`
34-
- Must be a Cargo workspace with two separate projects:
35-
- `api`: Contains API-related code
36-
- `program`: Contains the program implementation
37-
- Steel projects should NOT be added in the root [`Cargo.toml` file](https://github.com/solana-developers/program-examples/blob/main/Cargo.toml)
38-
39-
This structure ensures proper organization and separation of concerns.
40-
41-
5. For Steel framework programs:
42-
- Steel CLI is the recommended way to build and test programs:
43-
```bash
44-
# Install Steel CLI (one-time setup)
45-
cargo install steel-cli
46-
47-
# Create a new Steel project
48-
steel new <name>
49-
50-
# Build the program
51-
steel build
52-
53-
# Run tests
54-
steel test
55-
```
56-
- Alternatively, you can use package.json scripts if you need custom build/test configurations as Solana native one described below.
57-
58-
6. For Solana native programs ensure adding these mandatory pnpm run scripts to your `package.json` file for successful CI/CD builds:
31+
4. For Solana native programs ensure adding these mandatory pnpm run scripts to your `package.json` file for successful CI/CD builds:
5932

6033
```json
6134
"scripts": {
@@ -66,35 +39,22 @@ Specifically for code in this repo:
6639
},
6740
```
6841

69-
Alternatively, You can add `steel test` and `steel build` as commands according to your project.
70-
71-
"scripts": {
72-
"test": "steel test",
73-
"build-and-test": "steel build && steel test",
74-
"build": "steel build",
75-
"deploy": "solana program deploy ./program/target/so/program.so"
76-
},
77-
78-
7. Test command for Anchor should execute `pnpm test` instead of `yarn run test` for anchor programs. Replace `yarn` with `pnpm` in `[script]` table inside [Anchor.toml file.](https://www.anchor-lang.com/docs/manifest#scripts-required-for-testing)
42+
5. Test command for Anchor should execute `pnpm test` instead of `yarn run test` for anchor programs. Replace `yarn` with `pnpm` in `[script]` table inside [Anchor.toml file.](https://www.anchor-lang.com/docs/manifest#scripts-required-for-testing)
7943

8044
```
8145
[scripts]
8246
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
8347
```
8448

85-
8. TypeScript, JavaScript and JSON files are formatted and linted using
49+
6. TypeScript, JavaScript and JSON files are formatted and linted using
8650
[Biome](https://biomejs.dev/). Execute the following command to format and lint your code at the root of this project before submitting a pull request:
8751

88-
8. Some projects can be ignored from the building and testing process by adding the project name to the `.ghaignore` file.
89-
When removing or updating an example, please ensure that the example is removed from the `.ghaignore` file
90-
and there's a change in that example's directory.
91-
9252
```bash
9353
pnpm fix
9454
```
9555

96-
9. Some projects can be ignored from the building and testing process by adding the project name to the `.gitignore` file.
97-
When removing or updating an example, please ensure that the example is removed from the `.gitignore` file
56+
7. Some projects can be ignored from the building and testing process by adding the project name to the `.ghaignore` file.
57+
When removing or updating an example, please ensure that the example is removed from the `.ghaignore` file
9858
and there's a change in that example's directory.
9959

10060
## Code of Conduct

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Program Examples
22

3-
## Onchain program examples for :anchor: Anchor :crab: Native Rust, and [TS] TypeScript.
3+
## Onchain program examples for :anchor: Anchor and :crab: Native Rust.
44

5-
[![Native](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml) [![Anchor](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml)
5+
[![Anchor](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml) [![Native](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml)
66

77
This repo contains Solana onchain programs (referred to as 'Smart Contracts' in other blockchains).
88

@@ -175,7 +175,7 @@ Allow two users to swap digital assets with each other, each getting 100% of wha
175175

176176
### Basics - create token mints, mint tokens, and transfer tokens with Token Extensions
177177

178-
Create token mints, mint tokens, and transferr tokens using Token Extensions.
178+
Create token mints, mint tokens, and transfer tokens using Token Extensions.
179179

180180
[anchor](./tokens/token-2022/basics/anchor)
181181

@@ -221,13 +221,13 @@ Create tokens that store their onchain metadata inside the token mint, without n
221221

222222
[anchor](./tokens/token-2022/metadata/anchor)
223223

224-
### Allow a designedated account to close a mint
224+
### Allow a designated account to close a mint
225225

226226
Allow a designated account to close a Mint.
227227

228228
[anchor](./tokens/token-2022/mint-close-authority/anchor) [native](./tokens/token-2022/mint-close-authority/native)
229229

230-
### Usng multiple token extensions
230+
### Using multiple token extensions
231231

232232
Use multiple Token Extensions at once.
233233

basics/account-data/anchor/Anchor.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[toolchain]
2+
solana_version = "3.1.8"
3+
14
[features]
25
seeds = false
36
skip-lint = false

basics/account-data/anchor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"@coral-xyz/anchor": "0.32.1",
4-
"@solana/web3.js": "^1.95.2"
4+
"@solana/web3.js": "^1.98.4"
55
},
66
"devDependencies": {
77
"@types/bn.js": "^5.1.0",

0 commit comments

Comments
 (0)