-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Add revert if the bytecode length is zero #2117
Add revert if the bytecode length is zero #2117
Conversation
7a77eb2
to
35b1fbb
Compare
35b1fbb
to
16fd2e0
Compare
Thanks a lot for contributing @corydickson! I'd change the revert reason to bring it more in-line with our other ones, which describe what went wrong instead of what should've happened. In this case, it'd be something like 'empty bytecode'. |
@nventuro Thank you for the swift reply, I'll be sure to update the error message once we have clarity on the additional changes. I can also just push this along as is if there is a timeline for the next release you're trying to stick to :) |
Add tests for contract balance revert and depositing funds
Left a comment about an issue I'm having with ensuring the library contract has a sufficient balance to complete the transaction if it receives some ETH from another account beforehand. It seems as though making the
|
Not sure on how to go about implementing a fallback function |
I also tried an approach by making a new function in the mock contract called In the mock contract we would then have |
This change seems rather straightforward but still think I'm missing something 😭 |
Thanks for working on this @corydickson! I've now fixed the tests :) There were two issues that needed to be addressed:
I also took the liberty to slightly improve documentation and revert reasons. Let me know what you think! |
Thanks for taking care of that, looks good on my end! |
Fixes #2106
This adds a revert and a corresponding message if the bytecode provided to the create2
deploy
functionhas zero length
Would like to also address the second part discussed in the issue pertaining to the value. Let me know if I've identified the correct way to pursue that solution.