Skip to content

feat: add prevalidation hook support#232

Merged
filmakarov merged 7 commits intobcnmy:devfrom
highskore:feat/pre-validation-hooks
Jan 14, 2025
Merged

feat: add prevalidation hook support#232
filmakarov merged 7 commits intobcnmy:devfrom
highskore:feat/pre-validation-hooks

Conversation

@highskore
Copy link
Contributor

@highskore highskore commented Jan 7, 2025

PR-Codex overview

This PR introduces new pre-validation hooks for ERC-1271 and ERC-4337, enhances error handling, and implements an emergency uninstall feature. It also adds related mock contracts for testing and updates the module management system to support these hooks.

Detailed summary

  • Added EmergencyUninstall struct for emergency uninstall data.
  • Introduced new errors: EmergencyUninstallSigError, InvalidNonce, and PrevalidationHookAlreadyInstalled.
  • Implemented pre-validation hooks for ERC-1271 and ERC-4337.
  • Enhanced ModuleManager to manage pre-validation hooks.
  • Updated Nexus contract to support emergency uninstall operations.
  • Added MockAccountLocker, MockPreValidationHook, and other mock contracts for testing.
  • Updated tests to cover new functionalities and error scenarios.

The following files were skipped due to too many changes: contracts/base/ModuleManager.sol, test/foundry/unit/concrete/hook/TestNexus_Hook_Emergency_Uninstall.sol

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@openzeppelin-code
Copy link

openzeppelin-code bot commented Jan 7, 2025

feat: add prevalidation hook support

Generated at commit: 84f9aa08866ca457af6325db8ad1e0e3e667aea4

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
6
29
37

For more details view the full report in OpenZeppelin Code Inspector

@filmakarov filmakarov self-requested a review January 9, 2025 10:47
Copy link
Contributor

@filmakarov filmakarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting the PR, left some notes

@highskore highskore requested a review from filmakarov January 11, 2025 01:39
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