From 16242116f28a014c222a3e876355f2a54f6b5646 Mon Sep 17 00:00:00 2001 From: Josh Asplund Date: Wed, 23 May 2018 18:53:45 -0500 Subject: [PATCH] Moves graph to callgraph --- mythril/analysis/callgraph.py | 6 +++--- mythril/analysis/templates/{graph.html => callgraph.html} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename mythril/analysis/templates/{graph.html => callgraph.html} (100%) diff --git a/mythril/analysis/callgraph.py b/mythril/analysis/callgraph.py index 2b1e922b..1817d674 100644 --- a/mythril/analysis/callgraph.py +++ b/mythril/analysis/callgraph.py @@ -105,8 +105,8 @@ def extract_nodes(statespace, color_map): code_line = re.sub("([0-9a-f]{8})[0-9a-f]+", lambda m: m.group(1) + "(...)", code_line) code_split.append(code_line) - truncated_code = '\n'.join(code_split) if (len(code_split) < 7) else '\n'.join( - code_split[:6]) + "\n(click to expand +)" + truncated_code = '\n'.join(code_split) if (len(code_split) < 7) \ + else '\n'.join(code_split[:6]) + "\n(click to expand +)" nodes.append({ 'id': str(node_key), @@ -145,7 +145,7 @@ def extract_edges(statespace): def generate_graph(statespace, title="Mythril / Ethereum LASER Symbolic VM", physics=False, phrackify=False): env = Environment(loader=PackageLoader('mythril.analysis'), autoescape=select_autoescape(['html', 'xml'])) - template = env.get_template('graph.html') + template = env.get_template('callgraph.html') graph_opts = default_opts accounts = statespace.accounts diff --git a/mythril/analysis/templates/graph.html b/mythril/analysis/templates/callgraph.html similarity index 100% rename from mythril/analysis/templates/graph.html rename to mythril/analysis/templates/callgraph.html