Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly committed Sep 29, 2022
1 parent bad8334 commit 104a479
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions slither/tools/upgradeability/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/check-upgradeability/test_10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/check-upgradeability/test_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/check-upgradeability/test_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/check-upgradeability/test_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 104a479

Please sign in to comment.