Skip to content

Commit cd33357

Browse files
committed
Small fixes
1 parent 68eefca commit cd33357

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ There are already tools that allow you to debug Ethereum transactions (Solidity)
3939
* It compiles the provided source code and draws a control flow graph
4040
* From the provided transaction hash (using `debug_traceTransaction`) it gets the trace of the transaction
4141
* Combines the control flow graph with the execution trace, highlighting the executed instructions in red
42-
* Instructions opcodes can be clicked in the graph, and the Solidity source code in the left panel involving that instruction is highlighted. Also the EVM state is shown (stack, memory, storage)
42+
* Instructions opcodes can be clicked in the graph, and the Solidity source code in the left panel involving that instruction is highlighted.
43+
* For the selected opcode, The EVM state is shown (stack, memory, storage, gas, gasCost)
4344

4445
# Limitations
4546

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>net.nandgr.debugger</groupId>
88
<artifactId>ethereum-graph-debugger</artifactId>
9-
<version>0.0.2-SNAPSHOT</version>
9+
<version>0.0.4-SNAPSHOT</version>
1010

1111
<properties>
1212
<java.version>1.8</java.version>

src/main/resources/template/graph_template.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
memoryElement.innerHTML = "";
196196
var storageElement = document.getElementById("storage");
197197
storageElement.innerHTML = "";
198+
var gasDiv = document.getElementById("gas");
199+
200+
gasDiv.innerHTML = "";
198201

199202
if(trace == undefined) {
200203
stackElement.innerHTML = "Only executed instructions will show stack";
@@ -205,7 +208,6 @@
205208

206209
var gas = trace.gas;
207210
var gasCost = trace.gasCost;
208-
var gasDiv = document.getElementById("gas");
209211
gasDiv.innerHTML = "gas: " + gas + " - gasCost: " + gasCost;
210212

211213
var stack = trace.stack;
@@ -270,6 +272,7 @@
270272
editor.session.setMode("ace/mode/javascript");
271273
editor.session.setOptions({useSoftTabs: false });
272274
editor.getSession().setUseWorker(false);
275+
editor.resize(true);
273276

274277
function editorSelect(begin, end) {
275278
var s = begin;
@@ -309,7 +312,7 @@
309312
}
310313
}
311314
var range = new Range(startRow, startCol, endRow, endCol);
312-
315+
editor.gotoLine(startRow, 0, true);
313316
editor.session.selection.setSelectionRange(range, false);
314317

315318
}

0 commit comments

Comments
 (0)