From 92ced37b30b8e7182cd35851fad7f45b08d9c377 Mon Sep 17 00:00:00 2001 From: Josselin Date: Fri, 26 Apr 2019 19:30:18 +0100 Subject: [PATCH] Fix contract.all_functions_called --- slither/core/declarations/contract.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index 9ef2e88bf..8a022ef86 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -520,8 +520,9 @@ class Contract(ChildSlither, SourceMapping): ''' list(Function): List of functions reachable from the contract (include super) ''' - all_calls = [f.all_internal_calls() for f in self.functions + self.modifiers] + [self.functions + self.modifiers] - all_calls = [item for sublist in all_calls for item in sublist] + self.functions + all_calls = [f for f in self.functions + self.modifiers if not f.is_shadowed] + all_calls = [f.all_internal_calls() for f in all_calls] + [all_calls] + all_calls = [item for sublist in all_calls for item in sublist] all_calls = list(set(all_calls)) all_constructors = [c.constructor for c in self.inheritance]