anchor-derive-serde
Anchor Derive macro for serialization and deserialization
1.1.2
4.3M downloads/mo
#4837 most downloaded on crates.io
otter-sec/anchor
What this package is like to depend on
Last release 1 months ago
26 Jun 2026
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
18 releases · first in 2023
13 releases in the last 12 months
see the full history below
Release timeline
18 releases · Oct 2023 to Jun 2026Releases
latest 18-
1.1.226 Jun 2026Release notes
Open source →The v1.1.2 release is here.
Check out the release notes from Anchor website or GitHub.
For a list of notable changes with their associated PRs, see the CHANGELOG.
Release notes
Open source →Features
Fixes
- deps: Tighten dependencies between
anchor-*crates to reduce breakage (#4726).
Breaking
- deps: Tighten dependencies between
-
1.1.125 Jun 2026Release notes
Open source →The v1.1.1 release is here.
Check out the release notes from Anchor website or GitHub.
For a list of notable changes with their associated PRs, see the CHANGELOG.
Release notes
Open source →Features
- ts: Re-implement
verifiedBuildusing the OtterSec registry (verify.osec.io), replacing the defunctapr.devAPI (#4522). - ts: Add
decodeIdlAccountRaw(#4375). - cli: Add
--stdoutflag to theexpandcommand (#4400). - client: Add versioned tx support (#4207).
- cli: Add
editionandrust-versionto template (#4048) - lang: Add
program_idverification to CPI return values (#4411). - cli: Resolve the target directory via
cargo metadataso custom target locations (e.g.CARGO_TARGET_DIR, workspace-level overrides) work across build, test, deploy and IDL paths (#3817). - cli: Allow configuring IDL JSON location in workspace config (#4483).
- lang: Derive
Clone,Debug,Copy, andDefaulton generated client / CPI account structs and instruction args where the field types allow it (#4085). - cli: Support multiple named scripts in
Anchor.tomland run them viaanchor test --script <name>/anchor run <name>(#3999). - cli/idl: Add
fetch-historicalsupport to recover historical IDLs with the Anchor CLI (#3992). - cli:
anchor initrefuses to create a new Anchor workspace inside an existing Cargo workspace to avoid broken nested layouts (#4576). - cli: Add
ras an alias to theruncommand (#4643).
Fixes
- cli: Warn instead of aborting
anchor buildwhen a program keypair anddeclare_id!do not match (#4705). - lang: Snapshot CPI return data before
Return::get()validates the source program (#4624). - lang/syn: Remove remaining fallible IDL generation paths from clippy-denied code (#4631).
- lang: Validate
max_lenarguments more strictly during space derivation (#4707). - ts: Remove
cross-fetchdependency (#4671). - lang: Set
anchor-langMinimum Supported Rust Version to1.89(#4638). - lang: Migrate
anchor-synfrom syn 1.x to syn 2.0, allowing use of modern Rust syntax (#4523). - idl: Bump version to 0.1.3 (#4453).
- lang: Avoid fatal errors in IDL building when modern Rust syntax is in use (#4520).
- lang: Return
InvalidProgramIdwhenMigration::exitcannot persist migrated state becauseTo::owner()does not matchprogram_id(#4706). - client: Avoid panic in
parse_logs_responsewhen a program-emitted log line ends withinvoke [1](#4461). - cli: Correctly honor
--skip-seed-phrase-validationinkeygen recover(#4417). - ts: Fix
sha256.hash()returning corrupted output by using hex encoding (#4404). - lang: Support module constants in
max_lenattribute (#3879). - cli: Bump
cargo_tomlto allow parsingresolver = "3"(#4515). - ts: Validate instruction args in
BorshInstructionCoder.encodeto reject typo'd or missing fields instead of silently ignoring them (#4560). - ts: Align TS
camelCaseconversion with Rustheckfor digit-letter identifiers so generated client names match Rust identifiers (#4571). - cli: Warn if
event-cpiinstruction is unreachable with custom discriminators (#4614). - ts: Update
engines.nodeto>= 20.18(#4647).
Breaking
- ts: Re-implement
-
1.0.326 Jun 2026Release notes
Open source →The v1.0.3 release is here.
Check out the release notes from Anchor website or GitHub.
For a list of notable changes with their associated PRs, see the CHANGELOG.
Release notes
Open source →Features
Fixes
- deps: Tighten dependencies between
anchor-*crates to reduce breakage (#4726).
Breaking
- deps: Tighten dependencies between
-
1.0.202 May 2026Release notes
Open source →The v1.0.2 release is here.
Check out the release notes from Anchor website or GitHub.
For a list of notable changes with their associated PRs, see the CHANGELOG.
Release notes
Open source →Features
Fixes
- client: Replace
solana-programwithsolana-hash(#4468). - lang: Make idl build time way faster by caching
CrateContext(#4325). - cli: Bind
localnetto127.0.0.1by default to fix a panic insolana-test-validatorversion3.1.10(#4397). - cli: Fallback to a priority fee of 0 on localnet (#4259).
- lang/syn: Fix compile error with
initand a runtime seeds expression (#4495).
Breaking
- client: Replace
-
1.0.121 Apr 2026Release notes
Open source →The 1.0.1 patch release is here. This release fixes an issue with handling user-provided Borsh attributes in serialization.
For a list of notable changes with their associated PRs, see the CHANGELOG.
Release notes
Open source → -
1.0.002 Apr 2026Release notes
Open source →The first stable major release is here. This version ships several new features and improvements.
Check out the release notes from Anchor website or GitHub.
For a list of notable changes with their associated PRs, see the CHANGELOG.
Release notes
Open source →Features
- lang: Add
Migration<'info, From, To>account type for schema migrations between account types (#4060). - cli: Added a
check_program_id_mismatchin build time to check if the program ID in the source code matches the program ID in the keypair file (#4018). This check will be skipped duringanchor test. - lang: Add instruction parser to
declare_program!(#4118). - ts: Export all IDL types from the root. Users can now update
dist/cjs/idlimports to import directly from@anchor-lang/core(#3948). - lang: Add
declare_program!support with justanchor_clientand notanchor_lang(#4157). - lang: Export
Ownersfromprelude(#4189). - cli: Use surfpool by default for
anchor testandanchor localnetcommands (#4106). - lang: Optimize enums with all unit variants and empty arrays with
Lazy(#4237). - lang: Include
init_if_neededaccounts in duplicate mutable account checks (#4239). - client: Accept
FnMutfor events closure (#4024). - client: Export all types used by the public API (#4211).
- lang: Make
common::closeaccept references (#4178). - cli/idl: Add
--allow-localnetoption for IDL commands; fix panic when run outside a workspace (#4252). - lang: Check owner on account reload (#3837).
- lang/ts: Upgrade borsh to 1.5.7 (#4012).
- syn: Relax seeds syntax to allow more flexible PDA seed expressions (#3813).
- lang: Deprecate
AccountInfousage inAccountsmacro with a compile-time warning (#3854). - cli: Update
anchor initto use themultipleprogram template by default (#3958). - cli: Add
hookssection toAnchor.tomlfor{pre,post}-{build,test,deploy}lifecycle hooks (#3862). - lang: Add generic program validation support to
Programtype allowingProgram<'info>for executable-only validation (#3878). - cli: Added
litesvmtest template and made it the default option onanchor init(#4316) - cli: Added
--install-agent-skillsto automatically install Solana agent skills duringanchor init(#4307) - avm: Added flags and version labels to explicitly handle pre-releases (
avm list --pre-release,avm update --pre-releaseandavm install latest-pre-release). (#4335) - avm: Added
avm self-updatecommand and passive version check warning for out of date avm (#4338) - lang, cli, client: Updated solana dependencies to the latest compatible versions. Bumping CI and docker builds to use Solana CLI version 3.1.10 (#4317)
Fixes
- lang: Add missing
Lazybound on generics (#4240). - lang: Fix wrong generated error code in declare_program! (#4129).
- idl: Fix defined types with unsupported fields not producing an error (#4088).
- lang: Fix using non-instruction composite accounts multiple times with
declare_program!(#4113). - lang: Fix
declare_program!messing up IDL errors generation (#4126). - idl: Fix
addressconstraint not resolving constants that have numbers in their identifiers (#4144). - lang: Fix constant nested string generation in
declare_program!(#4158). - idl: Fix
local_filemethod not found forproc_macro2::Spanerror (#4187). - lang: Relax duplicate mutable account constraint to only check types that serialize on exit (
Account,LazyAccount,InterfaceAccount,Migration) (#4202). - idl: Make
serde_jsonoptional (#4296). - lang: Fix
declare_program!instruction parser with optional accounts (#4180). - lang: Use original
borshderives (#4205). - lang: Fix unexpected account substitution in
InterfaceAccount(#4139). - idl: Respect
offset = ...in IDL generation for custom errors (#4040). - cli: Relax separate dependency check for
solana-program(#4166). - lang: Enforce type and count matching between instruction handler and
#[instruction(..)]args (#4000). - lang: Handle invalid camelCase identifiers more gracefully (#4021).
- cli: Fix
i128/u128deserialization (#3938). - ts: Fix incorrect Anchor dependency version requirements (#4138).
- lang: Omit
parsersmodule ofdeclare_program!during on-chain (Solana) builds (#4109). - docs: Fixed broken links and replaced coral-xyz github references to solana-foundation (#4320)
- avm: Fixed handling of new Cargo.toml version location. Fixed handling of pre-release version parsing. (#4335)
- client: Fix deadlock when having multiple websocket listeners (#4250).
- lang: Fix incorrect deserialization for dynamically sized types when using
lazy-account(#4319) - avm: Using a temporary installation dir on cargo install calls to prevent cargo erroring out due to existing
anchorsymlink in.avm/bin(4343)
Breaking
- cli: Remove program
archoptions (#4295). - lang: Disallow duplicate mutable accounts by default. But allows duplicate mutable accounts in instruction contexts using
dupconstraint (#3946). - cli: Remove program id arguments of
idl initandidl upgradecommands (#4130). - lang: Rename
utilsmodule ofdeclare_program!toparsers(#4151). - lang: Remove the
interface-instructionsfeature and the#[interface]attribute (#4156). - cli: Remove the
logincommand (#4182). - idl: Exclude external accounts (#4197).
- idl: Remove the conflicting account names check (#4294).
- deps: Update to Solana 3.0 (#4031).
- idl: Remove legacy IDL instructions and integrate Program Metadata for IDL management (#3798).
- ts: Rename TypeScript packages from
@coral-xyz/anchorto@anchor-lang/core(#4141). - lang: Remove program account info from CPI context (#2762).
- cli: Remove dependency on the external
solanaCLI; native implementations provided for balance, airdrop, address, deploy, and other commands (#4099). - idl: Disallow multiple
#[error_code]definitions in a single program (#4300). - cli: Remove the
[registry]section fromAnchor.toml(#4299). - client: Make sending a tx not panic and instead return an Error when signing fails (#3865).
- lang: Rename
errorsandProgramErrorofdeclare_program!(#4347). - client: Remove the
solana-account-decodercrate export (#4373).
Release notes
Open source → - lang: Add
-
1.0.0-rc.520 Mar 2026 pre-releaseRelease notes
Open source →Features
- lang, cli, client: Updated solana dependencies to the latest compatible versions. Bumping CI and docker builds to use Solana CLI version 3.1.10 (#4317)
Fixes
- lang: Fix incorrect deserialization for dynamically sized types when using
lazy-account(#4319) - avm: Using a temporary installation dir on cargo install calls to prevent cargo erroring out due to existing
anchorsymlink in.avm/bin(4343)
Breaking
-
1.0.0-rc.419 Mar 2026 pre-releaseRelease notes
Open source →Features
- avm: Added flags and version labels to explicitly handle pre-releases (
avm list --pre-release,avm update --pre-releaseandavm install latest-pre-release). (#4335) - avm: Added
avm self-updatecommand and passive version check warning for out of date avm (#4338)
Fixes
- avm: Fixed handling of new Cargo.toml version location. Fixed handling of pre-release version parsing. (#4335)
Breaking
- avm: Added flags and version labels to explicitly handle pre-releases (
-
1.0.0-rc.318 Mar 2026 pre-releaseRelease notes
Open source →Features
- lang: Add
Migration<'info, From, To>account type for schema migrations between account types (#4060). - cli: Added a
check_program_id_mismatchin build time to check if the program ID in the source code matches the program ID in the keypair file (#4018). This check will be skipped duringanchor test. - lang: Add instruction parser to
declare_program!(#4118). - ts: Export all IDL types from the root. Users can now update
dist/cjs/idlimports to import directly from@anchor-lang/core(#3948). - lang: Add
declare_program!support with justanchor_clientand notanchor_lang(#4157). - lang: Export
Ownersfromprelude(#4189). - cli: Use surfpool by default for
anchor testandanchor localnetcommands (#4106). - lang: Optimize enums with all unit variants and empty arrays with
Lazy(#4237). - lang: Include
init_if_neededaccounts in duplicate mutable account checks (#4239). - client: Accept
FnMutfor events closure (#4024). - client: Export all types used by the public API (#4211).
- lang: Make
common::closeaccept references (#4178). - cli/idl: Add
--allow-localnetoption for IDL commands; fix panic when run outside a workspace (#4252). - lang: Check owner on account reload (#3837).
- lang/ts: Upgrade borsh to 1.5.7 (#4012).
- syn: Relax seeds syntax to allow more flexible PDA seed expressions (#3813).
- lang: Deprecate
AccountInfousage inAccountsmacro with a compile-time warning (#3854). - cli: Update
anchor initto use themultipleprogram template by default (#3958). - cli: Add
hookssection toAnchor.tomlfor{pre,post}-{build,test,deploy}lifecycle hooks (#3862). - lang: Add generic program validation support to
Programtype allowingProgram<'info>for executable-only validation (#3878). - cli: Added
litesvmtest template and made it the default option onanchor init(#4316) - cli: Added
--install-agent-skillsto automatically install Solana agent skills duringanchor init(#4307)
Fixes
- lang: Add missing
Lazybound on generics (#4240). - lang: Fix wrong generated error code in declare_program! (#4129).
- idl: Fix defined types with unsupported fields not producing an error (#4088).
- lang: Fix using non-instruction composite accounts multiple times with
declare_program!(#4113). - lang: Fix
declare_program!messing up IDL errors generation (#4126). - idl: Fix
addressconstraint not resolving constants that have numbers in their identifiers (#4144). - lang: Fix constant nested string generation in
declare_program!(#4158). - idl: Fix
local_filemethod not found forproc_macro2::Spanerror (#4187). - lang: Relax duplicate mutable account constraint to only check types that serialize on exit (
Account,LazyAccount,InterfaceAccount,Migration) (#4202). - idl: Make
serde_jsonoptional (#4296). - lang: Fix
declare_program!instruction parser with optional accounts (#4180). - lang: Use original
borshderives (#4205). - lang: Fix unexpected account substitution in
InterfaceAccount(#4139). - idl: Respect
offset = ...in IDL generation for custom errors (#4040). - cli: Relax separate dependency check for
solana-program(#4166). - lang: Enforce type and count matching between instruction handler and
#[instruction(..)]args (#4000). - lang: Handle invalid camelCase identifiers more gracefully (#4021).
- cli: Fix
i128/u128deserialization (#3938). - ts: Fix incorrect Anchor dependency version requirements (#4138).
- lang: Omit
parsersmodule ofdeclare_program!during on-chain (Solana) builds (#4109). - docs: Fixed broken links and replaced coral-xyz github references to solana-foundation (#4320)
Breaking
- cli: Remove program
archoptions (#4295). - lang: Disallow duplicate mutable accounts by default. But allows duplicate mutable accounts in instruction contexts using
dupconstraint (#3946). - cli: Remove program id arguments of
idl initandidl upgradecommands (#4130). - lang: Rename
utilsmodule ofdeclare_program!toparsers(#4151). - lang: Remove the
interface-instructionsfeature and the#[interface]attribute (#4156). - cli: Remove the
logincommand (#4182). - idl: Exclude external accounts (#4197).
- idl: Remove the conflicting account names check (#4294).
- deps: Update to Solana 3.0 (#4031).
- idl: Remove legacy IDL instructions and integrate Program Metadata for IDL management (#3798).
- ts: Rename TypeScript packages from
@coral-xyz/anchorto@anchor-lang/anchor(#4141). - lang: Remove program account info from CPI context (#2762).
- cli: Remove dependency on the external
solanaCLI; native implementations provided for balance, airdrop, address, deploy, and other commands (#4099). - idl: Disallow multiple
#[error_code]definitions in a single program (#4300). - cli: Remove the
[registry]section fromAnchor.toml(#4299). - client: Make sending a tx not panic and instead return an Error when signing fails (#3865).
- idl: Disallow multiple error definitions (#4300).
- lang: Add
-
1.0.0-rc.210 Jan 2026 pre-releaseNothing published for this version
-
1.0.0-rc.112 Dec 2025 pre-releaseNothing published for this version
-
0.32.110 Oct 2025Release notes
Open source →Features
Fixes
- lang: Fix deprecation warnings on alloc and add solana-program to prelude (#3975).
- cli: Fix race condition that could happen when deploying a program (#3976).
Breaking
-
0.32.009 Oct 2025Release notes
Open source →Features
- lang: Add
#[error]attribute todeclare_program!(#3757). - cli: Replace
anchor verifyto usesolana-verifyunder the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768). - lang: Replace
solana-programcrate with smaller crates (#3819). - cli: Make
anchor deployto upload the IDL to the cluster by default unless--no-idlis passed (#3863). - lang: Use
solana-invokeinstead ofsolana_cpi::invoke(#3900). - client: remove
solana-clientfromanchor-clientandcli(#3877). - idl: Build IDL on stable Rustc (#3842).
- lang: Add custom error when using init on SystemAccount (#3828).
- ts: Add support for Bun as a package manager (#3586).
- lang: Add support for tuple types in space calculation (#3744).
- lang: Add missing pubkey const generation (#3677).
- cli: Add the Minimum Supported Rust Version (MSRV) to the Rust template, since an arbitrary compiler version isn't supported (#3873).
- lang: Update mollusk test template dependencies to
~0.4and remove redundantsolana-programdev-dependency from generated template (#3790).
Fixes
- docker: Upgrade
nodeto 20.18.0 LTS (#3687). - cli: Fix using deprecated commitment
recentin migration scripts (#3725). - cli: Fix not respecting
provider.clusterinkeys synccommand (#3761). - lang: Fix deprecated
realloc,store_current_indexand clippy warnings (#3819). - avm: fix AVM instability with solana-verify (#3867).
- avm: update AVM to only use non-draft releases(#3931).
- lang: update bytemuck (#3858).
- idl: disable Locale in camelCase (#3845).
- ts: Remove event parsing panic (#3657).
- avm: Expose
anchoronPATHvia$CARGO_HOME/binsymlink (#3835).
Breaking
- spl: Update SPL dependencies to latest compatible versions (#3860).
- cli: Replace
anchor verifyto usesolana-verifyunder the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768). - cli: Upload IDL by default with an option to skip (#3863).
- lang: remove Solang (#3824).
- cli: remove
anchor publishcommand (#3795).
Release notes
Open source →Features
- lang: Add
#[error]attribute todeclare_program!(#3757). - cli: Replace
anchor verifyto usesolana-verifyunder the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768). - lang: Replace
solana-programcrate with smaller crates (#3819). - cli: Make
anchor deployto upload the IDL to the cluster by default unless--no-idlis passed (#3863). - lang: Use
solana-invokeinstead ofsolana_cpi::invoke(#3900). - client: remove
solana-clientfromanchor-clientandcli(#3877). - idl: Build IDL on stable Rustc (#3842).
- lang: Add custom error when using init on SystemAccount (#3828).
- ts: Add support for Bun as a package manager (#3586).
- lang: Add support for tuple types in space calculation (#3744).
- lang: Add missing pubkey const generation (#3677).
- cli: Add the Minimum Supported Rust Version (MSRV) to the Rust template, since an arbitrary compiler version isn't supported (#3873).
- lang: Update mollusk test template dependencies to
~0.4and remove redundantsolana-programdev-dependency from generated template (#3790).
Fixes
- docker: Upgrade
nodeto 20.18.0 LTS (#3687). - cli: Fix using deprecated commitment
recentin migration scripts (#3725). - cli: Fix not respecting
provider.clusterinkeys synccommand (#3761). - lang: Fix deprecated
realloc,store_current_indexand clippy warnings (#3819). - avm: fix AVM instability with solana-verify (#3867).
- avm: update AVM to only use non-draft releases(#3931).
- lang: update bytemuck (#3858).
- idl: disable Locale in camelCase (#3845).
- ts: Remove event parsing panic (#3657).
- avm: Expose
anchoronPATHvia$CARGO_HOME/binsymlink (#3835).
Breaking
- spl: Update SPL dependencies to latest compatible versions (#3860).
- cli: Replace
anchor verifyto usesolana-verifyunder the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768). - cli: Upload IDL by default with an option to skip ((#3863)[https://github.com/solana-foundation/anchor/pull/3863]).
- lang: remove Solang (#3824).
- cli: remove
anchor publishcommand (#3795).
Release notes
Open source →Features
- lang: Add
#[error]attribute todeclare_program!(#3757). - cli: Replace
anchor verifyto usesolana-verifyunder the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768). - lang: Replace
solana-programcrate with smaller crates (#3819). - cli: Make
anchor deployto upload the IDL to the cluster by default unless--no-idlis passed (#3863). - lang: Use
solana-invokeinstead ofsolana_cpi::invoke(#3900). - client: remove
solana-clientfromanchor-clientandcli(#3877). - idl: Build IDL on stable Rustc (#3842).
- lang: Add custom error when using init on SystemAccount (#3828).
- lang: Add
errorstodeclare_program(#3757). - ts: Add support for Bun as a package manager (#3586).
- lang: Add support for tuple types in space calculation (#3744).
- lang: Add missing pubkey const generation (#3677).
- cli: Add the Minimum Supported Rust Version (MSRV) to the Rust template, since an arbitrary compiler version isn't supported (#3873).
Fixes
- docker: Upgrade
nodeto 20.18.0 LTS (#3687). - cli: Fix using deprecated commitment
recentin migration scripts (#3725). - cli: Fix not respecting
provider.clusterinkeys synccommand (#3761). - lang: Fix deprecated
realloc,store_current_indexand clippy warnings (#3819). - avm: fix AVM instability with solana-verify (#3867).
- avm: update AVM to only use non-draft releases(#3931).
- lang: update bytemuck (#3858).
- idl: disable Locale in camelCase (#3845).
- ts: Remove event parsing panic (#3657).
Breaking
- spl: Update SPL dependencies to latest compatible versions (#3860).
- cli: Replace
anchor verifyto usesolana-verifyunder the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768). - cli: Upload IDL by default with an option to skip ((#3863)[https://github.com/solana-foundation/anchor/pull/3863]).
- lang: remove Solang (#3824).
- cli: remove
anchor publishcommand (#3795).
- lang: Add
-
0.31.120 Apr 2025Release notes
Open source →This release uses a new docker image found at
solanafoundation/anchorfor theanchor verifycommand. New images will be pushed to this organization in the future.Releases for anchor will also be published under the
solanafoundationGithub organization from now on.Features
- cli, docker: Replace
backpackapp/buildDocker image withsolanafoundation/anchor(#3619). - ts: Make
Providerrequire publicKey instead of wallet in accounts resolver (#3613)
Fixes
- idl: Update
proc-macro2usage for latest nightly (#3663) - ts: Fix parsing IDL with multiple const generics (#3665)
Breaking
Release notes
Open source →Features
- cli, docker: Replace
backpackapp/buildDocker image withsolanafoundation/anchor(#3619). - ts: Make
Providerrequire publicKey instead of wallet in accounts resolver (#3613)
Fixes
- idl: Update
proc-macro2usage for latest nightly (#3663) - ts: Fix parsing IDL with multiple const generics (#3665)
Breaking
- cli, docker: Replace
-
0.31.009 Mar 2025Release notes
Open source →Features
- client: Make
solana_account_decoderdep public in anchor client (#3455). - ts: Add optional
options.blockhashtoProvider.sendAndConfirm(#3070). - ts: Add optional
commitmentparameter toProgram.addEventListener(#3052). - cli, idl: Pass
cargoargs to IDL generation when building program or IDL (#3059). - cli: Add checks for incorrect usage of
idl-buildfeature (#3061). - lang: Export
Discriminatortrait fromprelude(#3075). - lang: Add
Accountutility type to get accounts from bytes (#3091). - client: Add option to pass in mock rpc client when using anchor_client (#3053).
- lang: Get discriminator length dynamically (#3101).
- lang: Add non-8-byte discriminator support in
declare_program!(#3103). - client: Make
ThreadSafeSignertrait public (#3107). - lang: Update
dispatchfunction to support dynamic discriminators (#3104). - lang: Remove the fallback function shortcut in
try_entryfunction (#3109). - ts: Get discriminator lengths dynamically (#3120).
- client: Support non-8-byte discriminators (#3125).
- spl: Add
withdraw_withheld_tokens_from_accountsinstruction (#3128). - ts: Add optional
walletproperty to theProviderinterface (#3130). - cli: Warn if
anchor-spl/idl-buildis missing (#3133). - client: Add
internal_rpcmethod formockfeature (#3135). - lang: Add
#[instruction]attribute proc-macro to override default instruction discriminators (#3137). - lang: Use associated discriminator constants instead of hardcoding in
#[account](#3144). - lang: Add
discriminatorargument to#[account]attribute (#3149). - lang: Add
discriminatorargument to#[event]attribute (#3152). - idl: Check ambiguous discriminators (#3157).
- idl: Disallow all zero account discriminators (#3159).
- cli: Support non-8-byte discriminators (#3165).
- idl: Disallow empty discriminators (#3166).
- cli: Add
--no-idloption to thetestcommand (#3175). - spl: Add
burn_checked,mint_to_checkedandapprove_checkedinstructions (#3186). - cli: Migrate to
agave-installwhensolana_versionis>= 1.18.19(#3185). - idl: Add
IdlBuilder(#3188). - cli: Make
cleancommand also remove the.anchordirectory (#3192). - lang: Deprecate
#[interface]attribute (#3195). - ts: Include unresolved accounts in the resolution error message (#3207).
- lang: Add
LazyAccount(#3194). - avm: Ask whether to install if the version is not installed with the
usecommand (#3230). - cli: Warn if a manifest has
solana-programdependency (#3250). - cli: Add completions command to generate shell completions via the clap_complete crate (#3251).
- cli: Always convert IDLs (#3265).
- cli: Check whether the
idl-buildfeature exists when using theidl buildcommand (#3273). - cli: Build IDL if there is only one program when using the
idl buildcommand (#3275). - cli: Add short alias for the
idl buildcommand (#3283). - cli: Add
--program-idoption toidl convertcommand (#3309). - lang: Generate documentation of constants in
declare_program!(#3311). - cli: Add support for fetching legacy IDLs (#3324).
- avm: Add short alias for
installandlistcommands (#3326). - avm: Add Windows support for renaming anchor binary (#3325).
- cli: Add optional
package-managerflag ininitcommand to set package manager field in Anchor.toml (#3328). - cli: Add test template for Mollusk (#3352).
- idl: Disallow account discriminators that can conflict with the
zeroconstraint (#3365). - cli: Include recommended solana args by default and add new
--max-retriesoption to thedeploycommand (#3354). - avm: Make installation download binaries by default (#3445).
- idl: Support PDA resolution of call expressions that don't have any arguments (#3485).
- spl: Add
anchor-debugfeature (#3511). - avm: Always install commit hash inputs from source (#3461).
Fixes
- idl: Make safety comment checks fail silently when program path env is not set (#3045).
- idl: Avoid interference from rust tests during IDL generation (#3058).
- lang: Fix
alignrepr support indeclare-program!(#3056). - lang: Make stack frames slimmer on ATA creation (#3065).
- lang: Remove
getrandomdependency (#3072). - lang: Make
InitSpacesupport unnamed & unit structs (#3084). - lang: Fix using
ownerconstraint withBoxed accounts (#3087). - lang: Add a sanity check for unimplemented token extensions (#3090).
- cli: Skip IDL checks if
--no-idloption is passed (#3093). - lang: Fix compilation error when an
#[account]struct has generics (#3148). - lang: Remove unnecessary clone in account exit routine (#3139).
- cli: Fix installation with
--lockedargument using Rust v1.80 due totimecrate issue (#3143). - lang: Fix compilation warnings due to unused deprecated program id macros (#3170).
- ts: Remove
crypto-hashdependency (#3171). - ts: Improve error message of unsupported
viewmethod (#3177). - idl: Fix panicking on tests (#3197).
- lang: Remove
arrayrefdependency (#3201). - cli: Fix template code shouldn't escape (#3210).
- idl: Fix using
addressconstraint with non-const expressions (#3216). - idl: Fix using full path types with
Program(#3228). - lang: Use closures for
initconstraints to reduce the stack usage oftry_accounts(#2939). - lang: Allow the
cfgattribute above the instructions (#2339). - idl: Log output with
ANCHOR_LOGon failure and improve build error message (#3284). - lang: Fix constant bytes declarations when using
declare_program!(#3287). - lang: Fix using non-instruction composite accounts with
declare_program!(#3290). - idl: Fix instructions with tuple parameters not producing an error(#3294).
- ts: Update
engines.nodeto>= 17(#3301). - cli: Use OS-agnostic paths (#3307).
- avm: Use
rustc 1.79.0when installing versions older than v0.31 (#3315). - cli: Fix priority fee calculation causing panic on localnet (#3318).
- cli: Fix
shellcommand failing due to outdated program initialization (#3351). - idl: Fix detecting false-positives from doc comments during module path conversion (#3359).
- cli: Remove passing the rent sysvar account to IDL instructions (#3372).
- lang: Fix
cpifeature instructions not accounting for discriminator overrides (#3376). - idl: Ignore compiler warnings during builds (#3396).
- cli: Avoid extra IDL generation during
verify(#3398). - lang: Require
zeroaccounts to be unique (#3409). - lang: Deduplicate
zeroaccounts againstinitaccounts (#3422). - cli: Fix custom
provider.cluster(#3428). - cli: Ignore non semver solana/agave releases to avoid panic (#3432).
- ts: Fix loading programs with numbers in their names using
workspace(#3450). - lang: Remove a potential panic while getting the IDL in
declare_program!(#3458). - cli: Fix altering user-provided lib names (#3467).
- idl: Fix missing
program::seedresolution (#3474). - lang: Fix adding
derives andreprs to type alias definitions indeclare_program!(#3504). - idl: Fix using constant identifiers as generic arguments (#3522).
- client: Remove
std::process::exitusage (#3544). - idl: Fix using
Pubkeyconstants withseeds::program(#3559). - lang: Fix instructions with no accounts causing compilation errors when using
declare_program!(#3567). - idl: Fix using account or arg values for
seeds::program(#3570). - lang: Fix using
dataas an instruction parameter name indeclare_program!(#3574). - cli: Use camelCase for program name in
anchor.workspacetemplates (#3581). - cli: Fix the default JS update command being incorrect (#3337).
- cli: Remove stripping workspace prefix from program id of the
upgradecommand (#3345). - cli: Convert package managers to lowercase during serialization (#3531).
Breaking
- syn: Remove
bpftarget support inhashfeature (#3078). - client: Add
tokiosupport toRequestBuilderwithasyncfeature (#3057). - lang: Remove
EventDatatrait (#3083). - client: Remove
async_rpcmethod (#3053). - lang: Make discriminator type unsized (#3098).
- lang: Require
Discriminatortrait impl when using thezeroconstraint (#3118). - ts: Remove
DISCRIMINATOR_SIZEconstant (#3120). - lang:
#[account]attribute arguments no longer parses identifiers as namespaces (#3140). - spl: Rename metadata interface instruction fields from
token_program_idtoprogram_id(#3076). - lang, ts: Remove "8 byte" requirement from discriminator error messages (#3161).
- lang: Remove
discriminatormethod fromDiscriminatortrait (#3163). - docker: Upgrade
nodeto 20.16.0 LTS (#3179). - ts: Change the
Programconstructor'sidlparameter type toany(#3181). - lang, spl: Remove
borsh 0.9support (#3199). - ts: Upgrade
typescriptto5.5.4and remove the generic parameters ofSimulateResponse(#3221). - ts: Remove
StateCoder(#3224). - cli: Accept integers for
warp_slot(#3235). - lang: Remove
EventIndex(#3244). - spl: Remove
dexfeature (#3257). - client, lang, spl: Upgrade Solana to v2 and SPL to the latest (#3219).
- cli: Install Solana from anza.xyz domain in Docker verifiable builds (#3271).
- spl: Upgrade SPL deps to latest (#3346).
- cli: Upgrade
typescriptversion of templates to v5 (#3480). - ts: Remove
snake-casedependency (#3507). - deps: Upgrade Solana to 2.1.0 (#3339).
- spl: Update
mpl-token-metadataversion requirement to5(#3356).
Release notes
Open source →Features
- client: Make
solana_account_decoderdep public in anchor client (#3455). - ts: Add optional
options.blockhashtoProvider.sendAndConfirm(#3070). - ts: Add optional
commitmentparameter toProgram.addEventListener(#3052). - cli, idl: Pass
cargoargs to IDL generation when building program or IDL (#3059). - cli: Add checks for incorrect usage of
idl-buildfeature (#3061). - lang: Export
Discriminatortrait fromprelude(#3075). - lang: Add
Accountutility type to get accounts from bytes (#3091). - client: Add option to pass in mock rpc client when using anchor_client (#3053).
- lang: Get discriminator length dynamically (#3101).
- lang: Add non-8-byte discriminator support in
declare_program!(#3103). - client: Make
ThreadSafeSignertrait public (#3107). - lang: Update
dispatchfunction to support dynamic discriminators (#3104). - lang: Remove the fallback function shortcut in
try_entryfunction (#3109). - ts: Get discriminator lengths dynamically (#3120).
- client: Support non-8-byte discriminators (#3125).
- spl: Add
withdraw_withheld_tokens_from_accountsinstruction (#3128). - ts: Add optional
walletproperty to theProviderinterface (#3130). - cli: Warn if
anchor-spl/idl-buildis missing (#3133). - client: Add
internal_rpcmethod formockfeature (#3135). - lang: Add
#[instruction]attribute proc-macro to override default instruction discriminators (#3137). - lang: Use associated discriminator constants instead of hardcoding in
#[account](#3144). - lang: Add
discriminatorargument to#[account]attribute (#3149). - lang: Add
discriminatorargument to#[event]attribute (#3152). - idl: Check ambiguous discriminators (#3157).
- idl: Disallow all zero account discriminators (#3159).
- cli: Support non-8-byte discriminators (#3165).
- idl: Disallow empty discriminators (#3166).
- cli: Add
--no-idloption to thetestcommand (#3175). - spl: Add
burn_checked,mint_to_checkedandapprove_checkedinstructions (#3186). - cli: Migrate to
agave-installwhensolana_versionis>= 1.18.19(#3185). - idl: Add
IdlBuilder(#3188). - cli: Make
cleancommand also remove the.anchordirectory (#3192). - lang: Deprecate
#[interface]attribute (#3195). - ts: Include unresolved accounts in the resolution error message (#3207).
- lang: Add
LazyAccount(#3194). - avm: Ask whether to install if the version is not installed with the
usecommand (#3230). - cli: Warn if a manifest has
solana-programdependency (#3250). - cli: Add completions command to generate shell completions via the clap_complete crate (#3251).
- cli: Always convert IDLs (#3265).
- cli: Check whether the
idl-buildfeature exists when using theidl buildcommand (#3273). - cli: Build IDL if there is only one program when using the
idl buildcommand (#3275). - cli: Add short alias for the
idl buildcommand (#3283). - cli: Add
--program-idoption toidl convertcommand (#3309). - lang: Generate documentation of constants in
declare_program!(#3311). - cli: Add support for fetching legacy IDLs (#3324).
- avm: Add short alias for
installandlistcommands (#3326). - avm: Add Windows support for renaming anchor binary (#3325).
- cli: Add optional
package-managerflag ininitcommand to set package manager field in Anchor.toml (#3328). - cli: Add test template for Mollusk (#3352).
- idl: Disallow account discriminators that can conflict with the
zeroconstraint (#3365). - cli: Include recommended solana args by default and add new
--max-retriesoption to thedeploycommand (#3354). - avm: Make installation download binaries by default (#3445).
- idl: Support PDA resolution of call expressions that don't have any arguments (#3485).
- spl: Add
anchor-debugfeature (#3511).
Fixes
- idl: Make safety comment checks fail silently when program path env is not set (#3045).
- idl: Avoid interference from rust tests during IDL generation (#3058).
- lang: Fix
alignrepr support indeclare-program!(#3056). - lang: Make stack frames slimmer on ATA creation (#3065).
- lang: Remove
getrandomdependency (#3072). - lang: Make
InitSpacesupport unnamed & unit structs (#3084). - lang: Fix using
ownerconstraint withBoxed accounts (#3087). - lang: Add a sanity check for unimplemented token extensions (#3090).
- cli: Skip IDL checks if
--no-idloption is passed (#3093). - lang: Remove unnecessary clone in account exit routine (#3139).
- cli: Fix installation with
--lockedargument using Rust v1.80 due totimecrate issue (#3143). - lang: Fix compilation warnings due to unused deprecated program id macros (#3170).
- ts: Remove
crypto-hashdependency (#3171). - ts: Improve error message of unsupported
viewmethod (#3177). - idl: Fix panicking on tests (#3197).
- lang: Remove
arrayrefdependency (#3201). - cli: Fix template code shouldn't escape (#3210).
- idl: Fix using
addressconstraint with non-const expressions (#3216). - idl: Fix using full path types with
Program(#3228). - lang: Use closures for
initconstraints to reduce the stack usage oftry_accounts(#2939). - lang: Allow the
cfgattribute above the instructions (#2339). - idl: Log output with
ANCHOR_LOGon failure and improve build error message (#3284). - lang: Fix constant bytes declarations when using
declare_program!(#3287). - lang: Fix using non-instruction composite accounts with
declare_program!(#3290). - idl: Fix instructions with tuple parameters not producing an error(#3294).
- ts: Update
engines.nodeto>= 17(#3301). - cli: Use OS-agnostic paths (#3307).
- avm: Use
rustc 1.79.0when installing versions older than v0.31 (#3315). - cli: Fix priority fee calculation causing panic on localnet (#3318).
- cli: Fix
shellcommand failing due to outdated program initialization (#3351). - idl: Fix detecting false-positives from doc comments during module path conversion (#3359).
- cli: Remove passing the rent sysvar account to IDL instructions (#3372).
- lang: Fix
cpifeature instructions not accounting for discriminator overrides (#3376). - idl: Ignore compiler warnings during builds (#3396).
- cli: Avoid extra IDL generation during
verify(#3398). - lang: Require
zeroaccounts to be unique (#3409). - lang: Deduplicate
zeroaccounts againstinitaccounts (#3422). - cli: Fix custom
provider.cluster(#3428). - cli: Ignore non semver solana/agave releases to avoid panic (#3432).
- ts: Fix loading programs with numbers in their names using
workspace(#3450). - lang: Remove a potential panic while getting the IDL in
declare_program!(#3458). - cli: Fix altering user-provided lib names (#3467).
- idl: Fix missing
program::seedresolution (#3474). - lang: Fix adding
derives andreprs to type alias definitions indeclare_program!(#3504). - idl: Fix using constant identifiers as generic arguments (#3522).
- client: Remove
std::process::exitusage (#3544). - idl: Fix using
Pubkeyconstants withseeds::program(#3559). - lang: Fix instructions with no accounts causing compilation errors when using
declare_program!(#3567). - idl: Fix using account or arg values for
seeds::program(#3570). - lang: Fix using
dataas an instruction parameter name indeclare_program!(#3574). - cli: Use camelCase for program name in
anchor.workspacetemplates (#3581).
Breaking
- syn: Remove
bpftarget support inhashfeature (#3078). - client: Add
tokiosupport toRequestBuilderwithasyncfeature (#3057). - lang: Remove
EventDatatrait (#3083). - client: Remove
async_rpcmethod (#3053). - lang: Make discriminator type unsized (#3098).
- lang: Require
Discriminatortrait impl when using thezeroconstraint (#3118). - ts: Remove
DISCRIMINATOR_SIZEconstant (#3120). - lang:
#[account]attribute arguments no longer parses identifiers as namespaces (#3140). - spl: Rename metadata interface instruction fields from
token_program_idtoprogram_id(#3076). - lang, ts: Remove "8 byte" requirement from discriminator error messages (#3161).
- lang: Remove
discriminatormethod fromDiscriminatortrait (#3163). - docker: Upgrade
nodeto 20.16.0 LTS (#3179). - ts: Change the
Programconstructor'sidlparameter type toany(#3181). - lang, spl: Remove
borsh 0.9support (#3199). - ts: Upgrade
typescriptto5.5.4and remove the generic parameters ofSimulateResponse(#3221). - ts: Remove
StateCoder(#3224). - cli: Accept integers for
warp_slot(#3235). - lang: Remove
EventIndex(#3244). - spl: Remove
dexfeature (#3257). - client, lang, spl: Upgrade Solana to v2 and SPL to the latest (#3219).
- cli: Install Solana from anza.xyz domain in Docker verifiable builds (#3271).
- spl: Upgrade SPL deps to latest (#3346).
- cli: Upgrade
typescriptversion of templates to v5 (#3480). - ts: Remove
snake-casedependency (#3507).
- client: Make
-
0.30.120 Jun 2024Release notes
Open source →Features
- idl: Allow overriding the idl build toolchain with the
RUSTUP_TOOLCHAINenvironment variable (#2941). - avm: Support customizing the installation location using
AVM_HOMEenvironment variable (#2917). - avm: Optimize
avm listwhen GitHub API rate limits are reached (#2962) - idl, ts: Add accounts resolution for associated token accounts (#2927).
- cli: Add
--no-installoption to theinitcommand (#2945). - lang: Implement
TryFromIntErrorforErrorto be able to propagate integer conversion errors (#2950). - idl: Add ability to convert legacy IDLs (#2986).
- ts: Extract Anchor error codes into their own package (#2983).
- cli: Add additional solana arguments to the
upgradecommand (#2998). - spl: Export
spl-associated-token-accountcrate (#2999). - lang: Support legacy IDLs with
declare_program!(#2997). - cli: Add
idl convertcommand (#3009). - cli: Add
idl typecommand (#3017). - lang: Add
anchor_lang::pubkeymacro for declaringPubkeyconst values (#3021). - cli: Sync program ids on the initial build (#3023).
- idl: Remove
anchor-syndependency (#3030). - lang: Add
constof program ID todeclare_id!anddeclare_program!(#3019). - idl: Add separate spec crate (#3036).
- lang: Include
pubkey!macro inprelude(#3026). - cli: Print total steps in IDL buffer writes (#2944).
Fixes
- lang: Eliminate variable allocations that build up stack space for token extension code generation (#2913).
- ts: Fix incorrect
maxSupportedTransactionVersioninAnchorProvider.send*()methods (#2922). - cli: Use npm's configured default license for new projects made with
anchor init(#2929). - cli: add filename to 'Unable to read keypair file' errors (#2932).
- idl: Fix path resolution of the
Cargo.lockof the project when generating idls for external types (#2946). - idl: Fix potential panic on external type resolution (#2954).
- lang: Fix using defined types in instruction parameters with
declare_program!(#2959). - lang: Fix using const generics with
declare_program!(#2965). - lang: Fix using
Vec<u8>type withdeclare_program!(#2966). - lang: Fix
ProgramError::ArithmeticOverflownot found error (#2975). - lang: Fix using optional accounts with
declare_program!(#2967). - lang: Fix instruction return type generation with
declare_program!(#2977). - cli: Fix IDL write getting corrupted from retries (#2964).
- idl: Fix
unexpected_cfgsbuild warning (#2992). - lang: Make tuple struct fields public in
declare_program!(#2994). - Remove
rust-versionfrom crate manifests (#3000). - cli: Fix upgradeable program clones (#3010).
- ts: Fix using IDLs that have defined types as generic arguments (#3016).
- idl: Fix generation with unsupported expressions (#3033).
- idl: Fix using
addressconstraint with field expressions (#3034). - lang: Fix using
bytemuckunsafeaccount serialization withdeclare_program!(#3037). - ts: Upgrade
@babel/traverseto 7.24.1 (#2919).
Breaking
- deps: Upgrade Solana to 1.18.17 (#3039).
Release notes
Open source →Features
- idl: Allow overriding the idl build toolchain with the
RUSTUP_TOOLCHAINenvironment variable (#2941). - avm: Support customizing the installation location using
AVM_HOMEenvironment variable (#2917). - avm: Optimize
avm listwhen GitHub API rate limits are reached (#2962) - idl, ts: Add accounts resolution for associated token accounts (#2927).
- cli: Add
--no-installoption to theinitcommand (#2945). - lang: Implement
TryFromIntErrorforErrorto be able to propagate integer conversion errors (#2950). - idl: Add ability to convert legacy IDLs (#2986).
- ts: Extract Anchor error codes into their own package (#2983).
- cli: Add additional solana arguments to the
upgradecommand (#2998). - spl: Export
spl-associated-token-accountcrate (#2999). - lang: Support legacy IDLs with
declare_program!(#2997). - cli: Add
idl convertcommand (#3009). - cli: Add
idl typecommand (#3017). - lang: Add
anchor_lang::pubkeymacro for declaringPubkeyconst values (#3021). - cli: Sync program ids on the initial build (#3023).
- idl: Remove
anchor-syndependency (#3030). - lang: Add
constof program ID todeclare_id!anddeclare_program!(#3019). - idl: Add separate spec crate (#3036).
Fixes
- lang: Eliminate variable allocations that build up stack space for token extension code generation (#2913).
- ts: Fix incorrect
maxSupportedTransactionVersioninAnchorProvider.send*()methods (#2922). - cli: Use npm's configured default license for new projects made with
anchor init(#2929). - cli: add filename to 'Unable to read keypair file' errors (#2932).
- idl: Fix path resolution of the
Cargo.lockof the project when generating idls for external types (#2946). - idl: Fix potential panic on external type resolution (#2954).
- lang: Fix using defined types in instruction parameters with
declare_program!(#2959). - lang: Fix using const generics with
declare_program!(#2965). - lang: Fix using
Vec<u8>type withdeclare_program!(#2966). - lang: Fix
ProgramError::ArithmeticOverflownot found error (#2975). - lang: Fix using optional accounts with
declare_program!(#2967). - lang: Fix instruction return type generation with
declare_program!(#2977). - cli: Fix IDL write getting corrupted from retries (#2964).
- idl: Fix
unexpected_cfgsbuild warning (#2992). - lang: Make tuple struct fields public in
declare_program!(#2994). - Remove
rust-versionfrom crate manifests (#3000). - cli: Fix upgradeable program clones (#3010).
- ts: Fix using IDLs that have defined types as generic arguments (#3016).
- idl: Fix generation with unsupported expressions (#3033).
- idl: Fix using
addressconstraint with field expressions (#3034). - lang: Fix using
bytemuckunsafeaccount serialization withdeclare_program!(#3037).
Breaking
- idl: Allow overriding the idl build toolchain with the
-
0.30.015 Apr 2024Release notes
Open source →See the Anchor 0.30 release notes for a high-level overview of how to update.
Features
- cli: Allow force
initandnew(#2698). - cli: Add verifiable option when
deploy(#2705). - cli: Add support for passing arguments to the underlying
solana program deploycommand withanchor deploy(#2709). - lang: Add
InstructionData::write_toimplementation (#2733). - lang: Add
#[interface(..)]attribute for instruction discriminator overrides (#2728). - ts: Add
.interface(..)method for instruction discriminator overrides (#2728). - cli: Check
anchor-langand CLI version compatibility (#2753). - ts: Add missing IDL PDA seed types (#2752).
- cli:
idl closeaccepts optional--idl-addressparameter (#2760). - cli: Add support for simple wildcard patterns in Anchor.toml's
workspace.membersandworkspace.exclude. (#2785). - cli: Add
--test-templateoption forinitcommand (#2805). - cli:
anchor testis able to run multiple commands (#2799). - cli: Check
@coral-xyz/anchorpackage and CLI version compatibility (#2813). - cli: Accept package name as program name (#2816).
- cli: Add ability to build and test only a specified program (#2823).
- idl: Add new IDL spec (#2824).
- idl: Add support for
reprs (#2824). - idl: Add support for expression evaluation (#2824).
- idl: Add support for using external types when generating the IDL (#2824).
- idl, ts: Add unit and tuple struct support (#2824).
- idl, ts: Add generics support (#2824).
- ts: Add
accountsPartialmethod to keep the oldaccountsmethod behavior (#2824). - ts: Make
optsparameter ofAnchorProviderconstructor optional (#2843). - cli: Add
--no-idlflag to thebuildcommand (#2847). - cli: Add priority fees to idl commands (#2845).
- ts: Add
prependoption to MethodBuilderpreInstructionsmethod (#2863). - lang: Add
declare_program!macro (#2857). - cli: Add
deactivate_featureflag tosolana-test-validatorconfig in Anchor.toml (#2872). - idl: Add
docsfield for constants (#2887). - idl: Store deployment addresses for other clusters (#2892).
- lang: Add
Eventutility type to get events from bytes (#2897). - lang, spl: Add support for token extensions (#2789).
- lang: Return overflow error from
Lamportstrait operations (#2907). - lang: Add composite accounts support for
declare_program!(#2894). - client: Expose more parts from logs parsing (#2707).
Fixes
- syn: Add missing
new_from_arraymethod toHash(#2682). - cli: Switch to Cargo feature resolver(
resolver = "2") (#2676). - cli: Fix using user specific path for
provider.walletinAnchor.toml(#2696). - syn: Fix IDL constant seeds parsing (#2699).
- cli: Display errors if toolchain override restoration fails (#2700).
- cli: Fix commit based
anchor_versionoverride (#2704). - spl: Fix compilation with
shmemfeature enabled (#2722). - cli: Localhost default test validator address changes from
localhostto127.0.0.1, NodeJS 17 IP resolution changes for IPv6 (#2725). - lang: Eliminate temporary Vec allocations when serializing data with discriminant and set the default capacity to 256 bytes (#2691).
- lang: Allow custom lifetime in Accounts structure (#2741).
- lang: Remove
try_to_vecusage while setting the return data in order to reduce heap memory usage (#2744) - cli: Show installation progress if Solana tools are not installed when using toolchain overrides (#2757).
- ts: Fix formatting enums (#2763).
- cli: Fix
migratecommand not working without globalts-nodeinstallation (#2767). - client, lang, spl, syn: Enable all features for docs.rs build (#2774).
- ts: Fix construction of field layouts for type aliased instruction arguments (#2821)
- idl: Fix IDL (#2824).
- idl, ts: Make casing consistent (#2824).
- ts: Fix not being able to use numbers in instruction, account, or event names in some cases due to case conversion (#2824).
- cli: Fix excessive test validator requests (#2828).
- client: Fix
parse_logs_responseto prevent panics when more than 1 outer instruction exists in logs (#2856). - avm, cli: Fix
stdsimdfeature compilation error fromahashwhen installing the CLI using newer Rust versions (#2867). - spl: Fix not being able to deserialize newer token 2022 extensions (#2876).
- client: Fix erroneous Cluster websocket ports (#2690).
- spl: Remove
solana-programdependency (#2900). - spl: Make
TokenAccountandMintCopy(#2904). - ts: Add missing errors (#2906).
Breaking
- cli: Make
cargo build-sbfthe default build command (#2694). - cli: Require explicit
overflow-checksflag (#2716). - ts: Remove
anchor-deprecated-statefeature (#2717). - lang: Remove
CLOSED_ACCOUNT_DISCRIMINATOR(#2726). - lang: Make bumps of optional accounts
Option<u8>rather thanu8(#2730). - spl: Remove
shared-memoryprogram (#2747). - ts: Remove
associated,account.associatedandaccount.associatedAddressmethods (#2749). - cli:
idl upgradecommand closes the IDL buffer account (#2760). - cli: Remove
--jestoption from theinitcommand (#2805). - cli: Require
idl-buildfeature in programCargo.toml(#2824). - cli: Rename
seedsfeature toresolutionand make it enabled by default (#2824). - cli: Remove
idl parsecommand (#2824). - idl: Change IDL spec (#2824).
- syn: Remove
idl-parseandseedsfeatures (#2824). - ts: Change
accountsmethod to no longer accept resolvable accounts (#2824). - ts:
Programinstances use camelCase for everything (#2824). - ts: Remove discriminator functions (#2824).
- ts: Remove
programIdparameter of theProgramconstructor (#2864). - idl, syn: Move IDL types from the
anchor-syncrate to the new IDL crate (#2882). - idl: Add
#[non_exhaustive]to IDL enums (#2890). - idl: Rename IDL crate from
anchor-idltoanchor-lang-idl(#2908). - deps: Upgrade Solana to 1.18.8 (#2867).
Release notes
Open source →See the Anchor 0.30 release notes for a high-level overview of how to update.
Features
- cli: Allow force
initandnew(#2698). - cli: Add verifiable option when
deploy(#2705). - cli: Add support for passing arguments to the underlying
solana program deploycommand withanchor deploy(#2709). - lang: Add
InstructionData::write_toimplementation (#2733). - lang: Add
#[interface(..)]attribute for instruction discriminator overrides (#2728). - ts: Add
.interface(..)method for instruction discriminator overrides (#2728). - cli: Check
anchor-langand CLI version compatibility (#2753). - ts: Add missing IDL PDA seed types (#2752).
- cli:
idl closeaccepts optional--idl-addressparameter (#2760). - cli: Add support for simple wildcard patterns in Anchor.toml's
workspace.membersandworkspace.exclude. (#2785). - cli: Add
--test-templateoption forinitcommand (#2805). - cli:
anchor testis able to run multiple commands (#2799). - cli: Check
@coral-xyz/anchorpackage and CLI version compatibility (#2813). - cli: Accept package name as program name (#2816).
- cli: Add ability to build and test only a specified program (#2823).
- idl: Add new IDL spec (#2824).
- idl: Add support for
reprs (#2824). - idl: Add support for expression evaluation (#2824).
- idl: Add support for using external types when generating the IDL (#2824).
- idl, ts: Add unit and tuple struct support (#2824).
- idl, ts: Add generics support (#2824).
- ts: Add
accountsPartialmethod to keep the oldaccountsmethod behavior (#2824). - ts: Make
optsparameter ofAnchorProviderconstructor optional (#2843). - cli: Add
--no-idlflag to thebuildcommand (#2847). - cli: Add priority fees to idl commands (#2845).
- ts: Add
prependoption to MethodBuilderpreInstructionsmethod (#2863). - lang: Add
declare_program!macro (#2857). - cli: Add
deactivate_featureflag tosolana-test-validatorconfig in Anchor.toml (#2872). - idl: Add
docsfield for constants (#2887). - idl: Store deployment addresses for other clusters (#2892).
- lang: Add
Eventutility type to get events from bytes (#2897). - lang, spl: Add support for token extensions (#2789).
- lang: Return overflow error from
Lamportstrait operations (#2907). - lang: Add composite accounts support for
declare_program!(#2894). - client: Expose more parts from logs parsing (#2707).
Fixes
- syn: Add missing
new_from_arraymethod toHash(#2682). - cli: Switch to Cargo feature resolver(
resolver = "2") (#2676). - cli: Fix using user specific path for
provider.walletinAnchor.toml(#2696). - syn: Fix IDL constant seeds parsing (#2699).
- cli: Display errors if toolchain override restoration fails (#2700).
- cli: Fix commit based
anchor_versionoverride (#2704). - spl: Fix compilation with
shmemfeature enabled (#2722). - cli: Localhost default test validator address changes from
localhostto127.0.0.1, NodeJS 17 IP resolution changes for IPv6 (#2725). - lang: Eliminate temporary Vec allocations when serializing data with discriminant and set the default capacity to 256 bytes (#2691).
- lang: Allow custom lifetime in Accounts structure (#2741).
- lang: Remove
try_to_vecusage while setting the return data in order to reduce heap memory usage (#2744) - cli: Show installation progress if Solana tools are not installed when using toolchain overrides (#2757).
- ts: Fix formatting enums (#2763).
- cli: Fix
migratecommand not working without globalts-nodeinstallation (#2767). - client, lang, spl, syn: Enable all features for docs.rs build (#2774).
- ts: Fix construction of field layouts for type aliased instruction arguments (#2821)
- idl: Fix IDL (#2824).
- idl, ts: Make casing consistent (#2824).
- ts: Fix not being able to use numbers in instruction, account, or event names in some cases due to case conversion (#2824).
- cli: Fix excessive test validator requests (#2828).
- client: Fix
parse_logs_responseto prevent panics when more than 1 outer instruction exists in logs (#2856). - avm, cli: Fix
stdsimdfeature compilation error fromahashwhen installing the CLI using newer Rust versions (#2867). - spl: Fix not being able to deserialize newer token 2022 extensions (#2876).
- client: Fix erroneous Cluster websocket ports (#2690).
- spl: Remove
solana-programdependency (#2900). - spl: Make
TokenAccountandMintCopy(#2904). - ts: Add missing errors (#2906).
Breaking
- cli: Make
cargo build-sbfthe default build command (#2694). - cli: Require explicit
overflow-checksflag (#2716). - ts: Remove
anchor-deprecated-statefeature (#2717). - lang: Remove
CLOSED_ACCOUNT_DISCRIMINATOR(#2726). - lang: Make bumps of optional accounts
Option<u8>rather thanu8(#2730). - spl: Remove
shared-memoryprogram (#2747). - ts: Remove
associated,account.associatedandaccount.associatedAddressmethods (#2749). - cli:
idl upgradecommand closes the IDL buffer account (#2760). - cli: Remove
--jestoption from theinitcommand (#2805). - cli: Require
idl-buildfeature in programCargo.toml(#2824). - cli: Rename
seedsfeature toresolutionand make it enabled by default (#2824). - cli: Remove
idl parsecommand (#2824). - idl: Change IDL spec (#2824).
- syn: Remove
idl-parseandseedsfeatures (#2824). - ts: Change
accountsmethod to no longer accept resolvable accounts (#2824). - ts:
Programinstances use camelCase for everything (#2824). - ts: Remove discriminator functions (#2824).
- ts: Remove
programIdparameter of theProgramconstructor (#2864). - idl, syn: Move IDL types from the
anchor-syncrate to the new IDL crate (#2882). - idl: Add
#[non_exhaustive]to IDL enums (#2890). - idl: Rename IDL crate from
anchor-idltoanchor-lang-idl(#2908). - deps: Upgrade Solana to 1.18.8 (#2867).
Release notes
Open source →Features
- cli: Allow force
initandnew(#2698). - cli: Add verifiable option when
deploy(#2705). - cli: Add support for passing arguments to the underlying
solana program deploycommand withanchor deploy(#2709). - lang: Add
InstructionData::write_toimplementation (#2733). - lang: Add
#[interface(..)]attribute for instruction discriminator overrides (#2728). - ts: Add
.interface(..)method for instruction discriminator overrides (#2728). - cli: Check
anchor-langand CLI version compatibility (#2753). - ts: Add missing IDL PDA seed types (#2752).
- cli:
idl closeaccepts optional--idl-addressparameter (#2760). - cli: Add support for simple wildcard patterns in Anchor.toml's
workspace.membersandworkspace.exclude. (#2785). - cli: Add
--test-templateoption forinitcommand (#2805). - cli:
anchor testis able to run multiple commands (#2799). - cli: Check
@coral-xyz/anchorpackage and CLI version compatibility (#2813). - cli: Accept package name as program name (#2816).
- cli: Add ability to build and test only a specified program (#2823).
- idl: Add new IDL spec (#2824).
- idl: Add support for
reprs (#2824). - idl: Add support for expression evaluation (#2824).
- idl: Add support for using external types when generating the IDL (#2824).
- idl, ts: Add unit and tuple struct support (#2824).
- idl, ts: Add generics support (#2824).
- ts: Add
accountsPartialmethod to keep the oldaccountsmethod behavior (#2824). - ts: Make
optsparameter ofAnchorProviderconstructor optional (#2843). - cli: Add
--no-idlflag to thebuildcommand (#2847). - cli: Add priority fees to idl commands (#2845).
- ts: Add
prependoption to MethodBuilderpreInstructionsmethod (#2863). - lang: Add
declare_program!macro (#2857). - cli: Add
deactivate_featureflag tosolana-test-validatorconfig in Anchor.toml (#2872). - idl: Add
docsfield for constants (#2887). - idl: Store deployment addresses for other clusters (#2892).
- lang: Add
Eventutility type to get events from bytes (#2897). - lang, spl: Add support for token extensions (#2789).
- lang: Return overflow error from
Lamportstrait operations (#2907).
Fixes
- syn: Add missing
new_from_arraymethod toHash(#2682). - cli: Switch to Cargo feature resolver(
resolver = "2") (#2676). - cli: Fix using user specific path for
provider.walletinAnchor.toml(#2696). - syn: Fix IDL constant seeds parsing (#2699).
- cli: Display errors if toolchain override restoration fails (#2700).
- cli: Fix commit based
anchor_versionoverride (#2704). - spl: Fix compilation with
shmemfeature enabled (#2722). - cli: Localhost default test validator address changes from
localhostto127.0.0.1, NodeJS 17 IP resolution changes for IPv6 (#2725). - lang: Eliminate temporary Vec allocations when serializing data with discriminant and set the default capacity to 256 bytes (#2691).
- lang: Allow custom lifetime in Accounts structure (#2741).
- lang: Remove
try_to_vecusage while setting the return data in order to reduce heap memory usage (#2744) - cli: Show installation progress if Solana tools are not installed when using toolchain overrides (#2757).
- ts: Fix formatting enums (#2763).
- cli: Fix
migratecommand not working without globalts-nodeinstallation (#2767). - client, lang, spl, syn: Enable all features for docs.rs build (#2774).
- ts: Fix construction of field layouts for type aliased instruction arguments (#2821)
- idl: Fix IDL (#2824).
- idl, ts: Make casing consistent (#2824).
- ts: Fix not being able to use numbers in instruction, account, or event names in some cases due to case conversion (#2824).
- cli: Fix excessive test validator requests (#2828).
- client: Fix
parse_logs_responseto prevent panics when more than 1 outer instruction exists in logs (#2856). - avm, cli: Fix
stdsimdfeature compilation error fromahashwhen installing the CLI using newer Rust versions (#2867). - spl: Fix not being able to deserialize newer token 2022 extensions (#2876).
- spl: Remove
solana-programdependency (#2900). - spl: Make
TokenAccountandMintCopy(#2904). - ts: Add missing errors (#2906).
Breaking
- cli: Make
cargo build-sbfthe default build command (#2694). - cli: Require explicit
overflow-checksflag (#2716). - ts: Remove
anchor-deprecated-statefeature (#2717). - lang: Remove
CLOSED_ACCOUNT_DISCRIMINATOR(#2726). - lang: Make bumps of optional accounts
Option<u8>rather thanu8(#2730). - spl: Remove
shared-memoryprogram (#2747). - ts: Remove
associated,account.associatedandaccount.associatedAddressmethods (#2749). - cli:
idl upgradecommand closes the IDL buffer account (#2760). - cli: Remove
--jestoption from theinitcommand (#2805). - cli: Require
idl-buildfeature in programCargo.toml(#2824). - cli: Rename
seedsfeature toresolutionand make it enabled by default (#2824). - cli: Remove
idl parsecommand (#2824). - idl: Change IDL spec (#2824).
- syn: Remove
idl-parseandseedsfeatures (#2824). - ts: Change
accountsmethod to no longer accept resolvable accounts (#2824). - ts:
Programinstances use camelCase for everything (#2824). - ts: Remove discriminator functions (#2824).
- ts: Remove
programIdparameter of theProgramconstructor (#2864). - idl, syn: Move IDL types from the
anchor-syncrate to the new IDL crate (#2882). - idl: Add
#[non_exhaustive]to IDL enums (#2890).
- cli: Allow force
-
0.29.016 Oct 2023Release notes
Open source →See the Anchor 0.29 release notes for a high-level overview of how to update.
Features
- lang: Change all accounts to have a reference to
AccountInfo(#2656). - lang: Add
get_lamports,add_lamportsandsub_lamportsmethods for all account types (#2552). - client: Add a helper struct
DynSignerto simplify use ofClient<C> where <C: Clone + Deref<Target = impl Signer>>with Solana clap CLI utils that loadsSignerasBox<dyn Signer>(#2550). - lang: Allow CPI calls matching an interface without pinning program ID (#2559).
- cli, lang: Add IDL generation through compilation.
anchor buildstill uses parsing method to generate IDLs, useanchor idl buildto generate IDLs with the build method (#2011). - avm: Add support for the
.anchorversionfile to facilitate switching between different versions of theanchor-cli(#2553). - ts: Add ability to access workspace programs independent of the casing used, e.g.
anchor.workspace.myProgram,anchor.workspace.MyProgram... (#2579). - bench: Add benchmarking for program binary size (#2591).
- spl: Export
mpl-token-metadatacrate (#2583). - spl: Add
TokenRecordAccountfor pNFTs (#2597). - ts: Add support for unnamed(tuple) enum in accounts (#2601).
- cli: Add program template with multiple files for instructions, state... (#2602).
- bench: Add benchmarking for stack memory usage (#2617).
- lang:
Boxthe inner enums ofanchor_lang::error::Errorto optimizeanchor_lang::Result(#2600). - ts: Add strong type support for
Program.addEventListenermethod (#2627). - syn: Add
IdlBuildtrait to implement IDL support for custom types (#2629). - spl: Add
idl-buildfeature. IDL build method will not work without enabling this feature when usinganchor-spl(#2629). - lang: Add support for type aliases in IDLs (#2637).
- cli: Add
test.upgradeable,test.genesis.upgradeablesetting inAnchor.tomlto support testing upgradeable programs (#2642). - cli, client, lang, spl: Update Solana toolchain and dependencies to
1.17.0,1.16remains supported (#2645). - spl: Add support for memo program (#2661).
- avm: Add
anchor-cliinstallation from commit (#2659). - cli: Add
toolchainproperty inAnchor.tomlto override Anchor and Solana versions (#2649).
Fixes
- ts: Packages no longer depend on
assert(#2535). - lang: Support for
constin theInitSpacemacro (#2555). - cli: Support workspace inheritance (#2570).
- client: Compile with Solana
1.14(#2572). - cli: Fix
anchor build --no-docsadding docs to the IDL (#2575). - ts: Load workspace programs on-demand rather than loading all of them at once (#2579).
- lang: Fix
associated_token::token_programconstraint (#2603). - cli: Fix
anchor accountcommand panicking outside of workspace (#2620). - lang: IDL named enum variant fields are now camelCase as opposed to snake_case, consistent with the other IDL types (#2633).
- avm: Remove excessive panics and handle the errors gracefully (#2671).
Breaking
- lang: Switch to type safe bumps in context (#2542).
- syn:
idlfeature has been replaced withidl-build,idl-parseandidl-typesfeatures (#2011). - syn: IDL
parsemethod now returnsResult<Idl>instead ofResult<Option<Idl>>(#2582). - spl: Update
mpl-token-metadatadependency to use the client SDK instead of the program crate (#2632). - ts: Remove
base64-jsdependency (#2635). - syn:
IdlTypeDefinitionTyenum has a new variantAlias(#2637). - cli, client, lang, spl: Solana
1.14is no longer supported, minimum required Solana version is1.16.0(#2645). - cli:
anchor_versionandsolana_versionproperty inAnchor.tomlthat was being used in verifiable builds are moved insidetoolchain. They are now being used for all commands in the workspace, not just verifiable builds (#2649).
Release notes
Open source →Features
- lang: Change all accounts to have a reference to
AccountInfo(#2656). - lang: Add
get_lamports,add_lamportsandsub_lamportsmethods for all account types (#2552). - client: Add a helper struct
DynSignerto simplify use ofClient<C> where <C: Clone + Deref<Target = impl Signer>>with Solana clap CLI utils that loadsSignerasBox<dyn Signer>(#2550). - lang: Allow CPI calls matching an interface without pinning program ID (#2559).
- cli, lang: Add IDL generation through compilation.
anchor buildstill uses parsing method to generate IDLs, useanchor idl buildto generate IDLs with the build method (#2011). - avm: Add support for the
.anchorversionfile to facilitate switching between different versions of theanchor-cli(#2553). - ts: Add ability to access workspace programs independent of the casing used,
e.g.
anchor.workspace.myProgram,anchor.workspace.MyProgram... (#2579). - bench: Add benchmarking for program binary size (#2591).
- spl: Export
mpl-token-metadatacrate (#2583). - spl: Add
TokenRecordAccountfor pNFTs (#2597). - ts: Add support for unnamed(tuple) enum in accounts (#2601).
- cli: Add program template with multiple files for instructions, state... (#2602).
- bench: Add benchmarking for stack memory usage (#2617).
- lang:
Boxthe inner enums ofanchor_lang::error::Errorto optimizeanchor_lang::Result(#2600). - ts: Add strong type support for
Program.addEventListenermethod (#2627). - syn: Add
IdlBuildtrait to implement IDL support for custom types (#2629). - spl: Add
idl-buildfeature. IDL build method will not work without enabling this feature when usinganchor-spl(#2629). - lang: Add support for type aliases in IDLs (#2637).
- cli: Add
test.upgradeable,test.genesis.upgradeablesetting inAnchor.tomlto support testing upgradeable programs (#2642). - cli, client, lang, spl: Update Solana toolchain and dependencies to
1.17.0,1.16remains supported (#2645). - spl: Add support for memo program (#2661).
- avm: Add
anchor-cliinstallation from commit (#2659). - cli: Add
toolchainproperty inAnchor.tomlto override Anchor and Solana versions (#2649).
Fixes
- ts: Packages no longer depend on
assert(#2535). - lang: Support for
constin theInitSpacemacro (#2555). - cli: Support workspace inheritance (#2570).
- client: Compile with Solana
1.14(#2572). - cli: Fix
anchor build --no-docsadding docs to the IDL (#2575). - ts: Load workspace programs on-demand rather than loading all of them at once (#2579).
- lang: Fix
associated_token::token_programconstraint (#2603). - cli: Fix
anchor accountcommand panicking outside of workspace (#2620). - lang: IDL named enum variant fields are now camelCase as opposed to snake_case, consistent with the other IDL types (#2633).
- avm: Remove excessive panics and handle the errors gracefully (#2671).
Breaking
- lang: Switch to type safe bumps in context (#2542).
- syn:
idlfeature has been replaced withidl-build,idl-parseandidl-typesfeatures (#2011). - syn: IDL
parsemethod now returnsResult<Idl>instead ofResult<Option<Idl>>(#2582). - spl: Update
mpl-token-metadatadependency to use the client SDK instead of the program crate (#2632). - ts: Remove
base64-jsdependency (#2635). - syn:
IdlTypeDefinitionTyenum has a new variantAlias(#2637). - cli, client, lang, spl: Solana
1.14is no longer supported, minimum required Solana version is1.16.0(#2645). - cli:
anchor_versionandsolana_versionproperty inAnchor.tomlthat was being used in verifiable builds are moved insidetoolchain. They are now being used for all commands in the workspace, not just verifiable builds (#2649).
- lang: Change all accounts to have a reference to