Skip to content

Commit

Permalink
Merge pull request #10 from klkvr/klkvr/more-examples
Browse files Browse the repository at this point in the history
CI for examples + native EOF
  • Loading branch information
klkvr authored Oct 7, 2024
2 parents cc6edd5 + 99e5feb commit 1fc3a69
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 17 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: examples

on:
pull_request:
merge_group:
push:
branches: [main]

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- uses: dtolnay/rust-toolchain@stable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run Forge build
id: build
run: forge build

- name: Rust BLS multisig example
run: cargo run --manifest-path ./examples/bls-multisig/rust/Cargo.toml

- name: Python BLS multisig example
run: |
pip install web3 py_ecc
python ./examples/bls-multisig/python/multisig.py
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ Set of solidity utilities to ease deployment and usage of applications on

## EOF support

This repository is configured to compile contracts for [EOF]. This is done by using solc binary from [forge-eof] repository distrbuted as a docker image. To be able to compile contracts you will need to have [Docker] installed.
Forge has built-in support for [EOF]. This is done by using solc binary from [forge-eof] repository distrbuted as a docker image. To be able to compile contracts you will need to have [Docker] installed. Once it's installed, and forge version is up to date (run `foundryup` if needed), you can add `--eof` flag to any forge command to try out EOF compilation.

To make sure that everything is working properly you can run the following command:
```shell
$ ./eof-solc --version
```

It will pull the docker image on a first run and should print the version of the solc binary.

After that, make sure that your forge version is up to data (run `foundryup` if needed), and then you should be able to use all usual forge commands —— all contracts will get compiled for EOF.
This repository is configured to compile contracts for [EOF] by default by setting `eof = true` in the `foundry.toml` file.

## EIP-7702 support

Expand Down
3 changes: 0 additions & 3 deletions eof-solc

This file was deleted.

6 changes: 1 addition & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@ src = "src"
out = "out"
libs = ["lib"]

# settings required for EOF
via_ir = true
evm_version = "prague"
eof_version = 1
solc = "./eof-solc"
eof = true
alphanet = true

0 comments on commit 1fc3a69

Please sign in to comment.