File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
slither/tools/upgradeability/checks Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
import logging
2
2
3
+ from slither .core .declarations import Function
3
4
from slither .slithir .operations import InternalCall
4
5
from slither .tools .upgradeability .checks .abstract_checks import (
5
6
AbstractCheck ,
13
14
class MultipleInitTarget (Exception ):
14
15
pass
15
16
17
+ def _has_initiliaze_modifier (function : Function ):
18
+ if not function .modifiers :
19
+ return False
20
+ return any ((m .name == "initializer" ) for m in function .modifiers )
21
+
16
22
17
23
def _get_initialize_functions (contract ):
18
- return [f for f in contract .functions if f .name == "initialize" and f .is_implemented ]
24
+ return [f for f in contract .functions if ( f .name == "initialize" or _has_initiliaze_modifier ( f )) and f .is_implemented ]
19
25
20
26
21
27
def _get_all_internal_calls (function ):
You can’t perform that action at this time.
0 commit comments