-
Notifications
You must be signed in to change notification settings - Fork 56
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: remove nonReentrant from execute #395
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe changes in the Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
=======================================
Coverage 84.95% 84.95%
=======================================
Files 8 8
Lines 412 412
Branches 138 138
=======================================
Hits 350 350
Misses 62 62 ☔ View full report in Codecov by Sentry. |
Use case:
Call from zetachain to evm chain reaches
gatewayEVM.execute
function which is calling arbitrary function on provided contract. That arbitrary function can call back gateway, eg:gatewayEVM.call
gatewayEVM.depositAndCall
. Because bothexecute
andcall/depositAndCall
havenonReentrant
modifier, this is not possible currently.Solution can be to remove
nonReentrant
from either of those - in this PR for illustration its removed fromexecute
andexecuteWithERC20
since same applies for this one as well.Qs:
call/depositAndCall
since these don't call any other contract? seems like effect is the samedelegatecall
forgatewayEVM.call/depositAndCall
with some edge cases? idea is that gateway dont hold assets so that part should be fine, but might be something elseexecuteRevert
andrevertWithERC20
? these also havenonReentrant
but theoreticallyonRevert
might want to call back gatewayEVM - should we allow these type of interactions or be more restrictive in these cases?Note:
Same issue would apply the other way around when going from connected chain to zetachain, but currently
execute
functions on GatewayZEVM don't have this modifier, don't remember if it was intentional or just by mistakeSummary by CodeRabbit
execute
function for enhanced call execution options.nonReentrant
modifier fromexecuteWithERC20
function to improve functionality.