Skip to content
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

Fetch posthook by input selector #5

Merged

Conversation

doublespending
Copy link
Contributor

Motivation

Currently, _doPreExecHooks in contract UpgradeableModularAccount use msg.sig to get postExecHook.
However, the input parameter selector is not always equal to msg.sig. In the case of executeFromPlugin(bytes calldata data), the input parameter selector is bytes4(data[:4]) and msg.sig is IPluginExecutor.executeFromPlugin.selector.

Solution

The solution is using input parameter selector to fetch postHook instead of msg.sig.

@howydev
Copy link
Collaborator

howydev commented Nov 6, 2023

hi there! good find, thank you for catching this and making this PR

@howydev howydev merged commit 5271507 into erc6900:main Nov 6, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants