error when the contract being attempted to deploy is not found

pull/7/head
Iuri Matias 7 years ago
parent d78bcebc3b
commit e3865ee27a
  1. 4
      src/deployer.js

@ -55,6 +55,10 @@ function deployAll (compileResult, web3, callback) {
function deployContracts (contractsToDeploy, next) { function deployContracts (contractsToDeploy, next) {
async.eachOfLimit(contractsToDeploy, 1, function (contractName, index, nextEach) { async.eachOfLimit(contractsToDeploy, 1, function (contractName, index, nextEach) {
let contract = compiledObject[contractName] 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 contractObject = new web3.eth.Contract(contract.abi)
let contractCode = '0x' + contract.code let contractCode = '0x' + contract.code

Loading…
Cancel
Save