Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
temp.mkdir('webpack-truffle', function(err, dirPath){
if(!err) {
var compilerOpts = {};
compilerOpts.contracts_directory = contractPath
compilerOpts.contracts_build_directory = dirPath
compilerOpts.network = buildOpts.network
compilerOpts.network_id = buildOpts.network_id
compilerOpts.logger = Logger
var provisionOpts = {}
provisionOpts.provider = new Web3.providers.HttpProvider(buildOpts.web3_rpc_uri)
provisionOpts.contracts_build_directory = dirPath
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) {