Commit e3865ee2 authored by Iuri Matias's avatar Iuri Matias

error when the contract being attempted to deploy is not found

parent d78bcebc
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment