Skip to content

Commit 266cbf9

Browse files
committed
feat: replace hex with solidity code
Uses forge/ foundry to build the contracts Adds github submodules as for the contract dependencies Updates our github actions to compile the smart contract code
1 parent d201f79 commit 266cbf9

22 files changed

+253
-25
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14+
with:
15+
submodules: true
1416

1517
- name: Set up Go
1618
uses: actions/setup-go@v3
@@ -63,13 +65,20 @@ jobs:
6365
run: |
6466
go mod download
6567
68+
- name: Install Foundry
69+
uses: foundry-rs/foundry-toolchain@v1
70+
6671
- name: Cache binaries
6772
uses: actions/cache@v3
6873
id: cache-bin
6974
with:
7075
path: ${{ runner.temp }}/bin
7176
key: ${{ runner.os }}-binaries
7277

78+
- name: Build Contracts
79+
run: |
80+
forge build --force
81+
7382
- name: Download geth and reth
7483
if: steps.cache-bin.outputs.cache-hit != 'true'
7584
run: |

.github/workflows/public-benchmarks.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
13+
with:
14+
submodules: true
1315

1416
- name: Set up Go
1517
uses: actions/setup-go@v3
@@ -30,6 +32,13 @@ jobs:
3032
path: ${{ runner.temp }}/bin
3133
key: ${{ runner.os }}-binaries
3234

35+
- name: Install Foundry
36+
uses: foundry-rs/foundry-toolchain@v1
37+
38+
- name: Build Contracts
39+
run: |
40+
forge build --force
41+
3342
- name: Download geth and reth
3443
if: steps.cache-bin.outputs.cache-hit != 'true'
3544
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
data-dir/
55
output/
66
.vercel
7+
8+
contracts/cache/
9+
contracts/out/

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "contracts/lib/openzeppelin"]
2+
path = contracts/lib/openzeppelin
3+
url = https://github.com/OpenZeppelin/openzeppelin-contracts
4+
[submodule "contracts/lib/forge-std"]
5+
path = contracts/lib/forge-std
6+
url = https://github.com/foundry-rs/forge-std

configs/contract.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
variables:
66
- type: transaction_workload
77
values:
8-
- contract:1:ecpairing(uint256,bytes):10000000:0x:./contracts/ecpairing.hex
8+
- contract:1:ecpairing(uint256,bytes):10000000:0x:Precompile
99
- type: node_type
1010
values:
1111
- geth

configs/contracts/ecpairing.hex

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)