You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After much debugging trying to get the tenderly:verify function to work I've realized that these libraries are incompatible. I kept getting the error:
Error: There are multiple definitions of libraries the contract should use. One is defined in the verify request and the other as an compiler config override. Please remove one of them.
Due to these lines of code in util.js:
if (compiler.settings.libraries !== undefined && compiler.settings.libraries !== null) {
console.log(compiler.settings.libraries);
throw new Error(`There are multiple definitions of libraries the contract should use. One is defined in the verify request and the other as an compiler config override. Please remove one of them.`);
}
After logging the compiler.settings.libraries object I realized a cache buster was getting injected and causing this error to get thrown. Eventually I pinpointed it down to be a result of hardhat-preprocessor injecting this value.
Please consider rethinking how this is handled to avoid others from going down the same rabbit hole I had to 🙏
For context these are the relevant lines in hardhat-preprocessor index.js
Believe issue #126 is a duplicate of this. I also had this issue, and think it would be useful if this was fixed as foundry/hardhat hybrid repositories are somewhat common. My workaround was to duplicate the dependencies, and remap them in foundry so that they match hardhat (and remove hardhat-preprocessor).
After much debugging trying to get the
tenderly:verify
function to work I've realized that these libraries are incompatible. I kept getting the error:Error: There are multiple definitions of libraries the contract should use. One is defined in the verify request and the other as an compiler config override. Please remove one of them.
Due to these lines of code in util.js:
After logging the compiler.settings.libraries object I realized a cache buster was getting injected and causing this error to get thrown. Eventually I pinpointed it down to be a result of hardhat-preprocessor injecting this value.
Please consider rethinking how this is handled to avoid others from going down the same rabbit hole I had to 🙏
For context these are the relevant lines in hardhat-preprocessor index.js
The text was updated successfully, but these errors were encountered: