⚡Optimize Create3 Lib#6564
Conversation
|
WalkthroughThis PR optimizes the CREATE3 proxy initialization bytecode by updating the Possibly related PRs
🚥 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)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@contracts/utils/Create3.sol`:
- Around line 45-46: Update the success-path annotations for the JUMPDEST at
0x12 in Create3.sol: change the stack/memory state to reflect that after a
successful JUMPI both operands were popped (stack empty at 0x12) and that a
successful CREATE does not leave returndata to reference; replace the current
revert-path stack/returndata notes with an empty-stack annotation and remove any
returndata reference for the success path so the comment accurately matches the
success flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 54a6f7a6-f0e4-4e27-84d8-b76d79b2b836
📒 Files selected for processing (3)
.changeset/whole-trains-sin.mdcontracts/utils/Create3.soltest/utils/Create3.test.js
|
@Amxx Request for review. |
|
Because this PR changes the helper code (which is deployed using create2), it changes the create3 target address and is therefore not backward compatible. This is fine (as of today) because the Create3 library was never released. We should not do this change after 5.7 |
|
@Amxx Thanks for considering my |

Reduce bytecode size by 1 byte by removing the
RETURNopcode from the successful deployment path.If
CREATEsucceeds, the initcode has already returned the runtime bytecode, which the EVM copies into the newly created contract's code storage. Nothing is returned to the caller's returndata buffer, so an additionalRETURNis unnecessary.Cheaper 16 gas for successful deployment and 3 gas for revert path.
PR Checklist
npx changeset add)