-
Notifications
You must be signed in to change notification settings - Fork 1
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
update executeUserOp implementation #149
Conversation
🤖 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
|
Changes to gas cost
🧾 Summary (5% most significant diffs)
Full diff report 👇
|
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.
Agree, that delegatecall'ing here is better
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.
I have a question. Can we limit execute
to be onlyEntryPoint
, not onlyEntryPointOrSelf
?
Now when executeUserOp
doesn't call execute
, I think we can do it
This will make execute safer for using with SmartSessions
executeUserOp can now delegate call to self with any calldata actually btw these below methods are also onlyEntryPointOrSelf
|
yep, which is good. so I suggest |
what do you mean by making execute-> execute impossible? and need for that |
msgSender field that the hook sees
one major upside of delegatecalling to the account only is that existing hooks will be more easily compatible
eg a spending limit hook will decode the execute calldata and check for the function signature but in the case of using the executeUserOp func on nexus the calldata could be address(erc20), transfer(...) in which case hooks also need to be able to decode this
If you instead have the account delegatecall to eg execute, then the hook can just decode normally
there are no real downsides to delegatecall here