- node.high_level_call: support call to this
Changed:
 - use 'contracts.dot' as default name for printers exporting a dot file
pull/179/head
Josselin 6 years ago
parent 3dbe807aad
commit fe6789bdc5
  1. 2
      slither/core/cfg/node.py
  2. 3
      slither/printers/call/call_graph.py
  3. 2
      slither/printers/inheritance/inheritance_graph.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):

@ -142,6 +142,9 @@ class PrinterCallGraph(AbstractPrinter):
Args:
filename(string)
"""
if not filename:
filename = "contracts.dot"
if not filename.endswith('.dot'):
filename += '.dot'

@ -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

Loading…
Cancel
Save