forked from graphprotocol/contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyze
executable file
·31 lines (26 loc) · 1.05 KB
/
analyze
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
#!/bin/bash
## Before running:
# This tool requires to have solc installed.
# Ensure that you have the binaries installed by pip3 in your path.
# Install:
# - https://github.com/crytic/slither#how-to-install
# Usage:
# - https://github.com/crytic/slither/wiki/Usage
mkdir -p reports
pip3 install --user slither-analyzer && \
yarn build && \
echo "Analyzing contracts..."
slither . \
--hardhat-ignore-compile \
--hardhat-artifacts-directory ./build/contracts \
--sarif - \
--filter-paths "contracts/bancor/.*|contracts/tests/.*|contracts/staking/libs/Cobbs.*|contracts/staking/libs/LibFixedMath.*|contracts/staking/libs/MathUtils.*" \
--exclude-dependencies \
--exclude similar-names,naming-convention \
--disable-color \
&> reports/analyzer-report.sarif && \
echo "Slither report generated at ./reports/analyzer-report.sarif"
echo "Checking ERC compliance..."
slither-check-erc build/flatten/GraphToken.sol GraphToken &> reports/analyzer-report-erc.log
echo "Compliance report generated at ./reports/analyzer-report-erc.log"
echo "Done!"