Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(() => {
if (compiledContractExists(contractJsonPath)) {
isCompilingContracts = false;
returnContractAsSource(contractJsonPath, callback);
} else {
waitForContractCompilation();
}
}, 500);
}
if (isCompilingContracts) {
// Logger.debug(`Currently compiling = ${this.resourcePath}`)
waitForContractCompilation();
} else {
isCompilingContracts = true;
truffleMigrator.run(buildOpts, err => {
isCompilingContracts = false;
if (err) {
return callback(err);
} else {
return returnContractAsSource(contractJsonPath, callback);
}
});
}
};