-
-
Notifications
You must be signed in to change notification settings - Fork 827
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: create_from_factory and create_copy_of #2895
Conversation
This pull request introduces 49 alerts when merging 60323b6 into 90e3d20 - view on LGTM.com new alerts:
|
create_copy_of is required since there isn't really an ergonomic way to get a bytestring with the bytecode of a contract (and even if there were, it would over-allocate memory)
f2972d0
to
c9ba77b
Compare
create_copy_of and create_with_code_of. delete raw create() function
c9ba77b
to
34b3112
Compare
add varargs flag to builtins fix abi encoder memory allocator issue
Codecov Report
@@ Coverage Diff @@
## master #2895 +/- ##
==========================================
- Coverage 88.05% 87.53% -0.53%
==========================================
Files 95 95
Lines 10442 10575 +133
Branches 2512 2532 +20
==========================================
+ Hits 9195 9257 +62
- Misses 790 848 +58
- Partials 457 470 +13
Continue to review full report at Codecov.
|
8faeed6
to
d31d593
Compare
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.
Overall looks pretty good
What I did
add
create_from_factory
andcreate_copy_of
builtinscreate_copy_of
copies the runtime code at the given addresscreate_from_factory
treats the code at given address as initcode, and tacks on the varargs so that the constructor interprets them as constructor arguments.create_forwarder_to
tocreate_minimal_proxy_to
(still allows the old name as a deprecated alias)fixes #1362, fixes #773, fixes #2893, fixes #2890, closes #2883
also added
_has_varargs
flag to SimpleBuiltinFunction. builtins now need a bit of refactoring, but saving that for a follow-up PR.open question: should we revert if extcodesize of the target contract is 0? thinking yesreverts if extcodesize of target contract is 0.How I did it
some mucking around with assembly
How to verify it
check tests
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture