Skip to content

Commit

Permalink
Merge pull request #71 from liquity/slither
Browse files Browse the repository at this point in the history
chore: Add slither config and instructions
  • Loading branch information
danielattilasimon authored Apr 26, 2024
2 parents 3998fd0 + 32649c6 commit f1c59eb
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
3 changes: 3 additions & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ cache_hardhat

coverage/
coverage.json

.venv

mochaOutput.json
testMatrix.json
/deployment-context-latest.json
27 changes: 23 additions & 4 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,29 @@ $ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --pri
$ cast <subcommand>
```

### Help
## Slither

Create a local Python env:

```shell
python3 -m venv .venv
```

Install slither:

```shell
pip3 install -r requirements.txt
```

Install and use Solidity compiler:

```shell
solc-select install 0.8.18
solc-select use 0.8.18
```

Run slither:

```shell
$ forge --help
$ anvil --help
$ cast --help
slither src
```
2 changes: 2 additions & 0 deletions contracts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
slither-analyzer==0.10.0
slitherin==0.5.0
4 changes: 4 additions & 0 deletions contracts/slither.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"detectors_to_exclude": "naming-convention,similar-names,incorrect-equality,uninitialized-local,solc-version,reentrancy-no-eth,reentrancy-benign,reentrancy-events,timestamp,pess-unprotected-setter,pess-readonly-reentrancy",
"filter_paths": "lib|test|TestContracts|Dependencies|Integrations|Interfaces"
}

0 comments on commit f1c59eb

Please sign in to comment.