diff --git a/index.html b/index.html
index 1a951a6e82..72e85071cb 100644
--- a/index.html
+++ b/index.html
@@ -56,7 +56,7 @@ body {
Source code on the left, compiled code and AST on the right (or error). Note: Chrome/Chromium currently reports "Uncaught JavaScript Exception".
To work around this problem, enable the debug console (Ctrl+Shift+i) and reload.
-Version: dea8d55f... 2015-05-18
+Version: 481e1f... 2015-06-01
@@ -197,12 +197,27 @@ var getDetails = function(contract, source) {
funHashes += contract.functionHashes[fun] + ' ' + fun + '\n';
details.append($('Functions'));
details.append($('').text(funHashes));
+ details.append($('Gas Estimates'));
+ details.append($('').text(formatGasEstimates(contract.gasEstimates)));
details.append($('Assembly'));
var assembly = $('').text(formatAssemblyText(contract.assembly, '', source));
details.append(assembly);
button.click(function() { details.toggle(); });
return $('').append(button).append(details);
};
+var formatGasEstimates = function(data) {
+ var gasToText = function(g) { return g === null ? 'unknown' : g; }
+ var text = '';
+ if ('creation' in data)
+ text += 'Creation: ' + gasToText(data.creation[0]) + ' + ' + gasToText(data.creation[1]) + '\n';
+ text += 'External:\n';
+ for (var fun in data.external)
+ text += ' ' + fun + ': ' + gasToText(data.external[fun]) + '\n';
+ text += 'Internal:\n';
+ for (var fun in data.internal)
+ text += ' ' + fun + ': ' + gasToText(data.external[fun]) + '\n';
+ return text;
+};
var formatAssemblyText = function(asm, prefix, source) {
var text = '';
text += prefix + '.code\n';