Skip to content

viaIR-mode does not inline internal solidity libraries #790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SevenSwen opened this issue Mar 28, 2023 · 1 comment
Closed

viaIR-mode does not inline internal solidity libraries #790

SevenSwen opened this issue Mar 28, 2023 · 1 comment

Comments

@SevenSwen
Copy link

Version of Hardhat
2.13.0

What happened?
Solidity-coverage has broken inliner optimization.
When I run coverage with optimizerSteps:

"dhfoDgvlfnTUtnIf" +
"[" +
"xa[r]EscLM" +
"cCTUtTOntnfDIl" +
"Lcl" +
"Vcl [j]" +
"Tpel" +
"xa[rl]" +
"xa[r]cL" +
"gvif" +
"CTUca[r]LSsTFOtfDnca[r]Ilc"
"]" +
"jml[jl] VcTOcl jml",
(default settings without u instrumentation in all steps) than all tests will be finished success. But If I remove "gvif" step (inliner optimization) then I will have error:
NomicLabsHardhatPluginError: The contract <contract_name> is missing links for the following libraries: @openzeppelin/contracts/utils/math/Math.sol:Math
Repo/branch:
https://github.com/1inch/farming/tree/feature/enable_viaIR

Same my issue into ethereum/solidity#14055

Minimal reproduction steps
clone repo
yarn
yarn coverage
Search terms
viaIR, inliner, link library

@SevenSwen SevenSwen changed the title viaIR-mode does not inline insided solidity libraries viaIR-mode does not inline internal solidity libraries Apr 11, 2023
@cgewecke cgewecke added the viaIR label Feb 4, 2024
@cgewecke
Copy link
Member

This should be fixed in v0.8.7 - viaIR is natively supported and no special config is required.

If you're still running into issues with this please report them to #861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants