Skip to content

Commit

Permalink
feat: Add slither for evm contracts (#253)
Browse files Browse the repository at this point in the history
* Successfully run all contract tests

* Add slinther for evm contracts

* Add target in the Makefile that triggers slither
  • Loading branch information
mikhailUshakoff committed Jun 26, 2024
1 parent 8f43707 commit df5a777
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,18 @@ tests-unit: ## runs all unit tests
go tool cover -html=coverage.out -o coverage.html

tests-contract: ## runs all forge tests
cd contracts/evm && forge test
cd contracts/evm && forge test --ffi

# TODO: Currently we cannot use the race detector with `integration_test.go`
tests-integration: ## runs all integration tests
go test ./tests/integration/integration_test.go -v -count=1
go test ./tests/integration/registration_test.go -v -race -count=1

## runs slither for solidity files
## You can install Slither by following the guide at https://github.com/crytic/slither/tree/master?tab=readme-ov-file#how-to-install
slither:
cd contracts/evm && slither .

## runs linter on all files
## TODO: For now, only Go files are linted
lint:
Expand Down
6 changes: 6 additions & 0 deletions contracts/evm/slither.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"detectors_to_run": "all",
"exclude_informational": true,
"exclude_low": true,
"filter_paths": "node_modules|lib"
}

0 comments on commit df5a777

Please sign in to comment.