Skip to content

fix(config): validate optimizer_runs does not exceed u32::MAX#14354

Merged
zerosnacks merged 2 commits intofoundry-rs:masterfrom
FredPhilipy:optimizer-runs
Apr 17, 2026
Merged

fix(config): validate optimizer_runs does not exceed u32::MAX#14354
zerosnacks merged 2 commits intofoundry-rs:masterfrom
FredPhilipy:optimizer-runs

Conversation

@FredPhilipy
Copy link
Copy Markdown
Contributor

Added validation in config loading to reject optimizer_runs values exceeding u32::MAX. The Solidity compiler expects this parameter as u32, and the doc comment at line 271 already documents this limit. Now the config fails early with a clear error instead of causing undefined behavior at compile time.

Copy link
Copy Markdown
Collaborator

@figtracer figtracer left a comment

Choose a reason for hiding this comment

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

doesn't hurt to have this check i think

Copy link
Copy Markdown
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

@zerosnacks zerosnacks merged commit fda7a51 into foundry-rs:master Apr 17, 2026
16 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants