Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (47 loc) · 2.69 KB
/
Copy pathMakefile
File metadata and controls
74 lines (47 loc) · 2.69 KB
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
69
70
71
72
73
74
# By default we want to build.
all: install build
# ===== Basic Development Rules =======================================================================================
# Install forge dependencies (not needed if submodules are already initialized).
install:; forge install && npm install
# Build contracts.
build:; forge build
# Run tests, with debug information and gas reports.
test:; FOUNDRY_PROFILE=debug forge test
# Clean the solidity build directory.
clean:; forge clean; rm -rf out/
# Get the contract sizes.
sizes:; forge build --sizes 2>&1 > .size-snapshot
# ===== Profiling Rules ===============================================================================================
# Benchmark the tests.
bench:; forge test --gas-report --no-match-test testCannotRegisterIfProofIncorrect
# Snapshot the current test usages.
snapshot:; forge snapshot --no-match-test testCannotRegisterIfProofIncorrect
# ===== Deployment Rules ==============================================================================================
# Deploy contracts
deploy: install build; node --no-warnings scripts/deploy.js deploy
# Upgrade contracts
upgrade: install build; node --no-warnings scripts/deploy.js upgrade
# Transfer contract ownership
transfer-ownership: install build; node --no-warnings scripts/deploy.js transfer
# Set the identity manager's identity operator
set-operator: install build; node --no-warnings scripts/deploy.js set-operator
# ===== Verifier Management Rules =====================================================================================
verifier-add: install build; node --no-warnings scripts/deploy.js verifier-add
verifier-update: install build; node --no-warnings scripts/deploy.js verifier-update
verifier-disable: install build; node --no-warnings scripts/deploy.js verifier-disable
# ===== Router Management Rules =======================================================================================
# Deploys the router contract.
deploy-router: install build; node --no-warnings scripts/deploy.js deploy-router
# Upgrades the router contract.
upgrade-router: install build; node --no-warnings scripts/deploy.js upgrade-router
# Add routes in the router.
route-add: install build; node --no-warnings scripts/deploy.js route-add
# Update routes in the router.
route-update: install build; node --no-warnings scripts/deploy.js route-update
# Disable routes in the router.
route-disable: install build; node --no-warnings scripts/deploy.js route-disable
# ===== Utility Rules =================================================================================================
# Format the solidity code.
format:; forge fmt; npx prettier --write .
# Update forge dependencies.
update:; forge update