'interface' is a reserved JS keyword

pull/1/head
Alex Beregszaszi 9 years ago
parent b99493ba0b
commit 1eca2fa112
  1. 10
      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) {

Loading…
Cancel
Save