pull/1388/head
Josselin Feist 2 years ago
parent bad83348b0
commit 104a4790e5
  1. 8
      slither/tools/upgradeability/__main__.py
  2. 2
      tests/check-upgradeability/test_10.txt
  3. 2
      tests/check-upgradeability/test_2.txt
  4. 2
      tests/check-upgradeability/test_3.txt
  5. 2
      tests/check-upgradeability/test_4.txt

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save