Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e1afcbf
Author: acheron <98934430+acheroncrypto@users.noreply.github.com>
Date:   Fri Jun 9 18:00:35 2023 +0200

    v0.28.0 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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` (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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` (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#2504)

commit 23b90bf
Author: Noah Gundotra <ngundotra@users.noreply.github.com>
Date:   Fri May 26 12:36:46 2023 -0400

    Feature: CPI Events API (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#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 (coral-xyz#2484)

commit 9a93a2e
Author: James <juicy66173@gmail.com>
Date:   Mon May 8 10:17:51 2023 +0100

    ts: Improve IDL typing (coral-xyz#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 (coral-xyz#2483)
  • Loading branch information
Aursen committed Jun 10, 2023
1 parent 2f6ddbe commit d8ace33
Show file tree
Hide file tree
Showing 154 changed files with 4,125 additions and 3,968 deletions.
6 changes: 3 additions & 3 deletions .github/actions/setup-ts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ runs:
path: |
./ts/dist/
key: solana-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/*.ts') }}
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && cd ../../../
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && yarn link && cd ../../../
shell: bash
- run: cd ts/packages/anchor && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
shell: bash
- run: cd ts/packages/spl-associated-token-account && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
shell: bash
- run: cd ts/packages/spl-token && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
shell: bash
- run: cd examples/tutorial && yarn link @coral-xyz/anchor && yarn --frozen-lockfile && cd ../../
- run: cd examples/tutorial && yarn link @coral-xyz/anchor @coral-xyz/borsh && yarn --frozen-lockfile && cd ../../
shell: bash
- 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 ..
- 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 ..
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/no-caching-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: false
solana_cli_version: 1.14.16
solana_cli_version: 1.16.0
node_version: 17.0.1
cargo_profile: release
anchor_binary_name: anchor-binary-no-caching
59 changes: 32 additions & 27 deletions .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,33 +332,34 @@ jobs:
# - run: cd tests/misc && chmod +x ci.sh && ./ci.sh
# - run: cd tests/misc && anchor test --skip-lint

test-anchor-init:
needs: setup-anchor-cli
name: Test Anchor Init
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-ts/
- uses: ./.github/actions/setup-solana/
# TODO: Re-enable after releasing `0.28.0`. See https://github.com/coral-xyz/anchor/pull/2512
# test-anchor-init:
# needs: setup-anchor-cli
# name: Test Anchor Init
# runs-on: ubuntu-latest
# timeout-minutes: 30
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/setup/
# - uses: ./.github/actions/setup-ts/
# - uses: ./.github/actions/setup-solana/

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

- uses: actions/download-artifact@v3
with:
name: ${{ env.ANCHOR_BINARY_NAME }}
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor
# - uses: actions/download-artifact@v3
# with:
# name: ${{ env.ANCHOR_BINARY_NAME }}
# path: ~/.cargo/bin/
# - run: chmod +x ~/.cargo/bin/anchor

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

test-programs:
needs: setup-anchor-cli
Expand All @@ -383,7 +384,9 @@ jobs:
path: tests/multisig
# - cmd: cd tests/lockup && anchor test --skip-lint
# path: tests/lockup
- cmd: cd tests/swap/deps/openbook-dex/dex && cargo build-bpf -- --locked && cd ../../../ && anchor test --skip-lint
# TODO: Remove `1.14.18` installation if/when https://github.com/solana-labs/solana/issues/31960 is solved
# `swap` tests don't work with Solana `1.16.0`, downgrade to `1.14.18`
- 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
path: tests/swap
- cmd: cd tests/escrow && anchor test --skip-lint && npx tsc --noEmit
path: tests/escrow
Expand All @@ -403,15 +406,17 @@ jobs:
path: tests/declare-id
- cmd: cd tests/typescript && anchor test --skip-lint && npx tsc --noEmit
path: tests/typescript
- cmd: cd tests/zero-copy && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf
- 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
path: tests/zero-copy
- cmd: cd tests/chat && anchor test --skip-lint
path: tests/chat
- cmd: cd tests/ido-pool && anchor test --skip-lint
path: tests/ido-pool
# - cmd: cd tests/cfo && anchor run test-with-build && cd deps/stake && git checkout Cargo.lock && cd ../swap && git checkout Cargo.lock
# path: tests/cfo
- cmd: cd tests/auction-house && yarn --frozen-lockfile && anchor test --skip-lint && git checkout Cargo.lock
# TODO: Remove `1.14.18` installation if/when https://github.com/solana-labs/solana/issues/31960 is solved
# `auction-house` tests don't work with Solana `1.16.0`, downgrade to `1.14.18`
- cmd: cd tests/auction-house && solana-install init 1.14.18 && yarn --frozen-lockfile && anchor test --skip-lint && git checkout Cargo.lock
path: tests/auction-house
- cmd: cd tests/floats && yarn --frozen-lockfile && anchor test --skip-lint && npx tsc --noEmit
path: tests/floats
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: true
solana_cli_version: 1.14.16
solana_cli_version: 1.16.0
node_version: 17.0.1
cargo_profile: debug
anchor_binary_name: anchor-binary
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,34 @@ The minor version will be incremented upon a breaking change and the patch versi

### Features

### Fixes

### Breaking

## [0.28.0] - 2023-06-09

### Features

- client: Add `async` feature flag to use an asynchronous anchor-client ([#2488](https://github.com/coral-xyz/anchor/pull/2488)).
- 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))
- 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))
- 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))
- bench: Add benchmarking for compute units usage ([#2466](https://github.com/coral-xyz/anchor/pull/2466))
- 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)).
- 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)).
- cli: Add `keys sync` command to sync program id declarations ([#2505](https://github.com/coral-xyz/anchor/pull/2505)).
- cli: Create new programs with correct program ids ([#2509](https://github.com/coral-xyz/anchor/pull/2509)).
- 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)).
- cli: `anchor deploy` command's `--program-name` argument accepts program lib names ([#2519](https://github.com/coral-xyz/anchor/pull/2519)).

### Fixes

- ts: Narrowed `AccountClient` type to it's appropriate account type ([#2440](https://github.com/coral-xyz/anchor/pull/2440))
- 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))
- cli: Fix incorrect `metadata.address` generation in IDL after deploying with a custom keypair ([#2485](https://github.com/coral-xyz/anchor/pull/2485))
- 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))
- cli: Fix `anchor new` not updating `Anchor.toml` ([#2516](https://github.com/coral-xyz/anchor/pull/2516)).
- client, lang, spl: Allow wider range of dependency versions to reduce dependency issues ([#2524](https://github.com/coral-xyz/anchor/pull/2524)).

### Breaking

Expand Down
Loading

0 comments on commit d8ace33

Please sign in to comment.