Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow direct plugin calls with validation & permission hooks #90
Allow direct plugin calls with validation & permission hooks #90
Changes from 20 commits
fe5af61
b11b7b4
222243e
e1adaca
1d45b2e
883eff5
691dd31
4a99058
efc111f
2a58118
d614b0e
f0b8321
43a3e5c
e615bc2
b537f07
b3b834f
4aa008c
ae26e5f
a09ffb2
a978cd7
ad4fcb6
d263656
0f04d85
32c39fb
a425c9b
4a29ae3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this necessary to prevent an access control issue? Or is it just an anti-footgun measure?
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.
It's just an anti-footgun, though I've not evaluated the consequences of having global validation for a direct call-- signature validation either.
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.
Ok sounds good. It might help to support global/sig validation in some very niche cases where the direct call validation is used to create an "owner" EOA, but that seems small enough to ignore for now.
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.
Gotcha, happy to revisit this down the line if we see the feature's important!
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.
What if a signer of the account call an execFunction? Would it fail here?
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.e. if a signer, as set in the storage of
SingleSignerValidation
, tries to call the account? In that case, this check would fail, the signer would need to useexecuteWithAuthorization
to trigger runtime validation.Alternatively, if an account is only used from an EOA, you could add an EOA itself as an allowed caller by installing the EOA address + the direct call magic value as a validation. But, this wouldn't be usable via user op validation.
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.
Aren't we executing the pre-execution hooks currently twice in case a permitted caller is calling through fallback? Within
_checkPermittedCallerAndAssociatedHooks()
inL664
we do the pre-execution hooks of the function selector, but again in the followingfallback()
flow inL143
.Also, are we not forgetting to do the post-permission hooks in the fallback flow? 👀
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.
@0xrubes you are correct... we'll get a fix PR up soon.
Check warning on line 715 in src/account/UpgradeableModularAccount.sol
GitHub Actions / Run Linters