error when the contract being attempted to deploy is not found

pull/3094/head
Iuri Matias 7 years ago
parent 12b36e4000
commit 4ced2fbfc9
  1. 4
      src/deployer.js

@ -55,6 +55,10 @@ function deployAll (compileResult, web3, callback) {
function deployContracts (contractsToDeploy, next) {
async.eachOfLimit(contractsToDeploy, 1, function (contractName, index, nextEach) {
let contract = compiledObject[contractName]
if (!contract) {
console.error("Contract not found: " + contractName);
return nextEach(new Error("Contract not found: " + contractName));
}
let contractObject = new web3.eth.Contract(contract.abi)
let contractCode = '0x' + contract.code

Loading…
Cancel
Save