Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
TruffleContractCompiler.compile( compilerOpts, function(err, contracts){
var migrationOpts = {}
migrationOpts.migrations_directory = buildOpts.migrations_directory
migrationOpts.contracts_build_directory = dirPath
migrationOpts.provider = provisionOpts.provider
migrationOpts.network = compilerOpts.network
migrationOpts.network_id = compilerOpts.network_id
migrationOpts.logger = Logger
TruffleContractMigrator.run( migrationOpts, function( err, result ) {
if(err) {
Logger.error(err);
return compilationFinished(err, null);
}
fs.readFile( path.resolve(dirPath, contractFileName+'.js'), 'utf8', function(err, solJsFile) {
if(err) {
Logger.error(err);
return compilationFinished(err, null);
}
compilationFinished(err, solJsFile)
})
})
})
}