-
Notifications
You must be signed in to change notification settings - Fork 3
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
#28 - Ensure _execute and _tryExecute Functions Correctly Handle Calls to EOAs #128
Conversation
Changes to gas cost
🧾 Summary (5% most significant diffs)
Full diff report 👇
|
refactor: Improve error handling in ExecutionHelper contract
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
🤖 Slither Analysis Report 🔎Slither report
# Slither report
_This comment was automatically generated by the GitHub Actions workflow._
THIS CHECKLIST IS NOT COMPLETE. Use
constable-statesImpact: Optimization
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## remediations/cantina-spearbit #128 +/- ##
=================================================================
- Coverage 72.54% 71.68% -0.87%
=================================================================
Files 13 13
Lines 663 671 +8
Branches 151 154 +3
=================================================================
Hits 481 481
- Misses 182 190 +8
Continue to review full report in Codecov by Sentry.
|
mstore(result, 0) // Set result length to 0 | ||
mstore(0x40, add(result, 0x20)) // Update free memory pointer | ||
} | ||
if iszero(success) { |
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.
success would already be 0 if it doesn't go to previous block.
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.
then it will still do this for EOA
success := call(gas(), target, value, result, callData.length, codesize(), 0x00)
I notice in case of eoa you're just doing this mstore(result, 0) // Set result length to 0 but the other code following can still be executed. Can you bring auditers attention to this comment again please? a. Assume all calls to EOA invalid / unsuccessfull Ensure it returns in such cases and does not go to other control paths. Write appropriate tests for it |
inclined to close this. |
Updated _execute and _tryExecute functions to include an extcodesize check, ensuring calls to EOAs are not incorrectly marked as successful. This change aligns the behavior of low-level calls with Solidity's expectations