Skip to content

Commit

Permalink
chore: update foundry to v0.3 (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoombs authored Jan 24, 2025
1 parent f9ce5ad commit 6c2e4ef
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: "nightly-fe2acca4e379793539db80e032d76ffe0110298b"
version: "v0.3.0"

# Build to generate the ABI bindings.
- name: cargo build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/compliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- main
pull_request:

name: compliance
name: compliance 07
jobs:
compliance:
runs-on: ubuntu-latest
Expand All @@ -25,11 +25,11 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: "nightly-fe2acca4e379793539db80e032d76ffe0110298b"
version: "v0.3.0"

- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '2.14.2'
version: "2.14.2"

- name: Clone Test Executor
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compliance_v06.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- main
pull_request:

name: compliance
name: compliance 06
jobs:
compliance:
runs-on: ubuntu-latest
Expand All @@ -24,7 +24,7 @@ jobs:

- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '2.14.2'
version: "2.14.2"

- name: Clone Test Executor
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
if: contains( ${{ matrix.target }}, 'apple')
uses: foundry-rs/foundry-toolchain@v1
with:
version: "nightly-fe2acca4e379793539db80e032d76ffe0110298b"
version: "v0.3.0"

- name: Install protobuf
if: contains( ${{ matrix.target }}, 'apple')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: "nightly-fe2acca4e379793539db80e032d76ffe0110298b"
version: "v0.3.0"

- name: Install latest nextest release
uses: taiki-e/install-action@nextest
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Adapted from https://github.com/paradigmxyz/reth/blob/main/Dockerfile
# syntax=docker/dockerfile:1.4

FROM ghcr.io/foundry-rs/foundry:nightly-fe2acca4e379793539db80e032d76ffe0110298b as foundry

FROM --platform=$TARGETPLATFORM rust:1.83.0 AS chef-builder

# Install system dependencies
Expand All @@ -12,12 +10,10 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn rsync

# copy foundry tool
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge

SHELL ["/bin/bash", "-c"]
RUN curl -L https://foundry.paradigm.xyz | bash
ENV PATH="/root/.foundry/bin:${PATH}"
RUN foundryup -i v0.3.0

RUN cargo install cargo-chef --locked

Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CROSS_BASE_IMAGE

FROM ghcr.io/foundry-rs/foundry:nightly-fe2acca4e379793539db80e032d76ffe0110298b as foundry
FROM ghcr.io/foundry-rs/foundry:v0.3.0 as foundry

FROM $CROSS_BASE_IMAGE
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
Expand All @@ -19,4 +19,3 @@ RUN apt-get update && apt-get install -y unzip
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip \
&& unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local \
&& chmod +x /usr/local/bin/protoc

3 changes: 3 additions & 0 deletions crates/contracts/contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ libs = ['lib']
test = 'test'
cache_path = 'cache'
solc_version = '0.8.26'
optimizer = true
optimizer_runs = 200
evm_version = 'paris'

remappings = [
'forge-std/=lib/forge-std/src',
Expand Down
4 changes: 2 additions & 2 deletions docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ git submodule update --init --recursive

2. Install prerequisites

* [Rust/Cargo](https://www.rust-lang.org/tools/install): 1.72 or higher with nightly
* [Rust/Cargo](https://www.rust-lang.org/tools/install): 1.83 or higher with nightly
* [Cocogitto](https://github.com/cocogitto/cocogitto): Commit linting
* [Docker](https://docs.docker.com/engine/install/): Run spec tests
* [PDM](https://pdm.fming.dev/latest/#installation): Run spec tests
* [Protoc](https://grpc.io/docs/protoc-installation/): Compile protobuf
* [Buf](https://buf.build/docs/installation): Protobuf linting
* [Foundry](https://book.getfoundry.sh/getting-started/installation): Compile contracts
* [Foundry ^0.3.0](https://book.getfoundry.sh/getting-started/installation): Compile contracts

## Build & Test

Expand Down

0 comments on commit 6c2e4ef

Please sign in to comment.