Commit 85aa223
Migrate all Anchor projects from 0.32.1 to 1.0.0-rc.5 (#548)
* migrate all Anchor projects from 0.32.1 to 1.0.0-rc.5
Rust changes (48 Anchor programs):
- anchor-lang 0.32.1 → 1.0.0-rc.5
- anchor-spl 0.32.1 → 1.0.0-rc.5
- CpiContext::new() program arg: .to_account_info() → .key() (Anchor 1.0 takes Pubkey)
- Context lifetime params: 4 → 2 (transfer-fee project)
- Removed interface-instructions feature (transfer-hook projects)
- Removed [registry] section from all Anchor.toml files
TypeScript changes:
- @coral-xyz/anchor → @anchor-lang/core 1.0.0-rc.5
- TypeScript bumped to ^5.3.3 where needed
Transfer-hook projects (7):
- Added .map_err() wrappers on spl-tlv-account-resolution calls to bridge
solana-program-error 2.x → 3.x ProgramError type gap
- transmute_pubkey() helper for solana-pubkey 2.x → 3.x in transfer-cost
- Fixed #[instruction] attribute mismatches in transfer-switch (stricter in 1.0)
- AccountInfo → UncheckedAccount in Accounts structs
Compression projects (3):
- Replaced mpl-bubblegum 2.1.1 and spl-account-compression 1.0.0 CPI wrappers
with raw invoke()/invoke_signed() — these crates depend on Solana 2.x types
and have no Solana 3.x compatible release yet
- New bubblegum_types.rs in cutils with reimplemented types using borsh 1.x
- Added sha3 crate for keccak256 (solana_program::keccak removed in Solana 3.x)
Why: Anchor 1.0 is the current release candidate. This migration ensures all
program-examples build against the latest framework. Pin to RC until stable.
* ci: trigger workflows on anchor-1.0 branch for testing
* regenerate all pnpm-lock.yaml files for @anchor-lang/core migration
* fix CI: regenerate Cargo.lock, fix borsh try_to_vec, allow clippy diverging_sub_expression
- Regenerated root Cargo.lock to resolve solana-address version conflicts
- basics/rent: replaced try_to_vec() with borsh::to_vec() (borsh 1.x compat)
- clippy: allow diverging_sub_expression (false positive from Anchor 1.0 #[program] macro)
* fix: transfer-cost stack overflow and upgrade SPL crates to Solana 3.x
- Box large InterfaceAccount fields to avoid BPF stack frame overflow
(12 accounts exceeded 4096-byte limit in Anchor 1.0's try_accounts)
- Upgrade spl-discriminator 0.4.1→0.5.2, spl-tlv-account-resolution 0.9.0→0.11.1,
spl-transfer-hook-interface 0.9.0→2.1.0 (now compatible with Solana 3.x)
- Remove transmute_pubkey() hack (no longer needed with matching Pubkey types)
---------
Co-authored-by: Mike MacCana <mike@mikemaccana.com>1 parent 2b7da9b commit 85aa223
377 files changed
Lines changed: 7221 additions & 6868 deletions
File tree
- .github/workflows
- .reference
- basics
- account-data/anchor
- programs/anchor-program-example
- tests
- checking-accounts/anchor
- programs/anchor-program-example
- tests
- close-account/anchor
- migrations
- programs/close-account
- tests
- counter/anchor
- migrations
- programs/counter_anchor
- tests
- create-account/anchor
- programs/create-system-account
- src
- tests
- cross-program-invocation/anchor
- migrations
- programs
- hand
- src
- lever
- tests
- favorites/anchor
- migrations
- programs/favorites
- tests
- hello-solana/anchor
- programs/hello-solana
- tests
- pda-rent-payer/anchor
- programs/anchor-program-example
- src/instructions
- tests
- processing-instructions/anchor
- programs/processing-instructions
- tests
- program-derived-addresses/anchor
- programs/anchor-program-example
- tests
- realloc/anchor
- migrations
- programs/anchor-realloc
- tests
- rent/anchor
- programs/rent-example
- src
- tests
- repository-layout/anchor
- programs/carnival
- tests
- transfer-sol/anchor
- programs/transfer-sol
- src
- tests
- compression
- cnft-burn/anchor
- migrations
- programs/cnft-burn
- src
- tests
- cnft-vault/anchor
- programs/cnft-vault
- src
- tests
- scripts
- cutils/anchor
- programs/cutils
- src
- actions
- tests
- oracles/pyth/anchor
- programs/pythexample
- tokens
- create-token/anchor
- programs/create-token
- src
- tests
- escrow/anchor
- migrations
- programs/escrow
- src/instructions
- tests
- external-delegate-token-master/anchor
- programs/external-delegate-token-master
- src
- nft-minter/anchor
- programs/nft-minter
- src
- tests
- nft-operations/anchor
- programs/mint-nft
- src/contexts
- tests
- pda-mint-authority/anchor
- programs/token-minter
- src/instructions
- tests
- spl-token-minter/anchor
- programs/spl-token-minter
- src/instructions
- tests
- token-2022
- basics/anchor
- migrations
- programs/basics
- src
- tests
- cpi-guard/anchor
- migrations
- programs/cpi-guard
- src
- tests
- default-account-state/anchor
- migrations
- programs/default-account-state
- src
- tests
- group/anchor
- migrations
- programs/group
- tests
- immutable-owner/anchor
- migrations
- programs/immutable-owner
- src
- tests
- interest-bearing/anchor
- migrations
- programs/interest-bearing
- src
- tests
- memo-transfer/anchor
- migrations
- programs/memo-transfer
- src
- tests
- metadata/anchor
- migrations
- programs/metadata
- src/instructions
- tests
- mint-close-authority/anchor
- migrations
- programs/mint-close-authority
- src
- tests
- nft-meta-data-pointer/anchor-example
- anchor
- programs/extension_nft
- src/instructions
- tests
- app
- utils
- non-transferable/anchor
- migrations
- programs/non-transferable
- src
- tests
- permanent-delegate/anchor
- migrations
- programs/permanent-delegate
- tests
- transfer-fee/anchor
- migrations
- programs/transfer-fee
- src
- instructions
- tests
- transfer-hook
- account-data-as-seed/anchor
- migrations
- programs/transfer-hook
- src
- tests
- allow-block-list-token
- anchor
- programs/abl-token
- src/instructions
- src
- tests
- src/components
- abl-token
- solana
- counter/anchor
- migrations
- programs/transfer-hook
- src
- tests
- hello-world/anchor
- migrations
- programs/transfer-hook
- src
- tests
- transfer-cost/anchor
- migrations
- programs/transfer-hook
- src
- tests
- transfer-switch/anchor
- programs/transfer-switch
- src
- instructions
- tests
- whitelist/anchor
- migrations
- programs/transfer-hook
- src
- tests
- token-fundraiser/anchor
- programs/fundraiser
- src/instructions
- tests
- token-swap/anchor
- programs/token-swap
- src/instructions
- tests
- transfer-tokens/anchor
- programs/transfer-tokens
- src/instructions
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments