|
|
@ -46,7 +46,7 @@ Bob calls `kill` and destructs the contract.''' |
|
|
|
if func.is_constructor: |
|
|
|
if func.is_constructor: |
|
|
|
return False |
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
if func.visibility != 'public': |
|
|
|
if func.visibility not in ['public', 'external']: |
|
|
|
return False |
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
calls = [c.name for c in func.internal_calls] |
|
|
|
calls = [c.name for c in func.internal_calls] |
|
|
@ -60,7 +60,7 @@ Bob calls `kill` and destructs the contract.''' |
|
|
|
|
|
|
|
|
|
|
|
def detect_suicidal(self, contract): |
|
|
|
def detect_suicidal(self, contract): |
|
|
|
ret = [] |
|
|
|
ret = [] |
|
|
|
for f in [f for f in contract.functions if f.contract_declarer == contract]: |
|
|
|
for f in contract.functions_declared: |
|
|
|
if self.detect_suicidal_func(f): |
|
|
|
if self.detect_suicidal_func(f): |
|
|
|
ret.append(f) |
|
|
|
ret.append(f) |
|
|
|
return ret |
|
|
|
return ret |
|
|
|