Skip to content

Commit c943078

Browse files
committed
Added gas and gas costs
1 parent d74909e commit c943078

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/resources/template/graph_template.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<style>
1313
h4 {
1414
margin: 1px;
15+
font-family: Courier;
1516
}
1617
#parent {
1718
position:absolute;
@@ -202,6 +203,11 @@
202203
return;
203204
}
204205

206+
var gas = trace.gas;
207+
var gasCost = trace.gasCost;
208+
var gasDiv = document.getElementById("gas");
209+
gasDiv.innerHTML = "gas: " + gas + " - gasCost: " + gasCost;
210+
205211
var stack = trace.stack;
206212
var stackTable = document.createElement("table");
207213
for(var i = stack.length-1; i >= 0; i--) {
@@ -316,6 +322,7 @@ <h4>Source: $fileName - Tx Hash: $txHash</h4>
316322
<div id="editor">
317323
<div id="aceEditor">$source</div>
318324
<div id="statemachine">
325+
<div id="gas"></div>
319326
<h3>Stack</h3>
320327
<div id="stack"></div>
321328
<h3>Memory</h3>

0 commit comments

Comments
 (0)