This commit is contained in:
acheron 2024-06-20 17:20:02 +02:00 committed by GitHub
parent cf7abd4fd4
commit e6d7dafe12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
101 changed files with 3571 additions and 155 deletions

View File

@ -12,6 +12,14 @@ The minor version will be incremented upon a breaking change and the patch versi
### Features
### Fixes
### Breaking
## [0.30.1] - 2024-06-20
### Features
- idl: Allow overriding the idl build toolchain with the `RUSTUP_TOOLCHAIN` environment variable ([#2941](https://github.com/coral-xyz/anchor/pull/2941])).
- avm: Support customizing the installation location using `AVM_HOME` environment variable ([#2917](https://github.com/coral-xyz/anchor/pull/2917)).
- avm: Optimize `avm list` when GitHub API rate limits are reached ([#2962](https://github.com/coral-xyz/anchor/pull/2962))

32
Cargo.lock generated
View File

@ -119,7 +119,7 @@ checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483"
[[package]]
name = "anchor-attribute-access-control"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"proc-macro2",
@ -129,7 +129,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-account"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"bs58 0.5.0",
@ -140,7 +140,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-constant"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"quote",
@ -149,7 +149,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-error"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"quote",
@ -158,7 +158,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-event"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"proc-macro2",
@ -168,7 +168,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-program"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-lang-idl",
"anchor-syn",
@ -183,7 +183,7 @@ dependencies = [
[[package]]
name = "anchor-cli"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-client",
"anchor-lang",
@ -219,7 +219,7 @@ dependencies = [
[[package]]
name = "anchor-client"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-lang",
"anyhow",
@ -236,7 +236,7 @@ dependencies = [
[[package]]
name = "anchor-derive-accounts"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"quote",
@ -245,7 +245,7 @@ dependencies = [
[[package]]
name = "anchor-derive-serde"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-syn",
"borsh-derive-internal 0.10.3",
@ -256,7 +256,7 @@ dependencies = [
[[package]]
name = "anchor-derive-space"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"proc-macro2",
"quote",
@ -265,7 +265,7 @@ dependencies = [
[[package]]
name = "anchor-lang"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-attribute-access-control",
"anchor-attribute-account",
@ -289,7 +289,7 @@ dependencies = [
[[package]]
name = "anchor-lang-idl"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"anchor-lang-idl-spec",
"anyhow",
@ -310,7 +310,7 @@ dependencies = [
[[package]]
name = "anchor-spl"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anchor-lang",
"borsh 0.10.3",
@ -327,7 +327,7 @@ dependencies = [
[[package]]
name = "anchor-syn"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anyhow",
"bs58 0.5.0",
@ -673,7 +673,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "avm"
version = "0.30.0"
version = "0.30.1"
dependencies = [
"anyhow",
"cargo_toml",

View File

@ -1 +1 @@
0.30.0
0.30.1

View File

@ -1,6 +1,6 @@
[package]
name = "avm"
version = "0.30.0"
version = "0.30.1"
edition = "2021"
[[bin]]

View File

@ -14,7 +14,19 @@ The programs and their tests are located in [/tests/bench](https://github.com/co
## [Unreleased]
Solana version: 1.18.8
Solana version: 1.18.17
| Program | Binary Size | - |
| ------- | ----------- | --- |
| bench | 791,008 | - |
### Notable changes
---
## [0.30.1]
Solana version: 1.18.17
| Program | Binary Size | - |
| ------- | ----------- | --- |

View File

@ -14,7 +14,105 @@ The programs and their tests are located in [/tests/bench](https://github.com/co
## [Unreleased]
Solana version: 1.18.8
Solana version: 1.18.17
| Instruction | Compute Units | - |
| --------------------------- | ------------- | --- |
| accountInfo1 | 601 | - |
| accountInfo2 | 923 | - |
| accountInfo4 | 1,583 | - |
| accountInfo8 | 2,975 | - |
| accountEmptyInit1 | 5,034 | - |
| accountEmpty1 | 652 | - |
| accountEmptyInit2 | 9,687 | - |
| accountEmpty2 | 1,016 | - |
| accountEmptyInit4 | 18,501 | - |
| accountEmpty4 | 1,737 | - |
| accountEmptyInit8 | 36,169 | - |
| accountEmpty8 | 3,186 | - |
| accountSizedInit1 | 5,106 | - |
| accountSized1 | 668 | - |
| accountSizedInit2 | 9,828 | - |
| accountSized2 | 1,046 | - |
| accountSizedInit4 | 18,837 | - |
| accountSized4 | 1,807 | - |
| accountSizedInit8 | 36,761 | - |
| accountSized8 | 3,326 | - |
| accountUnsizedInit1 | 5,199 | - |
| accountUnsized1 | 702 | - |
| accountUnsizedInit2 | 10,078 | - |
| accountUnsized2 | 1,116 | - |
| accountUnsizedInit4 | 19,259 | - |
| accountUnsized4 | 1,953 | - |
| accountUnsizedInit8 | 37,331 | - |
| accountUnsized8 | 3,626 | - |
| boxedAccountEmptyInit1 | 5,064 | - |
| boxedAccountEmpty1 | 671 | - |
| boxedAccountEmptyInit2 | 9,721 | - |
| boxedAccountEmpty2 | 1,052 | - |
| boxedAccountEmptyInit4 | 18,582 | - |
| boxedAccountEmpty4 | 1,811 | - |
| boxedAccountEmptyInit8 | 36,329 | - |
| boxedAccountEmpty8 | 3,357 | - |
| boxedAccountSizedInit1 | 5,119 | - |
| boxedAccountSized1 | 686 | - |
| boxedAccountSizedInit2 | 9,845 | - |
| boxedAccountSized2 | 1,085 | - |
| boxedAccountSizedInit4 | 18,825 | - |
| boxedAccountSized4 | 1,874 | - |
| boxedAccountSizedInit8 | 36,824 | - |
| boxedAccountSized8 | 3,490 | - |
| boxedAccountUnsizedInit1 | 5,207 | - |
| boxedAccountUnsized1 | 721 | - |
| boxedAccountUnsizedInit2 | 10,015 | - |
| boxedAccountUnsized2 | 1,157 | - |
| boxedAccountUnsizedInit4 | 19,160 | - |
| boxedAccountUnsized4 | 2,019 | - |
| boxedAccountUnsizedInit8 | 37,496 | - |
| boxedAccountUnsized8 | 3,776 | - |
| boxedInterfaceAccountMint1 | 1,372 | - |
| boxedInterfaceAccountMint2 | 2,293 | - |
| boxedInterfaceAccountMint4 | 4,121 | - |
| boxedInterfaceAccountMint8 | 7,811 | - |
| boxedInterfaceAccountToken1 | 2,056 | - |
| boxedInterfaceAccountToken2 | 3,660 | - |
| boxedInterfaceAccountToken4 | 6,858 | - |
| boxedInterfaceAccountToken8 | 13,284 | - |
| interfaceAccountMint1 | 1,472 | - |
| interfaceAccountMint2 | 2,631 | - |
| interfaceAccountMint4 | 4,951 | - |
| interfaceAccountMint8 | 9,588 | - |
| interfaceAccountToken1 | 2,130 | - |
| interfaceAccountToken2 | 3,928 | - |
| interfaceAccountToken4 | 7,521 | - |
| interface1 | 600 | - |
| interface2 | 745 | - |
| interface4 | 1,033 | - |
| interface8 | 1,616 | - |
| program1 | 596 | - |
| program2 | 737 | - |
| program4 | 1,019 | - |
| program8 | 1,584 | - |
| signer1 | 580 | - |
| signer2 | 872 | - |
| signer4 | 1,454 | - |
| signer8 | 2,618 | - |
| systemAccount1 | 592 | - |
| systemAccount2 | 894 | - |
| systemAccount4 | 1,497 | - |
| systemAccount8 | 2,707 | - |
| uncheckedAccount1 | 563 | - |
| uncheckedAccount2 | 836 | - |
| uncheckedAccount4 | 1,378 | - |
| uncheckedAccount8 | 2,468 | - |
### Notable changes
---
## [0.30.1]
Solana version: 1.18.17
| Instruction | Compute Units | - |
| --------------------------- | ------------- | --- |

View File

@ -14,7 +14,105 @@ The programs and their tests are located in [/tests/bench](https://github.com/co
## [Unreleased]
Solana version: 1.18.8
Solana version: 1.18.17
| Instruction | Stack Memory | - |
| ------------------------------ | ------------ | --- |
| account_info1 | 144 | - |
| account_info2 | 144 | - |
| account_info4 | 144 | - |
| account_info8 | 144 | - |
| account_empty_init1 | 144 | - |
| account_empty_init2 | 144 | - |
| account_empty_init4 | 192 | - |
| account_empty_init8 | 224 | - |
| account_empty1 | 144 | - |
| account_empty2 | 144 | - |
| account_empty4 | 144 | - |
| account_empty8 | 144 | - |
| account_sized_init1 | 176 | - |
| account_sized_init2 | 192 | - |
| account_sized_init4 | 224 | - |
| account_sized_init8 | 288 | - |
| account_sized1 | 144 | - |
| account_sized2 | 144 | - |
| account_sized4 | 144 | - |
| account_sized8 | 144 | - |
| account_unsized_init1 | 192 | - |
| account_unsized_init2 | 224 | - |
| account_unsized_init4 | 288 | - |
| account_unsized_init8 | 416 | - |
| account_unsized1 | 144 | - |
| account_unsized2 | 144 | - |
| account_unsized4 | 144 | - |
| account_unsized8 | 144 | - |
| boxed_account_empty_init1 | 144 | - |
| boxed_account_empty_init2 | 144 | - |
| boxed_account_empty_init4 | 192 | - |
| boxed_account_empty_init8 | 224 | - |
| boxed_account_empty1 | 144 | - |
| boxed_account_empty2 | 144 | - |
| boxed_account_empty4 | 144 | - |
| boxed_account_empty8 | 144 | - |
| boxed_account_sized_init1 | 144 | - |
| boxed_account_sized_init2 | 144 | - |
| boxed_account_sized_init4 | 192 | - |
| boxed_account_sized_init8 | 224 | - |
| boxed_account_sized1 | 144 | - |
| boxed_account_sized2 | 144 | - |
| boxed_account_sized4 | 144 | - |
| boxed_account_sized8 | 144 | - |
| boxed_account_unsized_init1 | 144 | - |
| boxed_account_unsized_init2 | 144 | - |
| boxed_account_unsized_init4 | 192 | - |
| boxed_account_unsized_init8 | 224 | - |
| boxed_account_unsized1 | 144 | - |
| boxed_account_unsized2 | 144 | - |
| boxed_account_unsized4 | 144 | - |
| boxed_account_unsized8 | 144 | - |
| boxed_interface_account_mint1 | 144 | - |
| boxed_interface_account_mint2 | 144 | - |
| boxed_interface_account_mint4 | 144 | - |
| boxed_interface_account_mint8 | 144 | - |
| boxed_interface_account_token1 | 144 | - |
| boxed_interface_account_token2 | 144 | - |
| boxed_interface_account_token4 | 144 | - |
| boxed_interface_account_token8 | 144 | - |
| interface_account_mint1 | 144 | - |
| interface_account_mint2 | 144 | - |
| interface_account_mint4 | 144 | - |
| interface_account_mint8 | 144 | - |
| interface_account_token1 | 144 | - |
| interface_account_token2 | 144 | - |
| interface_account_token4 | 144 | - |
| interface1 | 144 | - |
| interface2 | 144 | - |
| interface4 | 144 | - |
| interface8 | 144 | - |
| program1 | 144 | - |
| program2 | 144 | - |
| program4 | 144 | - |
| program8 | 144 | - |
| signer1 | 144 | - |
| signer2 | 144 | - |
| signer4 | 144 | - |
| signer8 | 144 | - |
| system_account1 | 144 | - |
| system_account2 | 144 | - |
| system_account4 | 144 | - |
| system_account8 | 144 | - |
| unchecked_account1 | 144 | - |
| unchecked_account2 | 144 | - |
| unchecked_account4 | 144 | - |
| unchecked_account8 | 144 | - |
### Notable changes
---
## [0.30.1]
Solana version: 1.18.17
| Instruction | Stack Memory | - |
| ------------------------------ | ------------ | --- |

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-cli"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
edition = "2021"
repository = "https://github.com/coral-xyz/anchor"
@ -15,9 +15,9 @@ path = "src/bin/main.rs"
dev = []
[dependencies]
anchor-client = { path = "../client", version = "0.30.0" }
anchor-lang-idl = { path = "../idl", version = "0.1.0", features = ["build", "convert"] }
anchor-lang = { path = "../lang", version = "0.30.0" }
anchor-client = { path = "../client", version = "0.30.1" }
anchor-lang-idl = { path = "../idl", version = "0.1.1", features = ["build", "convert"] }
anchor-lang = { path = "../lang", version = "0.30.1" }
anyhow = "1.0.32"
base64 = "0.21"
bincode = "1.3.3"

View File

@ -1,6 +1,6 @@
{
"name": "@coral-xyz/anchor-cli",
"version": "0.30.0",
"version": "0.30.1",
"description": "Anchor CLI tool",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-client"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
edition = "2021"
license = "Apache-2.0"
@ -15,7 +15,7 @@ async = []
debug = []
[dependencies]
anchor-lang = { path = "../lang", version = "0.30.0" }
anchor-lang = { path = "../lang", version = "0.30.1" }
anyhow = "1"
futures = "0.3"
regex = "1"

View File

@ -50,14 +50,14 @@
//!
//! More examples can be found in [here].
//!
//! [here]: https://github.com/coral-xyz/anchor/tree/v0.30.0/client/example/src
//! [here]: https://github.com/coral-xyz/anchor/tree/v0.30.1/client/example/src
//!
//! # Features
//!
//! The client is blocking by default. To enable asynchronous client, add `async` feature:
//!
//! ```toml
//! anchor-client = { version = "0.30.0 ", features = ["async"] }
//! anchor-client = { version = "0.30.1 ", features = ["async"] }
//! ````
use anchor_lang::solana_program::hash::Hash;

View File

@ -2,7 +2,7 @@ WORKDIR=$(PWD)
#
# Anchor version.
#
ANCHOR_CLI=v0.30.0
ANCHOR_CLI=v0.30.1
#
# Solana toolchain.
#

View File

@ -24,7 +24,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-access-control"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319"
dependencies = [
@ -38,7 +38,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-account"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29"
dependencies = [
@ -53,7 +53,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-constant"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28"
dependencies = [
@ -64,7 +64,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-error"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4"
dependencies = [
@ -76,7 +76,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-event"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582"
dependencies = [
@ -89,7 +89,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-interface"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480"
dependencies = [
@ -103,7 +103,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-program"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712"
dependencies = [
@ -116,7 +116,7 @@ dependencies = [
[[package]]
name = "anchor-attribute-state"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116"
dependencies = [
@ -129,7 +129,7 @@ dependencies = [
[[package]]
name = "anchor-derive-accounts"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8"
dependencies = [
@ -142,7 +142,7 @@ dependencies = [
[[package]]
name = "anchor-lang"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8"
dependencies = [
@ -166,7 +166,7 @@ dependencies = [
[[package]]
name = "anchor-syn"
version = "0.30.0"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc"
dependencies = [
@ -400,7 +400,7 @@ dependencies = [
name = "console_log"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494"
checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0.30.1d75dfb2f8a1494"
dependencies = [
"log",
"web-sys",

View File

@ -16,6 +16,6 @@ cpi = ["no-entrypoint"]
default = []
[dependencies]
anchor-lang = "=0.30.0"
anchor-lang = "=0.30.1"
num-traits = "0.2"
num-derive = "0.3"

View File

@ -29,6 +29,7 @@ const navigation = [
links: [
{ title: '0.29.0', href: '/release-notes/0.29.0' },
{ title: '0.30.0', href: '/release-notes/0.30.0' },
{ title: '0.30.1', href: '/release-notes/0.30.1' },
{ title: 'CHANGELOG', href: '/release-notes/changelog' },
],
},

View File

@ -63,7 +63,7 @@ Anchor binaries are available via an NPM package [`@coral-xyz/anchor-cli`](https
We can also use Cargo to install the CLI directly. Make sure that the `--tag` argument uses the version you want (the version here is just an example).
```shell
cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.0 anchor-cli --locked
cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.1 anchor-cli --locked
```
On Linux systems you may need to install additional dependencies if cargo install fails. On Ubuntu,

View File

@ -200,6 +200,6 @@ Override toolchain data in the workspace similar to [`rust-toolchain.toml`](http
```toml
[toolchain]
anchor_version = "0.30.0" # `anchor-cli` version to use(requires `avm`)
solana_version = "1.18.8" # Solana version to use(applies to all Solana tools)
anchor_version = "0.30.1" # `anchor-cli` version to use(requires `avm`)
solana_version = "1.18.17" # Solana version to use(applies to all Solana tools)
```

View File

@ -35,8 +35,8 @@ An example `Anchor.toml` config looks as follows,
```toml
[toolchain]
anchor_version = "0.30.0"
solana_version = "1.18.8"
anchor_version = "0.30.1"
solana_version = "1.18.17"
[workspace]
members = ["programs/multisig"]

View File

@ -37,10 +37,10 @@ If the program has an IDL, it will also check the IDL deployed on chain matches.
## Images
A docker image for each version of Anchor is published on [Docker Hub](https://hub.docker.com/r/backpackapp/build). They are tagged in the form `backpackapp/build:<version>`. For example, to get the image for Anchor `v0.30.0` one can run
A docker image for each version of Anchor is published on [Docker Hub](https://hub.docker.com/r/backpackapp/build). They are tagged in the form `backpackapp/build:<version>`. For example, to get the image for Anchor `v0.30.1` one can run
```shell
docker pull backpackapp/build:v0.30.0
docker pull backpackapp/build:v0.30.1
```
## Removing an Image

View File

@ -0,0 +1,282 @@
---
title: Release Notes 0.30.1
description: Anchor - Release Notes 0.30.1
---
There are a good number of quality of life improvements in this patch release. You can upgrade to this version from `0.30.0` with ease since there are no major breaking changes.
---
## How to upgrade
1. Update `anchor-cli`:
```sh
avm install 0.30.1
```
2. Update Anchor crate(s) to `0.30.1`.
3. Update TS package(s) to `0.30.1`.
## Recommended Solana Version
While this release supports anything above `1.17.3`, the recommended Solana version is `1.18.17`. You can upgrade Solana tools by running:
```
solana-install init 1.18.17
```
## IDL
### Convert legacy IDLs
A new feature has been added to the IDL crate in order to convert legacy IDLs (pre Anchor v0.30) to new IDLs.
To programmatically convert legacy IDLs, add:
```
anchor-lang-idl = { version = "0.1.1", features = ["convert"] }
```
and use the [`convert_idl`](https://docs.rs/anchor-lang-idl/0.1.1/anchor_lang_idl/convert/fn.convert_idl.html) function.
**NOTE:** This functionality has also been implemented as a CLI command for convenience, see [`idl convert` command](#idl-convert-command).
### Unsupported seed expressions
Some seed expressions such as `&(my_account.data + 1).to_le_bytes()`:
```rs
#[derive(Accounts)]
pub struct SeedMathExpr<'info> {
#[account(seeds = [&(my_account.data + 1).to_le_bytes()], bump)]
pub math_expr_account: UncheckedAccount<'info>,
pub my_account: Account<'info, MyAccount>,
}
#[account]
pub struct MyAccount {
data: u64,
}
```
cannot currently get stored in the IDL, but there was a regression in the IDL generation that resulted in compile errors when using these or similar unsupported expressions.
They no longer cause compile errors, but this also means that they also cannot get automatically resolved by clients.
### Fields with `address` constraint
Using field expressions as an address constraint e.g.
```rs
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(address = my_account.authority)]
pub authority: UncheckedAccount<'info>,
pub my_account: Account<'info, MyAccount>,
}
#[account]
pub struct MyAccount {
authority: u64,
}
```
no longer result in a compile error when generating the IDL.
However, accounts that use the `address` constraint with non-constant values do not currently resolve automatically. For this reason, you might want to consider using the `has_one` constraint instead:
```rs
#[derive(Accounts)]
pub struct Initialize<'info> {
pub authority: UncheckedAccount<'info>,
#[account(has_one = authority)]
pub my_account: Account<'info, MyAccount>,
}
```
### Override `nightly` version on builds
IDL generation currently uses the `nightly` compiler to build the IDL, and this can potentially result in compile errors on certain `nightly` versions.
In this release, you can now override the nightly version with `RUSTUP_TOOLCHAIN` env variable.
### Recursive generation
There was a compile error during generation with recursive external type resolution, which is now fixed. See [this](https://github.com/coral-xyz/anchor/pull/2946) if you'd like to see the problem in more detail.
### New spec crate
Making changes to the IDL crate, e.g. adding features such as the [`convert`](https://github.com/coral-xyz/anchor/pull/2986) feature, would require bumping the version to get the changes even if the spec itself doesn't change.
To fix this problem, a new [crate](https://docs.rs/anchor-lang-idl-spec) that only includes the IDL spec has been introduced. The new crate's version will be used in the `idl.metadata.spec` field to differentiate between various IDLs.
**NOTE:** This crate is accesible via the main IDL crate from [`anchor_lang_idl::types`](https://docs.rs/anchor-lang-idl/0.1.1/anchor_lang_idl/types/index.html).
## CLI
### `idl convert` command
This command allows you to convert legacy IDLs with the new `anchor idl convert` command:
```
anchor idl convert <PATH_TO_IDL_JSON>
```
### `idl type` command
This command creates TypeScript IDL type (with camelCase fields) from an existing IDL file:
```
anchor idl type <PATH_TO_IDL_JSON>
```
### `idl build` toolchain override
See the [explanation](#override-nightly-version-on-builds) in the IDL section. Example usage with the CLI:
```sh
RUSTUP_TOOLCHAIN="nightly-2024-05-09" anchor idl build
```
### Automatic program id updates
When building a program for the first time ever, the program id declarations will get automatically updated if there is not a `[programs.localnet]` entry in `Anchor.toml`.
Note that this is essentially the same as running `anchor keys sync`, only difference being that this will only run once automatically.
### Upgradeable program clones
Cloning upgradeable programs with
```toml
[test.validator]
url = "https://api.mainnet-beta.solana.com"
[[test.validator.clone]]
address = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
```
would result in unusable programs due to a breaking change in Solana `1.17.12`.
This problem has been fixed from both Anchor and Solana's side. However, it requires using `solana-cli >=1.18.10`.
### File system error improvements
Default Rust error when a file is not found in the file system does not log the file path, which makes it difficult to debug.
In this release, file system related errors also include the path of the file.
## Lang
### Using legacy IDLs with `declare_program!`
[`declare_program!`](https://www.anchor-lang.com/release-notes/0.30.0#dependency-free-program-declaration) macro can now be used with legacy IDLs (pre Anchor v0.30).
This works great as long as the program can be described correctly with the legacy IDL spec. However, if a program uses non-default features such as zero copy, or `repr` modifications, the declaration of the program either won't compile, or will be invalid. There are two main solutions in this scenerio:
- Use the `idl convert` command, and manually fix the invalid parts
- Generate the program's IDL by upgrading the program to Anchor v0.30
The latter option is preferred as it's less error-prone. If you have dependency issues while upgrading, simply remove them when generating the IDL since the IDL generation only cares about the signatures, and all program logic, including all dependencies (except Anchor), can be removed when generating the IDL. [Here](https://github.com/coral-xyz/anchor/blob/cc43e67399ad50cf7d33466f7bcd7e6dcee88ae2/ts/packages/spl-token/program/lib.rs) is an example program that you can generate an IDL from.
In short, IDLs should be preferably generated with v0.30 rather than the conversion method, as a new IDL spec wouldn't be necessary if the old one was sufficient to reliably describe programs.
### `declare_program!` fixes
There were a number of cases where the new `declare_program!` would cause a compile error.
Using the following would result in a compile error:
- Defined types (e.g. `struct`s) in instruction parameters
- Types with `const` generics
- `Vec<u8>` type
- Instruction with a non-unit return type
- Optional accounts (in clients)
- `bytemuckunsafe` account serialization
Another issue was tuple struct fields were private (Rust default), they are now public.
### `pubkey!` macro
[`solana-program`](https://docs.rs/solana-program/1.18.17/solana_program/index.html) has [`pubkey!`](https://docs.rs/solana-program/1.18.17/solana_program/macro.pubkey.html) to easily declare public keys:
```rs
let key = pubkey!("11111111111111111111111111111111");
```
which is more convenient than `Pubkey::from_str`:
```rs
use std::str::FromStr;
let key = Pubkey::from_str("11111111111111111111111111111111").unwrap();
```
However, because of how the macro is implemented, it wasn't possible to use it from Anchor without also including `solana-program` to your dependency list as the macro was specifically using `::solana_program`.
You can now directly use `pubkey!` as it's exported from `anchor_lang::prelude`.
Note that because `solana_program` is exported from `anchor_lang`, you can also remove `solana-program` dependency from your `Cargo.toml` if `pubkey!` was the reason for adding it.
### `ID_CONST` constant
Program ids declared from [`declare_id!`](https://docs.rs/anchor-lang/0.30.1/anchor_lang/macro.declare_id.html) and [`declare_program!`](https://docs.rs/anchor-lang/0.30.1/anchor_lang/macro.declare_program.html) have `ID` declared as `static` which doesn't allow compile time checks.
Both of these macros now have a new constant (`ID_CONST`), which is essentially the same as `ID`, but is declared as `const` instead of `static`.
### Stack usage of token extensions
Stack usage of the new [token extensions constraints](https://www.anchor-lang.com/release-notes/0.30.0#token-extensions) has been improved.
### Error propagation from integer conversion errors
You can now propagate integer conversion errors with `?`:
```rs
let n: i32 = u32::MAX.try_into()?;
```
## SPL
### Export ATA crate
[`spl-associated-token-account](https://crates.io/crates/spl-associated-token-account) crate is now re-exported from `anchor_spl::associated_token`.
Similar to how you can [remove](https://www.anchor-lang.com/release-notes/0.29.0#export-mpl-token-metadata) the `mpl-token-metadata` crate from your dependency list, you can also remove `spl-associated-token-accounts` crate.
```toml
[dependencies]
anchor-spl = "0.30.1"
- spl-associated-token-account = "3.0.2"
```
## TypeScript
### ATA resolution
The [account resolution](https://www.anchor-lang.com/release-notes/0.30.0#account-resolution) support has been extended to support associated token accounts in this release.
If you use ATAs in your instruction, you'll get a type error if you call the `accounts` method with those account specified. To solve, simply remove all ATAs from your `accounts` call.
### Defined types in generics
Using defined types (structs, enums, or type aliases) as a generic argument e.g.
```rs
param: GenericStruct<MyStruct>,
```
no longer results in an error.
### Versioned transactions
A problem where `maxSupportedTransactionVersion` was needed, but not being set from `AnchorProvider` has been fixed.
### New errors package
Anchor errors have been separated into a new package [`@coral-xyz/anchor-errors`](https://www.npmjs.com/package/@coral-xyz/anchor-errors).
---
See the full list of notable changes in the [CHANGELOG](https://github.com/coral-xyz/anchor/blob/v0.30.1/CHANGELOG.md#0301---2024-06-20).

View File

@ -8,6 +8,55 @@ The minor version will be incremented upon a breaking change and the patch versi
---
## [0.30.1] - 2024-06-20
### Features
- idl: Allow overriding the idl build toolchain with the `RUSTUP_TOOLCHAIN` environment variable ([#2941](https://github.com/coral-xyz/anchor/pull/2941])).
- avm: Support customizing the installation location using `AVM_HOME` environment variable ([#2917](https://github.com/coral-xyz/anchor/pull/2917)).
- avm: Optimize `avm list` when GitHub API rate limits are reached ([#2962](https://github.com/coral-xyz/anchor/pull/2962))
- idl, ts: Add accounts resolution for associated token accounts ([#2927](https://github.com/coral-xyz/anchor/pull/2927)).
- cli: Add `--no-install` option to the `init` command ([#2945](https://github.com/coral-xyz/anchor/pull/2945)).
- lang: Implement `TryFromIntError` for `Error` to be able to propagate integer conversion errors ([#2950](https://github.com/coral-xyz/anchor/pull/2950)).
- idl: Add ability to convert legacy IDLs ([#2986](https://github.com/coral-xyz/anchor/pull/2986)).
- ts: Extract Anchor error codes into their own package ([#2983](https://github.com/coral-xyz/anchor/pull/2983)).
- cli: Add additional solana arguments to the `upgrade` command ([#2998](https://github.com/coral-xyz/anchor/pull/2998)).
- spl: Export `spl-associated-token-account` crate ([#2999](https://github.com/coral-xyz/anchor/pull/2999)).
- lang: Support legacy IDLs with `declare_program!` ([#2997](https://github.com/coral-xyz/anchor/pull/2997)).
- cli: Add `idl convert` command ([#3009](https://github.com/coral-xyz/anchor/pull/3009)).
- cli: Add `idl type` command ([#3017](https://github.com/coral-xyz/anchor/pull/3017)).
- lang: Add `anchor_lang::pubkey` macro for declaring `Pubkey` const values ([#3021](https://github.com/coral-xyz/anchor/pull/3021)).
- cli: Sync program ids on the initial build ([#3023](https://github.com/coral-xyz/anchor/pull/3023)).
- idl: Remove `anchor-syn` dependency ([#3030](https://github.com/coral-xyz/anchor/pull/3030)).
- lang: Add `const` of program ID to `declare_id!` and `declare_program!` ([#3019](https://github.com/coral-xyz/anchor/pull/3019)).
- idl: Add separate spec crate ([#3036](https://github.com/coral-xyz/anchor/pull/3036)).
### Fixes
- lang: Eliminate variable allocations that build up stack space for token extension code generation ([#2913](https://github.com/coral-xyz/anchor/pull/2913)).
- ts: Fix incorrect `maxSupportedTransactionVersion` in `AnchorProvider.send*()` methods ([#2922](https://github.com/coral-xyz/anchor/pull/2922)).
- cli: Use npm's configured default license for new projects made with `anchor init` ([#2929](https://github.com/coral-xyz/anchor/pull/2929)).
- cli: add filename to 'Unable to read keypair file' errors ([#2932](https://github.com/coral-xyz/anchor/pull/2932)).
- idl: Fix path resolution of the `Cargo.lock` of the project when generating idls for external types ([#2946](https://github.com/coral-xyz/anchor/pull/2946)).
- idl: Fix potential panic on external type resolution ([#2954](https://github.com/coral-xyz/anchor/pull/2954)).
- lang: Fix using defined types in instruction parameters with `declare_program!` ([#2959](https://github.com/coral-xyz/anchor/pull/2959)).
- lang: Fix using const generics with `declare_program!` ([#2965](https://github.com/coral-xyz/anchor/pull/2965)).
- lang: Fix using `Vec<u8>` type with `declare_program!` ([#2966](https://github.com/coral-xyz/anchor/pull/2966)).
- lang: Fix `ProgramError::ArithmeticOverflow` not found error ([#2975](https://github.com/coral-xyz/anchor/pull/2975)).
- lang: Fix using optional accounts with `declare_program!` ([#2967](https://github.com/coral-xyz/anchor/pull/2967)).
- lang: Fix instruction return type generation with `declare_program!` ([#2977](https://github.com/coral-xyz/anchor/pull/2977)).
- cli: Fix IDL write getting corrupted from retries ([#2964](https://github.com/coral-xyz/anchor/pull/2964)).
- idl: Fix `unexpected_cfgs` build warning ([#2992](https://github.com/coral-xyz/anchor/pull/2992)).
- lang: Make tuple struct fields public in `declare_program!` ([#2994](https://github.com/coral-xyz/anchor/pull/2994)).
- Remove `rust-version` from crate manifests ([#3000](https://github.com/coral-xyz/anchor/pull/3000)).
- cli: Fix upgradeable program clones ([#3010](https://github.com/coral-xyz/anchor/pull/3010)).
- ts: Fix using IDLs that have defined types as generic arguments ([#3016](https://github.com/coral-xyz/anchor/pull/3016)).
- idl: Fix generation with unsupported expressions ([#3033](https://github.com/coral-xyz/anchor/pull/3033)).
- idl: Fix using `address` constraint with field expressions ([#3034](https://github.com/coral-xyz/anchor/pull/3034)).
- lang: Fix using `bytemuckunsafe` account serialization with `declare_program!` ([#3037](https://github.com/coral-xyz/anchor/pull/3037)).
### Breaking
## [0.30.0] - 2024-04-15
### Features

View File

@ -1,6 +1,6 @@
{
"name": "basic-0",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "basic-1",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "basic-2",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "basic-3",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "basic-4",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "basic-5",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-lang-idl"
version = "0.1.0"
version = "0.1.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
edition = "2021"

View File

@ -6,7 +6,7 @@ use crate::types::Idl;
/// `idl.metadata.spec` field.
///
/// If `spec` field is not specified, the conversion will fallback to the legacy IDL spec
/// (pre Anchor v0.30.0).
/// (pre Anchor v0.30.1).
///
/// **Note:** For legacy IDLs, `idl.metadata.address` field is required to be populated with
/// program's address otherwise an error will be returned.
@ -27,7 +27,7 @@ pub fn convert_idl(idl: &[u8]) -> Result<Idl> {
}
}
/// Legacy IDL spec (pre Anchor v0.30.0)
/// Legacy IDL spec (pre Anchor v0.30.1)
mod legacy {
use crate::types as t;
use anyhow::{anyhow, Result};

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-lang"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
edition = "2021"
@ -38,18 +38,18 @@ init-if-needed = ["anchor-derive-accounts/init-if-needed"]
interface-instructions = ["anchor-attribute-program/interface-instructions"]
[dependencies]
anchor-attribute-access-control = { path = "./attribute/access-control", version = "0.30.0" }
anchor-attribute-account = { path = "./attribute/account", version = "0.30.0" }
anchor-attribute-constant = { path = "./attribute/constant", version = "0.30.0" }
anchor-attribute-error = { path = "./attribute/error", version = "0.30.0" }
anchor-attribute-event = { path = "./attribute/event", version = "0.30.0" }
anchor-attribute-program = { path = "./attribute/program", version = "0.30.0" }
anchor-derive-accounts = { path = "./derive/accounts", version = "0.30.0" }
anchor-derive-serde = { path = "./derive/serde", version = "0.30.0" }
anchor-derive-space = { path = "./derive/space", version = "0.30.0" }
anchor-attribute-access-control = { path = "./attribute/access-control", version = "0.30.1" }
anchor-attribute-account = { path = "./attribute/account", version = "0.30.1" }
anchor-attribute-constant = { path = "./attribute/constant", version = "0.30.1" }
anchor-attribute-error = { path = "./attribute/error", version = "0.30.1" }
anchor-attribute-event = { path = "./attribute/event", version = "0.30.1" }
anchor-attribute-program = { path = "./attribute/program", version = "0.30.1" }
anchor-derive-accounts = { path = "./derive/accounts", version = "0.30.1" }
anchor-derive-serde = { path = "./derive/serde", version = "0.30.1" }
anchor-derive-space = { path = "./derive/space", version = "0.30.1" }
# `anchor-lang-idl` should only be included with `idl-build` feature
anchor-lang-idl = { path = "../idl", version = "0.1.0", optional = true }
anchor-lang-idl = { path = "../idl", version = "0.1.1", optional = true }
arrayref = "0.3"
base64 = "0.21"

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-access-control"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -14,7 +14,7 @@ proc-macro = true
anchor-debug = ["anchor-syn/anchor-debug"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0" }
anchor-syn = { path = "../../syn", version = "0.30.1" }
proc-macro2 = "1"
quote = "1"
syn = { version = "1", features = ["full"] }

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-account"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -15,7 +15,7 @@ anchor-debug = ["anchor-syn/anchor-debug"]
idl-build = ["anchor-syn/idl-build"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0", features = ["hash"] }
anchor-syn = { path = "../../syn", version = "0.30.1", features = ["hash"] }
bs58 = "0.5"
proc-macro2 = "1"
quote = "1"

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-constant"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -15,6 +15,6 @@ anchor-debug = ["anchor-syn/anchor-debug"]
idl-build = ["anchor-syn/idl-build"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0" }
anchor-syn = { path = "../../syn", version = "0.30.1" }
quote = "1"
syn = { version = "1", features = ["full"] }

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-error"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -15,6 +15,6 @@ anchor-debug = ["anchor-syn/anchor-debug"]
idl-build = ["anchor-syn/idl-build"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0" }
anchor-syn = { path = "../../syn", version = "0.30.1" }
quote = "1"
syn = { version = "1", features = ["full"] }

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-event"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -17,7 +17,7 @@ event-cpi = ["anchor-syn/event-cpi"]
idl-build = ["anchor-syn/idl-build"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0", features = ["hash"] }
anchor-syn = { path = "../../syn", version = "0.30.1", features = ["hash"] }
proc-macro2 = "1"
quote = "1"
syn = { version = "1", features = ["full"] }

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-attribute-program"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -16,8 +16,8 @@ idl-build = ["anchor-syn/idl-build"]
interface-instructions = ["anchor-syn/interface-instructions"]
[dependencies]
anchor-lang-idl = { path = "../../../idl", version = "0.1.0", features = ["convert"] }
anchor-syn = { path = "../../syn", version = "0.30.0" }
anchor-lang-idl = { path = "../../../idl", version = "0.1.1", features = ["convert"] }
anchor-syn = { path = "../../syn", version = "0.30.1" }
anyhow = "1"
bs58 = "0.5"
heck = "0.3"

View File

@ -50,7 +50,7 @@ pub fn program(
///
/// A full on-chain CPI usage example can be found [here].
///
/// [here]: https://github.com/coral-xyz/anchor/tree/v0.30.0/tests/declare-program
/// [here]: https://github.com/coral-xyz/anchor/tree/v0.30.1/tests/declare-program
#[proc_macro]
pub fn declare_program(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
parse_macro_input!(input as DeclareProgram)

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-derive-accounts"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -17,6 +17,6 @@ idl-build = ["anchor-syn/idl-build"]
init-if-needed = ["anchor-syn/init-if-needed"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0" }
anchor-syn = { path = "../../syn", version = "0.30.1" }
quote = "1"
syn = { version = "1", features = ["full"] }

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-derive-serde"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"
@ -14,7 +14,7 @@ proc-macro = true
idl-build = ["anchor-syn/idl-build"]
[dependencies]
anchor-syn = { path = "../../syn", version = "0.30.0" }
anchor-syn = { path = "../../syn", version = "0.30.1" }
borsh-derive-internal = ">=0.9, <0.11"
proc-macro2 = "1"
syn = { version = "1", features = ["full"] }

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-derive-space"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-syn"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
repository = "https://github.com/coral-xyz/anchor"
license = "Apache-2.0"

View File

@ -1,6 +1,6 @@
[package]
name = "anchor-spl"
version = "0.30.0"
version = "0.30.1"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
edition = "2021"
license = "Apache-2.0"
@ -26,7 +26,7 @@ token_2022 = ["spl-token-2022"]
token_2022_extensions = ["spl-token-2022", "spl-token-group-interface", "spl-token-metadata-interface", "spl-pod"]
[dependencies]
anchor-lang = { path = "../lang", version = "0.30.0", features = ["derive"] }
anchor-lang = { path = "../lang", version = "0.30.1", features = ["derive"] }
borsh = { version = ">=0.9, <0.11", optional = true }
mpl-token-metadata = { version = "4", optional = true }
serum_dex = { git = "https://github.com/openbook-dex/program/", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true }

View File

@ -1,6 +1,6 @@
{
"name": "anchor-cli-account",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "anchor-cli-idl",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "auction-house",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -743,8 +743,194 @@
}
}
},
"0.30.1": {
"solanaVersion": "1.18.17",
"result": {
"binarySize": {
"bench": 791008
},
"computeUnits": {
"accountInfo1": 601,
"accountInfo2": 923,
"accountInfo4": 1583,
"accountInfo8": 2975,
"accountEmptyInit1": 5034,
"accountEmpty1": 652,
"accountEmptyInit2": 9687,
"accountEmpty2": 1016,
"accountEmptyInit4": 18501,
"accountEmpty4": 1737,
"accountEmptyInit8": 36169,
"accountEmpty8": 3186,
"accountSizedInit1": 5106,
"accountSized1": 668,
"accountSizedInit2": 9828,
"accountSized2": 1046,
"accountSizedInit4": 18837,
"accountSized4": 1807,
"accountSizedInit8": 36761,
"accountSized8": 3326,
"accountUnsizedInit1": 5199,
"accountUnsized1": 702,
"accountUnsizedInit2": 10078,
"accountUnsized2": 1116,
"accountUnsizedInit4": 19259,
"accountUnsized4": 1953,
"accountUnsizedInit8": 37331,
"accountUnsized8": 3626,
"boxedAccountEmptyInit1": 5064,
"boxedAccountEmpty1": 671,
"boxedAccountEmptyInit2": 9721,
"boxedAccountEmpty2": 1052,
"boxedAccountEmptyInit4": 18582,
"boxedAccountEmpty4": 1811,
"boxedAccountEmptyInit8": 36329,
"boxedAccountEmpty8": 3357,
"boxedAccountSizedInit1": 5119,
"boxedAccountSized1": 686,
"boxedAccountSizedInit2": 9845,
"boxedAccountSized2": 1085,
"boxedAccountSizedInit4": 18825,
"boxedAccountSized4": 1874,
"boxedAccountSizedInit8": 36824,
"boxedAccountSized8": 3490,
"boxedAccountUnsizedInit1": 5207,
"boxedAccountUnsized1": 721,
"boxedAccountUnsizedInit2": 10015,
"boxedAccountUnsized2": 1157,
"boxedAccountUnsizedInit4": 19160,
"boxedAccountUnsized4": 2019,
"boxedAccountUnsizedInit8": 37496,
"boxedAccountUnsized8": 3776,
"boxedInterfaceAccountMint1": 1372,
"boxedInterfaceAccountMint2": 2293,
"boxedInterfaceAccountMint4": 4121,
"boxedInterfaceAccountMint8": 7811,
"boxedInterfaceAccountToken1": 2056,
"boxedInterfaceAccountToken2": 3660,
"boxedInterfaceAccountToken4": 6858,
"boxedInterfaceAccountToken8": 13284,
"interfaceAccountMint1": 1472,
"interfaceAccountMint2": 2631,
"interfaceAccountMint4": 4951,
"interfaceAccountMint8": 9588,
"interfaceAccountToken1": 2130,
"interfaceAccountToken2": 3928,
"interfaceAccountToken4": 7521,
"interface1": 600,
"interface2": 745,
"interface4": 1033,
"interface8": 1616,
"program1": 596,
"program2": 737,
"program4": 1019,
"program8": 1584,
"signer1": 580,
"signer2": 872,
"signer4": 1454,
"signer8": 2618,
"systemAccount1": 592,
"systemAccount2": 894,
"systemAccount4": 1497,
"systemAccount8": 2707,
"uncheckedAccount1": 563,
"uncheckedAccount2": 836,
"uncheckedAccount4": 1378,
"uncheckedAccount8": 2468
},
"stackMemory": {
"account_info1": 144,
"account_info2": 144,
"account_info4": 144,
"account_info8": 144,
"account_empty_init1": 144,
"account_empty_init2": 144,
"account_empty_init4": 192,
"account_empty_init8": 224,
"account_empty1": 144,
"account_empty2": 144,
"account_empty4": 144,
"account_empty8": 144,
"account_sized_init1": 176,
"account_sized_init2": 192,
"account_sized_init4": 224,
"account_sized_init8": 288,
"account_sized1": 144,
"account_sized2": 144,
"account_sized4": 144,
"account_sized8": 144,
"account_unsized_init1": 192,
"account_unsized_init2": 224,
"account_unsized_init4": 288,
"account_unsized_init8": 416,
"account_unsized1": 144,
"account_unsized2": 144,
"account_unsized4": 144,
"account_unsized8": 144,
"boxed_account_empty_init1": 144,
"boxed_account_empty_init2": 144,
"boxed_account_empty_init4": 192,
"boxed_account_empty_init8": 224,
"boxed_account_empty1": 144,
"boxed_account_empty2": 144,
"boxed_account_empty4": 144,
"boxed_account_empty8": 144,
"boxed_account_sized_init1": 144,
"boxed_account_sized_init2": 144,
"boxed_account_sized_init4": 192,
"boxed_account_sized_init8": 224,
"boxed_account_sized1": 144,
"boxed_account_sized2": 144,
"boxed_account_sized4": 144,
"boxed_account_sized8": 144,
"boxed_account_unsized_init1": 144,
"boxed_account_unsized_init2": 144,
"boxed_account_unsized_init4": 192,
"boxed_account_unsized_init8": 224,
"boxed_account_unsized1": 144,
"boxed_account_unsized2": 144,
"boxed_account_unsized4": 144,
"boxed_account_unsized8": 144,
"boxed_interface_account_mint1": 144,
"boxed_interface_account_mint2": 144,
"boxed_interface_account_mint4": 144,
"boxed_interface_account_mint8": 144,
"boxed_interface_account_token1": 144,
"boxed_interface_account_token2": 144,
"boxed_interface_account_token4": 144,
"boxed_interface_account_token8": 144,
"interface_account_mint1": 144,
"interface_account_mint2": 144,
"interface_account_mint4": 144,
"interface_account_mint8": 144,
"interface_account_token1": 144,
"interface_account_token2": 144,
"interface_account_token4": 144,
"interface1": 144,
"interface2": 144,
"interface4": 144,
"interface8": 144,
"program1": 144,
"program2": 144,
"program4": 144,
"program8": 144,
"signer1": 144,
"signer2": 144,
"signer4": 144,
"signer8": 144,
"system_account1": 144,
"system_account2": 144,
"system_account4": 144,
"system_account8": 144,
"unchecked_account1": 144,
"unchecked_account2": 144,
"unchecked_account4": 144,
"unchecked_account8": 144
}
}
},
"unreleased": {
"solanaVersion": "1.18.8",
"solanaVersion": "1.18.17",
"result": {
"binarySize": {
"bench": 791008
@ -929,4 +1115,4 @@
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "bench",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "cashiers-check",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "cfo",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "chat",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "composite",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "cpi-returns",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "custom-coder",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "declare-id",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "declare-program",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "errors",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "errors",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "escrow",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "events",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "floats",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "idl",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "ido-pool",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "lockup",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "misc",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "multiple-suites",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "multisig",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "optional",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "pda-derivation",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "pyth",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "realloc",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "relations-derivation",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "solang",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "metadata",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "token-extensions",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "token-proxy",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "token-wrapper",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "transfer-hook",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "swap",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "system-accounts",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "sysvars",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "tictactoe",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "typescript-example",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "validator-clone",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "zero-copy",
"version": "0.30.0",
"version": "0.30.1",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "@coral-xyz/anchor-errors",
"version": "0.30.0",
"version": "0.30.1",
"description": "Anchor error codes",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,6 +1,6 @@
{
"name": "@coral-xyz/anchor",
"version": "0.30.0",
"version": "0.30.1",
"description": "Anchor client",
"module": "./dist/esm/index.js",
"main": "./dist/cjs/index.js",
@ -33,8 +33,8 @@
"test": "jest tests --detectOpenHandles"
},
"dependencies": {
"@coral-xyz/anchor-errors": "^0.30.0",
"@coral-xyz/borsh": "^0.30.0",
"@coral-xyz/anchor-errors": "^0.30.1",
"@coral-xyz/borsh": "^0.30.1",
"@noble/hashes": "^1.3.1",
"@solana/web3.js": "^1.68.0",
"bn.js": "^5.1.2",

View File

@ -1,6 +1,6 @@
{
"name": "@coral-xyz/borsh",
"version": "0.30.0",
"version": "0.30.1",
"description": "Anchor Borsh",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0"
"@coral-xyz/anchor": "=0.30.1"
},
"devDependencies": {
"@rollup/plugin-commonjs": "=21.0.2",

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@coral-xyz/anchor": "=0.30.0",
"@coral-xyz/anchor": "=0.30.1",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

Some files were not shown because too many files have changed in this diff Show More