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

Parameterize Validator Manager Custom Errors #568

Closed
cam-schultz opened this issue Sep 23, 2024 · 0 comments
Closed

Parameterize Validator Manager Custom Errors #568

cam-schultz opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cam-schultz
Copy link
Contributor

Context and scope
#566 added custom errors to the validator manager contracts, primarily as a way to reduce the contract size. We should circle back and add parameters where appropriate to make the error messages more meaningful.

Discussion and alternatives

  • We should evaluate the context in which each error is called, and aim to make each error case unique within a given context.
  • We will need to update the unit tests to catch the parameterized errors. forge-std 1.9.2 does not yet include expectPartialRevert, which allows for name based pattern matching on custom errors, without requiring explicit parameter matches. The most robust approach would be to match parameter values anyway, though there may be some scenarios in which that's overkill.

Open questions
Questions that are still being discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants