diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 7b15937e7..855871684 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -685,6 +685,8 @@ class Node(SourceMapping, ChildFunction): elif isinstance(ir, (HighLevelCall)) and not isinstance(ir, LibraryCall): if isinstance(ir.destination.type, Contract): self._high_level_calls.append((ir.destination.type, ir.function)) + elif ir.destination == SolidityVariable('this'): + self._high_level_calls.append((self.function.contract, ir.function)) else: self._high_level_calls.append((ir.destination.type.type, ir.function)) elif isinstance(ir, LibraryCall): diff --git a/slither/printers/call/call_graph.py b/slither/printers/call/call_graph.py index a68b7de49..ed5efdfae 100644 --- a/slither/printers/call/call_graph.py +++ b/slither/printers/call/call_graph.py @@ -142,6 +142,9 @@ class PrinterCallGraph(AbstractPrinter): Args: filename(string) """ + if not filename: + filename = "contracts.dot" + if not filename.endswith('.dot'): filename += '.dot' diff --git a/slither/printers/inheritance/inheritance_graph.py b/slither/printers/inheritance/inheritance_graph.py index 9897db4b2..468969002 100644 --- a/slither/printers/inheritance/inheritance_graph.py +++ b/slither/printers/inheritance/inheritance_graph.py @@ -171,7 +171,7 @@ class PrinterInheritanceGraph(AbstractPrinter): filename(string) """ if filename == '': - filename = 'export' + filename = 'contracts.dot' if not filename.endswith('.dot'): filename += ".dot" info = 'Inheritance Graph: ' + filename