Skip to content

Commit 3d92505

Browse files
authored
Merge branch 'main' into asm/hello-world
2 parents 53c85f9 + 6063401 commit 3d92505

738 files changed

Lines changed: 28221 additions & 19180 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: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
push:
77
branches:
88
- main
9+
- anchor-1.0
10+
- fix-biome-errors
911
pull_request:
1012
types: [opened, synchronize, reopened]
1113
branches:
@@ -15,6 +17,10 @@ env:
1517
MAX_JOBS: 64
1618
MIN_PROJECTS_PER_JOB: 4
1719
MIN_PROJECTS_FOR_MATRIX: 4
20+
# Force all JavaScript-based actions to use Node.js 24 runtime.
21+
# Node.js 20 actions are deprecated and will stop working June 2026.
22+
# This catches composite actions whose internal dependencies still reference @v4.
23+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1824

1925
jobs:
2026
changes:
@@ -26,8 +32,8 @@ jobs:
2632
total_projects: ${{ steps.analyze.outputs.total_projects }}
2733
matrix: ${{ steps.matrix.outputs.matrix }}
2834
steps:
29-
- uses: actions/checkout@v4
30-
- uses: dorny/paths-filter@v3
35+
- uses: actions/checkout@v5
36+
- uses: dorny/paths-filter@v4
3137
id: changes
3238
if: github.event_name == 'pull_request'
3339
with:
@@ -103,8 +109,8 @@ jobs:
103109
outputs:
104110
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
105111
steps:
106-
- uses: actions/checkout@v4
107-
- uses: heyAyushh/setup-anchor@v0.31
112+
- uses: actions/checkout@v5
113+
- uses: heyAyushh/setup-anchor@v4.999
108114
with:
109115
anchor-version: 0.32.1
110116
solana-cli-version: stable
@@ -204,7 +210,7 @@ jobs:
204210
if: always()
205211
runs-on: ubuntu-latest
206212
steps:
207-
- uses: actions/checkout@v4
213+
- uses: actions/checkout@v5
208214
- name: Create job summary
209215
run: |
210216
echo "## Anchor Workflow Summary" >> $GITHUB_STEP_SUMMARY

.github/workflows/rust.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The name of your workflow. GitHub displays the names of your workflows on your repository's "Actions" tab
2-
name: Rust
2+
name: Rust Lint
33

44
# To automatically trigger the workflow
55
on:
@@ -9,11 +9,19 @@ on:
99
push:
1010
branches:
1111
- main
12+
- anchor-1.0
13+
- fix-biome-errors
1214
pull_request:
1315
types: [opened, synchronize, reopened]
1416
branches:
1517
- main
1618

19+
env:
20+
# Force all JavaScript-based actions to use Node.js 24 runtime.
21+
# Node.js 20 actions are deprecated and will stop working June 2026.
22+
# This catches composite actions whose internal dependencies still reference @v4.
23+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
24+
1725
# A workflow run is made up of one or more jobs, which run in parallel by default
1826
# Each job runs in a runner environment specified by runs-on
1927
jobs:
@@ -22,7 +30,7 @@ jobs:
2230
name: Rustfmt
2331
runs-on: ubuntu-latest
2432
steps:
25-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v5
2634
- uses: dtolnay/rust-toolchain@stable
2735
with:
2836
# Specific to dtolnay/rust-toolchain: Comma-separated string of additional components to install
@@ -35,9 +43,10 @@ jobs:
3543
name: Clippy
3644
runs-on: ubuntu-latest
3745
steps:
38-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@v5
3947
- uses: dtolnay/rust-toolchain@stable
4048
with:
4149
components: clippy
4250
- name: Linting
43-
run: cargo clippy -- -D warnings
51+
# Allow diverging_sub_expression: false positive from Anchor 1.0's #[program] macro expansion
52+
run: cargo clippy -- -D warnings -A clippy::diverging_sub_expression

.github/workflows/solana-native.yml

