From 68886d70953cf40640ceb2a1494d36e3ffbe0e7c Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 15 Dec 2017 16:39:13 -0500 Subject: [PATCH] add error for reference issues --- lib/contracts/deploy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/contracts/deploy.js b/lib/contracts/deploy.js index dfb6bf24..bb001314 100644 --- a/lib/contracts/deploy.js +++ b/lib/contracts/deploy.js @@ -115,6 +115,9 @@ class Deploy { deployedAddress = deployedAddress.substr(2); } let linkReference = '__' + filename + ":" + contractObj.className; + if (linkReference.length > 40) { + return callback(new Error(linkReference + " is too long, try reducing the path of the contract (" + filename + ") and/or its name " + contractObj.className)); + } let toReplace = linkReference + "_".repeat(40 - linkReference.length); if (contractCode.indexOf(linkReference) >= 0 && deployedAddress === undefined) { let libraryName = contractObj.className;