-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
68 lines (56 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.PHONY: install
install:
cd precompiles && pnpm install --frozen-lockfile=false
cd solgen && pnpm install --frozen-lockfile=false
cd solidity && pnpm install --frozen-lockfile=false
.PHONY: gen
gen:
./gen.sh
cd solgen && pnpm build
.PHONY: gen-fheops
gen-fheops:
./gen.sh -g true -n true
cd solgen && pnpm build
.PHONY: compile
compile:
cp solidity/.env.example solidity/.env
cd solidity && pnpm compile
.PHONY: gencompile
gencompile: gen compile
.PHONY: lint
lint:
# cd solidity && pnpm solhint FHE.sol FheOS.sol tests/contracts/*.sol tests/contracts/utils/*.sol
cd solidity && pnpm solhint --ignore-path .solhintignore FheOS.sol tests/contracts/*.sol tests/contracts/utils/*.sol
check_network_is_running:
@echo "Checking connection to 127.0.0.1:8547..."
@nc -z -v 127.0.0.1 8547 2>/dev/null || (echo "Connection failed to localfhenix" && false)
@echo "connected"
.PHONY: test
test: check_network_is_running gen compile
cd solidity && pnpm install
cd solidity && pnpm test
.PHONY: test-precomp
test-precomp: check_network_is_running
cp solidity/.env.example solidity/.env
cd solidity && pnpm test -- precompiles.test.ts
.PHONY: test-tx
test-tx: check_network_is_running
cp solidity/.env.example solidity/.env
cd solidity && pnpm test -- transaction.test.ts
.PHONY: build
build:
go build -o build/main ./cmd/
.PHONY: clean
clean:
rm -r build/*
.PHONY: clean-gen
clean-gen:
find solidity/tests/contracts -type f \
-not -name 'Counter.sol' \
-not -name 'Ownership.sol' \
-not -name 'Tx.sol' \
-not -name 'wERC20.sol' \
-not -name 'Utils.sol' \
-delete
rm solidity/FHE.sol
rm solidity/FheOS.sol