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
I have a set of smart contracts that use npm package for some contract dependencies. One of the smart contracts in the npm package is failing the optimizer, therefore if I want to have optimizer enabled for my contracts, I have to somehow disable optimizer for failing contracts (because fails on optimizer revert the whole compilation).
I created a very simplistic repo showcasing the error, there I put exact setup that I face, I import the contract that does not suffer from optimization failures from the package that contains a contract that does fail. The result is that the whole optimization (and therefore compilation) step is failing, even thought I don't import the failing contract directly.
I try to use solidity.overrides to disable optimizer for the problematic contract, but it does not seem to produce any effect, the compilation still fails.
Like I said this does not produce any effect, even in logs with --verbose it shows that it does not use compiler from overrides.
hardhat:core:compilation-job File '/home/keyg/tmp/hardhat-overrides-bug/node_modules/@entangle_protocol/oracle-sdk/contracts/EndPoint.sol' will be compiled with version '0.8.28'
YulException: Cannot swap Variable expr_1156_offset with Variable _3: too deep in the stack by 1 slots in [ value_5 var_transmitterSigs_length RET var_transmitterSigs_offset expr_1156_offset var_opData_offset value_3 value_2 value _2 _1 value_2 value_1 value var_opData_offset value_3 value_5 value_4 expr_1158_length expr_1158_offset expr_length _3 ]
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.
--> @entangle_protocol/oracle-sdk/contracts/EndPoint.sol:404:17:
|
404 | opData.params,
| ^^^^^^^^^^^^^
Error HH600: Compilation failed
For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces
error Command failed with exit code 1.
Search terms
No response
The text was updated successfully, but these errors were encountered:
theonekeyg
changed the title
Unable to specify compiler options for contracts in node_modules
Unable to override compiler options for contracts in node_modules
Dec 27, 2024
Version of Hardhat
1.22.17
What happened?
I have a set of smart contracts that use npm package for some contract dependencies. One of the smart contracts in the npm package is failing the optimizer, therefore if I want to have optimizer enabled for my contracts, I have to somehow disable optimizer for failing contracts (because fails on optimizer revert the whole compilation).
I created a very simplistic repo showcasing the error, there I put exact setup that I face, I import the contract that does not suffer from optimization failures from the package that contains a contract that does fail. The result is that the whole optimization (and therefore compilation) step is failing, even thought I don't import the failing contract directly.
I try to use
solidity.overrides
to disable optimizer for the problematic contract, but it does not seem to produce any effect, the compilation still fails.Here's my hardhat.config.ts
Like I said this does not produce any effect, even in logs with
--verbose
it shows that it does not use compiler from overrides.Minimal reproduction steps
Clone the repo https://github.com/theonekeyg/hardhat-overrides-bug and run:
yarn install
yarn hardhat compile
Search terms
No response
The text was updated successfully, but these errors were encountered: