-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
277 lines (254 loc) · 10.1 KB
/
justfile
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
default:
@just --list
set dotenv-load
set fallback
defaultNativeCurrencyLabel := "TIA"
defaultWTIA9Name := "Wrapped Celestia"
defaultWTIA9Symbol := "WTIA"
deploy-uniswapv3 nativeCurrencyLabel=defaultNativeCurrencyLabel:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(string)" \
scripts/DeployUniswapV3.s.sol:DeployUniswapV3 \
"{{ defaultNativeCurrencyLabel }}"
transfer-ownership new_owner:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(address)" \
scripts/TransferOwnership.s.sol:TransferOwnership \
"{{ new_owner }}"
deploy-wtia9 name=defaultWTIA9Name symbol=defaultWTIA9Symbol:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(string,string)" \
scripts/DeployWTIA9.s.sol:DeployWTIA9 \
"{{ name }}" \
"{{ symbol }}"
wtia9-deposit amount:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(uint256)" \
scripts/WTIA9Deposit.s.sol:WTIA9Deposit \
{{ amount }}
deploy-erc20 name symbol max_supply decimals="18":
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(string,string,uint8,uint256)" \
scripts/DeployERC20.s.sol:DeployERC20 \
"{{ name }}" \
"{{ symbol }}" \
{{ decimals }} \
{{ max_supply }}
deploy-pool tokenA tokenB fee sqrtPriceX96:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(address,address,uint24,uint160)" \
scripts/DeployPool.s.sol:DeployPool \
"{{ tokenA }}" \
"{{ tokenB }}" \
{{ fee }} \
{{ sqrtPriceX96 }}
create-position tokenA tokenB tokenAAmount tokenBAmount fee:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(address,address,uint24,uint256,uint256)" \
scripts/CreatePosition.s.sol:CreatePosition \
"{{ tokenA }}" \
"{{ tokenB }}" \
{{ fee }} \
{{ tokenAAmount }} \
{{ tokenBAmount }}
swap tokenIn tokenOut fee amountIn:
forge script \
--private-key {{ env_var('PRIVATE_KEY') }} \
--rpc-url {{ env_var('JSON_RPC') }} \
--broadcast \
--skip-simulation \
--slow \
--priority-gas-price 1 \
--sig "run(address,address,uint24,uint256)" \
scripts/Swap.s.sol:Swap \
"{{ tokenIn }}" \
"{{ tokenOut }}" \
{{ fee }} \
{{ amountIn }}
verify-wtia9 name=defaultWTIA9Name symbol=defaultWTIA9Symbol:
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode "constructor(string,string)" "{{ name }}" "{{ symbol }}") \
$(jq -r .weth9Address {{ env_var('DEPLOY_JSON') }}) \
contracts/WTIA9.sol:WTIA9 \
--skip-is-verified-check \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-v3-core-factory:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode "constructor()") \
$(jq -r .v3CoreFactoryAddress {{ env_var('DEPLOY_JSON') }}) \
lib/v3-core/contracts/UniswapV3Factory.sol:UniswapV3Factory \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-v3-pool poolAddress:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode "constructor()") \
{{ poolAddress }} \
lib/v3-core/contracts/UniswapV3Pool.sol:UniswapV3Pool \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-multicall2:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode "constructor()") \
$(jq -r .multicall2Address {{ env_var('DEPLOY_JSON') }}) \
lib/v3-periphery/contracts/lens/UniswapInterfaceMulticall.sol:UniswapInterfaceMulticall \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-proxy-admin:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode "constructor()") \
$(jq -r .proxyAdminAddress {{ env_var('DEPLOY_JSON') }}) \
lib/openzeppelin-contracts/contracts/proxy/ProxyAdmin.sol:ProxyAdmin \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-tick-lens:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode "constructor()") \
$(jq -r .tickLensAddress {{ env_var('DEPLOY_JSON') }}) \
lib/v3-periphery/contracts/lens/TickLens.sol:TickLens \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-nft-position-descriptor nativeCurrencyLabel=defaultNativeCurrencyLabel:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,bytes32)" \
$(jq -r .weth9Address {{ env_var('DEPLOY_JSON') }}) \
$(cast format-bytes32-string "{{ nativeCurrencyLabel }}")) \
$(jq -r .nftPositionDescriptorAddress {{ env_var('DEPLOY_JSON') }}) \
lib/v3-periphery/contracts/NonfungibleTokenPositionDescriptor.sol:NonfungibleTokenPositionDescriptor \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-proxy-descriptor:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,address,bytes)" \
$(jq -r .nftPositionDescriptorAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .proxyAdminAddress {{ env_var('DEPLOY_JSON') }}) \
"0x") \
$(jq -r .descriptorProxyAddress {{ env_var('DEPLOY_JSON') }}) \
lib/openzeppelin-contracts/contracts/proxy/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-nft-position-manager:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,address,address)" \
$(jq -r .v3CoreFactoryAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .weth9Address {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .nftPositionDescriptorAddress {{ env_var('DEPLOY_JSON') }}) ) \
$(jq -r .nftPositionManagerAddress {{ env_var('DEPLOY_JSON') }}) \
lib/v3-periphery/contracts/NonfungiblePositionManager.sol:NonfungiblePositionManager \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-v3-migrator:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,address,address)" \
$(jq -r .v3CoreFactoryAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .weth9Address {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .nftPositionManagerAddress {{ env_var('DEPLOY_JSON') }}) ) \
$(jq -r .v3MigratorAddress {{ env_var('DEPLOY_JSON') }}) \
lib/v3-periphery/contracts/V3Migrator.sol:V3Migrator \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-v3-staker:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,address,uint256,uint256)" \
$(jq -r .v3CoreFactoryAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .nftPositionManagerAddress {{ env_var('DEPLOY_JSON') }}) \
$(cast --to-uint256 2592000) \
$(cast --to-uint256 63072000)) \
$(jq -r .v3StakerAddress {{ env_var('DEPLOY_JSON') }}) \
lib/v3-staker/contracts/UniswapV3Staker.sol:UniswapV3Staker \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-quoter-v2:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,address)" \
$(jq -r .v3CoreFactoryAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .weth9Address {{ env_var('DEPLOY_JSON') }}) ) \
$(jq -r .quoterV2Address {{ env_var('DEPLOY_JSON') }}) \
lib/v3-periphery/contracts/lens/QuoterV2.sol:QuoterV2 \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api
verify-swap-router-2:
FOUNDRY_PROFILE=uniswap \
forge verify-contract \
--chain-id $(cast chain-id --rpc-url {{ env_var('JSON_RPC') }}) \
--constructor-args $(cast abi-encode \
"constructor(address,address,address,address)" \
"0x0000000000000000000000000000000000000000" \
$(jq -r .v3CoreFactoryAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .nftPositionManagerAddress {{ env_var('DEPLOY_JSON') }}) \
$(jq -r .weth9Address {{ env_var('DEPLOY_JSON') }}) ) \
$(jq -r .swapRouter02Address {{ env_var('DEPLOY_JSON') }}) \
lib/swap-router-contracts/contracts/SwapRouter02.sol:SwapRouter02 \
--verifier blockscout \
--verifier-url {{ env_var('BLOCKSCOUT_URL') }}/api