Commit 1eca2fa1 authored by Alex Beregszaszi's avatar Alex Beregszaszi

'interface' is a reserved JS keyword

parent b99493ba
...@@ -860,15 +860,15 @@ var run = function() { ...@@ -860,15 +860,15 @@ var run = function() {
} }
}; };
var gethDeploy = function(contractName, interface, bytecode){ var gethDeploy = function(contractName, jsonInterface, bytecode){
var code = ""; var code = "";
var funABI = getConstructorInterface($.parseJSON(interface)); var funABI = getConstructorInterface($.parseJSON(jsonInterface));
$.each(funABI.inputs, function(i, inp) { $.each(funABI.inputs, function(i, inp) {
code += "var " + inp.name + " = /* var of type " + inp.type + " here */ ;\n"; 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("; +"\nvar " + contractName + " = " + contractName + "Contract.new(";
$.each(funABI.inputs, function(i, inp) { $.each(funABI.inputs, function(i, inp) {
...@@ -890,8 +890,8 @@ var run = function() { ...@@ -890,8 +890,8 @@ var run = function() {
return code; return code;
}; };
var combined = function(contractName, interface, bytecode){ var combined = function(contractName, jsonInterface, bytecode){
return JSON.stringify([{name: contractName, interface: interface, bytecode: bytecode}]); return JSON.stringify([{name: contractName, interface: jsonInterface, bytecode: bytecode}]);
}; };
var renderContracts = function(data, source) { var renderContracts = function(data, source) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment