-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
31 lines (22 loc) · 1.11 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
-include .env
.EXPORT_ALL_VARIABLES:
FOUNDRY_BLOCK_NUMBER=36992329
FOUNDRY_ETH_RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}
test:
forge test -vv
storage-check:
forge inspect src/WeSplit.sol:WeSplit storage-layout --pretty | awk -F\| 'NR>2 {$$7=""; print $$0}' > layout/WeSplit.layout
forge inspect src/WeSplitProxy.sol:WeSplitProxy storage-layout --pretty | awk -F\| 'NR>2 {$$7=""; print $$0}' > layout/WeSplitProxy.layout
if ! diff -u layout/reference.layout layout/WeSplit.layout; then false; fi
if ! diff -u layout/reference.layout layout/WeSplitProxy.layout; then false; fi
build:
forge build --force --sizes
deploy:
forge script script/DeployWeSplit.sol --broadcast --etherscan-api-key ${POLYGONSCAN_API_KEY} --verify
upgrade:
forge script script/UpgradeWeSplit.sol --broadcast --etherscan-api-key ${POLYGONSCAN_API_KEY} --verify -vvv
verify:
forge verify-contract --chain 137 --watch --constructor-args ${ENCODED_CONSTRUCTOR_ARGS} ${ADDRESS} WeSplit ${POLYGONSCAN_API_KEY}
gasprice:
cast gas-price --rpc-url ${FOUNDRY_ETH_RPC_URL}
.PHONY: test storage-check build deploy upgrade verify gasprice