Filtering duplicated contracts dirs

This commit is contained in:
Richard Ramos 2018-07-24 12:05:42 -04:00
parent 21d65e8f8c
commit 98890beb46
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,6 @@ const path = require('path');
function compileSolcContract(logger, filename, allowedDirectories, callback) {
const command = `solc --optimize --combined-json abi,bin,bin-runtime,compact-format,hashes,interface,metadata --allow-paths ${allowedDirectories.join(',')} ${filename}`;
console.log(command);
shelljs.exec(command,
{silent: true}, (code, stdout, stderr) => {
@ -43,7 +42,8 @@ function compileSolc(embark, contractFiles, cb) {
logger.info("compiling solidity contracts with command line solc...");
const allowedDirectories = contractFiles.map((contractFile) => path.dirname(path.join(process.cwd(), contractFile.path)));
const allowedDirectories = contractFiles.map((contractFile) => path.dirname(path.join(process.cwd(), contractFile.path)))
.filter((x, i, a) => a.indexOf(x) == i);
let compiled_object = {};
async.each(contractFiles,