-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 923 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (24 loc) · 923 Bytes
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
.PHONY: all test clean deploy-anvil deploy-ganache deploy-sepolia
# --- Shortcuts ---
# 1. Clean the project
clean :; forge clean
# 2. Run all tests
test :; forge test
# 3. Deploy to Anvil
# Uses default local Anvil key - no need for interactive here usually
deploy-anvil:
forge script script/DeployBank.s.sol --rpc-url ${ANVIL_RPC_URL} --broadcast --private-key ${ANVIL_PRIVATE_KEY} --force
# 4. Deploy to Ganache
# Asks for private key interactively && Remember to uncomment the line in tomal file "env_version"
deploy-ganache:
forge script script/DeployBank.s.sol --rpc-url $(GANACHE_RPC_URL) --broadcast --interactives 1 --force
# 5. Deploy to Sepolia
# Uses variables from .env and asks for private key interactively
deploy-sepolia:
forge script script/DeployBank.s.sol \
--rpc-url $(SEPOLIA_RPC_URL) \
--broadcast \
--interactives 1 \
--verify \
--etherscan-api-key $(EATHER_SCAN_API_KEY)