From 43c488ce931f334722fb53ea1cd5b0d032c876dd Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 15 Oct 2026 16:11:10 +0000 Subject: [PATCH] Move the Anchor v1 examples to Anchor 1.2.1 anchor-lang and anchor-spl move from 1.2.0 to 1.2.1 in all 57 anchor-v1 examples, the Anchor v1 workflow installs anchor-cli 1.2.1, and the docs name 1.2.1 as the v1 CLI. 1.2.1 only adds the opt-in solana-v4 feature, which no example enables, so no program or test source changes. Claude-Session: https://claude.ai/code/session_01KZaRLaqvHMdDVdafevQfRE --- .github/workflows/anchor-v1.yml | 10 +++++----- CHANGELOG.md | 14 ++++++++++++++ CONTRIBUTING.md | 4 ++-- README.md | 2 +- basics/account-data/anchor-v1/README.md | 4 ++-- .../programs/anchor-program-example/Cargo.toml | 2 +- basics/checking-accounts/anchor-v1/README.md | 4 ++-- .../programs/anchor-program-example/Cargo.toml | 2 +- basics/close-account/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/close-account/Cargo.toml | 2 +- basics/counter/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/counter_anchor/Cargo.toml | 2 +- basics/create-account/anchor-v1/README.md | 4 ++-- .../programs/create-system-account/Cargo.toml | 2 +- .../cross-program-invocation/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/hand/Cargo.toml | 2 +- .../anchor-v1/programs/lever/Cargo.toml | 2 +- basics/favorites/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/favorites/Cargo.toml | 2 +- basics/hello-solana/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/hello-solana/Cargo.toml | 2 +- basics/pda-rent-payer/anchor-v1/README.md | 4 ++-- .../programs/anchor-program-example/Cargo.toml | 2 +- basics/processing-instructions/anchor-v1/README.md | 4 ++-- .../programs/processing-instructions/Cargo.toml | 2 +- .../program-derived-addresses/anchor-v1/README.md | 4 ++-- .../programs/anchor-program-example/Cargo.toml | 2 +- basics/pyth/anchor-v1/README.md | 4 ++-- .../pyth/anchor-v1/programs/pythexample/Cargo.toml | 2 +- basics/realloc/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/anchor-realloc/Cargo.toml | 2 +- basics/rent/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/rent-example/Cargo.toml | 2 +- basics/repository-layout/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/carnival/Cargo.toml | 2 +- basics/transaction-v1/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transaction-v1/Cargo.toml | 2 +- basics/transfer-sol/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-sol/Cargo.toml | 2 +- compression/cnft-burn/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/cnft-burn/Cargo.toml | 2 +- compression/cnft-vault/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/cnft-vault/Cargo.toml | 2 +- compression/cutils/anchor-v1/README.md | 4 ++-- .../cutils/anchor-v1/programs/cutils/Cargo.toml | 2 +- docs/anchor-v2-migration.md | 4 ++-- finance/betting-market/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/betting-market/Cargo.toml | 4 ++-- finance/escrow/anchor-v1/README.md | 4 ++-- .../escrow/anchor-v1/programs/escrow/Cargo.toml | 4 ++-- finance/fundraiser/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/fundraiser/Cargo.toml | 4 ++-- finance/lending/anchor-v1/README.md | 6 +++--- .../lending/anchor-v1/programs/lending/Cargo.toml | 4 ++-- finance/managed-fund/anchor-v1/README.md | 4 ++-- finance/managed-fund/anchor-v1/app/README.md | 2 +- .../anchor-v1/programs/managed-fund/Cargo.toml | 4 ++-- .../anchor-v1/programs/mock-swap-router/Cargo.toml | 4 ++-- finance/options/anchor-v1/README.md | 4 ++-- .../options/anchor-v1/programs/options/Cargo.toml | 4 ++-- finance/order-book/anchor-v1/README.md | 6 +++--- .../anchor-v1/programs/order-book/Cargo.toml | 4 ++-- finance/perpetual-futures/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/mock-price-feed/Cargo.toml | 2 +- .../programs/perpetual-futures/Cargo.toml | 4 ++-- finance/prop-amm/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/mock-price-feed/Cargo.toml | 2 +- .../anchor-v1/programs/prop-amm/Cargo.toml | 4 ++-- finance/token-swap/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/token-swap/Cargo.toml | 4 ++-- tokens/create-token/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/create-token/Cargo.toml | 4 ++-- .../anchor-v1/README.md | 4 ++-- .../external-delegate-token-master/Cargo.toml | 4 ++-- tokens/nft-minter/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/nft-minter/Cargo.toml | 4 ++-- tokens/nft-operations/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/mint-nft/Cargo.toml | 4 ++-- tokens/pda-mint-authority/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/token-minter/Cargo.toml | 4 ++-- tokens/token-extensions/basics/anchor-v1/README.md | 4 ++-- .../basics/anchor-v1/programs/basics/Cargo.toml | 4 ++-- .../token-extensions/cpi-guard/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/cpi-guard/Cargo.toml | 4 ++-- .../default-account-state/anchor-v1/README.md | 4 ++-- .../programs/default-account-state/Cargo.toml | 4 ++-- tokens/token-extensions/group/anchor-v1/README.md | 4 ++-- .../group/anchor-v1/programs/group/Cargo.toml | 4 ++-- .../immutable-owner/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/immutable-owner/Cargo.toml | 4 ++-- .../interest-bearing/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/interest-bearing/Cargo.toml | 4 ++-- .../memo-transfer/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/memo-transfer/Cargo.toml | 4 ++-- .../token-extensions/metadata/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/metadata/Cargo.toml | 4 ++-- .../mint-close-authority/anchor-v1/README.md | 4 ++-- .../programs/mint-close-authority/Cargo.toml | 4 ++-- .../anchor-example/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/extension_nft/Cargo.toml | 4 ++-- .../non-transferable/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/non-transferable/Cargo.toml | 4 ++-- .../permanent-delegate/anchor-v1/README.md | 4 ++-- .../programs/permanent-delegate/Cargo.toml | 4 ++-- .../transfer-fee/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-fee/Cargo.toml | 4 ++-- .../account-data-as-seed/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-hook/Cargo.toml | 4 ++-- .../allow-block-list-token/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/abl-token/Cargo.toml | 4 ++-- .../transfer-hook/counter/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-hook/Cargo.toml | 4 ++-- .../transfer-hook/hello-world/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-hook/Cargo.toml | 4 ++-- .../transfer-cost/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-hook/Cargo.toml | 4 ++-- .../transfer-switch/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-switch/Cargo.toml | 4 ++-- .../transfer-hook/whitelist/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-hook/Cargo.toml | 4 ++-- tokens/token-minter/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/token-minter/Cargo.toml | 4 ++-- tokens/transfer-tokens/anchor-v1/README.md | 4 ++-- .../anchor-v1/programs/transfer-tokens/Cargo.toml | 4 ++-- 124 files changed, 240 insertions(+), 226 deletions(-) diff --git a/.github/workflows/anchor-v1.yml b/.github/workflows/anchor-v1.yml index 8a3eb1db..25c5385e 100644 --- a/.github/workflows/anchor-v1.yml +++ b/.github/workflows/anchor-v1.yml @@ -206,22 +206,22 @@ jobs: # Pinned to match the anchor-lang/anchor-spl crate version the programs depend on. # The key deliberately differs from the old avm-based one so a cache entry # holding an avm-built binary is never restored over this. - key: anchor-cli-crates-io-${{ runner.os }}-1.2.0 - - name: Install Anchor 1.2.0 + key: anchor-cli-crates-io-${{ runner.os }}-1.2.1 + - name: Install Anchor 1.2.1 run: | export PATH="$HOME/.cargo/bin:$PATH" # `anchor --version` can emit more than one line; read the first line only so # a multi-line value never reaches downstream parsing. current="$(anchor --version 2>/dev/null | head -n1 | awk '{print $2}' || true)" - if [ "$current" != "1.2.0" ]; then + if [ "$current" != "1.2.1" ]; then # Install the CLI from crates.io rather than through avm, matching the # Anchor v2 job. `cargo install --git ... avm` builds avm from the tip of # anchor's main branch, so what CI installs drifts with whatever landed - # there. 1.2.0 is an ordinary published release — unlike the 2.0.0-rc.1 + # there. 1.2.1 is an ordinary published release — unlike the 2.0.0-rc.1 # pre-release that forced the v2 job off avm — so the CLI comes straight # from the registry. --locked builds it against its own published lockfile # so the result does not drift with the registry either. - cargo install anchor-cli --version 1.2.0 --locked --force + cargo install anchor-cli --version 1.2.1 --locked --force fi echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Install Surfpool diff --git a/CHANGELOG.md b/CHANGELOG.md index 315c2a00..7e86f8ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this repository are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [2026-10-15] - Anchor v1 examples on Anchor 1.2.1 + +Anchor 1.2.1 is a patch release of the v1 line. Its one change is an opt-in +`solana-v4` feature on `anchor-lang` for building against the Solana v4 crates; no +example turns it on, so no program or test source changed. + +### Changed + +- All 57 `anchor-v1/` examples move `anchor-lang` and `anchor-spl` from `1.2.0` to + `1.2.1`. Feature lists are unchanged. +- The Anchor v1 workflow installs and caches `anchor-cli 1.2.1` instead of `1.2.0`. +- Every `anchor-v1/` README, `CONTRIBUTING.md` and `docs/anchor-v2-migration.md` + name 1.2.1 as the v1 CLI to install. + ## [2026-10-15] - solana-kite 0.6.1 ### Changed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4e8a601e..5574ef5b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ See [CHANGELOG.md](./CHANGELOG.md) for release history. This file had no changel - Each example lives at `category/example-name//`, e.g. `basics/counter/anchor/`. - Supported frameworks: `anchor`, `anchor-v1`, `quasar`, `pinocchio`, `native`, `asm`. Use the existing layout as a reference. -- `anchor-v1/` is Anchor v1 (1.2.0), the current stable Anchor. `anchor/` is the same example +- `anchor-v1/` is Anchor v1 (1.2.1), the current stable Anchor. `anchor/` is the same example on Anchor v2 (2.0.0-rc.1), the release candidate for the next major version, and is where new Anchor work starts; the v1 copy tracks its v2 counterpart. A change to what an example does (a new handler, a new check, a fix, a renamed field) goes into both copies, in the same pull request where practical, so a @@ -34,7 +34,7 @@ See [CHANGELOG.md](./CHANGELOG.md) for release history. This file had no changel Run an example's tests with the command for its framework, from the framework directory (e.g. `basics/counter/anchor/`): - **Anchor v2** (in `anchor/`): `anchor test` (runs `cargo test`, per the `[scripts]` table in `Anchor.toml`), with the v2 CLI: `cargo install anchor-cli --version 2.0.0-rc.1 --locked`. -- **Anchor v1** (in `anchor-v1/`): the same `anchor test`, with the v1 CLI: `avm install 1.2.0 && avm use 1.2.0`. Selecting the wrong CLI is the usual cause of a confusing build failure in these directories. +- **Anchor v1** (in `anchor-v1/`): the same `anchor test`, with the v1 CLI: `avm install 1.2.1 && avm use 1.2.1`. Selecting the wrong CLI is the usual cause of a confusing build failure in these directories. Anchor v1 tests send v1 transactions (4,096 bytes, resource limits in the message) through `solana-kite` 0.6. Its senders take a last `compute_unit_limit: Option`: pass `None` and kite simulates the transaction and sends it with the compute units the simulation used. A test that needs the diff --git a/README.md b/README.md index d8c2536a..d637672b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Working, tested, up-to-date examples of common Solana programs (what other chain Each example is available in one or more of the following frameworks: -- [⚓ Anchor v1](https://www.anchor-lang.com/) - the most popular framework for Solana development, in its current major version. Lives in `anchor-v1/`. Install with `avm install 1.2.0 && avm use 1.2.0`, build with `anchor build`, test with `anchor test`. +- [⚓ Anchor v1](https://www.anchor-lang.com/) - the most popular framework for Solana development, in its current major version. Lives in `anchor-v1/`. Install with `avm install 1.2.1 && avm use 1.2.1`, build with `anchor build`, test with `anchor test`. - [⚓ Anchor v2](https://www.anchor-lang.com/) - the next major version of Anchor, a ground-up rewrite that is not yet released. Lives in `anchor/`, alongside the v1 copy of the same example, and builds on the release candidate: install with `cargo install anchor-cli --version 2.0.0-rc.1 --locked`, then the same `anchor build` / `anchor test`. - [💫 Quasar](https://quasar-lang.com/docs) - a newer, more performant framework with Anchor-compatible ergonomics. Build with `quasar build`, test with `quasar test`. - [🤥 Pinocchio](https://github.com/anza-xyz/pinocchio) - a zero-copy, zero-allocation library for Solana programs. Build with `cargo build-sbf --manifest-path=./program/Cargo.toml`, test with `cargo test --manifest-path=./program/Cargo.toml`. diff --git a/basics/account-data/anchor-v1/README.md b/basics/account-data/anchor-v1/README.md index 7ecb71ba..8bd4427c 100644 --- a/basics/account-data/anchor-v1/README.md +++ b/basics/account-data/anchor-v1/README.md @@ -1,9 +1,9 @@ # Account Data (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Store and retrieve arbitrary data in a Solana [account](https://solana.com/docs/terminology#account) owned by this [program](https://solana.com/docs/terminology#program). diff --git a/basics/account-data/anchor-v1/programs/anchor-program-example/Cargo.toml b/basics/account-data/anchor-v1/programs/anchor-program-example/Cargo.toml index d379fb45..ce1bb09d 100644 --- a/basics/account-data/anchor-v1/programs/anchor-program-example/Cargo.toml +++ b/basics/account-data/anchor-v1/programs/anchor-program-example/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/checking-accounts/anchor-v1/README.md b/basics/checking-accounts/anchor-v1/README.md index c7beb131..a538368a 100644 --- a/basics/checking-accounts/anchor-v1/README.md +++ b/basics/checking-accounts/anchor-v1/README.md @@ -1,9 +1,9 @@ # Checking Accounts (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Validate that accounts passed into an [instruction](https://solana.com/docs/terminology#instruction) meet signer, owner, and address constraints before handler logic runs. diff --git a/basics/checking-accounts/anchor-v1/programs/anchor-program-example/Cargo.toml b/basics/checking-accounts/anchor-v1/programs/anchor-program-example/Cargo.toml index eb302d5e..760d2a6d 100644 --- a/basics/checking-accounts/anchor-v1/programs/anchor-program-example/Cargo.toml +++ b/basics/checking-accounts/anchor-v1/programs/anchor-program-example/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/close-account/anchor-v1/README.md b/basics/close-account/anchor-v1/README.md index 5cc6fab0..8dc3fb7f 100644 --- a/basics/close-account/anchor-v1/README.md +++ b/basics/close-account/anchor-v1/README.md @@ -1,9 +1,9 @@ # Close Account > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Two [instruction handlers](https://solana.com/docs/terminology#instruction-handler): `create_user` initializes a [PDA](https://solana.com/docs/terminology#program-derived-address-pda) `User` [account](https://solana.com/docs/terminology#account), and `close_user` closes it and returns the [rent](https://solana.com/docs/terminology#rent) to the user. diff --git a/basics/close-account/anchor-v1/programs/close-account/Cargo.toml b/basics/close-account/anchor-v1/programs/close-account/Cargo.toml index a88a06ae..2ab7aea6 100644 --- a/basics/close-account/anchor-v1/programs/close-account/Cargo.toml +++ b/basics/close-account/anchor-v1/programs/close-account/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/counter/anchor-v1/README.md b/basics/counter/anchor-v1/README.md index 8d74f151..0f56568b 100644 --- a/basics/counter/anchor-v1/README.md +++ b/basics/counter/anchor-v1/README.md @@ -1,9 +1,9 @@ # Counter (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Increment a global counter stored in a [PDA](https://solana.com/docs/terminology#program-derived-address-pda). [Anchor](https://solana.com/docs/terminology#anchor) adds an explicit `initialize` handler that the native variant handles differently. diff --git a/basics/counter/anchor-v1/programs/counter_anchor/Cargo.toml b/basics/counter/anchor-v1/programs/counter_anchor/Cargo.toml index f081669c..76c7e140 100644 --- a/basics/counter/anchor-v1/programs/counter_anchor/Cargo.toml +++ b/basics/counter/anchor-v1/programs/counter_anchor/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/create-account/anchor-v1/README.md b/basics/create-account/anchor-v1/README.md index dfd437e1..b2f0d740 100644 --- a/basics/create-account/anchor-v1/README.md +++ b/basics/create-account/anchor-v1/README.md @@ -1,9 +1,9 @@ # Create Account (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Create new onchain accounts and fund them for rent exemption using the System Program. diff --git a/basics/create-account/anchor-v1/programs/create-system-account/Cargo.toml b/basics/create-account/anchor-v1/programs/create-system-account/Cargo.toml index 64d094bb..19a5b712 100644 --- a/basics/create-account/anchor-v1/programs/create-system-account/Cargo.toml +++ b/basics/create-account/anchor-v1/programs/create-system-account/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/cross-program-invocation/anchor-v1/README.md b/basics/cross-program-invocation/anchor-v1/README.md index 4ac3c55d..6be411d7 100644 --- a/basics/cross-program-invocation/anchor-v1/README.md +++ b/basics/cross-program-invocation/anchor-v1/README.md @@ -1,9 +1,9 @@ # Cross-Program Invocation (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Invoke another program from this one (hand program calls lever program) using CPI. diff --git a/basics/cross-program-invocation/anchor-v1/programs/hand/Cargo.toml b/basics/cross-program-invocation/anchor-v1/programs/hand/Cargo.toml index 64c204ef..619780e4 100644 --- a/basics/cross-program-invocation/anchor-v1/programs/hand/Cargo.toml +++ b/basics/cross-program-invocation/anchor-v1/programs/hand/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/cross-program-invocation/anchor-v1/programs/lever/Cargo.toml b/basics/cross-program-invocation/anchor-v1/programs/lever/Cargo.toml index 99cf6826..b9f72e3c 100644 --- a/basics/cross-program-invocation/anchor-v1/programs/lever/Cargo.toml +++ b/basics/cross-program-invocation/anchor-v1/programs/lever/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/favorites/anchor-v1/README.md b/basics/favorites/anchor-v1/README.md index f669c7cf..242781aa 100644 --- a/basics/favorites/anchor-v1/README.md +++ b/basics/favorites/anchor-v1/README.md @@ -1,9 +1,9 @@ # Favorites (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Store per-user favorites in a [PDA](https://solana.com/docs/terminology#program-derived-address-pda). [Account](https://solana.com/docs/terminology#account) constraints ensure each user can only modify their own data. diff --git a/basics/favorites/anchor-v1/programs/favorites/Cargo.toml b/basics/favorites/anchor-v1/programs/favorites/Cargo.toml index 0eff42b2..4d900390 100644 --- a/basics/favorites/anchor-v1/programs/favorites/Cargo.toml +++ b/basics/favorites/anchor-v1/programs/favorites/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = {version = "1.2.0", features = ["init-if-needed"]} +anchor-lang = {version = "1.2.1", features = ["init-if-needed"]} [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/hello-solana/anchor-v1/README.md b/basics/hello-solana/anchor-v1/README.md index 2193915e..93318892 100644 --- a/basics/hello-solana/anchor-v1/README.md +++ b/basics/hello-solana/anchor-v1/README.md @@ -1,9 +1,9 @@ # Hello Solana (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Minimal program that logs a greeting. Introduces transactions, instructions, and program entrypoints. diff --git a/basics/hello-solana/anchor-v1/programs/hello-solana/Cargo.toml b/basics/hello-solana/anchor-v1/programs/hello-solana/Cargo.toml index 0338f9a9..5e4e4a79 100644 --- a/basics/hello-solana/anchor-v1/programs/hello-solana/Cargo.toml +++ b/basics/hello-solana/anchor-v1/programs/hello-solana/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/pda-rent-payer/anchor-v1/README.md b/basics/pda-rent-payer/anchor-v1/README.md index 4ebb15f6..0e922ff7 100644 --- a/basics/pda-rent-payer/anchor-v1/README.md +++ b/basics/pda-rent-payer/anchor-v1/README.md @@ -1,9 +1,9 @@ # PDA Rent Payer (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Use a [PDA](https://solana.com/docs/terminology#program-derived-address-pda) to pay [rent](https://solana.com/docs/terminology#rent) when creating another account. diff --git a/basics/pda-rent-payer/anchor-v1/programs/anchor-program-example/Cargo.toml b/basics/pda-rent-payer/anchor-v1/programs/anchor-program-example/Cargo.toml index a7aa03d9..1815683e 100644 --- a/basics/pda-rent-payer/anchor-v1/programs/anchor-program-example/Cargo.toml +++ b/basics/pda-rent-payer/anchor-v1/programs/anchor-program-example/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/processing-instructions/anchor-v1/README.md b/basics/processing-instructions/anchor-v1/README.md index 5fa25d9e..50f98066 100644 --- a/basics/processing-instructions/anchor-v1/README.md +++ b/basics/processing-instructions/anchor-v1/README.md @@ -1,9 +1,9 @@ # Processing Instructions (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Pass arguments into an [instruction handler](https://solana.com/docs/terminology#instruction-handler) and use them in program logic. diff --git a/basics/processing-instructions/anchor-v1/programs/processing-instructions/Cargo.toml b/basics/processing-instructions/anchor-v1/programs/processing-instructions/Cargo.toml index 5973ebf6..84c68fbd 100644 --- a/basics/processing-instructions/anchor-v1/programs/processing-instructions/Cargo.toml +++ b/basics/processing-instructions/anchor-v1/programs/processing-instructions/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/program-derived-addresses/anchor-v1/README.md b/basics/program-derived-addresses/anchor-v1/README.md index fb90bca8..57386f1b 100644 --- a/basics/program-derived-addresses/anchor-v1/README.md +++ b/basics/program-derived-addresses/anchor-v1/README.md @@ -1,9 +1,9 @@ # Program Derived Addresses (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Derive and use PDAs as deterministic account addresses for program-owned state. diff --git a/basics/program-derived-addresses/anchor-v1/programs/anchor-program-example/Cargo.toml b/basics/program-derived-addresses/anchor-v1/programs/anchor-program-example/Cargo.toml index b3bdd73b..e05fa97c 100644 --- a/basics/program-derived-addresses/anchor-v1/programs/anchor-program-example/Cargo.toml +++ b/basics/program-derived-addresses/anchor-v1/programs/anchor-program-example/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/pyth/anchor-v1/README.md b/basics/pyth/anchor-v1/README.md index 6f46a91c..370e64fc 100644 --- a/basics/pyth/anchor-v1/README.md +++ b/basics/pyth/anchor-v1/README.md @@ -1,9 +1,9 @@ # Pyth Price Feeds (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Read a [Pyth](https://pyth.network/) price feed account and log price, confidence, and exponent. diff --git a/basics/pyth/anchor-v1/programs/pythexample/Cargo.toml b/basics/pyth/anchor-v1/programs/pythexample/Cargo.toml index 8f6ab375..1fda7efe 100644 --- a/basics/pyth/anchor-v1/programs/pythexample/Cargo.toml +++ b/basics/pyth/anchor-v1/programs/pythexample/Cargo.toml @@ -21,7 +21,7 @@ custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] # Self-dependency with no-entrypoint: host test builds otherwise export a diff --git a/basics/realloc/anchor-v1/README.md b/basics/realloc/anchor-v1/README.md index b19db4c5..07292ab7 100644 --- a/basics/realloc/anchor-v1/README.md +++ b/basics/realloc/anchor-v1/README.md @@ -1,9 +1,9 @@ # Realloc (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Grow or shrink account data when variable-length storage is required. diff --git a/basics/realloc/anchor-v1/programs/anchor-realloc/Cargo.toml b/basics/realloc/anchor-v1/programs/anchor-realloc/Cargo.toml index cdb9c727..ce4f8424 100644 --- a/basics/realloc/anchor-v1/programs/anchor-realloc/Cargo.toml +++ b/basics/realloc/anchor-v1/programs/anchor-realloc/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/rent/anchor-v1/README.md b/basics/rent/anchor-v1/README.md index 351a45cc..1b97d715 100644 --- a/basics/rent/anchor-v1/README.md +++ b/basics/rent/anchor-v1/README.md @@ -1,9 +1,9 @@ # Rent (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Calculate account size and the minimum rent-exempt [lamport](https://solana.com/docs/terminology#lamport) balance. diff --git a/basics/rent/anchor-v1/programs/rent-example/Cargo.toml b/basics/rent/anchor-v1/programs/rent-example/Cargo.toml index 6e31f710..56b5ae6e 100644 --- a/basics/rent/anchor-v1/programs/rent-example/Cargo.toml +++ b/basics/rent/anchor-v1/programs/rent-example/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/repository-layout/anchor-v1/README.md b/basics/repository-layout/anchor-v1/README.md index 595183ca..8c966bc5 100644 --- a/basics/repository-layout/anchor-v1/README.md +++ b/basics/repository-layout/anchor-v1/README.md @@ -1,9 +1,9 @@ # Repository Layout (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Organize a larger program across modules (state, instructions, errors) instead of a single file. diff --git a/basics/repository-layout/anchor-v1/programs/carnival/Cargo.toml b/basics/repository-layout/anchor-v1/programs/carnival/Cargo.toml index 32ca7ad6..d4a9dc96 100644 --- a/basics/repository-layout/anchor-v1/programs/carnival/Cargo.toml +++ b/basics/repository-layout/anchor-v1/programs/carnival/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/basics/transaction-v1/anchor-v1/README.md b/basics/transaction-v1/anchor-v1/README.md index 7b86fe0e..477d32e6 100644 --- a/basics/transaction-v1/anchor-v1/README.md +++ b/basics/transaction-v1/anchor-v1/README.md @@ -1,8 +1,8 @@ # Solana Transaction v1 (Anchor) > [!NOTE] -> This example is on Anchor 1.2.0, the current stable Anchor release. Every `anchor` -> command on this page needs the v1 CLI: `avm install 1.2.0 && avm use 1.2.0`. There is +> This example is on Anchor 1.2.1, the current stable Anchor release. Every `anchor` +> command on this page needs the v1 CLI: `avm install 1.2.1 && avm use 1.2.1`. There is > no Anchor v2 copy yet: Anchor v2's test harness runs on a LiteSVM that predates v1. A Solana transaction v1 example: a program that stores a 3,000 byte document in a single [instruction](https://solana.com/docs/references/terminology#instruction), which only fits inside the v1 [transaction](https://solana.com/docs/references/terminology#transaction) format (4,096 bytes, up from the 1,232 bytes of legacy and v0 transactions). Nothing in the program is specific to v1: an Anchor program reads its accounts and instruction data the same way whichever format carried them, and no Anchor change is needed to be called through v1. The tests are where v1 shows up, because the client builds the transaction. diff --git a/basics/transaction-v1/anchor-v1/programs/transaction-v1/Cargo.toml b/basics/transaction-v1/anchor-v1/programs/transaction-v1/Cargo.toml index abcc9fb0..7aebf2f7 100644 --- a/basics/transaction-v1/anchor-v1/programs/transaction-v1/Cargo.toml +++ b/basics/transaction-v1/anchor-v1/programs/transaction-v1/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] # 0.16.0 is the first LiteSVM that understands v1 transactions: it reads the diff --git a/basics/transfer-sol/anchor-v1/README.md b/basics/transfer-sol/anchor-v1/README.md index ec8939a6..6cd7fe24 100644 --- a/basics/transfer-sol/anchor-v1/README.md +++ b/basics/transfer-sol/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer SOL (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Transfer native SOL between accounts using the System Program. diff --git a/basics/transfer-sol/anchor-v1/programs/transfer-sol/Cargo.toml b/basics/transfer-sol/anchor-v1/programs/transfer-sol/Cargo.toml index 98404261..28283822 100644 --- a/basics/transfer-sol/anchor-v1/programs/transfer-sol/Cargo.toml +++ b/basics/transfer-sol/anchor-v1/programs/transfer-sol/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/compression/cnft-burn/anchor-v1/README.md b/compression/cnft-burn/anchor-v1/README.md index d24effcb..b21d0f8a 100644 --- a/compression/cnft-burn/anchor-v1/README.md +++ b/compression/cnft-burn/anchor-v1/README.md @@ -1,9 +1,9 @@ # cnft-burn > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). An [Anchor](https://solana.com/docs/terminology#anchor) [program](https://solana.com/docs/terminology#program) that burns compressed NFTs (cNFTs) in your collection. The program performs a [CPI](https://solana.com/docs/terminology#cross-program-invocation-cpi) into the Metaplex Bubblegum program to do the burn. diff --git a/compression/cnft-burn/anchor-v1/programs/cnft-burn/Cargo.toml b/compression/cnft-burn/anchor-v1/programs/cnft-burn/Cargo.toml index f0a699ad..07a53344 100644 --- a/compression/cnft-burn/anchor-v1/programs/cnft-burn/Cargo.toml +++ b/compression/cnft-burn/anchor-v1/programs/cnft-burn/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" # mpl-bubblegum and spl-account-compression removed: they depend on solana-program 2.x # which is incompatible with Anchor 1.0's solana 3.x types. CPI calls are built manually # using raw invoke() with hardcoded program IDs and discriminators. diff --git a/compression/cnft-vault/anchor-v1/README.md b/compression/cnft-vault/anchor-v1/README.md index d09bfbb8..8edf4387 100644 --- a/compression/cnft-vault/anchor-v1/README.md +++ b/compression/cnft-vault/anchor-v1/README.md @@ -1,9 +1,9 @@ # cNFT Vault > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Example code for working with Metaplex compressed NFTs (cNFTs) inside Solana [Anchor](https://solana.com/docs/terminology#anchor) [programs](https://solana.com/docs/terminology#program). diff --git a/compression/cnft-vault/anchor-v1/programs/cnft-vault/Cargo.toml b/compression/cnft-vault/anchor-v1/programs/cnft-vault/Cargo.toml index accfcac4..57c9a784 100644 --- a/compression/cnft-vault/anchor-v1/programs/cnft-vault/Cargo.toml +++ b/compression/cnft-vault/anchor-v1/programs/cnft-vault/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" # mpl-bubblegum and spl-account-compression removed: they depend on solana-program 2.x # which is incompatible with Anchor 1.0's solana 3.x types. CPI calls are built manually # using raw invoke_signed() with hardcoded program IDs and discriminators. diff --git a/compression/cutils/anchor-v1/README.md b/compression/cutils/anchor-v1/README.md index d2f9cc36..d12bac18 100644 --- a/compression/cutils/anchor-v1/README.md +++ b/compression/cutils/anchor-v1/README.md @@ -1,9 +1,9 @@ # cNFT Utils > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Example code for working with Metaplex compressed NFTs (cNFTs) inside Solana [Anchor](https://solana.com/docs/terminology#anchor) [programs](https://solana.com/docs/terminology#program). diff --git a/compression/cutils/anchor-v1/programs/cutils/Cargo.toml b/compression/cutils/anchor-v1/programs/cutils/Cargo.toml index fdf639de..69b24e5d 100644 --- a/compression/cutils/anchor-v1/programs/cutils/Cargo.toml +++ b/compression/cutils/anchor-v1/programs/cutils/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" # mpl-bubblegum and spl-account-compression removed: they depend on solana-program 2.x # which is incompatible with Anchor 1.0's solana 3.x types. CPI calls are built manually # using raw invoke() with hardcoded program IDs and discriminators. Bubblegum types diff --git a/docs/anchor-v2-migration.md b/docs/anchor-v2-migration.md index 51709b69..6b4f59bd 100644 --- a/docs/anchor-v2-migration.md +++ b/docs/anchor-v2-migration.md @@ -10,14 +10,14 @@ The single most important one is **[borrows held across CPIs](#borrows-held-acro it is the only rule here that the compiler will not catch for you. Every difference below has a worked example in this repository. Each Anchor example keeps -both versions side by side: `/anchor-v1/` is the program on 1.2.0 and +both versions side by side: `/anchor-v1/` is the program on 1.2.1 and `/anchor/` is the same program on 2.0.0-rc.1, so diffing the two directories shows any rule here applied to real code. Both are built and tested in CI, by the Anchor v1 and Anchor v2 workflows respectively. ## Manifest Changes Every Crate Needs -- `anchor-lang` and `anchor-spl` both move from `1.2.0` to `2.0.0-rc.1`. +- `anchor-lang` and `anchor-spl` both move from `1.2.1` to `2.0.0-rc.1`. - `wincode = { version = "0.5", features = ["derive"] }` is new. - `features = ["init-if-needed"]` goes away. There is no such feature, and the constraint is always available. diff --git a/finance/betting-market/anchor-v1/README.md b/finance/betting-market/anchor-v1/README.md index 779801ce..415eb2e6 100644 --- a/finance/betting-market/anchor-v1/README.md +++ b/finance/betting-market/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Betting Market (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A parimutuel (pooled) betting market on Solana. An admin creates an **event**, adds the possible diff --git a/finance/betting-market/anchor-v1/programs/betting-market/Cargo.toml b/finance/betting-market/anchor-v1/programs/betting-market/Cargo.toml index ee90cb71..4942b15e 100644 --- a/finance/betting-market/anchor-v1/programs/betting-market/Cargo.toml +++ b/finance/betting-market/anchor-v1/programs/betting-market/Cargo.toml @@ -21,8 +21,8 @@ custom-panic = [] [dependencies] # init-if-needed: place_bet creates the Bet account only on a bettor's first bet on an outcome. -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" [dev-dependencies] # no-entrypoint: solana-kite pulls these SPL program crates into the host test diff --git a/finance/escrow/anchor-v1/README.md b/finance/escrow/anchor-v1/README.md index 6e880fd1..92f5fe73 100644 --- a/finance/escrow/anchor-v1/README.md +++ b/finance/escrow/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Escrow (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). This Solana [program](https://solana.com/docs/terminology#program) is an **escrow** - it lets a **maker** swap a specific amount of one token for a desired amount of another token with a **taker**, atomically and without either party having to trust the other. diff --git a/finance/escrow/anchor-v1/programs/escrow/Cargo.toml b/finance/escrow/anchor-v1/programs/escrow/Cargo.toml index d1ff435b..09c25e72 100644 --- a/finance/escrow/anchor-v1/programs/escrow/Cargo.toml +++ b/finance/escrow/anchor-v1/programs/escrow/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"]} -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"]} +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/finance/fundraiser/anchor-v1/README.md b/finance/fundraiser/anchor-v1/README.md index e3fa6983..660ecbbb 100644 --- a/finance/fundraiser/anchor-v1/README.md +++ b/finance/fundraiser/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Fundraiser (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Onchain crowdfunding on Solana: a program that collects tokens toward a target amount, like Kickstarter without a payment processor. A **maker** creates a fundraiser [account](https://solana.com/docs/terminology#account), specifies the [mint](https://solana.com/docs/terminology#token-mint) they want to receive, the target amount, and a duration in days. **Contributors** contribute while the window is open. If the target is reached, the maker claims the funds, anyone closes each contributor's record to return its rent to that contributor, and the maker then closes the fundraiser; if it is not reached by the deadline, anyone can refund each contributor, and once refunds are complete the maker closes the fundraiser. Either way, the maker can then open a new one. diff --git a/finance/fundraiser/anchor-v1/programs/fundraiser/Cargo.toml b/finance/fundraiser/anchor-v1/programs/fundraiser/Cargo.toml index 6babd34d..d7cfc6dd 100644 --- a/finance/fundraiser/anchor-v1/programs/fundraiser/Cargo.toml +++ b/finance/fundraiser/anchor-v1/programs/fundraiser/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/finance/lending/anchor-v1/README.md b/finance/lending/anchor-v1/README.md index fcc21e87..479301f6 100644 --- a/finance/lending/anchor-v1/README.md +++ b/finance/lending/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Lending (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A Kamino/Solend-style borrow/lend program on Solana: suppliers earn interest on deposits, @@ -299,7 +299,7 @@ on its own. ## Setup -- Rust and the Solana toolchain (`cargo-build-sbf`), Anchor 1.2.0, Solana 3.1.8. +- Rust and the Solana toolchain (`cargo-build-sbf`), Anchor 1.2.1, Solana 3.1.8. - This program has no client/JavaScript code; tests are Rust + LiteSVM. ## Testing diff --git a/finance/lending/anchor-v1/programs/lending/Cargo.toml b/finance/lending/anchor-v1/programs/lending/Cargo.toml index a8fe5968..9294fed6 100644 --- a/finance/lending/anchor-v1/programs/lending/Cargo.toml +++ b/finance/lending/anchor-v1/programs/lending/Cargo.toml @@ -21,8 +21,8 @@ custom-panic = [] [dependencies] # init-if-needed: the obligation share vault and the test price feed are created lazily. -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" # For the LastRestartSlot sysvar (not re-exported by anchor-lang): the price # feed rejects prices from before a cluster restart. Same major as the # solana-sysvar anchor-lang itself uses, so only one copy is compiled in. diff --git a/finance/managed-fund/anchor-v1/README.md b/finance/managed-fund/anchor-v1/README.md index 319e2106..826eb68b 100644 --- a/finance/managed-fund/anchor-v1/README.md +++ b/finance/managed-fund/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Managed Fund (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A manager-run investment fund on Solana, the onchain equivalent of a mutual fund. Users deposit [USDC](https://www.investopedia.com/terms/u/usd-coin-usdc.asp) and receive shares representing proportional ownership of a portfolio of assets. The manager adds assets a curator has approved and sets their target weights; each deposit is deployed across those assets at its weights in the same transaction. The manager rebalances as prices drift, earns a fee, and depositors withdraw their proportional slice in kind when they choose. diff --git a/finance/managed-fund/anchor-v1/app/README.md b/finance/managed-fund/anchor-v1/app/README.md index be08bbff..c0223b12 100644 --- a/finance/managed-fund/anchor-v1/app/README.md +++ b/finance/managed-fund/anchor-v1/app/README.md @@ -68,7 +68,7 @@ client mirrors it call-for-call. ## Where the IDL comes from `src/idl/managed_fund.json` is generated from the program source with -`anchor idl build` (Anchor 1.2.0, the version CI installs) and committed. If you change +`anchor idl build` (Anchor 1.2.1, the version CI installs) and committed. If you change the program, regenerate it: ```sh diff --git a/finance/managed-fund/anchor-v1/programs/managed-fund/Cargo.toml b/finance/managed-fund/anchor-v1/programs/managed-fund/Cargo.toml index 1f58e5d5..265e9594 100644 --- a/finance/managed-fund/anchor-v1/programs/managed-fund/Cargo.toml +++ b/finance/managed-fund/anchor-v1/programs/managed-fund/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" # For the LastRestartSlot sysvar (not re-exported by anchor-lang): the oracle # rejects prices from before a cluster restart. Same major as the # solana-sysvar anchor-lang itself uses, so only one copy is compiled in. diff --git a/finance/managed-fund/anchor-v1/programs/mock-swap-router/Cargo.toml b/finance/managed-fund/anchor-v1/programs/mock-swap-router/Cargo.toml index 9bf4fd9f..2cce130a 100644 --- a/finance/managed-fund/anchor-v1/programs/mock-swap-router/Cargo.toml +++ b/finance/managed-fund/anchor-v1/programs/mock-swap-router/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/finance/options/anchor-v1/README.md b/finance/options/anchor-v1/README.md index f8349dee..0fd375ea 100644 --- a/finance/options/anchor-v1/README.md +++ b/finance/options/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Options (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A Solana options venue is a program that lets one user sell another the right, diff --git a/finance/options/anchor-v1/programs/options/Cargo.toml b/finance/options/anchor-v1/programs/options/Cargo.toml index 668105a3..ddebcffc 100644 --- a/finance/options/anchor-v1/programs/options/Cargo.toml +++ b/finance/options/anchor-v1/programs/options/Cargo.toml @@ -24,8 +24,8 @@ custom-panic = [] # party's token account for the asset they are about to be paid in, so a call # holder who has never held the underlying needs no separate setup transaction. # The receiving party is always the payer, so nobody funds another's rent. -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" # Declared only so Cargo feature-unification turns on `no-entrypoint`; without # these the test binary links two `entrypoint` symbols and fails to build. spl-token = { version = "9.0.0", features = ["no-entrypoint"] } diff --git a/finance/order-book/anchor-v1/README.md b/finance/order-book/anchor-v1/README.md index 83c5c301..10dc6e77 100644 --- a/finance/order-book/anchor-v1/README.md +++ b/finance/order-book/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Order Book Exchange (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). This Solana program is an **[order book](https://www.investopedia.com/terms/o/order-book.asp)** exchange: specifically, a **[central limit order @@ -1571,7 +1571,7 @@ run first. ### Prerequisites -- Anchor 1.2.0 +- Anchor 1.2.1 - Solana CLI (`solana -V`) - Rust stable (pinned at the repo root) diff --git a/finance/order-book/anchor-v1/programs/order-book/Cargo.toml b/finance/order-book/anchor-v1/programs/order-book/Cargo.toml index b328f49e..1c6255c1 100644 --- a/finance/order-book/anchor-v1/programs/order-book/Cargo.toml +++ b/finance/order-book/anchor-v1/programs/order-book/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" # Used by the ported Openbook slab - `bytemuck::Pod` / `Zeroable` on every node # variant + `min_const_generics` so `[AnyNode; 1024]` can derive Pod without # hitting bytemuck's default-32 array cap. `static_assertions` keeps the slab diff --git a/finance/perpetual-futures/anchor-v1/README.md b/finance/perpetual-futures/anchor-v1/README.md index 27b7a1fa..03d2b1cd 100644 --- a/finance/perpetual-futures/anchor-v1/README.md +++ b/finance/perpetual-futures/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Perpetual Futures (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A perpetual futures exchange on Solana: a venue for making leveraged bets on an asset's price without ever owning the asset. It is modelled on the oracle-priced, pool-collateralized design used by [Jupiter Perpetuals](https://station.jup.ag/guides/perpetual-exchange/overview) and GMX (and the open-source [`solana-labs/perpetuals`](https://github.com/solana-labs/perpetuals) reference that [Adrena](https://github.com/AdrenaFoundation/adrena-program) and [Flash Trade](https://github.com/flash-trade/flash-perpetuals) fork), rather than the order-book design used by [Drift](https://docs.drift.trade/). diff --git a/finance/perpetual-futures/anchor-v1/programs/mock-price-feed/Cargo.toml b/finance/perpetual-futures/anchor-v1/programs/mock-price-feed/Cargo.toml index bc8254df..6b845486 100644 --- a/finance/perpetual-futures/anchor-v1/programs/mock-price-feed/Cargo.toml +++ b/finance/perpetual-futures/anchor-v1/programs/mock-price-feed/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] } diff --git a/finance/perpetual-futures/anchor-v1/programs/perpetual-futures/Cargo.toml b/finance/perpetual-futures/anchor-v1/programs/perpetual-futures/Cargo.toml index 4a4bd0f2..0355baf2 100644 --- a/finance/perpetual-futures/anchor-v1/programs/perpetual-futures/Cargo.toml +++ b/finance/perpetual-futures/anchor-v1/programs/perpetual-futures/Cargo.toml @@ -23,8 +23,8 @@ custom-panic = [] # init-if-needed lets add_liquidity create the provider's liquidity-provider # token account on their first deposit. The provider is the payer, so this does # not let one party fund another's rent. -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" # Not used directly. Declared so Cargo feature unification turns on # `no-entrypoint` for the spl-token that anchor-spl pulls in; without it the # integration-test binary links two `entrypoint` symbols (this program's and diff --git a/finance/prop-amm/anchor-v1/README.md b/finance/prop-amm/anchor-v1/README.md index 0b5bce2b..c503f1b4 100644 --- a/finance/prop-amm/anchor-v1/README.md +++ b/finance/prop-amm/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Prop AMM (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). An oracle-quoted **proprietary AMM** on Solana: a market-making firm funds a diff --git a/finance/prop-amm/anchor-v1/programs/mock-price-feed/Cargo.toml b/finance/prop-amm/anchor-v1/programs/mock-price-feed/Cargo.toml index 9d91fc55..e73cf554 100644 --- a/finance/prop-amm/anchor-v1/programs/mock-price-feed/Cargo.toml +++ b/finance/prop-amm/anchor-v1/programs/mock-price-feed/Cargo.toml @@ -20,7 +20,7 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" +anchor-lang = "1.2.1" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] } diff --git a/finance/prop-amm/anchor-v1/programs/prop-amm/Cargo.toml b/finance/prop-amm/anchor-v1/programs/prop-amm/Cargo.toml index b09f862b..29fe7aef 100644 --- a/finance/prop-amm/anchor-v1/programs/prop-amm/Cargo.toml +++ b/finance/prop-amm/anchor-v1/programs/prop-amm/Cargo.toml @@ -22,8 +22,8 @@ custom-panic = [] [dependencies] # init-if-needed: swap creates the trader's destination token account when it # doesn't exist yet, so a first-time buyer needs no separate setup transaction. -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" # For the LastRestartSlot sysvar (not re-exported by anchor-lang): the oracle # reader rejects prices from before a cluster restart. Same major as the # solana-sysvar anchor-lang itself uses, so only one copy is compiled in. diff --git a/finance/token-swap/anchor-v1/README.md b/finance/token-swap/anchor-v1/README.md index d26c712c..71f7e85a 100644 --- a/finance/token-swap/anchor-v1/README.md +++ b/finance/token-swap/anchor-v1/README.md @@ -1,9 +1,9 @@ # Solana Token Swap AMM (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A constant-product AMM (automated market maker) on Solana: create pools, deposit liquidity, swap with slippage guards, and withdraw. This is the exchange design behind Solana venues like Raydium and Orca. diff --git a/finance/token-swap/anchor-v1/programs/token-swap/Cargo.toml b/finance/token-swap/anchor-v1/programs/token-swap/Cargo.toml index 2f89bdcb..966c837b 100644 --- a/finance/token-swap/anchor-v1/programs/token-swap/Cargo.toml +++ b/finance/token-swap/anchor-v1/programs/token-swap/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata", "spl-token-interface"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata", "spl-token-interface"] } # `fixed` removed: all financial math is now u128 + checked_*, matching how # production Solana AMMs (Orca, Raydium, Meteora, Saber) do it. Floats / # fixed-point types are not used for money in this program. diff --git a/tokens/create-token/anchor-v1/README.md b/tokens/create-token/anchor-v1/README.md index 64f4a66a..7aeb7272 100644 --- a/tokens/create-token/anchor-v1/README.md +++ b/tokens/create-token/anchor-v1/README.md @@ -1,9 +1,9 @@ # Create Token (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Create a token mint with metadata (symbol, name, uri) via the Classic Token and Metaplex Token Metadata programs. diff --git a/tokens/create-token/anchor-v1/programs/create-token/Cargo.toml b/tokens/create-token/anchor-v1/programs/create-token/Cargo.toml index e0ac8182..f157d00e 100644 --- a/tokens/create-token/anchor-v1/programs/create-token/Cargo.toml +++ b/tokens/create-token/anchor-v1/programs/create-token/Cargo.toml @@ -21,8 +21,8 @@ custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = "1.2.1" +anchor-spl = { version = "1.2.1", features = ["metadata"] } [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/external-delegate-token-master/anchor-v1/README.md b/tokens/external-delegate-token-master/anchor-v1/README.md index 43344a00..fb8b8bf4 100644 --- a/tokens/external-delegate-token-master/anchor-v1/README.md +++ b/tokens/external-delegate-token-master/anchor-v1/README.md @@ -1,9 +1,9 @@ # External Delegate Token Master (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Authorize token transfers using an external secp256k1 delegate signature. diff --git a/tokens/external-delegate-token-master/anchor-v1/programs/external-delegate-token-master/Cargo.toml b/tokens/external-delegate-token-master/anchor-v1/programs/external-delegate-token-master/Cargo.toml index 62e27bc0..188cde56 100644 --- a/tokens/external-delegate-token-master/anchor-v1/programs/external-delegate-token-master/Cargo.toml +++ b/tokens/external-delegate-token-master/anchor-v1/programs/external-delegate-token-master/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata"] } sha3 = "0.10.8" solana-secp256k1-recover = "2.0.0" diff --git a/tokens/nft-minter/anchor-v1/README.md b/tokens/nft-minter/anchor-v1/README.md index 60cb6209..65f719bd 100644 --- a/tokens/nft-minter/anchor-v1/README.md +++ b/tokens/nft-minter/anchor-v1/README.md @@ -1,9 +1,9 @@ # NFT Minter (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Mint an NFT from inside your program using the Classic Token Program and Metaplex Token Metadata. diff --git a/tokens/nft-minter/anchor-v1/programs/nft-minter/Cargo.toml b/tokens/nft-minter/anchor-v1/programs/nft-minter/Cargo.toml index 9f8d0f11..7e49fd45 100644 --- a/tokens/nft-minter/anchor-v1/programs/nft-minter/Cargo.toml +++ b/tokens/nft-minter/anchor-v1/programs/nft-minter/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata"] } [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/nft-operations/anchor-v1/README.md b/tokens/nft-operations/anchor-v1/README.md index fb9207f6..75b31968 100644 --- a/tokens/nft-operations/anchor-v1/README.md +++ b/tokens/nft-operations/anchor-v1/README.md @@ -1,9 +1,9 @@ # NFT Operations > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Create an NFT collection, mint an NFT, and verify an NFT as part of a collection - all using Metaplex Token Metadata. diff --git a/tokens/nft-operations/anchor-v1/programs/mint-nft/Cargo.toml b/tokens/nft-operations/anchor-v1/programs/mint-nft/Cargo.toml index 7e2030c0..800042be 100644 --- a/tokens/nft-operations/anchor-v1/programs/mint-nft/Cargo.toml +++ b/tokens/nft-operations/anchor-v1/programs/mint-nft/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata"] } [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/pda-mint-authority/anchor-v1/README.md b/tokens/pda-mint-authority/anchor-v1/README.md index 307ae840..f14d5fcf 100644 --- a/tokens/pda-mint-authority/anchor-v1/README.md +++ b/tokens/pda-mint-authority/anchor-v1/README.md @@ -1,9 +1,9 @@ # PDA Mint Authority (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Mint tokens with a PDA as mint authority so the program controls issuance. diff --git a/tokens/pda-mint-authority/anchor-v1/programs/token-minter/Cargo.toml b/tokens/pda-mint-authority/anchor-v1/programs/token-minter/Cargo.toml index cd5c74e3..667df381 100644 --- a/tokens/pda-mint-authority/anchor-v1/programs/token-minter/Cargo.toml +++ b/tokens/pda-mint-authority/anchor-v1/programs/token-minter/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata"] } [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/basics/anchor-v1/README.md b/tokens/token-extensions/basics/anchor-v1/README.md index 25f32884..7f27b036 100644 --- a/tokens/token-extensions/basics/anchor-v1/README.md +++ b/tokens/token-extensions/basics/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Basics (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Create mints, mint tokens, and transfer using the [Token Extensions Program](https://solana.com/docs/terminology#token-extensions-program). diff --git a/tokens/token-extensions/basics/anchor-v1/programs/basics/Cargo.toml b/tokens/token-extensions/basics/anchor-v1/programs/basics/Cargo.toml index fd1ffb32..d39faac2 100644 --- a/tokens/token-extensions/basics/anchor-v1/programs/basics/Cargo.toml +++ b/tokens/token-extensions/basics/anchor-v1/programs/basics/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-spl = "1.2.0" -anchor-lang = { version = "1.2.0", features= ["init-if-needed"]} +anchor-spl = "1.2.1" +anchor-lang = { version = "1.2.1", features= ["init-if-needed"]} [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/cpi-guard/anchor-v1/README.md b/tokens/token-extensions/cpi-guard/anchor-v1/README.md index 65416e9e..fc1b8c2d 100644 --- a/tokens/token-extensions/cpi-guard/anchor-v1/README.md +++ b/tokens/token-extensions/cpi-guard/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - CPI Guard (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Enable CPI Guard so certain token actions cannot run inside a CPI context. diff --git a/tokens/token-extensions/cpi-guard/anchor-v1/programs/cpi-guard/Cargo.toml b/tokens/token-extensions/cpi-guard/anchor-v1/programs/cpi-guard/Cargo.toml index 3c72afb1..4d05e668 100644 --- a/tokens/token-extensions/cpi-guard/anchor-v1/programs/cpi-guard/Cargo.toml +++ b/tokens/token-extensions/cpi-guard/anchor-v1/programs/cpi-guard/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/default-account-state/anchor-v1/README.md b/tokens/token-extensions/default-account-state/anchor-v1/README.md index f07f03a5..ef1a1979 100644 --- a/tokens/token-extensions/default-account-state/anchor-v1/README.md +++ b/tokens/token-extensions/default-account-state/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Default Account State (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). New token accounts are frozen by default until thawed. diff --git a/tokens/token-extensions/default-account-state/anchor-v1/programs/default-account-state/Cargo.toml b/tokens/token-extensions/default-account-state/anchor-v1/programs/default-account-state/Cargo.toml index 94803c0e..6ccc500f 100644 --- a/tokens/token-extensions/default-account-state/anchor-v1/programs/default-account-state/Cargo.toml +++ b/tokens/token-extensions/default-account-state/anchor-v1/programs/default-account-state/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/group/anchor-v1/README.md b/tokens/token-extensions/group/anchor-v1/README.md index 1d6fdd49..3c021dd8 100644 --- a/tokens/token-extensions/group/anchor-v1/README.md +++ b/tokens/token-extensions/group/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Group Pointer (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Link tokens to a group using the Group Pointer extension. diff --git a/tokens/token-extensions/group/anchor-v1/programs/group/Cargo.toml b/tokens/token-extensions/group/anchor-v1/programs/group/Cargo.toml index c794584d..d2c34e20 100644 --- a/tokens/token-extensions/group/anchor-v1/programs/group/Cargo.toml +++ b/tokens/token-extensions/group/anchor-v1/programs/group/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/immutable-owner/anchor-v1/README.md b/tokens/token-extensions/immutable-owner/anchor-v1/README.md index 4b1f717f..64e684cf 100644 --- a/tokens/token-extensions/immutable-owner/anchor-v1/README.md +++ b/tokens/token-extensions/immutable-owner/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Immutable Owner (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Create token accounts whose owner field cannot be changed after creation. diff --git a/tokens/token-extensions/immutable-owner/anchor-v1/programs/immutable-owner/Cargo.toml b/tokens/token-extensions/immutable-owner/anchor-v1/programs/immutable-owner/Cargo.toml index 6409f39a..e7ac2057 100644 --- a/tokens/token-extensions/immutable-owner/anchor-v1/programs/immutable-owner/Cargo.toml +++ b/tokens/token-extensions/immutable-owner/anchor-v1/programs/immutable-owner/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/interest-bearing/anchor-v1/README.md b/tokens/token-extensions/interest-bearing/anchor-v1/README.md index 2f23f49d..1b579f56 100644 --- a/tokens/token-extensions/interest-bearing/anchor-v1/README.md +++ b/tokens/token-extensions/interest-bearing/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Interest Bearing (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Display balances that accrue interest over time using the interest-bearing extension. diff --git a/tokens/token-extensions/interest-bearing/anchor-v1/programs/interest-bearing/Cargo.toml b/tokens/token-extensions/interest-bearing/anchor-v1/programs/interest-bearing/Cargo.toml index 60e3f5bd..0938d5cd 100644 --- a/tokens/token-extensions/interest-bearing/anchor-v1/programs/interest-bearing/Cargo.toml +++ b/tokens/token-extensions/interest-bearing/anchor-v1/programs/interest-bearing/Cargo.toml @@ -21,8 +21,8 @@ custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/memo-transfer/anchor-v1/README.md b/tokens/token-extensions/memo-transfer/anchor-v1/README.md index c18a4900..73b533d5 100644 --- a/tokens/token-extensions/memo-transfer/anchor-v1/README.md +++ b/tokens/token-extensions/memo-transfer/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Memo Transfer (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Require a memo on every transfer via the memo-transfer extension. diff --git a/tokens/token-extensions/memo-transfer/anchor-v1/programs/memo-transfer/Cargo.toml b/tokens/token-extensions/memo-transfer/anchor-v1/programs/memo-transfer/Cargo.toml index 95f48c0e..76089b7d 100644 --- a/tokens/token-extensions/memo-transfer/anchor-v1/programs/memo-transfer/Cargo.toml +++ b/tokens/token-extensions/memo-transfer/anchor-v1/programs/memo-transfer/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/metadata/anchor-v1/README.md b/tokens/token-extensions/metadata/anchor-v1/README.md index d8a26eff..41bc2a44 100644 --- a/tokens/token-extensions/metadata/anchor-v1/README.md +++ b/tokens/token-extensions/metadata/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Onchain Metadata (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Store token metadata inside the mint account using Token Extensions metadata. diff --git a/tokens/token-extensions/metadata/anchor-v1/programs/metadata/Cargo.toml b/tokens/token-extensions/metadata/anchor-v1/programs/metadata/Cargo.toml index 656460b9..cb6fc8eb 100644 --- a/tokens/token-extensions/metadata/anchor-v1/programs/metadata/Cargo.toml +++ b/tokens/token-extensions/metadata/anchor-v1/programs/metadata/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" spl-token-metadata-interface = "0.8.0" spl-type-length-value = "0.9.1" diff --git a/tokens/token-extensions/mint-close-authority/anchor-v1/README.md b/tokens/token-extensions/mint-close-authority/anchor-v1/README.md index 05a8eb31..fb8f571d 100644 --- a/tokens/token-extensions/mint-close-authority/anchor-v1/README.md +++ b/tokens/token-extensions/mint-close-authority/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Mint Close Authority (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Designate an account allowed to close the mint and reclaim lamports. diff --git a/tokens/token-extensions/mint-close-authority/anchor-v1/programs/mint-close-authority/Cargo.toml b/tokens/token-extensions/mint-close-authority/anchor-v1/programs/mint-close-authority/Cargo.toml index d0646853..ff292c7d 100644 --- a/tokens/token-extensions/mint-close-authority/anchor-v1/programs/mint-close-authority/Cargo.toml +++ b/tokens/token-extensions/mint-close-authority/anchor-v1/programs/mint-close-authority/Cargo.toml @@ -17,8 +17,8 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/README.md b/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/README.md index 78965b04..5c250973 100644 --- a/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/README.md +++ b/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/README.md @@ -1,9 +1,9 @@ # Anchor Program > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). ```bash diff --git a/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/programs/extension_nft/Cargo.toml b/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/programs/extension_nft/Cargo.toml index 5ab9b647..e0d0ef99 100644 --- a/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/programs/extension_nft/Cargo.toml +++ b/tokens/token-extensions/nft-meta-data-pointer/anchor-example/anchor-v1/programs/extension_nft/Cargo.toml @@ -21,8 +21,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0" } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1" } # session-keys 3.1.1 is the first release that supports Anchor >=0.28,<2.0 # (so it builds against Anchor 1.0). Earlier 2.x releases pin Anchor <=0.30 # and fail to compile against the Anchor 1.0 / Solana 3.x API. Provides the diff --git a/tokens/token-extensions/non-transferable/anchor-v1/README.md b/tokens/token-extensions/non-transferable/anchor-v1/README.md index 5060d51b..99416c64 100644 --- a/tokens/token-extensions/non-transferable/anchor-v1/README.md +++ b/tokens/token-extensions/non-transferable/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Non-Transferable (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Create tokens that cannot be transferred between accounts. diff --git a/tokens/token-extensions/non-transferable/anchor-v1/programs/non-transferable/Cargo.toml b/tokens/token-extensions/non-transferable/anchor-v1/programs/non-transferable/Cargo.toml index e550fabc..37437beb 100644 --- a/tokens/token-extensions/non-transferable/anchor-v1/programs/non-transferable/Cargo.toml +++ b/tokens/token-extensions/non-transferable/anchor-v1/programs/non-transferable/Cargo.toml @@ -17,8 +17,8 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/permanent-delegate/anchor-v1/README.md b/tokens/token-extensions/permanent-delegate/anchor-v1/README.md index 72cfb3a8..357a046e 100644 --- a/tokens/token-extensions/permanent-delegate/anchor-v1/README.md +++ b/tokens/token-extensions/permanent-delegate/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Permanent Delegate (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Keep a permanent delegate with transfer rights over all token accounts for the mint. diff --git a/tokens/token-extensions/permanent-delegate/anchor-v1/programs/permanent-delegate/Cargo.toml b/tokens/token-extensions/permanent-delegate/anchor-v1/programs/permanent-delegate/Cargo.toml index 67663816..25e25c6e 100644 --- a/tokens/token-extensions/permanent-delegate/anchor-v1/programs/permanent-delegate/Cargo.toml +++ b/tokens/token-extensions/permanent-delegate/anchor-v1/programs/permanent-delegate/Cargo.toml @@ -21,8 +21,8 @@ custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/transfer-fee/anchor-v1/README.md b/tokens/token-extensions/transfer-fee/anchor-v1/README.md index 1b34bd30..c2d0910c 100644 --- a/tokens/token-extensions/transfer-fee/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-fee/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Extensions - Transfer Fee (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Charge a fee on each transfer configured at the mint level. diff --git a/tokens/token-extensions/transfer-fee/anchor-v1/programs/transfer-fee/Cargo.toml b/tokens/token-extensions/transfer-fee/anchor-v1/programs/transfer-fee/Cargo.toml index 7b2892bb..44c39c2e 100644 --- a/tokens/token-extensions/transfer-fee/anchor-v1/programs/transfer-fee/Cargo.toml +++ b/tokens/token-extensions/transfer-fee/anchor-v1/programs/transfer-fee/Cargo.toml @@ -17,8 +17,8 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/README.md index 75eea5ca..28fb7786 100644 --- a/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/README.md @@ -1,9 +1,9 @@ # Using Token Account Data as a Seed in a Transfer Hook > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Sometimes you want to use [account](https://solana.com/docs/terminology#account) data to derive additional accounts in the extra-account-metas. For example, you might want to use the [token account](https://solana.com/docs/terminology#token-account)'s owner as a seed for a [PDA](https://solana.com/docs/terminology#program-derived-address-pda). diff --git a/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/programs/transfer-hook/Cargo.toml b/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/programs/transfer-hook/Cargo.toml index f4aee2bf..55103d8d 100644 --- a/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/programs/transfer-hook/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/account-data-as-seed/anchor-v1/programs/transfer-hook/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" spl-discriminator = "0.4.1" spl-tlv-account-resolution = "0.9.0" spl-transfer-hook-interface = "0.9.0" diff --git a/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/README.md index 8a63cca6..b1e3585d 100644 --- a/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Hook - Allow/Block List (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Restrict transfers using an onchain allow/block list enforced by a transfer hook program. diff --git a/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/programs/abl-token/Cargo.toml b/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/programs/abl-token/Cargo.toml index 522ec1a6..12465651 100644 --- a/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/programs/abl-token/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/allow-block-list-token/anchor-v1/programs/abl-token/Cargo.toml @@ -22,8 +22,8 @@ custom-panic = [] [dependencies] # interface-instructions feature removed in Anchor 1.0 -anchor-lang = "1.2.0" -anchor-spl = { version = "1.2.0", features = [ +anchor-lang = "1.2.1" +anchor-spl = { version = "1.2.1", features = [ "token_2022_extensions", "token_2022", ] } diff --git a/tokens/token-extensions/transfer-hook/counter/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/counter/anchor-v1/README.md index 5d49c3f6..14912453 100644 --- a/tokens/token-extensions/transfer-hook/counter/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/counter/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Hook - Counter (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Count how many times tokens have been transferred using hook-side state. diff --git a/tokens/token-extensions/transfer-hook/counter/anchor-v1/programs/transfer-hook/Cargo.toml b/tokens/token-extensions/transfer-hook/counter/anchor-v1/programs/transfer-hook/Cargo.toml index f4aee2bf..55103d8d 100644 --- a/tokens/token-extensions/transfer-hook/counter/anchor-v1/programs/transfer-hook/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/counter/anchor-v1/programs/transfer-hook/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" spl-discriminator = "0.4.1" spl-tlv-account-resolution = "0.9.0" spl-transfer-hook-interface = "0.9.0" diff --git a/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/README.md index 6f753516..921b4731 100644 --- a/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Hook - Hello World (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Minimal transfer hook that runs custom logic on every token transfer. diff --git a/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/programs/transfer-hook/Cargo.toml b/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/programs/transfer-hook/Cargo.toml index f4aee2bf..55103d8d 100644 --- a/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/programs/transfer-hook/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/hello-world/anchor-v1/programs/transfer-hook/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" spl-discriminator = "0.4.1" spl-tlv-account-resolution = "0.9.0" spl-transfer-hook-interface = "0.9.0" diff --git a/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/README.md index 8919c6d7..6240a89c 100644 --- a/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Hook - Transfer Cost (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Charge an additional fee on each transfer via hook logic. diff --git a/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/programs/transfer-hook/Cargo.toml b/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/programs/transfer-hook/Cargo.toml index 8b8179ad..8b7b2a3b 100644 --- a/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/programs/transfer-hook/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/transfer-cost/anchor-v1/programs/transfer-hook/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = "1.2.0" -anchor-spl = "1.2.0" +anchor-lang = "1.2.1" +anchor-spl = "1.2.1" # SPL crates v3.x-compatible - uses solana-program-error 3.x matching anchor-lang 1.0 spl-discriminator = "0.5.2" # 0.11.3 or later. 0.11.2 pulled in spl-list-view 0.1.0, which was written diff --git a/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/README.md index c4b0530b..3ba8be88 100644 --- a/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Hook - Transfer Switch (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Enable or disable transfers globally with onchain switch state. diff --git a/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/programs/transfer-switch/Cargo.toml b/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/programs/transfer-switch/Cargo.toml index 0faa0fb9..e9667b54 100644 --- a/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/programs/transfer-switch/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/transfer-switch/anchor-v1/programs/transfer-switch/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" spl-discriminator = "0.4.1" spl-tlv-account-resolution = "0.9.0" spl-transfer-hook-interface = "0.9.0" diff --git a/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/README.md b/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/README.md index 89cf157a..c716e882 100644 --- a/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/README.md +++ b/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Hook - Whitelist (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). A whitelist enforced by a [Token Extensions](https://solana.com/docs/terminology#token-extensions-program) transfer hook. The whitelist is stored inline on a single [account](https://solana.com/docs/terminology#account). diff --git a/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/programs/transfer-hook/Cargo.toml b/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/programs/transfer-hook/Cargo.toml index 1a9b6c54..632351ae 100644 --- a/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/programs/transfer-hook/Cargo.toml +++ b/tokens/token-extensions/transfer-hook/whitelist/anchor-v1/programs/transfer-hook/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = "1.2.0" +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = "1.2.1" spl-discriminator = "0.4.1" spl-tlv-account-resolution = "0.9.0" spl-transfer-hook-interface = "0.9.0" diff --git a/tokens/token-minter/anchor-v1/README.md b/tokens/token-minter/anchor-v1/README.md index fad1b98a..5a8c5367 100644 --- a/tokens/token-minter/anchor-v1/README.md +++ b/tokens/token-minter/anchor-v1/README.md @@ -1,9 +1,9 @@ # Token Minter (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Mint tokens from inside your program using the [Classic Token Program](https://solana.com/docs/terminology#token-program). diff --git a/tokens/token-minter/anchor-v1/programs/token-minter/Cargo.toml b/tokens/token-minter/anchor-v1/programs/token-minter/Cargo.toml index aa64188f..67b1ee38 100644 --- a/tokens/token-minter/anchor-v1/programs/token-minter/Cargo.toml +++ b/tokens/token-minter/anchor-v1/programs/token-minter/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata"] } [dev-dependencies] litesvm = "0.16.0" diff --git a/tokens/transfer-tokens/anchor-v1/README.md b/tokens/transfer-tokens/anchor-v1/README.md index b5086af9..3e59d48f 100644 --- a/tokens/transfer-tokens/anchor-v1/README.md +++ b/tokens/transfer-tokens/anchor-v1/README.md @@ -1,9 +1,9 @@ # Transfer Tokens (Anchor) > [!NOTE] -> This is the **Anchor v1** copy of this example, on Anchor 1.2.0, the current +> This is the **Anchor v1** copy of this example, on Anchor 1.2.1, the current > stable Anchor release. Every `anchor` command on this page needs the v1 CLI: -> `avm install 1.2.0 && avm use 1.2.0`. The Anchor v2 version of this example is in +> `avm install 1.2.1 && avm use 1.2.1`. The Anchor v2 version of this example is in > [`../anchor`](../anchor/). Transfer tokens between token accounts via CPI to the token program. diff --git a/tokens/transfer-tokens/anchor-v1/programs/transfer-tokens/Cargo.toml b/tokens/transfer-tokens/anchor-v1/programs/transfer-tokens/Cargo.toml index c871f9a0..0ce56a6a 100644 --- a/tokens/transfer-tokens/anchor-v1/programs/transfer-tokens/Cargo.toml +++ b/tokens/transfer-tokens/anchor-v1/programs/transfer-tokens/Cargo.toml @@ -20,8 +20,8 @@ custom-heap = [] custom-panic = [] [dependencies] -anchor-lang = { version = "1.2.0", features = ["init-if-needed"] } -anchor-spl = { version = "1.2.0", features = ["metadata"] } +anchor-lang = { version = "1.2.1", features = ["init-if-needed"] } +anchor-spl = { version = "1.2.1", features = ["metadata"] } [dev-dependencies] litesvm = "0.16.0"