-
Notifications
You must be signed in to change notification settings - Fork 345
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
chore(l1-contracts): Migrate L1 Contracts to Custom Errors #477
Conversation
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.24; | ||
|
||
error Unauthorized(address caller); |
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.
Better to place errors in the interface version of the contract. So we will see which error supposed to be in which contract + there will be no ridiculously big imports
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.
we'll likely end up with the same number of imports unless they live within the interface (but then we need to duplicate them in the tests) and a single file lets us remove duplicates. I don't feel strongly though on this.
Maybe @dnkolegov does?
What ❔
Moving all of the l1 contracts to use custom errors instead of string based reverts
pt 2 of #473
Gas Report From Before: https://gist.github.com/koloz193/c8f39f6b61411e6b6a3ddebd8a8869df
Gas Report From After: https://gist.github.com/koloz193/beb78cb4ed2aa0919d7adda72b288a07
Why ❔
Checklist