forked from layer3xyz/cubes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 1.37 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
-include .env
.PHONY: deploy test coverage build deploy_proxy fork_test
DEFAULT_ANVIL_PRIVATE_KEY := 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
install:; forge install
build:; forge build
test :; forge test --ffi
coverage :; forge coverage --ffi --report debug > coverage-report.txt
snapshot :; forge snapshot --ffi
NETWORK_ARGS := --rpc-url http://localhost:8545 --private-key $(DEFAULT_ANVIL_PRIVATE_KEY) --broadcast
# Goerli
ifeq ($(findstring --network goerli,$(ARGS)),--network goerli)
NETWORK_ARGS := --rpc-url $(GOERLI_RPC_ENDPOINT) --private-key $(PRIVATE_KEY) --verify --etherscan-api-key $(ETHERSCAN_API_KEY) --broadcast -vvvv
endif
# Base
ifeq ($(findstring --network base,$(ARGS)),--network base)
NETWORK_ARGS := --rpc-url $(BASE_RPC_ENDPOINT) --private-key $(PRIVATE_KEY) --verify --etherscan-api-key $(BASESCAN_API_KEY) --broadcast -vvvv
endif
# Base Sepolia
ifeq ($(findstring --network base_sepolia,$(ARGS)),--network base_sepolia)
NETWORK_ARGS := --rpc-url $(BASE_SEPOLIA_RPC_ENDPOINT) --private-key $(PRIVATE_KEY) --broadcast -vvvv
endif
deploy:
@forge script script/DeployCube.s.sol:DeployCube $(NETWORK_ARGS)
deploy_proxy:
@forge script script/DeployProxy.s.sol:DeployProxy $(NETWORK_ARGS) --ffi
upgrade_proxy:
@forge script script/UpgradeCube.s.sol:UpgradeCube $(NETWORK_ARGS) --ffi
fork_test:
@forge test --rpc-url $(RPC_ENDPOINT) -vvv