Skip to content

chore: optimize foundry config for gas and security#1

Open
lofingv wants to merge 1 commit intoOpenGradient:mainfrom
lofingv:foundry.toml
Open

chore: optimize foundry config for gas and security#1
lofingv wants to merge 1 commit intoOpenGradient:mainfrom
lofingv:foundry.toml

Conversation

@lofingv
Copy link

@lofingv lofingv commented Feb 4, 2026

Description

This PR improves the Foundry configuration to enhance security and optimize gas costs for end-users.

Changes:

  • Set ffi = false: Security hardening to prevent arbitrary shell command execution during tests.
  • Increased optimizer_runs to 10,000: Prioritizes lower runtime gas costs for bonding curve interactions (buying/selling shares).
  • Enabled via_ir = true: Uses the Yul IR pipeline for better bytecode optimization and to prevent "Stack too deep" issues.

Verified with forge build.

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.

1 participant