update foundry.toml with configuration settings to fix forge build is…#53
Conversation
…sue with newer solc versions
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdated Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey @yogesh0509 can you review this? |
|
Is there any benefit to hardcode the evm version to "london"? |
|
@yogesh0509 No, |
|
Hey @Zahnentferner, as @yogesh0509 has approved the changes, you can merge this PR. |
Addressed Issues:
Fixes #52
Screen shots:
Additional Notes:
The build fails on recent Foundry versions (tested on v1.6.0-rc1) because the HebeSwap submodule (
lib/hebeswap-contract) pinspragma solidity 0.8.13;, forcing Foundry's auto-detected Solc to 0.8.13. This version cannot handle the deep inline assembly insrc/test/utils/Console.sol(5,204 lines), resulting in aStack too deeperror.Changes (4 lines added to
foundry.toml):via_ir = true: Switches to the Yul IR compilation pipeline, which has a smarter stack allocator that spills variables to memory when the stack exceeds 16 slots.optimizer = true+optimizer_runs = 200: Required alongsidevia_irfor the Yul codegen to perform stack-to-memory moves.evm_version = 'london': Ensures bytecode compatibility with target chains (Milkomeda C1, ETC) that don't support post-London opcodes likePUSH0.No Solidity source files, submodules, or tests were modified. The
foundry.lockfile was also added to lock submodule dependency versions for reproducible builds.Checklist
I have used Github Copilot to discuss and understand the scope of the issue and it's fix.
Summary by CodeRabbit