-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
150 lines (103 loc) · 4.77 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
-include .env
.PHONY: all test 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 install update build
# 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"
install:; forge install chainaccelorg/[email protected] --no-commit && forge install smartcontractkit/[email protected] --no-commit && forge install foundry-rs/[email protected] --no-commit && forge install transmissions11/solmate@v6 --no-commit
# Update Dependencies
update:; forge update
build:; forge build
test:; forge test
format:; forge fmt
anvil:; anvil -m 'test test test test test test test test test test test junk' --steps-tracing --block-time 1
# Ethereum Mainnet
testForkMainnet:
@forge test --fork-url $(MAINNET_RPC_URL)
testForkMainnetC:
@forge coverage --fork-url $(MAINNET_RPC_URL)
testForkMainnetCR:
@forge coverage --fork-url $(MAINNET_RPC_URL) --report lcov
# Ethereum Testnet
testForkSepolia:
@forge test --fork-url $(SEPOLIA_RPC_URL)
testForkSepoliaC:
@forge coverage --fork-url $(SEPOLIA_RPC_URL)
testForkSepoliaCR:
@forge coverage --fork-url $(SEPOLIA_RPC_URL) --report lcov
# Aleph Zero Mainnet
testForkAleph:
@forge test --fork-url $()
testForkAlephC:
@forge coverage --fork-url $()
testForkAlephCR:
@forge coverage --fork-url $() --report lcov
# Aleph Zero Testnet
testForkAlephT:
@forge test --fork-url $(ALEPH_TESTNET_RPC_URL)
testForkAlephTC:
@forge coverage --fork-url $(ALEPH_TESTNET_RPC_URL)
testForkAlephTCR:
@forge coverage --fork-url $(ALEPH_TESTNET_RPC_URL) --report lcov
NETWORK_ARGS:= --rpc-url http://localhost:8545 --private-key $(LOCAL_PRIVATE_KEY) --broadcast
ifeq ($(findstring --network sepolia,$(ARGS)),--network sepolia)
NETWORK_ARGS:= --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv
endif
# --skip-simulation
# ifeq ($(findstring --network alepht,$(ARGS)),--network alepht)
# NETWORK_ARGS:= --rpc-url $(ALEPH_TESTNET_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ALEPH_API_KEY) -vvvv
# endif
ifeq ($(findstring --network alepht,$(ARGS)),--network alepht)
NETWORK_ARGS:= --rpc-url $(ALEPH_TESTNET_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --verifier blockscout --verifier-url $(ALEPHT_VERIFIER_URL)
endif
# Using Foundry Keystore '--account defaultKey --sender 0x000' where 0x000 is wallet public key
ifeq ($(findstring --network test,$(ARGS)),--network test)
NETWORK_ARGS:= --rpc-url $(ALEPH_TESTNET_RPC_URL) --account defaultKey --sender 0x000 --broadcast --verify --verifier blockscout --verifier-url $(ALEPHT_VERIFIER_URL)
endif
# MANUAL DEPLOY WITHOUT SCRIPT
# RUN IN ORDER !!!
deployGovernorAlephT:
@forge create Governor $(NETWORK_ARGS)
deployAuctionerAlephT:
@forge create AuctionerDev $(NETWORK_ARGS) --constructor-args $(FOUNDATION) $(GOVERNOR_ADDRESS)
verifyGovernor:
@forge verify-contract $(GOVERNOR_ADDRESS) Governor --chain-id=2039 --verifier-url=$(ALEPHT_VERIFIER_URL) --verifier blockscout
verifyAuctioner:
@forge verify-contract $(AUCTIONER_ADDRESS) AuctionerDev --chain-id 2039 --verifier-url $(ALEPHT_VERIFIER_URL) --verifier blockscout
# AUTOMATED DEPLOYMENT
deployPiecesMarketSepolia:
@forge script script/DeployPiecesMarket.s.sol:DeployPiecesMarket $(NETWORK_ARGS)
deployPiecesMarketDevSepolia:
@forge script script/DeployPiecesMarketDev.s.sol:DeployPiecesMarketDev $(NETWORK_ARGS)
deployPiecesMarketAlephT:
@forge script script/DeployPiecesMarket.s.sol:DeployPiecesMarket $(NETWORK_ARGS)
deployPiecesMarketDevAlephT:
@forge script script/DeployPiecesMarketDev.s.sol:DeployPiecesMarketDev $(NETWORK_ARGS)
# MOCK TRANSACTIONS SCRIPTS
mockPiecesMarketTxAlephT:
@forge script script/MockPiecesMarket.s.sol:MockPiecesMarket $(NETWORK_ARGS)
# MOCK TRANSACTIONS SCRIPTS
mockPhase1:
@forge script script/MockPiecesMarket.s.sol:Phase1 $(NETWORK_ARGS)
mockPhase2:
@forge script script/MockPiecesMarket.s.sol:Phase2 $(NETWORK_ARGS)
mockPhase3:
@forge script script/MockPiecesMarket.s.sol:Phase3 $(NETWORK_ARGS)
mockPhase4:
@forge script script/MockPiecesMarket.s.sol:Phase4 $(NETWORK_ARGS)
mockPhase5:
@forge script script/MockPiecesMarket.s.sol:Phase5 $(NETWORK_ARGS)
mockPhase6:
@forge script script/MockPiecesMarket.s.sol:Phase6 $(NETWORK_ARGS)
mockPhase7:
@forge script script/MockPiecesMarket.s.sol:Phase7 $(NETWORK_ARGS)
mockPhase8:
@forge script script/MockPiecesMarket.s.sol:Phase8 $(NETWORK_ARGS)
mockPhase9:
@forge script script/MockPiecesMarket.s.sol:Phase9 $(NETWORK_ARGS)