Skip to content

Commit 1fc3a69

Browse files
authored
Merge pull request #10 from klkvr/klkvr/more-examples
CI for examples + native EOF
2 parents cc6edd5 + 99e5feb commit 1fc3a69

File tree

4 files changed

+46
-17
lines changed

4 files changed

+46
-17
lines changed

.github/workflows/examples.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: examples
2+
3+
on:
4+
pull_request:
5+
merge_group:
6+
push:
7+
branches: [main]
8+
9+
env:
10+
FOUNDRY_PROFILE: ci
11+
12+
jobs:
13+
check:
14+
strategy:
15+
fail-fast: true
16+
17+
name: Foundry project
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
28+
- uses: dtolnay/rust-toolchain@stable
29+
30+
- name: Install Foundry
31+
uses: foundry-rs/foundry-toolchain@v1
32+
33+
- name: Run Forge build
34+
id: build
35+
run: forge build
36+
37+
- name: Rust BLS multisig example
38+
run: cargo run --manifest-path ./examples/bls-multisig/rust/Cargo.toml
39+
40+
- name: Python BLS multisig example
41+
run: |
42+
pip install web3 py_ecc
43+
python ./examples/bls-multisig/python/multisig.py

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,9 @@ Set of solidity utilities to ease deployment and usage of applications on
55

66
## EOF support
77

8-
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.
8+
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.
99

10-
To make sure that everything is working properly you can run the following command:
11-
```shell
12-
$ ./eof-solc --version
13-
```
14-
15-
It will pull the docker image on a first run and should print the version of the solc binary.
16-
17-
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.
10+
This repository is configured to compile contracts for [EOF] by default by setting `eof = true` in the `foundry.toml` file.
1811

1912
## EIP-7702 support
2013

eof-solc

Lines changed: 0 additions & 3 deletions
This file was deleted.

foundry.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,5 @@ src = "src"
33
out = "out"
44
libs = ["lib"]
55

6-
# settings required for EOF
7-
via_ir = true
8-
evm_version = "prague"
9-
eof_version = 1
10-
solc = "./eof-solc"
6+
eof = true
117
alphanet = true

0 commit comments

Comments
 (0)