diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index 384ecf7a..73f14456 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -209,6 +209,9 @@ class ContractDeployer { if (linkReference.length > 40) { return next(new Error(__("{{linkReference}} is too long, try reducing the path of the contract ({{filename}}) and/or its name {{contractName}}", {linkReference: linkReference, filename: filename, contractName: contractObj.className}))); } + if (contractCode.indexOf(linkReference) < 0) { + continue; + } let toReplace = linkReference + "_".repeat(40 - linkReference.length); if (deployedAddress === undefined) { let libraryName = contractObj.className;