Skip to content

Commit

Permalink
Merge pull request #2613 from crytic/DanielVF-horizontal-call-graph
Browse files Browse the repository at this point in the history
PR 2603 improvements
  • Loading branch information
montyly authored Dec 6, 2024
2 parents bcd0f83 + ce496c7 commit c6d56e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion slither/printers/call/call_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def output(self, filename: str) -> Output:
}
content = "\n".join(
["strict digraph {"]
+ ['rankdir="LR"']
+ ["node [shape=box]"]
+ [_process_functions(list(all_functions_as_dict.values()))]
+ ["}"]
)
Expand All @@ -268,7 +270,11 @@ def output(self, filename: str) -> Output:
with open(derived_output_filename, "w", encoding="utf8") as f:
info += f"Call Graph: {derived_output_filename}\n"
content = "\n".join(
["strict digraph {"] + [_process_functions(derived_contract.functions)] + ["}"]
["strict digraph {"]
+ ['rankdir="LR"']
+ ["node [shape=box]"]
+ [_process_functions(derived_contract.functions)]
+ ["}"]
)
f.write(content)
results.append((derived_output_filename, content))
Expand Down

0 comments on commit c6d56e8

Please sign in to comment.