generated from aragon/osx-plugin-template-foundry
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
168 lines (115 loc) · 6.66 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# include .env file and export its env vars
# (-include to ignore error if it does not exist)
-include .env
# env var check
check-env :; echo $(ETHERSCAN_API_KEY)
# linux: allow shell scripts to be executed
allow-scripts:; chmod +x script/bash/*.sh
# create an HTML coverage report in ./report (requires lcov & genhtml)
coverage-report:; ./script/bash/coverage-report.sh
# init the repo
install :; make allow-scripts && make coverage-report
send-tokens :; cast send 0xcD25DAecFe1334e1879580E1762d98E22D7ad50C \
"transfer(address,uint256)" 0x8bF1e340055c7dE62F11229A149d3A1918de3d74 100ether \
--rpc-url https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA) \
--private-key $(PRIVATE_KEY)
bridge-tokens :; forge script BridgeAndSend \
--rpc-url https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA) \
--private-key $(PRIVATE_KEY) \
--broadcast \
-vvvvv
unstick-deploy-optimism-sepolia :; forge script UnstickDeploy \
--rpc-url https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA) \
--private-key $(PRIVATE_KEY) \
--broadcast \
-vvvvv
unstick-dispatch-arbitrum-sepolia :; forge test --mc ToucanReceiverStuckMessage \
--rpc-url https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA) \
-vvvvv
test-oapp-conf :; forge test --mc TestOAppConf \
--rpc-url https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA) \
-vvvvv
set-send-conf-arbitrum :; forge script SetOAppConf \
--rpc-url https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA) \
--private-key $(PRIVATE_KEY) \
--broadcast \
-vvvvv
## DEPLOY SCRIPTS
define deploy-script
export STAGE=$(1) && \
export EXECUTION_OR_VOTING=$(2) && \
forge script DeployE2E \
--rpc-url $(3) \
--private-key $(PRIVATE_KEY) \
$(4) \
-vvvvv
endef
### Arbitrum ###
# run deploy script but don't broadcast the transaction
preview-deploy-arbitrum-sepolia-stage-0:
$(call deploy-script,0,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-sepolia-stage-1:
$(call deploy-script,1,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-sepolia-stage-2:
$(call deploy-script,2,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-sepolia-stage-3:
$(call deploy-script,3,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-sepolia-stage-4:
$(call deploy-script,4,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),)
# deploy the contract to the arbitrum-sepolia network
deploy-arbitrum-sepolia-stage-0:
$(call deploy-script,0,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-sepolia-stage-1:
$(call deploy-script,1,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-sepolia-stage-2:
$(call deploy-script,2,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-sepolia-stage-3:
$(call deploy-script,3,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-sepolia-stage-4:
$(call deploy-script,4,EXECUTION,https://arbitrum-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
### Optimism ###
# run deploy script but don't broadcast the transaction
preview-deploy-optimism-sepolia-stage-0:
$(call deploy-script,0,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-optimism-sepolia-stage-1:
$(call deploy-script,1,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-optimism-sepolia-stage-2:
$(call deploy-script,2,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-optimism-sepolia-stage-3:
$(call deploy-script,3,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-optimism-sepolia-stage-4:
$(call deploy-script,4,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),)
# deploy the contract to the optimism-sepolia network
deploy-optimism-sepolia-stage-0:
$(call deploy-script,0,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(OPTIMISM_API_KEY))
deploy-optimism-sepolia-stage-1:
$(call deploy-script,1,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(OPTIMISM_API_KEY))
deploy-optimism-sepolia-stage-2:
$(call deploy-script,2,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(OPTIMISM_API_KEY))
deploy-optimism-sepolia-stage-3:
$(call deploy-script,3,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(OPTIMISM_API_KEY))
deploy-optimism-sepolia-stage-4:
$(call deploy-script,4,VOTING,https://optimism-sepolia.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(OPTIMISM_API_KEY))
## Mainnet Arbitrum
# run deploy script but don't broadcast the transaction
preview-deploy-arbitrum-stage-0:
$(call deploy-script,0,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-stage-1:
$(call deploy-script,1,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-stage-2:
$(call deploy-script,2,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-stage-3:
$(call deploy-script,3,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),)
preview-deploy-arbitrum-stage-4:
$(call deploy-script,4,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),)
# deploy the contract to the arbitrum-mainnet network
deploy-arbitrum-stage-0:
$(call deploy-script,0,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-stage-1:
$(call deploy-script,1,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-stage-2:
$(call deploy-script,2,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-stage-3:
$(call deploy-script,3,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))
deploy-arbitrum-stage-4:
$(call deploy-script,4,EXECUTION,https://arbitrum-mainnet.infura.io/v3/$(API_KEY_INFURA),--broadcast --verify --etherscan-api-key $(ARBISCAN_API_KEY))