Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update foundry to v0.3 #968

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading