Giter Site home page Giter Site logo

sm-stack / foundry-alphanet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paradigmxyz/foundry-alphanet

0.0 0.0 0.0 37 KB

Foundry tools for interfacing with Reth Alphanet's bleeding-edge EVM extensions.

License: Apache License 2.0

Shell 92.99% Dockerfile 7.01%

foundry-alphanet's Introduction

foundry-alphanet

Tools built around the patched versions of forge and the solidity compiler from clabby/eip-3074-foundry, which support EIP-3074 instructions.

We intend to further roll out Foundry patches to support other EVM modifications such as new opcodes or precompiles.

Docker image

The Docker image defined in this repo contains both the patched solc and forge binaries, compatible with EIP-3074 and ready to be used. The patches are avaiable under the patches directory, during the image build process the source for both binaries is checked out, the patches are applied and the binaries are built and put under /usr/local/bin in the final image.

The image also includes an entrypoint script that makes it easier to use the patched forge with any foundry project using EIP-3074 instructions. It provides these arguments:

  • --foundry-command: subcommand to use with the patched forge
  • --foundry-directory: where to find the foundry project in the container
  • --foundry-script: when --foundry-command is script, path in the foundry project of the script to execute.

There's a github actions workflow in this repo that builds and publishes the image on each merge to main, it is available at: ghcr.io/paradigmxyz/foundry-alphanet

How to use

Containers created from this image should mount a local directory containing a source foundry project and then run a forge command on it. For example, to build a project, from the project root you can execute:

$ docker run --rm \
    -v $(pwd):/app/foundry \
    -u $(id -u):$(id -g) \
    ghcr.io/paradigmxyz/foundry-alphanet:latest \
    --foundry-directory /app/foundry \
    --foundry-command build

In this command:

  • -v $(pwd):/app/foundry mounts the local directory in /app/foundry in the container.
  • -u $(id -u):$(id -g) makes sure that the files created will belong to the same user executing the command.
  • ghcr.io/paradigmxyz/foundry-alphanet:latest is the image name
  • --foundry-directory /app/foundry tells the entrypoint script to use /app/foundry in the container as the foundry project directory.
  • --foundry-command build tells the entrypoint script to use build as the forge command.

To run tests in a project, from the projects root:

$ docker run --rm \
    -v $(pwd):/app/foundry \
    -u $(id -u):$(id -g) \
    ghcr.io/paradigmxyz/foundry-alphanet:latest \
    --foundry-directory /app/foundry \
    --foundry-command "test -vvv"

In this case we have signalled forge that we want increased verbosity in the test output passing test -vvvv to --foundry-command.

foundry-alphanet's People

Contributors

fgimenez avatar gakonst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.