From 1eca2fa112391610db373f70ee078a2836f9a178 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 24 May 2016 18:49:25 +0100 Subject: [PATCH] 'interface' is a reserved JS keyword --- src/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app.js b/src/app.js index 8f5b4ec764..3608a528ff 100644 --- a/src/app.js +++ b/src/app.js @@ -860,15 +860,15 @@ var run = function() { } }; - var gethDeploy = function(contractName, interface, bytecode){ + var gethDeploy = function(contractName, jsonInterface, bytecode){ var code = ""; - var funABI = getConstructorInterface($.parseJSON(interface)); + var funABI = getConstructorInterface($.parseJSON(jsonInterface)); $.each(funABI.inputs, function(i, inp) { code += "var " + inp.name + " = /* var of type " + inp.type + " here */ ;\n"; }); - code += "var " + contractName + "Contract = web3.eth.contract(" + interface.replace("\n","") + ");" + code += "var " + contractName + "Contract = web3.eth.contract(" + jsonInterface.replace("\n","") + ");" +"\nvar " + contractName + " = " + contractName + "Contract.new("; $.each(funABI.inputs, function(i, inp) { @@ -890,8 +890,8 @@ var run = function() { return code; }; - var combined = function(contractName, interface, bytecode){ - return JSON.stringify([{name: contractName, interface: interface, bytecode: bytecode}]); + var combined = function(contractName, jsonInterface, bytecode){ + return JSON.stringify([{name: contractName, interface: jsonInterface, bytecode: bytecode}]); }; var renderContracts = function(data, source) {