From 104a4790e56f3497b261cdd2bedecb3eac530daf Mon Sep 17 00:00:00 2001 From: Josselin Feist Date: Thu, 29 Sep 2022 12:23:15 +0200 Subject: [PATCH] Minor --- slither/tools/upgradeability/__main__.py | 8 ++++---- tests/check-upgradeability/test_10.txt | 2 +- tests/check-upgradeability/test_2.txt | 2 +- tests/check-upgradeability/test_3.txt | 2 +- tests/check-upgradeability/test_4.txt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slither/tools/upgradeability/__main__.py b/slither/tools/upgradeability/__main__.py index d772029d0..414a4c175 100644 --- a/slither/tools/upgradeability/__main__.py +++ b/slither/tools/upgradeability/__main__.py @@ -166,7 +166,7 @@ def _checks_on_contract( for d in detectors if (not d.REQUIRE_PROXY and not d.REQUIRE_CONTRACT_V2) ] - return _run_checks(detectors_), len(detectors) + return _run_checks(detectors_), len(detectors_) def _checks_on_contract_update( @@ -175,14 +175,14 @@ def _checks_on_contract_update( detectors_ = [ d(logger, contract_v1, contract_v2=contract_v2) for d in detectors if d.REQUIRE_CONTRACT_V2 ] - return _run_checks(detectors_), len(detectors) + return _run_checks(detectors_), len(detectors_) def _checks_on_contract_and_proxy( detectors: List[Type[AbstractCheck]], contract: Contract, proxy: Contract ) -> Tuple[List[Dict], int]: detectors_ = [d(logger, contract, proxy=proxy) for d in detectors if d.REQUIRE_PROXY] - return _run_checks(detectors_), len(detectors) + return _run_checks(detectors_), len(detectors_) # endregion @@ -279,7 +279,7 @@ def main() -> None: number_detectors_run += number_detectors # If there is a V2, we run the contract-only check on the V2 - detectors_results, _ = _checks_on_contract(detectors, v2_contract) + detectors_results, number_detectors = _checks_on_contract(detectors, v2_contract) json_results["detectors"] += detectors_results number_detectors_run += number_detectors diff --git a/tests/check-upgradeability/test_10.txt b/tests/check-upgradeability/test_10.txt index 1527735c5..3d317aca5 100644 --- a/tests/check-upgradeability/test_10.txt +++ b/tests/check-upgradeability/test_10.txt @@ -10,4 +10,4 @@ Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#missing- INFO:Slither: Initializable contract not found, the contract does not follow a standard initalization schema. Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#initializable-is-missing -INFO:Slither:4 findings, 18 detectors run +INFO:Slither:4 findings, 21 detectors run diff --git a/tests/check-upgradeability/test_2.txt b/tests/check-upgradeability/test_2.txt index 7641e8335..dcf910c00 100644 --- a/tests/check-upgradeability/test_2.txt +++ b/tests/check-upgradeability/test_2.txt @@ -4,4 +4,4 @@ Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#initiali INFO:Slither: Initializable contract not found, the contract does not follow a standard initalization schema. Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#initializable-is-missing -INFO:Slither:2 findings, 22 detectors run +INFO:Slither:2 findings, 25 detectors run diff --git a/tests/check-upgradeability/test_3.txt b/tests/check-upgradeability/test_3.txt index b3c7c0a15..fb694d5fb 100644 --- a/tests/check-upgradeability/test_3.txt +++ b/tests/check-upgradeability/test_3.txt @@ -20,4 +20,4 @@ Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#extra-va INFO:Slither: Initializable contract not found, the contract does not follow a standard initalization schema. Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#initializable-is-missing -INFO:Slither:6 findings, 22 detectors run +INFO:Slither:6 findings, 25 detectors run diff --git a/tests/check-upgradeability/test_4.txt b/tests/check-upgradeability/test_4.txt index 4e32dc904..4752eb706 100644 --- a/tests/check-upgradeability/test_4.txt +++ b/tests/check-upgradeability/test_4.txt @@ -17,4 +17,4 @@ Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#extra-va INFO:Slither: Initializable contract not found, the contract does not follow a standard initalization schema. Reference: https://github.com/crytic/slither/wiki/Upgradeability-Checks#initializable-is-missing -INFO:Slither:5 findings, 22 detectors run +INFO:Slither:5 findings, 25 detectors run