Skip to content

Conversation

@MarcBickel
Copy link

@MarcBickel MarcBickel commented May 2, 2025

What I did

fixes: Compilation arguments not being precise enough for optimizer

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@MarcBickel MarcBickel changed the title Add support for optimizer compiler args feat: Add support for optimizer compiler args May 2, 2025
@MarcBickel
Copy link
Author

I am not sure on how to actually test this properly, I would love some help for writing them.

@fubuloubu
Copy link
Member

I am not sure on how to actually test this properly, I would love some help for writing them.

There is a temporary config method @antazoey introduced so you can modify config for testing

"""Yul optimization and steps are not supported for this version of solc
(Need >= 0.8.22)."""
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this likely needs some changes up here https://github.com/ApeWorX/ape-solidity/pull/162/files#diff-de61acbec749a43c9ae1590d091b2924af42588fa689b9cef657a9e02f39e016R359

Maybe move it here to be:

Suggested change
else:
version_settings["optimzer"].update({"enabled": config.optimize, "runs": config.optimization_runs})

(Also remove the setting above it and change the type hint for version_settings to just dict

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants