-
-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deterministic proxies with CREATE2 and EIP1167 #2460
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2460 +/- ##
==========================================
- Coverage 84.67% 84.66% -0.02%
==========================================
Files 94 94
Lines 9438 9446 +8
Branches 2206 2208 +2
==========================================
+ Hits 7992 7997 +5
- Misses 937 939 +2
- Partials 509 510 +1
Continue to review full report at Codecov.
|
Nice work and neat PR. Is there a corresponding issue that this closes? Also I think this can be done without the is_deterministic flag. You can just look for the presence of the |
True, I started off without the And hmm, technically it's related to issue #649, but since this is embedded in Edit: ah actually I could just annotate that it's deterministic during the annotation phase ... |
I think you can just check in the AST whether the keyword is set at all. Not sure if you can do it in the implementation of CreateForwarderTo itself |
Yeah I think in build_LLL you can just check |
Closes #649 |
stolen from charles, booleans affecting control flow, better to name them `should_*`
🔥 🔥 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sick!
What I did
Extended the
create_forwarder_to
built-in by adding functionality to deploy minimal proxies using theCREATE2
opcode.The following is now possible:
The deployment address of the proxy can be determined with the following:
where
bytecode
is equal to:How I did it
Modified the built-in to accept and handle new keyword
salt
.How to verify it
Check the new tests added. A set of tests verifying syntax, and a test verifying runtime execution.
Description for the changelog
Added support for deterministic deployment of minimal proxies using CREATE2
Cute Animal Picture