From df5a7777e7f280084e1e444aa6a4305e85558fe5 Mon Sep 17 00:00:00 2001 From: mikhailUshakoff <75278099+mikhailUshakoff@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:45:39 +0200 Subject: [PATCH] feat: Add slither for evm contracts (#253) * Successfully run all contract tests * Add slinther for evm contracts * Add target in the Makefile that triggers slither --- Makefile | 7 ++++++- contracts/evm/slither.config.json | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 contracts/evm/slither.config.json diff --git a/Makefile b/Makefile index f9ea23e6..c9314b1d 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/contracts/evm/slither.config.json b/contracts/evm/slither.config.json new file mode 100644 index 00000000..fb2decd5 --- /dev/null +++ b/contracts/evm/slither.config.json @@ -0,0 +1,6 @@ +{ + "detectors_to_run": "all", + "exclude_informational": true, + "exclude_low": true, + "filter_paths": "node_modules|lib" +}