Skip to content

Upgrade Anchor programs to 1.0.0 stable (existing tests only)#558

Open
mikemaccana-edwardbot wants to merge 11 commits intosolana-developers:mainfrom
mikemaccana:anchor-10-existing-tests
Open

Upgrade Anchor programs to 1.0.0 stable (existing tests only)#558
mikemaccana-edwardbot wants to merge 11 commits intosolana-developers:mainfrom
mikemaccana:anchor-10-existing-tests

Conversation

@mikemaccana-edwardbot
Copy link
Copy Markdown
Contributor

@mikemaccana-edwardbot mikemaccana-edwardbot commented Apr 12, 2026

Summary

Upgrades all Anchor programs from 1.0.0-rc.5 to 1.0.0 stable. No new test files — existing tests only.

Changes

Anchor 1.0.0 stable upgrade (101 files)

  • anchor-lang and anchor-spl1.0.0 in 50+ Cargo.toml files
  • @anchor-lang/core1.0.0 in 50 package.json files
  • Removed stale # pin to RC until stable release comments
  • Updated .reference/ANCHOR-1.0-MIGRATION.md to reflect stable release

Replace magic numbers with DISCRIMINATOR + INIT_SPACE (8 files)

  • Replaced hardcoded space = 8 + 32 + ... with SomeStruct::DISCRIMINATOR.len() + SomeStruct::INIT_SPACE
  • Added #[derive(InitSpace)] where needed
  • Affected: lever, transfer-hook (counter, transfer-cost, whitelist), token-swap

Replace remaining @coral-xyz/anchor imports (3 files)

  • @coral-xyz/anchor@anchor-lang/core in remaining TypeScript app code
  • Affected: scripts/lib/command-help.ts, MintNftButton.tsx, GameStateProvider.tsx

What this does NOT include

mikemaccana-edwardbot added a commit to mikemaccana/program-examples that referenced this pull request Apr 12, 2026
Adds Rust integration tests using LiteSVM and solana-kite for all 46 Anchor
programs. These run via anchor test → cargo test.

Existing TypeScript tests preserved — this PR only adds the Rust test files,
updates Cargo.toml dev-dependencies, and changes the Anchor.toml test script.

Based on anchor-10-existing-tests (solana-developers#558).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants