diff --git a/lib/contracts/deploy.js b/lib/contracts/deploy.js index c9ea7ada..67dec724 100644 --- a/lib/contracts/deploy.js +++ b/lib/contracts/deploy.js @@ -109,6 +109,9 @@ class Deploy { deployedAddress = deployedAddress.substr(2); } let linkReference = '__' + filename + ":" + contractObj.className; + if (contractCode.indexOf(linkReference) < 0) { + continue; + } let toReplace = linkReference + "_".repeat(40 - linkReference.length); contractCode = contractCode.replace(new RegExp(toReplace, "g"), deployedAddress); }