diff --git a/slitherin/detectors/unprotected_initialize.py b/slitherin/detectors/unprotected_initialize.py index 4adcd69..17ce112 100644 --- a/slitherin/detectors/unprotected_initialize.py +++ b/slitherin/detectors/unprotected_initialize.py @@ -30,7 +30,11 @@ def _is_initialize(self, fun: Function) -> bool: def _has_modifiers(self, fun: Function) -> bool: """Checks if function has modifier protection""" for modifier in fun.modifiers: - if str(modifier) == "onlyOwner" or str(modifier) == "initializer": + if str(modifier).startswith("only") or str(modifier) in [ + "initializer", + "onlyInitializing", + "reinitializer", + ]: return True return False @@ -43,7 +47,7 @@ def _has_require(self, fun: Function) -> bool: if str(variable.type) == "address": return True return False - + def _has_if_with_reverts(self, fun: Function) -> bool: for node in fun.nodes: if node.contains_if():