Skip to content

Commit d8ace33

Browse files
committed
Squashed commit of the following:
commit e1afcbf Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Fri Jun 9 18:00:35 2023 +0200 v0.28.0 (solana-foundation#2527) commit c7c7319 Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Thu Jun 8 18:59:44 2023 +0200 Allow wider range of dependency versions to reduce dependency issues (solana-foundation#2524) commit 6df34e7 Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Wed Jun 7 19:12:56 2023 +0200 Update crate authors and remove outdated registry (solana-foundation#2522) commit 1705d16 Author: Jean Marchand (Exotic Markets) <jeanno11@orange.fr> Date: Wed Jun 7 16:29:23 2023 +0200 docs: Add doc for InitSpace macro (solana-foundation#2521) commit 3d7c97b Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Tue Jun 6 19:28:24 2023 +0200 cli: Accept program lib name for `anchor deploy --program-name` (solana-foundation#2519) commit a88be42 Author: Sergo <rogaldh@radsh.red> Date: Tue Jun 6 14:07:33 2023 +0300 ts: Validate `error.data` exists on simulation response (solana-foundation#2508) commit 65c9d6e Author: Jean Marchand (Exotic Markets) <jeanno11@orange.fr> Date: Tue Jun 6 09:43:46 2023 +0200 client: Add async to anchor-client (solana-foundation#2488) Co-authored-by: acheron <acheroncrypto@gmail.com> commit b8eda69 Author: Deep Mehta <65382963+0xdeepmehta@users.noreply.github.com> Date: Mon Jun 5 22:35:24 2023 +0530 cli: Print not found message if the given program cannot be found during deployment (solana-foundation#2517) commit 1902b8e Author: CanardMandarin <thibault.marboud@gmail.com> Date: Mon Jun 5 14:16:10 2023 +0200 cli: Update programs in `Anchor.toml` when using `anchor new` (solana-foundation#2516) commit 383e440 Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Sun Jun 4 21:02:16 2023 +0200 cli: Initialize with the correct program id (solana-foundation#2509) commit 835dc5b Author: Sarfaraz Nawaz <sir_nawaz959@yahoo.com> Date: Sun Jun 4 23:20:03 2023 +0530 lang: Rename derive_anchor_deserialize -> derive_init_space (solana-foundation#2510) commit 1c6f86e Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Sun Jun 4 13:09:39 2023 +0200 Upgrade Solana to 1.16.0 (solana-foundation#2512) commit 2bf8afe Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Tue May 30 19:50:45 2023 +0200 cli: Use `confirmed` commitment level in commands (solana-foundation#2506) commit 70d9223 Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Sun May 28 22:34:53 2023 +0200 cli: Add `anchor keys sync` command (solana-foundation#2505) commit 0c8498d Author: cavemanloverboy <93507302+cavemanloverboy@users.noreply.github.com> Date: Sat May 27 06:53:02 2023 -0700 cli: Exit `anchor clean` without error when dirs don't exist (solana-foundation#2504) commit 23b90bf Author: Noah Gundotra <ngundotra@users.noreply.github.com> Date: Fri May 26 12:36:46 2023 -0400 Feature: CPI Events API (solana-foundation#2438) Co-authored-by: acheron <acheroncrypto@gmail.com> commit c3625c8 Author: Last Emperor <46998219+lastemp@users.noreply.github.com> Date: Wed May 24 15:05:47 2023 +0300 examples: Add an example with `instruction` method (solana-foundation#2501) Co-authored-by: acheron <acheroncrypto@gmail.com> commit 67eb752 Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Sat May 20 20:34:38 2023 +0200 tests: Fix zero-copy tests (solana-foundation#2498) commit f9d0eca Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Fri May 19 13:18:14 2023 +0200 spl: Update `spl-token-2022` to 0.6.1 (solana-foundation#2496) commit 4793b90 Author: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Fri May 19 10:58:16 2023 +0200 Fix `toml_datetime` 1.64.0 MSRV error (solana-foundation#2495) commit 41a4d82 Author: chalda <chalda@seznam.cz> Date: Thu May 18 19:12:25 2023 +0200 cli: Add print base64 instruction option for some of the IDL commands (solana-foundation#2486) Co-authored-by: acheron <acheroncrypto@gmail.com> commit b7bada1 Author: Pierre <Arrowana@users.noreply.github.com> Date: Tue May 16 23:46:40 2023 +1000 fix: remove skip preflight from cli (solana-foundation#2492) --------- Co-authored-by: acheron <acheroncrypto@gmail.com> commit 89e94d1 Author: Ryan De La O <rdelao@users.noreply.github.com> Date: Sat May 13 02:17:47 2023 -0700 cli: Fix incorrect metadata.address generation (solana-foundation#2485) Currently when running 'anchor deploy --program-name <name> --program-keypair <specified keypair>' the cli still uses the auto-generated keypair when fetching the program id to add to the IDL metadata at the end. It should instead use the address from the specified keypair. --------- Co-authored-by: acheron <acheroncrypto@gmail.com> commit 714d524 Author: CanardMandarin <thibault.marboud@gmail.com> Date: Tue May 9 16:17:11 2023 +0200 lang: Add error message when Mint and TokenAccount with `init` are not ordered correctly (solana-foundation#2484) commit 9a93a2e Author: James <juicy66173@gmail.com> Date: Mon May 8 10:17:51 2023 +0100 ts: Improve IDL typing (solana-foundation#2482) * Use XOR pattern for enum variants to prevent two variants being used at the same time. * Fix unknown for types like Option<[u8; 32]> commit d1ddf00 Author: CanardMandarin <thibault.marboud@gmail.com> Date: Sun May 7 11:03:37 2023 +0200 lang: Fix incorrectly checking the first init constraint (solana-foundation#2483)
1 parent 2f6ddbe commit d8ace33

154 files changed

Lines changed: 4125 additions & 3968 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-ts/action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ runs:
2020
path: |
2121
./ts/dist/
2222
key: solana-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/*.ts') }}
23-
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && cd ../../../
23+
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && yarn link && cd ../../../
2424
shell: bash
2525
- run: cd ts/packages/anchor && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
2626
shell: bash
2727
- run: cd ts/packages/spl-associated-token-account && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
2828
shell: bash
2929
- run: cd ts/packages/spl-token && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
3030
shell: bash
31-
- run: cd examples/tutorial && yarn link @coral-xyz/anchor && yarn --frozen-lockfile && cd ../../
31+
- run: cd examples/tutorial && yarn link @coral-xyz/anchor @coral-xyz/borsh && yarn --frozen-lockfile && cd ../../
3232
shell: bash
33-
- run: cd tests && yarn link @coral-xyz/anchor && yarn link @coral-xyz/spl-associated-token-account && yarn link @coral-xyz/spl-token && yarn --frozen-lockfile && cd ..
33+
- run: cd tests && yarn link @coral-xyz/anchor @coral-xyz/borsh @coral-xyz/spl-associated-token-account @coral-xyz/spl-token && yarn --frozen-lockfile && cd ..
3434
shell: bash

.github/workflows/no-caching-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: ./.github/workflows/reusable-tests.yaml
1212
with:
1313
cache: false
14-
solana_cli_version: 1.14.16
14+
solana_cli_version: 1.16.0
1515
node_version: 17.0.1
1616
cargo_profile: release
1717
anchor_binary_name: anchor-binary-no-caching

.github/workflows/reusable-tests.yaml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -332,33 +332,34 @@ jobs:
332332
# - run: cd tests/misc && chmod +x ci.sh && ./ci.sh
333333
# - run: cd tests/misc && anchor test --skip-lint
334334

335-
test-anchor-init:
336-
needs: setup-anchor-cli
337-
name: Test Anchor Init
338-
runs-on: ubuntu-latest
339-
timeout-minutes: 30
340-
steps:
341-
- uses: actions/checkout@v3
342-
- uses: ./.github/actions/setup/
343-
- uses: ./.github/actions/setup-ts/
344-
- uses: ./.github/actions/setup-solana/
335+
# TODO: Re-enable after releasing `0.28.0`. See https://github.com/coral-xyz/anchor/pull/2512
336+
# test-anchor-init:
337+
# needs: setup-anchor-cli
338+
# name: Test Anchor Init
339+
# runs-on: ubuntu-latest
340+
# timeout-minutes: 30
341+
# steps:
342+
# - uses: actions/checkout@v3
343+
# - uses: ./.github/actions/setup/
344+
# - uses: ./.github/actions/setup-ts/
345+
# - uses: ./.github/actions/setup-solana/
345346

346-
- uses: actions/cache@v3
347-
if: ${{ env.CACHE != 'false' }}
348-
name: Cache Cargo registry + index
349-
id: cache-anchor
350-
with:
351-
path: ${{ env.CARGO_CACHE_PATH }}
352-
key: cargo-${{ runner.os }}-${{ env.CARGO_PROFILE }}-anchor-${{ hashFiles('**/Cargo.lock') }}
347+
# - uses: actions/cache@v3
348+
# if: ${{ env.CACHE != 'false' }}
349+
# name: Cache Cargo registry + index
350+
# id: cache-anchor
351+
# with:
352+
# path: ${{ env.CARGO_CACHE_PATH }}
353+
# key: cargo-${{ runner.os }}-${{ env.CARGO_PROFILE }}-anchor-${{ hashFiles('**/Cargo.lock') }}
353354

354-
- uses: actions/download-artifact@v3
355-
with:
356-
name: ${{ env.ANCHOR_BINARY_NAME }}
357-
path: ~/.cargo/bin/
358-
- run: chmod +x ~/.cargo/bin/anchor
355+
# - uses: actions/download-artifact@v3
356+
# with:
357+
# name: ${{ env.ANCHOR_BINARY_NAME }}
358+
# path: ~/.cargo/bin/
359+
# - run: chmod +x ~/.cargo/bin/anchor
359360

360-
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
361-
- uses: ./.github/actions/git-diff/
361+
# - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
362+
# - uses: ./.github/actions/git-diff/
362363

363364
test-programs:
364365
needs: setup-anchor-cli
@@ -383,7 +384,9 @@ jobs:
383384
path: tests/multisig
384385
# - cmd: cd tests/lockup && anchor test --skip-lint
385386
# path: tests/lockup
386-
- cmd: cd tests/swap/deps/openbook-dex/dex && cargo build-bpf -- --locked && cd ../../../ && anchor test --skip-lint
387+
# TODO: Remove `1.14.18` installation if/when https://github.com/solana-labs/solana/issues/31960 is solved
388+
# `swap` tests don't work with Solana `1.16.0`, downgrade to `1.14.18`
389+
- cmd: cd tests/swap/deps/openbook-dex/dex && solana-install init 1.14.18 && cargo build-bpf -- --locked && cd ../../../ && solana-install init $SOLANA_CLI_VERSION && anchor test --skip-lint
387390
path: tests/swap
388391
- cmd: cd tests/escrow && anchor test --skip-lint && npx tsc --noEmit
389392
path: tests/escrow
@@ -403,15 +406,17 @@ jobs:
403406
path: tests/declare-id
404407
- cmd: cd tests/typescript && anchor test --skip-lint && npx tsc --noEmit
405408
path: tests/typescript
406-
- cmd: cd tests/zero-copy && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf
409+
- cmd: cd tests/zero-copy && rustup toolchain install 1.66.1-x86_64-unknown-linux-gnu && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf
407410
path: tests/zero-copy
408411
- cmd: cd tests/chat && anchor test --skip-lint
409412
path: tests/chat
410413
- cmd: cd tests/ido-pool && anchor test --skip-lint
411414
path: tests/ido-pool
412415
# - cmd: cd tests/cfo && anchor run test-with-build && cd deps/stake && git checkout Cargo.lock && cd ../swap && git checkout Cargo.lock
413416
# path: tests/cfo
414-
- cmd: cd tests/auction-house && yarn --frozen-lockfile && anchor test --skip-lint && git checkout Cargo.lock
417+
# TODO: Remove `1.14.18` installation if/when https://github.com/solana-labs/solana/issues/31960 is solved
418+
# `auction-house` tests don't work with Solana `1.16.0`, downgrade to `1.14.18`
419+
- cmd: cd tests/auction-house && solana-install init 1.14.18 && yarn --frozen-lockfile && anchor test --skip-lint && git checkout Cargo.lock
415420
path: tests/auction-house
416421
- cmd: cd tests/floats && yarn --frozen-lockfile && anchor test --skip-lint && npx tsc --noEmit
417422
path: tests/floats

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: ./.github/workflows/reusable-tests.yaml
1515
with:
1616
cache: true
17-
solana_cli_version: 1.14.16
17+
solana_cli_version: 1.16.0
1818
node_version: 17.0.1
1919
cargo_profile: debug
2020
anchor_binary_name: anchor-binary

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,34 @@ The minor version will be incremented upon a breaking change and the patch versi
1212

1313
### Features
1414

15+
### Fixes
16+
17+
### Breaking
18+
19+
## [0.28.0] - 2023-06-09
20+
21+
### Features
22+
23+
- client: Add `async` feature flag to use an asynchronous anchor-client ([#2488](https://github.com/coral-xyz/anchor/pull/2488)).
1524
- spl: Add metadata wrappers `approve_collection_authority`, `bubblegum_set_collection_size`, `burn_edition_nft`, `burn_nft`, `revoke_collection_authority`, `set_token_standard`, `utilize`, `unverify_sized_collection_item`, `unverify_collection` ([#2430](https://github.com/coral-xyz/anchor/pull/2430))
1625
- spl: Add `token_program` constraint to `Token`, `Mint`, and `AssociatedToken` accounts in order to override required `token_program` fields and use different token interface implementations in the same instruction ([#2460](https://github.com/coral-xyz/anchor/pull/2460))
1726
- cli: Add support for Solidity programs. `anchor init` and `anchor new` take an option `--solidity` which creates solidity code rather than rust. `anchor build` and `anchor test` work accordingly ([#2421](https://github.com/coral-xyz/anchor/pull/2421))
1827
- bench: Add benchmarking for compute units usage ([#2466](https://github.com/coral-xyz/anchor/pull/2466))
28+
- cli: `idl set-buffer`, `idl set-authority` and `idl close` take an option `--print-only`. which prints transaction in a base64 Borsh compatible format but not sent to the cluster. It's helpful when managing authority under a multisig, e.g., a user can create a proposal for a `Custom Instruction` in SPL Governance ([#2486](https://github.com/coral-xyz/anchor/pull/2486)).
29+
- lang: Add `emit_cpi!` and `#[event_cpi]` macros(behind `event-cpi` feature flag) to store event logs in transaction metadata ([#2438](https://github.com/coral-xyz/anchor/pull/2438)).
30+
- cli: Add `keys sync` command to sync program id declarations ([#2505](https://github.com/coral-xyz/anchor/pull/2505)).
31+
- cli: Create new programs with correct program ids ([#2509](https://github.com/coral-xyz/anchor/pull/2509)).
32+
- cli, client, lang, spl: Update Solana toolchain and dependencies to `1.16.0` and specify maximum version of `<1.17.0` ([#2512](https://github.com/coral-xyz/anchor/pull/2512)).
33+
- cli: `anchor deploy` command's `--program-name` argument accepts program lib names ([#2519](https://github.com/coral-xyz/anchor/pull/2519)).
1934

2035
### Fixes
2136

2237
- ts: Narrowed `AccountClient` type to it's appropriate account type ([#2440](https://github.com/coral-xyz/anchor/pull/2440))
2338
- lang: Fix inability to use identifiers `program_id`, `accounts`, `ix_data`, `remaining_accounts` in instruction arguments ([#2464](https://github.com/coral-xyz/anchor/pull/2464))
39+
- cli: Fix incorrect `metadata.address` generation in IDL after deploying with a custom keypair ([#2485](https://github.com/coral-xyz/anchor/pull/2485))
40+
- cli: IDL commands no longer hang when the payer doesn't have funds to pay for the transaction fee ([#2492](https://github.com/coral-xyz/anchor/pull/2492))
41+
- cli: Fix `anchor new` not updating `Anchor.toml` ([#2516](https://github.com/coral-xyz/anchor/pull/2516)).
42+
- client, lang, spl: Allow wider range of dependency versions to reduce dependency issues ([#2524](https://github.com/coral-xyz/anchor/pull/2524)).
2443

2544
### Breaking
2645

0 commit comments

Comments
 (0)