@@ -9,6 +9,278 @@ patch version will be incremented for features.
99
1010---
1111
12+ ## [ 0.31.0] - 2025-03-08
13+
14+ ### Features
15+
16+ - client: Make ` solana_account_decoder ` dep public in anchor client
17+ ([ #3455 ] ( https://github.com/coral-xyz/anchor/pull/3455 ) ).
18+ - ts: Add optional ` options.blockhash ` to ` Provider.sendAndConfirm `
19+ ([ #3070 ] ( https://github.com/coral-xyz/anchor/pull/3070 ) ).
20+ - ts: Add optional ` commitment ` parameter to ` Program.addEventListener `
21+ ([ #3052 ] ( https://github.com/coral-xyz/anchor/pull/3052 ) ).
22+ - cli, idl: Pass ` cargo ` args to IDL generation when building program or IDL
23+ ([ #3059 ] ( https://github.com/coral-xyz/anchor/pull/3059 ) ).
24+ - cli: Add checks for incorrect usage of ` idl-build ` feature
25+ ([ #3061 ] ( https://github.com/coral-xyz/anchor/pull/3061 ) ).
26+ - lang: Export ` Discriminator ` trait from ` prelude `
27+ ([ #3075 ] ( https://github.com/coral-xyz/anchor/pull/3075 ) ).
28+ - lang: Add ` Account ` utility type to get accounts from bytes
29+ ([ #3091 ] ( https://github.com/coral-xyz/anchor/pull/3091 ) ).
30+ - client: Add option to pass in mock rpc client when using anchor_client
31+ ([ #3053 ] ( https://github.com/coral-xyz/anchor/pull/3053 ) ).
32+ - lang: Get discriminator length dynamically
33+ ([ #3101 ] ( https://github.com/coral-xyz/anchor/pull/3101 ) ).
34+ - lang: Add non-8-byte discriminator support in ` declare_program! `
35+ ([ #3103 ] ( https://github.com/coral-xyz/anchor/pull/3103 ) ).
36+ - client: Make ` ThreadSafeSigner ` trait public
37+ ([ #3107 ] ( https://github.com/coral-xyz/anchor/pull/3107 ) ).
38+ - lang: Update ` dispatch ` function to support dynamic discriminators
39+ ([ #3104 ] ( https://github.com/coral-xyz/anchor/pull/3104 ) ).
40+ - lang: Remove the fallback function shortcut in ` try_entry ` function
41+ ([ #3109 ] ( https://github.com/coral-xyz/anchor/pull/3109 ) ).
42+ - ts: Get discriminator lengths dynamically
43+ ([ #3120 ] ( https://github.com/coral-xyz/anchor/pull/3120 ) ).
44+ - client: Support non-8-byte discriminators
45+ ([ #3125 ] ( https://github.com/coral-xyz/anchor/pull/3125 ) ).
46+ - spl: Add ` withdraw_withheld_tokens_from_accounts ` instruction
47+ ([ #3128 ] ( https://github.com/coral-xyz/anchor/pull/3128 ) ).
48+ - ts: Add optional ` wallet ` property to the ` Provider ` interface
49+ ([ #3130 ] ( https://github.com/coral-xyz/anchor/pull/3130 ) ).
50+ - cli: Warn if ` anchor-spl/idl-build ` is missing
51+ ([ #3133 ] ( https://github.com/coral-xyz/anchor/pull/3133 ) ).
52+ - client: Add ` internal_rpc ` method for ` mock ` feature
53+ ([ #3135 ] ( https://github.com/coral-xyz/anchor/pull/3135 ) ).
54+ - lang: Add ` #[instruction] ` attribute proc-macro to override default
55+ instruction discriminators
56+ ([ #3137 ] ( https://github.com/coral-xyz/anchor/pull/3137 ) ).
57+ - lang: Use associated discriminator constants instead of hardcoding in
58+ ` #[account] ` ([ #3144 ] ( https://github.com/coral-xyz/anchor/pull/3144 ) ).
59+ - lang: Add ` discriminator ` argument to ` #[account] ` attribute
60+ ([ #3149 ] ( https://github.com/coral-xyz/anchor/pull/3149 ) ).
61+ - lang: Add ` discriminator ` argument to ` #[event] ` attribute
62+ ([ #3152 ] ( https://github.com/coral-xyz/anchor/pull/3152 ) ).
63+ - idl: Check ambiguous discriminators
64+ ([ #3157 ] ( https://github.com/coral-xyz/anchor/pull/3157 ) ).
65+ - idl: Disallow all zero account discriminators
66+ ([ #3159 ] ( https://github.com/coral-xyz/anchor/pull/3159 ) ).
67+ - cli: Support non-8-byte discriminators
68+ ([ #3165 ] ( https://github.com/coral-xyz/anchor/pull/3165 ) ).
69+ - idl: Disallow empty discriminators
70+ ([ #3166 ] ( https://github.com/coral-xyz/anchor/pull/3166 ) ).
71+ - cli: Add ` --no-idl ` option to the ` test ` command
72+ ([ #3175 ] ( https://github.com/coral-xyz/anchor/pull/3175 ) ).
73+ - spl: Add ` burn_checked ` , ` mint_to_checked ` and ` approve_checked ` instructions
74+ ([ #3186 ] ( https://github.com/coral-xyz/anchor/pull/3186 ) ).
75+ - cli: Migrate to ` agave-install ` when ` solana_version ` is ` >= 1.18.19 `
76+ ([ #3185 ] ( https://github.com/coral-xyz/anchor/pull/3185 ) ).
77+ - idl: Add ` IdlBuilder `
78+ ([ #3188 ] ( https://github.com/coral-xyz/anchor/pull/3188 ) ).
79+ - cli: Make ` clean ` command also remove the ` .anchor ` directory
80+ ([ #3192 ] ( https://github.com/coral-xyz/anchor/pull/3192 ) ).
81+ - lang: Deprecate ` #[interface] ` attribute
82+ ([ #3195 ] ( https://github.com/coral-xyz/anchor/pull/3195 ) ).
83+ - ts: Include unresolved accounts in the resolution error message
84+ ([ #3207 ] ( https://github.com/coral-xyz/anchor/pull/3207 ) ).
85+ - lang: Add ` LazyAccount `
86+ ([ #3194 ] ( https://github.com/coral-xyz/anchor/pull/3194 ) ).
87+ - avm: Ask whether to install if the version is not installed with the ` use `
88+ command ([ #3230 ] ( https://github.com/coral-xyz/anchor/pull/3230 ) ).
89+ - cli: Warn if a manifest has ` solana-program ` dependency
90+ ([ #3250 ] ( https://github.com/coral-xyz/anchor/pull/3250 ) ).
91+ - cli: Add completions command to generate shell completions via the
92+ clap_complete crate ([ #3251 ] ( https://github.com/coral-xyz/anchor/pull/3251 ) ).
93+ - cli: Always convert IDLs
94+ ([ #3265 ] ( https://github.com/coral-xyz/anchor/pull/3265 ) ).
95+ - cli: Check whether the ` idl-build ` feature exists when using the ` idl build `
96+ command ([ #3273 ] ( https://github.com/coral-xyz/anchor/pull/3273 ) ).
97+ - cli: Build IDL if there is only one program when using the ` idl build ` command
98+ ([ #3275 ] ( https://github.com/coral-xyz/anchor/pull/3275 ) ).
99+ - cli: Add short alias for the ` idl build ` command
100+ ([ #3283 ] ( https://github.com/coral-xyz/anchor/pull/3283 ) ).
101+ - cli: Add ` --program-id ` option to ` idl convert ` command
102+ ([ #3309 ] ( https://github.com/coral-xyz/anchor/pull/3309 ) ).
103+ - lang: Generate documentation of constants in ` declare_program! `
104+ ([ #3311 ] ( https://github.com/coral-xyz/anchor/pull/3311 ) ).
105+ - cli: Add support for fetching legacy IDLs
106+ ([ #3324 ] ( https://github.com/coral-xyz/anchor/pull/3324 ) ).
107+ - avm: Add short alias for ` install ` and ` list ` commands
108+ ([ #3326 ] ( https://github.com/coral-xyz/anchor/pull/3326 ) ).
109+ - avm: Add Windows support for renaming anchor binary
110+ ([ #3325 ] ( https://github.com/coral-xyz/anchor/pull/3325 ) ).
111+ - cli: Add optional ` package-manager ` flag in ` init ` command to set package
112+ manager field in Anchor.toml
113+ ([ #3328 ] ( https://github.com/coral-xyz/anchor/pull/3328 ) ).
114+ - cli: Add test template for [ Mollusk] ( https://github.com/buffalojoec/mollusk )
115+ ([ #3352 ] ( https://github.com/coral-xyz/anchor/pull/3352 ) ).
116+ - idl: Disallow account discriminators that can conflict with the ` zero `
117+ constraint ([ #3365 ] ( https://github.com/coral-xyz/anchor/pull/3365 ) ).
118+ - cli: Include recommended solana args by default and add new ` --max-retries `
119+ option to the ` deploy ` command
120+ ([ #3354 ] ( https://github.com/coral-xyz/anchor/pull/3354 ) ).
121+ - avm: Make installation download binaries by default
122+ ([ #3445 ] ( https://github.com/coral-xyz/anchor/pull/3445 ) ).
123+ - idl: Support PDA resolution of call expressions that don't have any arguments
124+ ([ #3485 ] ( https://github.com/coral-xyz/anchor/pull/3485 ) ).
125+ - spl: Add ` anchor-debug ` feature
126+ ([ #3511 ] ( https://github.com/coral-xyz/anchor/pull/3511 ) ).
127+
128+ ### Fixes
129+
130+ - idl: Make safety comment checks fail silently when program path env is not set
131+ ([ #3045 ] ( https://github.com/coral-xyz/anchor/pull/3045 ) ).
132+ - idl: Avoid interference from rust tests during IDL generation
133+ ([ #3058 ] ( https://github.com/coral-xyz/anchor/pull/3058 ) ).
134+ - lang: Fix ` align ` repr support in ` declare-program! `
135+ ([ #3056 ] ( https://github.com/coral-xyz/anchor/pull/3056 ) ).
136+ - lang: Make stack frames slimmer on ATA creation
137+ ([ #3065 ] ( https://github.com/coral-xyz/anchor/pull/3065 ) ).
138+ - lang: Remove ` getrandom ` dependency
139+ ([ #3072 ] ( https://github.com/coral-xyz/anchor/pull/3072 ) ).
140+ - lang: Make ` InitSpace ` support unnamed & unit structs
141+ ([ #3084 ] ( https://github.com/coral-xyz/anchor/pull/3084 ) ).
142+ - lang: Fix using ` owner ` constraint with ` Box ` ed accounts
143+ ([ #3087 ] ( https://github.com/coral-xyz/anchor/pull/3087 ) ).
144+ - lang: Add a sanity check for unimplemented token extensions
145+ ([ #3090 ] ( https://github.com/coral-xyz/anchor/pull/3090 ) ).
146+ - cli: Skip IDL checks if ` --no-idl ` option is passed
147+ ([ #3093 ] ( https://github.com/coral-xyz/anchor/pull/3093 ) ).
148+ - lang: Remove unnecessary clone in account exit routine
149+ ([ #3139 ] ( https://github.com/coral-xyz/anchor/pull/3139 ) ).
150+ - cli: Fix installation with ` --locked ` argument using Rust v1.80 due to ` time `
151+ crate issue ([ #3143 ] ( https://github.com/coral-xyz/anchor/pull/3143 ) ).
152+ - lang: Fix compilation warnings due to unused deprecated program id macros
153+ ([ #3170 ] ( https://github.com/coral-xyz/anchor/pull/3170 ) ).
154+ - ts: Remove ` crypto-hash ` dependency
155+ ([ #3171 ] ( https://github.com/coral-xyz/anchor/pull/3171 ) ).
156+ - ts: Improve error message of unsupported ` view ` method
157+ ([ #3177 ] ( https://github.com/coral-xyz/anchor/pull/3177 ) ).
158+ - idl: Fix panicking on tests
159+ ([ #3197 ] ( https://github.com/coral-xyz/anchor/pull/3197 ) ).
160+ - lang: Remove ` arrayref ` dependency
161+ ([ #3201 ] ( https://github.com/coral-xyz/anchor/pull/3201 ) ).
162+ - cli: Fix template code shouldn't escape
163+ ([ #3210 ] ( https://github.com/coral-xyz/anchor/pull/3210 ) ).
164+ - idl: Fix using ` address ` constraint with non-const expressions
165+ ([ #3216 ] ( https://github.com/coral-xyz/anchor/pull/3216 ) ).
166+ - idl: Fix using full path types with ` Program `
167+ ([ #3228 ] ( https://github.com/coral-xyz/anchor/pull/3228 ) ).
168+ - lang: Use closures for ` init ` constraints to reduce the stack usage of
169+ ` try_accounts ` ([ #2939 ] ( https://github.com/coral-xyz/anchor/pull/2939 ) ).
170+ - lang: Allow the ` cfg ` attribute above the instructions
171+ ([ #2339 ] ( https://github.com/coral-xyz/anchor/pull/2339 ) ).
172+ - idl: Log output with ` ANCHOR_LOG ` on failure and improve build error message
173+ ([ #3284 ] ( https://github.com/coral-xyz/anchor/pull/3284 ) ).
174+ - lang: Fix constant bytes declarations when using ` declare_program! `
175+ ([ #3287 ] ( https://github.com/coral-xyz/anchor/pull/3287 ) ).
176+ - lang: Fix using non-instruction composite accounts with ` declare_program! `
177+ ([ #3290 ] ( https://github.com/coral-xyz/anchor/pull/3290 ) ).
178+ - idl: Fix instructions with tuple parameters not producing an
179+ error([ #3294 ] ( https://github.com/coral-xyz/anchor/pull/3294 ) ).
180+ - ts: Update ` engines.node ` to ` >= 17 `
181+ ([ #3301 ] ( https://github.com/coral-xyz/anchor/pull/3301 ) ).
182+ - cli: Use OS-agnostic paths
183+ ([ #3307 ] ( https://github.com/coral-xyz/anchor/pull/3307 ) ).
184+ - avm: Use ` rustc 1.79.0 ` when installing versions older than v0.31
185+ ([ #3315 ] ( https://github.com/coral-xyz/anchor/pull/3315 ) ).
186+ - cli: Fix priority fee calculation causing panic on localnet
187+ ([ #3318 ] ( https://github.com/coral-xyz/anchor/pull/3318 ) ).
188+ - cli: Fix ` shell ` command failing due to outdated program initialization
189+ ([ #3351 ] ( https://github.com/coral-xyz/anchor/pull/3351 ) ).
190+ - idl: Fix detecting false-positives from doc comments during module path
191+ conversion ([ #3359 ] ( https://github.com/coral-xyz/anchor/pull/3359 ) ).
192+ - cli: Remove passing the rent sysvar account to IDL instructions
193+ ([ #3372 ] ( https://github.com/coral-xyz/anchor/pull/3372 ) ).
194+ - lang: Fix ` cpi ` feature instructions not accounting for discriminator
195+ overrides ([ #3376 ] ( https://github.com/coral-xyz/anchor/pull/3376 ) ).
196+ - idl: Ignore compiler warnings during builds
197+ ([ #3396 ] ( https://github.com/coral-xyz/anchor/pull/3396 ) ).
198+ - cli: Avoid extra IDL generation during ` verify `
199+ ([ #3398 ] ( https://github.com/coral-xyz/anchor/pull/3398 ) ).
200+ - lang: Require ` zero ` accounts to be unique
201+ ([ #3409 ] ( https://github.com/coral-xyz/anchor/pull/3409 ) ).
202+ - lang: Deduplicate ` zero ` accounts against ` init ` accounts
203+ ([ #3422 ] ( https://github.com/coral-xyz/anchor/pull/3422 ) ).
204+ - cli: Fix custom ` provider.cluster `
205+ ([ #3428 ] ( https://github.com/coral-xyz/anchor/pull/3428 ) ).
206+ - cli: Ignore non semver solana/agave releases to avoid panic
207+ ([ #3432 ] ( https://github.com/coral-xyz/anchor/pull/3432 ) ).
208+ - ts: Fix loading programs with numbers in their names using ` workspace `
209+ ([ #3450 ] ( https://github.com/coral-xyz/anchor/pull/3450 ) ).
210+ - lang: Remove a potential panic while getting the IDL in ` declare_program! `
211+ ([ #3458 ] ( https://github.com/coral-xyz/anchor/pull/3458 ) ).
212+ - cli: Fix altering user-provided lib names
213+ ([ #3467 ] ( https://github.com/coral-xyz/anchor/pull/3467 ) ).
214+ - idl: Fix missing ` program::seed ` resolution
215+ ([ #3474 ] ( https://github.com/coral-xyz/anchor/pull/3474 ) ).
216+ - lang: Fix adding ` derive ` s and ` repr ` s to type alias definitions in
217+ ` declare_program! ` ([ #3504 ] ( https://github.com/coral-xyz/anchor/pull/3504 ) ).
218+ - idl: Fix using constant identifiers as generic arguments
219+ ([ #3522 ] ( https://github.com/coral-xyz/anchor/pull/3522 ) ).
220+ - client: Remove ` std::process::exit ` usage
221+ ([ #3544 ] ( https://github.com/coral-xyz/anchor/pull/3544 ) ).
222+ - idl: Fix using ` Pubkey ` constants with ` seeds::program `
223+ ([ #3559 ] ( https://github.com/coral-xyz/anchor/pull/3559 ) ).
224+ - lang: Fix instructions with no accounts causing compilation errors when using
225+ ` declare_program! ` ([ #3567 ] ( https://github.com/coral-xyz/anchor/pull/3567 ) ).
226+ - idl: Fix using account or arg values for ` seeds::program `
227+ ([ #3570 ] ( https://github.com/coral-xyz/anchor/pull/3570 ) ).
228+ - lang: Fix using ` data ` as an instruction parameter name in ` declare_program! `
229+ ([ #3574 ] ( https://github.com/coral-xyz/anchor/pull/3574 ) ).
230+ - cli: Use camelCase for program name in ` anchor.workspace ` templates
231+ ([ #3581 ] ( https://github.com/coral-xyz/anchor/pull/3581 ) ).
232+
233+ ### Breaking
234+
235+ - syn: Remove ` bpf ` target support in ` hash ` feature
236+ ([ #3078 ] ( https://github.com/coral-xyz/anchor/pull/3078 ) ).
237+ - client: Add ` tokio ` support to ` RequestBuilder ` with ` async ` feature
238+ ([ #3057 ] ( https://github.com/coral-xyz/anchor/pull/3057 ) ).
239+ - lang: Remove ` EventData ` trait
240+ ([ #3083 ] ( https://github.com/coral-xyz/anchor/pull/3083 ) ).
241+ - client: Remove ` async_rpc ` method
242+ ([ #3053 ] ( https://github.com/coral-xyz/anchor/pull/3053 ) ).
243+ - lang: Make discriminator type unsized
244+ ([ #3098 ] ( https://github.com/coral-xyz/anchor/pull/3098 ) ).
245+ - lang: Require ` Discriminator ` trait impl when using the ` zero ` constraint
246+ ([ #3118 ] ( https://github.com/coral-xyz/anchor/pull/3118 ) ).
247+ - ts: Remove ` DISCRIMINATOR_SIZE ` constant
248+ ([ #3120 ] ( https://github.com/coral-xyz/anchor/pull/3120 ) ).
249+ - lang: ` #[account] ` attribute arguments no longer parses identifiers as
250+ namespaces ([ #3140 ] ( https://github.com/coral-xyz/anchor/pull/3140 ) ).
251+ - spl: Rename metadata interface instruction fields from ` token_program_id ` to
252+ ` program_id ` ([ #3076 ] ( https://github.com/coral-xyz/anchor/pull/3076 ) ).
253+ - lang, ts: Remove "8 byte" requirement from discriminator error messages
254+ ([ #3161 ] ( https://github.com/coral-xyz/anchor/pull/3161 ) ).
255+ - lang: Remove ` discriminator ` method from ` Discriminator ` trait
256+ ([ #3163 ] ( https://github.com/coral-xyz/anchor/pull/3163 ) ).
257+ - docker: Upgrade ` node ` to 20.16.0 LTS
258+ ([ #3179 ] ( https://github.com/coral-xyz/anchor/pull/3179 ) ).
259+ - ts: Change the ` Program ` constructor's ` idl ` parameter type to ` any `
260+ ([ #3181 ] ( https://github.com/coral-xyz/anchor/pull/3181 ) ).
261+ - lang, spl: Remove ` borsh 0.9 ` support
262+ ([ #3199 ] ( https://github.com/coral-xyz/anchor/pull/3199 ) ).
263+ - ts: Upgrade ` typescript ` to ` 5.5.4 ` and remove the generic parameters of
264+ ` SimulateResponse ` ([ #3221 ] ( https://github.com/coral-xyz/anchor/pull/3221 ) ).
265+ - ts: Remove
266+ ` StateCoder ` ([ #3224 ] ( https://github.com/coral-xyz/anchor/pull/3224 ) ).
267+ - cli: Accept integers for ` warp_slot `
268+ ([ #3235 ] ( https://github.com/coral-xyz/anchor/pull/3235 ) ).
269+ - lang: Remove ` EventIndex `
270+ ([ #3244 ] ( https://github.com/coral-xyz/anchor/pull/3244 ) ).
271+ - spl: Remove ` dex ` feature
272+ ([ #3257 ] ( https://github.com/coral-xyz/anchor/pull/3257 ) ).
273+ - client, lang, spl: Upgrade Solana to v2 and SPL to the latest
274+ ([ #3219 ] ( https://github.com/coral-xyz/anchor/pull/3219 ) ).
275+ - cli: Install Solana from anza.xyz domain in Docker verifiable builds
276+ ([ #3271 ] ( https://github.com/coral-xyz/anchor/pull/3271 ) ).
277+ - spl: Upgrade SPL deps to latest
278+ ([ #3346 ] ( https://github.com/coral-xyz/anchor/pull/3346 ) ).
279+ - cli: Upgrade ` typescript ` version of templates to v5
280+ ([ #3480 ] ( https://github.com/coral-xyz/anchor/pull/3480 ) ).
281+ - ts: Remove ` snake-case ` dependency
282+ ([ #3507 ] ( https://github.com/coral-xyz/anchor/pull/3507 ) ).
283+
12284## [ 0.30.1] - 2024-06-20
13285
14286### Features
0 commit comments