-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (31 loc) · 1.09 KB
/
Makefile
File metadata and controls
35 lines (31 loc) · 1.09 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
# dependencies
update :; forge update
# install latest stable solc version
solc:
@command -v solc >/dev/null 2>&1 && { \
echo "solc already installed: $$(solc --version | head -n1)"; \
exit 0; \
} || true
@echo "Installing latest stable Solidity binary..."
@TMPFILE=$$(mktemp) && \
if wget -q https://github.com/ethereum/solidity/releases/latest/download/solc-static-linux -O $$TMPFILE 2>/dev/null; then \
chmod +x $$TMPFILE && \
sudo mv $$TMPFILE /usr/local/bin/solc && \
echo "Installed: $$(solc --version | head -n1)"; \
else \
rm -f $$TMPFILE; \
echo "Download failed. Install manually from https://github.com/ethereum/solidity/releases/latest."; \
exit 1; \
fi
# build & test
build :; forge build
build-optimised :; forge build --optimize
test-forge :; forge test
test-gasreport :; forge test --gas-report
trace :; forge test -vvvvv
clean :; forge clean
snapshot :; forge snapshot
# chmod scripts
scripts :; chmod +x ./scripts/*
# fork mainnet with Hardhat
mainnet-fork :; npx hardhat node --fork ${ETH_MAINNET_RPC_URL}