Skip to content

Commit

Permalink
Update: Anchor Contract Dependencies (#769)
Browse files Browse the repository at this point in the history
* Dust off dependencies, start updating to latest anchor

* ci: Update to point to the latest backpackapp/build image

* fix edition config

* Work around lifetime issues from latest anchor

* Fix compilation of all programs

* Pin ahash so it doesn't require rustc that's too new

cargo update -p [email protected] --precise 0.8.6

* Pin toml_edit the same way

cargo update -p [email protected] --precise 0.21.0

* Address clippy lint

* Pin solana to 1.17

* Bump anchor js dep under contract tests

* gauntlet: Update to anchor 0.29

* Fix close() feed computation limits

* Update yarn.lock

* Update more serum references

* Update the ts library

* Fix anchor ocr2 case naming issue

* Update lockfiles, maybe this fixes the config load issue

* Update the generated bindings folder location too

* bump ts-mocha in examples

* fix folder path in script

* fix localnet deployment keys

* fix ocr2 -> ocr_2 naming for filepaths

* ts syntax fix

* bump generated deps

* build artifacts

* bump example deps

* update gauntlet

---------

Co-authored-by: Blaž Hrastnik <[email protected]>
  • Loading branch information
aalu1418 and archseer authored Jul 31, 2024
1 parent b3035e3 commit a008941
Show file tree
Hide file tree
Showing 113 changed files with 3,199 additions and 1,792 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/contract-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ jobs:
name: Release Artifacts
runs-on: ubuntu-latest
needs: [get_projectserum_version]
# container:
# image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }}
# env:
# RUSTUP_HOME: "/root/.rustup"
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Build Artifacts
env:
psversion: ${{ needs.get_projectserum_version.outputs.projectserum_version }}
run: |
docker run -v "$(pwd)":/repo projectserum/build:"${psversion}" bash -c "\
docker run -v "$(pwd)":/repo backpackapp/build:"${psversion}" bash -c "\
anchor build &&\
chown -R $(id -u):$(id -g) /repo"
- name: Generate archive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Build contracts
uses: ./.github/actions/build_contract_artifacts
with:
image: projectserum/build
image: backpackapp/build
image-version: ${{ needs.get_projectserum_version.outputs.projectserum_version }}

e2e_custom_build_custom_chainlink_image:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_testnet_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Build contracts
uses: ./.github/actions/build_contract_artifacts
with:
image: projectserum/build
image: backpackapp/build
image-version: ${{ needs.get_projectserum_version.outputs.projectserum_version }}

e2e_custom_build_custom_chainlink_image:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/integration-tests-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,13 @@ jobs:
contents: read
runs-on: ubuntu-latest
needs: [get-projectserum-version]
# container:
# image: projectserum/build:${{ needs.get-projectserum-version.outputs.projectserum_version }}
# env:
# RUSTUP_HOME: "/root/.rustup"
# FORCE_COLOR: 1
steps:
- name: Checkout the repo
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Build contracts
uses: ./.github/actions/build_contract_artifacts
with:
image: projectserum/build
image: backpackapp/build
image-version: ${{ needs.get-projectserum-version.outputs.projectserum_version }}

publish-integration-test-image:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ jobs:
name: Rust Run Anchor Tests
runs-on: ubuntu-latest
needs: [get_projectserum_version]
# container:
# image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }}
# env:
# RUSTUP_HOME: "/root/.rustup"
# FORCE_COLOR: 1

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Cache cargo registry
Expand All @@ -56,7 +50,7 @@ jobs:
env:
psversion: ${{ needs.get_projectserum_version.outputs.projectserum_version }}
run: |
docker run -v "$(pwd)/../":/repo projectserum/build:"${psversion}" bash -c "\
docker run -v "$(pwd)/../":/repo backpackapp/build:"${psversion}" bash -c "\
set -eoux pipefail &&\
RUSTUP_HOME=\"/root/.rustup\" &&\
FORCE_COLOR=1 &&\
Expand Down Expand Up @@ -92,12 +86,6 @@ jobs:
name: Rust Lint
runs-on: ubuntu-latest
needs: [get_projectserum_version]
# container:
# image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }}
# env:
# RUSTUP_HOME: "/root/.rustup"
# FORCE_COLOR: 1

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Cache cargo registry
Expand All @@ -122,7 +110,7 @@ jobs:
env:
psversion: ${{ needs.get_projectserum_version.outputs.projectserum_version }}
run: |
docker run -v "$(pwd)/../":/repo projectserum/build:"${psversion}" bash -c "\
docker run -v "$(pwd)/../":/repo backpackapp/build:"${psversion}" bash -c "\
set -eoux pipefail &&\
RUSTUP_HOME=\"/root/.rustup\" &&\
FORCE_COLOR=1 &&\
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ jobs:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest-32cores-128GB
needs: [get_projectserum_version]
steps:
- name: Checkout the repo
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Build contracts
uses: ./.github/actions/build_contract_artifacts
with:
image: projectserum/build
image: backpackapp/build
image-version: ${{ needs.get_projectserum_version.outputs.projectserum_version }}

e2e_custom_run_smoke_tests:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN_DIR = bin
export GOPATH ?= $(shell go env GOPATH)
export GO111MODULE ?= on
export PROJECT_SERUM_VERSION ?=v0.25.0
export PROJECT_SERUM_IMAGE ?= projectserum/build:$(PROJECT_SERUM_VERSION)
export PROJECT_SERUM_VERSION ?=v0.29.0
export PROJECT_SERUM_IMAGE ?= backpackapp/build:$(PROJECT_SERUM_VERSION)

LINUX=LINUX
OSX=OSX
Expand Down
4 changes: 2 additions & 2 deletions contracts/Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
anchor_version = "0.25.0"
anchor_version = "0.29.0"

[registry]
url = "https://anchor.projectserum.com"
Expand All @@ -21,6 +21,6 @@ test = "yarn run test"
# TODO: add pubkeys

[programs.localnet]
ocr2 = "cjg3oHmg9uuPsP8D6g29NWvhySJkdYdAo9D25PRbKXJ"
ocr_2 = "cjg3oHmg9uuPsP8D6g29NWvhySJkdYdAo9D25PRbKXJ" # need to rename the idl to satisfy anchor.js...
store = "HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny"
access_controller = "9xi644bRR8birboDGdTiwBq3C7VEeR7VuamRYYXCubUW"
Loading

0 comments on commit a008941

Please sign in to comment.