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

Post-only hooks #16

Merged
merged 7 commits into from
Nov 30, 2023
Merged

Post-only hooks #16

merged 7 commits into from
Nov 30, 2023

Conversation

adam-alchemy
Copy link
Contributor

Motivation

The ERC-6900 standard does not prohibit post-only execution hooks and permitted call hooks. However, the RI only supported associated post exec hooks.

Solution

  • Refactor execution hooks and permitted call hooks into a reusable HookGroup struct.
  • Add support for post-only hooks during installation and uninstallation.
  • Run post-only hooks during execution. This is achieved by adding them to the end of the array of PostExecToRun items.
  • Fix a bug with pre-exec hooks running with incorrect calldata in executeFromPlugin.
    • This refactor unfortunately caused a stack-too-deep error in the non-IR build, so I also refactored _doPrePermittedCallHooks to take in the key to get back under the stack limit.

@adam-alchemy adam-alchemy merged commit 5ad698e into spec-update-6 Nov 30, 2023
3 checks passed
@adam-alchemy adam-alchemy deleted the adam/post-only-hooks branch November 30, 2023 17:02
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.

3 participants