forked from thirdweb-dev/contracts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
59 lines (39 loc) · 1.95 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-include .env
.PHONY: all test test_anvil clean deploy fund help install snapshot format anvil
help:
@echo "Usage:"
@echo " make deploy [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
@echo ""
@echo " make fund [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
all: clean remove update build deploy
# Clean the repo
clean :; forge clean
# Remove modules
remove :; rm -rf .gitmodules && rm -rf .git/modules/* && rm -rf lib && touch .gitmodules && git add . && git commit -m "modules"
# Update Dependencies
update:; forge update
build:; forge build
test :; forge test
test_anvil :; forge test --rpc-url $(ANVIL_RPC_URL)
snapshot :; forge snapshot
format :; forge fmt
anvil :; anvil -m 'test test test test test test test test test test test junk' --steps-tracing --block-time 1
NETWORK_ARGS := --rpc-url $(ANVIL_RPC_URL) --private-key $(ANVIL_PRIVATE_KEY) --broadcast
ifeq ($(findstring --network sepolia,$(ARGS)),--network sepolia)
NETWORK_ARGS := --rpc-url $(SEPOLIA_RPC_URL) --private-key $(SEPOLIA_PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv
endif
ifeq ($(findstring --network mumbai,$(ARGS)),--network mumbai)
NETWORK_ARGS := --rpc-url $(MUMBAI_RPC_URL) --private-key $(MUMBAI_PRIVATE_KEY) --broadcast -vvvv
endif
ifeq ($(findstring --network areon,$(ARGS)),--network areon)
NETWORK_ARGS := --rpc-url $(AREON_RPC_URL) --private-key $(AREON_PRIVATE_KEY) --broadcast -vvvv
endif
ifeq ($(findstring --network ganache,$(ARGS)),--network ganache)
NETWORK_ARGS := --rpc-url $(GANACHE_RPC_URL) --private-key $(GANACHE_PRIVATE_KEY) --broadcast -vvvv
endif
deploy_smart_wallet_factory:
@forge script scripts/DeploySmartAccountUtilContracts.s.sol:DeploySmartAccountUtilContracts $(NETWORK_ARGS)
deploy_entrypoint:
@forge script scripts/DeployEntryPoint.s.sol:DeployEntryPointContract $(NETWORK_ARGS)
test_CrossChainSender:
@forge test --mt testTransferTokensPayNative --rpc-url $(SEPOLIA_RPC_URL) -vvvv