-
Notifications
You must be signed in to change notification settings - Fork 0
/
slither.sh
executable file
·42 lines (33 loc) · 1012 Bytes
/
slither.sh
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
# Use git grep to find all files containing '0.8.19'
files=$(git grep -l '0.8.19')
# Loop over files and replace '0.8.19' with '0.8.18'
for file in $files
do
sed -i '' 's/0.8.19/0.8.18/g' "$file"
done
# # # Ignore test files
# find "test/" -type f -name "*.sol" | while read file; do
# # Replace '.sol' extension with '.txt'
# mv "$file" "${file%.sol}.txt"
# done
# mv "test/mock/MockLib.txt" "test/mock/MockLib.sol"
# Function to handle error
reset() {
# find "test/" -type f -name "*.txt" | while read file; do
# # Replace '.sol' extension with '.txt'
# mv "$file" "${file%.txt}.sol"
# done
files=$(git grep -l '0.8.18')
for file in $files
do
sed -i '' 's/0.8.18/0.8.19/g' "$file"
done
}
trap 'reset' ERR
# pip3 install slither-analyzer
# pip3 install solc-select
# solc-select install 0.8.18
# solc-select use 0.8.18
FOUNDRY_PROFILE=dev forge build --skip test
slither test/mock/Slither.sol --show-ignored-findings --foundry-ignore-compile
reset