Update compiler.js
This commit is contained in:
parent
f2e4333d1e
commit
867b7a16fc
|
@ -14,18 +14,11 @@ Compiler.prototype.init = function(env) {
|
|||
|
||||
Compiler.prototype.compile_solidity = function(contractFiles) {
|
||||
console.log(contractFiles.length);
|
||||
var source = '{ \n';
|
||||
var sources = {}
|
||||
|
||||
for (var i = 0; i < contractFiles.length; i++){
|
||||
source += '\'' + contractFiles[i] + '\': \''
|
||||
var file = fs.readFileSync(contractFiles[i]).toString();
|
||||
|
||||
source += file + '\'\n';
|
||||
|
||||
if (i < contractFiles.length - 1) source += ', \n'
|
||||
sources[contractFiles[i]] = fs.readFileSync(contractFiles[i]).toString();
|
||||
}
|
||||
source += '\n}';
|
||||
|
||||
|
||||
|
||||
var output = solc.compile(source, 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue