-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_benchmark_final.sh
More file actions
executable file
·324 lines (292 loc) · 8.49 KB
/
test_benchmark_final.sh
File metadata and controls
executable file
·324 lines (292 loc) · 8.49 KB
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#!/bin/bash
# Function to execute a numbered group of commands
execute_group() {
group_number=$1
shift
echo "Executing Group $group_number"
"$@"
echo "Group $group_number complete"
}
# Group 1: MarginSwap
if [[ $# -eq 0 || $1 -eq 1 ]]; then
solc-select use 0.8.3
cd "Benchmark/MarginSwap/contracts"
slither --detect tcheck HourlyBondSubscriptionLending.sol
cd "../../../"
execute_group 1 echo "[*] Tested 1 warning for MarginSwap"
sleep 3
fi
# Group 2: MarginSwap
if [[ $# -eq 0 || $1 -eq 2 ]]; then
solc-select use 0.8.3
cd "Benchmark/Vader_Protocol_p1/vader-protocol/contracts"
slither --detect tcheck Utils.sol
cd "../../../../"
execute_group 2 echo "[*] Tested 3 warnings for Vader Protocol P1"
sleep 3
fi
# Group 3: PoolTogether
if [[ $# -eq 0 || $1 -eq 3 ]]; then
solc-select use 0.8.4
cd "Benchmark/PoolTogether/contracts/yield-source"
slither --detect tcheck .
#echo "Currently ommitted"
cd "../../../../"
execute_group 3 echo "[*] Tested 1 warning for PoolTogether"
sleep 3
fi
# Group 4: Tracer
if [[ $# -eq 0 || $1 -eq 4 ]]; then
solc-select use 0.8.4
cd "Benchmark/Tracer/src/contracts/lib"
slither --detect tcheck .
#echo "Currently ommitted"
cd "../../../../../"
execute_group 4 echo "[*] Tested 1 warning for Tracer"
sleep 3
fi
# Group 5: Yield Micro
if [[ $# -eq 0 || $1 -eq 5 ]]; then
solc-select use 0.8.1
cd "Benchmark/Yield_Micro/contracts/oracles/composite"
slither --detect tcheck CompositeMultiOracle.sol
cd "../../../../../"
execute_group 5 echo "[*] Tested 1 warning for Yield Micro"
sleep 3
fi
# Group 6: Sushi Trident
if [[ $# -eq 0 || $1 -eq 6 ]]; then
solc-select use 0.8.1
cd "Benchmark/Sushi_Trident/trident/contracts/pool"
slither --detect tcheck HybridPool.sol
cd "../../../../../"
execute_group 6 echo "[*] Tested 0 warnings for Sushi Tridnet"
sleep 3
fi
# Group 7: yAxis8
if [[ $# -eq 0 || $1 -eq 7 ]]; then
solc-select use 0.6.12
cd "Benchmark/yAxis/contracts/v3"
slither --detect tcheck Vault.sol
cd "../../../../"
execute_group 7 echo "[*] Tested 5 warnings for yAxis"
sleep 3
fi
# Group 8: BadgerDao
if [[ $# -eq 0 || $1 -eq 8 ]]; then
solc-select use 0.6.12
cd "Benchmark/BadgerDao/veCVX/contracts"
slither --detect tcheck veCVXStrategy.sol
cd "../../../../"
execute_group 8 echo "[*] Tested 2 warnings for BadgerDao"
sleep 3
fi
# Group 9: Wild Credit
if [[ $# -eq 0 || $1 -eq 9 ]]; then
solc-select use 0.8.6
cd "Benchmark/Wild_Credit/contracts"
slither --detect tcheck LendingPair.sol
cd "../../../"
execute_group 9 echo "[*] Tested 4 warnings for Wild Credit"
sleep 3
fi
#Group 10: PoolTogether_v4
if [[ $# -eq 0 || $1 -eq 10 ]]; then
solc-select use 0.8.6
cd "Benchmark/PoolTogether_v4/v4-core/contracts"
slither --detect tcheck DrawCalculator.sol
cd "../../../../"
execute_group 10 echo "[*] Tested 0 warnings for Pool Together v4"
sleep 3
fi
#Group 11: Sushi Trident p2
if [[ $# -eq 0 || $1 -eq 11 ]]; then
solc-select use 0.8.4
cd "Benchmark/Sushi_Trident_p2/trident/contracts/pool/concentrated"
slither --detect tcheck ConcentratedLiquidityPool.sol
cd "../../../../../../"
execute_group 11 echo "[*] Tested 8 warnings for Sushi Trident"
sleep 3
fi
#Group 12: Swivel
if [[ $# -eq 0 || $1 -eq 12 ]]; then
solc-select use 0.8.4
cd "Benchmark/Swivel/gost/build/swivel"
slither --detect tcheck Swivel.sol
cd "../../../../../"
execute_group 12 echo "[*] Tested 2 warnings for Swivel"
sleep 3
fi
#Group 13 Covalent
if [[ $# -eq 0 || $1 -eq 13 ]]; then
solc-select use 0.8.4
cd "Benchmark/Covalent/contracts"
slither --detect tcheck DelegatedStaking.sol
cd "../../../"
execute_group 13 echo "[*] Tested 2 warnings for Covalent"
sleep 3
fi
#Group 14 Badger Dao p2
if [[ $# -eq 0 || $1 -eq 14 ]]; then
solc-select use 0.6.12
cd "Benchmark/Badger_Dao_p2/contracts"
slither --detect tcheck WrappedIbbtc.sol
cd "../../../"
execute_group 14 echo "[*] Tested 4 warnings for Badger Dao p2"
sleep 3
fi
#Group 15 Vader Protocol p2
if [[ $# -eq 0 || $1 -eq 15 ]]; then
solc-select use 0.8.9
cd "Benchmark/Vader_Protocol_p2/contracts"
cd "twap"
slither --detect tcheck TwapOracle.sol
echo "[*] Tested 5 warnings for Part 1"
cd "../"
cd "dex/router"
slither --detect tcheck .
echo "[*] Tested 11 warnings for Part 2"
cd "../../"
cd "dex-v2/router"
slither --detect tcheck .
echo "[*] Tested 1 warnings for Part 3"
cd "../../"
cd "../../../"
execute_group 15 echo "[*] Tested 17 warnings for Badger Dao p2"
sleep 3
fi
#Group 16 yAxis p2
if [[ $# -eq 0 || $1 -eq 16 ]]; then
solc-select use 0.6.12
cd "Benchmark/yAxis_p2/contracts/v3/alchemix/libraries/alchemist"
slither --detect tcheck CDP.sol
cd "../../../../../../../"
execute_group 16 echo "[*] Tested 0 warnings for yAxis p2"
sleep 3
fi
#Group 17 Malt Finance
if [[ $# -eq 0 || $1 -eq 17 ]]; then
solc-select use 0.6.12
cd "Benchmark/Malt_Finance/src/contracts"
slither --detect tcheck AuctionEscapeHatch.sol
slither --detect tcheck AuctionBurnReserveSkew.sol
cd "../../../../"
execute_group 17 echo "[*] Tested 0 warnings for Malt Finance"
sleep 3
fi
#Group 18 Perennial
if [[ $# -eq 0 || $1 -eq 18 ]]; then
solc-select use 0.8.10
cd "Benchmark/Perennial/protocol/contracts/collateral/types"
slither --detect tcheck OptimisticLedger.sol
cd "../../../../../../"
execute_group 18 echo "[*] Tested 1 warnings for Perennial"
sleep 3
fi
#Group 19 Sublime
if [[ $# -eq 0 || $1 -eq 19 ]]; then
solc-select use 0.7.6
cd "Benchmark/Sublime/contracts"
cd "CreditLine"
slither --detect tcheck CreditLine.sol
echo "[*] Tested 1 warnings for Part 1"
cd ".."
cd "yield"
slither --detect tcheck YearnYield.sol
echo "[*] Tested 4 warnings for Part 2"
cd ".."
cd "../../../"
execute_group 19 echo "[*] Tested 5 warnings total for Sublime"
sleep 3
fi
#Group 20 Yeti Finance
if [[ $# -eq 0 || $1 -eq 20 ]]; then
solc-select use 0.6.12
cd "Benchmark/Yeti_Finance/packages/contracts/contracts/YETI"
slither --detect tcheck sYETIToken.sol
cd "../../../../../../"
execute_group 20 echo "[*] Tested 0 warnings for Yeti Finance"
sleep 3
fi
#Group 21 Vader Protocol p3
if [[ $# -eq 0 || $1 -eq 21 ]]; then
solc-select use 0.8.9
cd "Benchmark/Vader_Protocol_p3/contracts/lbt"
slither --detect tcheck LiquidityBasedTWAP.sol
cd "../../../../"
execute_group 21 echo "[*] Tested 4 warnings for Vader Protocol p3"
sleep 3
fi
#Group 22 InsureDao
if [[ $# -eq 0 || $1 -eq 22 ]]; then
solc-select use 0.8.7
cd "Benchmark/InsureDao/contracts"
slither --detect tcheck PoolTemplate.sol
cd "../../../"
execute_group 22 echo "[*] Tested 1 warnings for InsureDao"
sleep 3
fi
#Group 23 Rocket Joe
if [[ $# -eq 0 || $1 -eq 23 ]]; then
solc-select use 0.8.7
cd "Benchmark/Rocket_Joe/contracts"
slither --detect tcheck LaunchEvent.sol
cd "../../../"
execute_group 23 echo "[*] Tested 5 warnings for Rocket Joe"
sleep 3
fi
#Group 24 Concur Finance
if [[ $# -eq 0 || $1 -eq 24 ]]; then
solc-select use 0.8.12
cd "Benchmark/Concur_Finance/contracts"
slither --detect tcheck MasterChef.sol
cd "../../../"
execute_group 24 echo "[*] Tested 1 warnings for Concur Finance"
sleep 3
fi
#Group 25 Biconomy Hyphen
if [[ $# -eq 0 || $1 -eq 25 ]]; then
solc-select use 0.8.0
cd "Benchmark/Biconomy_Hyphen/contracts/hyphen"
slither --detect tcheck LiquidityPool.sol
cd "../../../../"
execute_group 25 echo "[*] Tested 1 warnings for Biconomy Hyphen"
sleep 3
fi
#Group 26 Sublime p2
if [[ $# -eq 0 || $1 -eq 26 ]]; then
solc-select use 0.7.6
cd "Benchmark/Sublime_p2/sublime-v1/contracts/PooledCreditLine"
slither --detect tcheck LenderPool.sol
cd "../../../../../"
execute_group 26 echo "[*] Tested 0 warnings for Sublime p2"
sleep 3
fi
#Group 27 Volt
if [[ $# -eq 0 || $1 -eq 27 ]]; then
solc-select use 0.8.6
cd "Benchmark/Volt/contracts/oracle"
slither --detect tcheck ScalingPriceOracle.sol
cd "../../../../"
execute_group 27 echo "[*] Tested 0 warnings for Volt"
sleep 3
fi
#Group 28 Badger Dao p3
if [[ $# -eq 0 || $1 -eq 28 ]]; then
solc-select use 0.8.12
cd "Benchmark/Badger_Dao_p3/src"
slither --detect tcheck StakedCitadel.sol
cd "../../../"
execute_group 28 echo "[*] Tested 0 warnings for Badger Dao p3"
sleep 3
fi
#Group 29 Tigris Trade
if [[ $# -eq 0 || $1 -eq 29 ]]; then
solc-select use 0.8.12
cd "Benchmark/Tigris_Trade/contracts"
slither --detect tcheck Trading.sol
cd "../../../"
execute_group 29 echo "[*] Tested 4 warnings for Tigris Trade"
sleep 3
fi
echo "Testing complete"