diff --git a/lib/compiler.js b/lib/compiler.js index 5913ca631..7a98aac14 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -69,6 +69,14 @@ Compiler.prototype.compile_serpent = function(contractFile) { json = JSON.parse(result.output.trim()); className = contractFile.split('.')[0].split("/").pop(); + for (var i=0; i < json.length; i++) { + var elem = json[i]; + + if (elem.outputs.length > 0) { + elem.constant = true; + } + } + compiled_object = {} compiled_object[className] = {}; compiled_object[className].code = code.trim();