-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
48 lines (41 loc) · 1.99 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Generate solidity files using the gyb templates in ./templates and the data in test-cases.yml
.PHONY: codegen
codegen:
./codegen.sh
# Build and run tests, output the results to the ./gas-snapshots dir
.PHONY: snapshot
snapshot:
forge snapshot --force --optimize --use 0.8.20 --snap gas-snapshots/0-8-20
forge snapshot --force --optimize --use 0.8.20 --snap gas-snapshots/0-8-20-via-ir --via-ir
forge snapshot --force --optimize --use 0.8.21 --snap gas-snapshots/0-8-21
forge snapshot --force --optimize --use 0.8.21 --snap gas-snapshots/0-8-21-via-ir --via-ir
forge snapshot --force --optimize --use 0.8.22 --snap gas-snapshots/0-8-22
forge snapshot --force --optimize --use 0.8.22 --snap gas-snapshots/0-8-22-via-ir --via-ir
forge snapshot --force --optimize --use 0.8.23 --snap gas-snapshots/0-8-23
forge snapshot --force --optimize --use 0.8.23 --snap gas-snapshots/0-8-23-via-ir --via-ir
forge snapshot --force --optimize --use 0.8.24 --snap gas-snapshots/0-8-24
forge snapshot --force --optimize --use 0.8.24 --snap gas-snapshots/0-8-24-via-ir --via-ir
forge snapshot --force --optimize --use 0.8.25 --snap gas-snapshots/0-8-25
forge snapshot --force --optimize --use 0.8.25 --snap gas-snapshots/0-8-25-via-ir --via-ir
forge snapshot --force --optimize --use 0.8.26 --snap gas-snapshots/0-8-26
forge snapshot --force --optimize --use 0.8.26 --snap gas-snapshots/0-8-26-via-ir --via-ir
# Generate a structured json from gas-snapshots and outputs to ./data.json
.PHONY: json
json:
python scripts/gen_json.py
# Generate readme files in benchmarks/
.PHONY: readme
readme:
python scripts/main.py
# run swift generator
.PHONY: readme-swift
readme-swift:
swift run --package-path generator solbench erc20 data.json benchmarks
# build swift generator docker image
.PHONY: build-generator-docker
build-solbench:
docker build . -t solbench
# run solbench image
.PHONY: run-generator-docker
run-generator-docker:
docker run -v ./data.json:/data.json -v ./benchmarks:/benchmarks solbench erc20 /data.json /benchmarks