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
fix(precompile): Proper handling of fallback
and receive
functions in common precompile
#2064
fix(precompile): Proper handling of fallback
and receive
functions in common precompile
#2064
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2064 +/- ##
==========================================
- Coverage 70.16% 70.06% -0.11%
==========================================
Files 340 340
Lines 25455 25492 +37
==========================================
Hits 17861 17861
- Misses 6676 6713 +37
Partials 918 918
|
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.
Left comments. It's hard to follow the cases and the implementation can be cleaned up.
We also need to write tests for each of the cases
…eive-handling' into Vvaradinov/detailed-fallback-receive-handling
Description
After a few more integration tests and the discussion with @VictorTrustyDev here - #2061 the original solution to handling
receive
andfallback
methods was very naive. This PR aims to fix that by taking into consideration all possible cases possible while maintaining a nice solution that plays well with all past and potential future precompiles that may need to define any of the 2 functions. Some notes on the implementation:HasFallback
andHasReceive
. This is why this solution is future proof and backwards compatible with our existing precompiles as they do not define any of these functions in their ABI so the logic will be skipped.payable
if we decide that we might be mixing these in the future with nonpayable
additional cases must be created CC @fedekunzeThanks again @VictorTrustyDev for flagging this.
Closes #XXX