Lines changed: 18 additions & 9 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:
@@ -15,6 +16,10 @@ env:
1516
MAX_JOBS: 64
1617
MIN_PROJECTS_PER_JOB: 4
1718
MIN_PROJECTS_FOR_MATRIX: 4
19+
# Force all JavaScript-based actions to use Node.js 24 runtime.
20+
# Node.js 20 actions are deprecated and will stop working June 2026.
21+
# This catches composite actions whose internal dependencies still reference @v4.
22+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1823

1924
jobs:
2025
changes:
@@ -26,8 +31,8 @@ jobs:
2631
total_projects: ${{ steps.analyze.outputs.total_projects }}
2732
matrix: ${{ steps.matrix.outputs.matrix }}
2833
steps:
29-
- uses: actions/checkout@v4
30-
- uses: dorny/paths-filter@v3
34+
- uses: actions/checkout@v5
35+
- uses: dorny/paths-filter@v4
3136
id: changes
3237
if: github.event_name == 'pull_request'
3338
with:
@@ -102,9 +107,10 @@ jobs:
102107
outputs:
103108
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
104109
steps:
105-
- uses: actions/checkout@v4
110+
- uses: actions/checkout@v5
111+
- uses: pnpm/action-setup@v4
106112
- name: Use Node.js
107-
uses: actions/setup-node@v4
113+
uses: actions/setup-node@v5
108114
with:
109115
node-version: 'lts/*'
110116
check-latest: true
@@ -188,10 +194,9 @@ jobs:
188194
# Make the script executable
189195
chmod +x build_and_test.sh
190196
191-
# Install pnpm
192-
npm install --global pnpm
197+
# pnpm is already installed via pnpm/action-setup
193198
- name: Setup Solana Stable
194-
uses: heyAyushh/setup-solana@v2.02
199+
uses: heyAyushh/setup-solana@v5.9
195200
with:
196201
solana-cli-version: stable
197202
- name: Build and Test with Stable
@@ -200,8 +205,12 @@ jobs:
200205
solana -V
201206
rustc -V
202207
process_projects "stable"
208+
# continue-on-error because the beta channel may not have a valid release
209+
# (e.g. v4.0 returns 404 from release.anza.xyz). This is an upstream issue
210+
# with heyAyushh/setup-solana — beta setup clears the stable install first.
203211
- name: Setup Solana Beta
204-
uses: heyAyushh/setup-solana@v2.02
212+
continue-on-error: true
213+
uses: heyAyushh/setup-solana@v5.9
205214
with:
206215
solana-cli-version: beta
207216
- name: Build and Test with Beta
@@ -228,7 +237,7 @@ jobs:
228237
if: always()
229238
runs-on: ubuntu-latest
230239
steps:
231-
- uses: actions/checkout@v4
240+
- uses: actions/checkout@v5
232241
- name: Create job summary
233242
run: |
234243
echo "## Native Workflow Summary" >> $GITHUB_STEP_SUMMARY

.github/workflows/solana-pinocchio.yml

Lines changed: 18 additions & 9 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:
@@ -15,6 +16,10 @@ env:
1516
MAX_JOBS: 64
1617
MIN_PROJECTS_PER_JOB: 4
1718
MIN_PROJECTS_FOR_MATRIX: 4
19+
# Force all JavaScript-based actions to use Node.js 24 runtime.
20+
# Node.js 20 actions are deprecated and will stop working June 2026.
21+
# This catches composite actions whose internal dependencies still reference @v4.
22+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1823

1924
jobs:
2025
changes:
@@ -26,8 +31,8 @@ jobs:
2631
total_projects: ${{ steps.analyze.outputs.total_projects }}
2732
matrix: ${{ steps.matrix.outputs.matrix }}
2833
steps:
29-
- uses: actions/checkout@v4
30-
- uses: dorny/paths-filter@v3
34+
- uses: actions/checkout@v5
35+
- uses: dorny/paths-filter@v4
3136
id: changes
3237
if: github.event_name == 'pull_request'
3338
with:
@@ -102,9 +107,10 @@ jobs:
102107
outputs:
103108
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
104109
steps:
105-
- uses: actions/checkout@v4
110+
- uses: actions/checkout@v5
111+
- uses: pnpm/action-setup@v4
106112
- name: Use Node.js
107-
uses: actions/setup-node@v4
113+
uses: actions/setup-node@v5
108114
with:
109115
node-version: "lts/*"
110116
check-latest: true
@@ -188,10 +194,9 @@ jobs:
188194
# Make the script executable
189195
chmod +x build_and_test.sh
190196
191-
# Install pnpm
192-
npm install --global pnpm
197+
# pnpm is already installed via pnpm/action-setup
193198
- name: Setup Solana Stable
194-
uses: heyAyushh/setup-solana@v2.02
199+
uses: heyAyushh/setup-solana@v5.9
195200
with:
196201
solana-cli-version: stable
197202
- name: Build and Test with Stable
@@ -200,8 +205,12 @@ jobs:
200205
solana -V
201206
rustc -V
202207
process_projects "stable"
208+
# continue-on-error because the beta channel may not have a valid release
209+
# (e.g. v4.0 returns 404 from release.anza.xyz). This is an upstream issue
210+
# with heyAyushh/setup-solana — beta setup clears the stable install first.
203211
- name: Setup Solana Beta
204-
uses: heyAyushh/setup-solana@v2.02
212+
continue-on-error: true
213+
uses: heyAyushh/setup-solana@v5.9
205214
with:
206215
solana-cli-version: beta
207216
- name: Build and Test with Beta
@@ -228,7 +237,7 @@ jobs:
228237
if: always()
229238
runs-on: ubuntu-latest
230239
steps:
231-
- uses: actions/checkout@v4
240+
- uses: actions/checkout@v5
232241
- name: Create job summary
233242
run: |
234243
echo "## Pinocchio Workflow Summary" >> $GITHUB_STEP_SUMMARY

.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

.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

.reference/ANCHOR-1.0-MIGRATION.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Anchor 1.0.0-rc.5 Migration Reference
2+
3+
## Proven pattern (from basics/counter/anchor)
4+
5+
### Cargo.toml
6+
- Change `anchor-lang = "0.32.1"``anchor-lang = "1.0.0-rc.5"`
7+
- Change `anchor-lang = { version = "0.32.1", ... }``anchor-lang = { version = "1.0.0-rc.5", ... }`
8+
- Same for `anchor-spl` if present — change to `1.0.0-rc.5`
9+
- Add comment: `# Anchor 1.0.0-rc.5 — pin to RC until stable release`
10+
- **REMOVE `interface-instructions` feature** if present (removed in Anchor 1.0). This affects transfer-hook projects.
11+
- Keep all other features as-is (`idl-build`, `init-if-needed`, `cpi`, etc.)
12+
13+
### Anchor.toml
14+
- Remove `[registry]` section if present (no longer used in Anchor 1.0)
15+
- Keep everything else
16+
17+
### package.json
18+
- Replace `"@coral-xyz/anchor": "..."` with `"@anchor-lang/core": "1.0.0-rc.5"`
19+
- Bump `"typescript"` to `"^5.3.3"` if it's on 4.x (required for @solana/web3.js peer dep)
20+
- Keep everything else
21+
22+
### TypeScript files (tests/*.ts, migrations/*.ts)
23+
- Replace `import ... from "@coral-xyz/anchor"``import ... from "@anchor-lang/core"`
24+
- Replace `import ... from '@coral-xyz/anchor'``import ... from '@anchor-lang/core'`
25+
- Replace `require("@coral-xyz/anchor")``require("@anchor-lang/core")` if any
26+
27+
### Rust source code (lib.rs etc.)
28+
- Usually NO changes needed
29+
- If `AccountInfo` is used in an Accounts struct, replace with `UncheckedAccount`
30+
- If duplicate mutable accounts exist, add `#[account(dup)]` constraint
31+
32+
### Build verification
33+
- Run `cargo build-sbf` in the anchor project directory to verify Rust builds
34+
- Run `pnpm install` to verify deps install
35+
- Do NOT run tests (no validator available)
36+
37+
### interface-instructions removal (transfer-hook projects)
38+
For projects that had `features = ["interface-instructions"]`:
39+
- Remove that feature from Cargo.toml
40+
- The `#[interface]` attribute is removed — check if the program source uses it
41+
- If it does, this needs manual intervention to refactor

.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)