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

Replace require functions with custom errors #565

Open
RiccardoBiosas opened this issue May 10, 2022 · 0 comments
Open

Replace require functions with custom errors #565

RiccardoBiosas opened this issue May 10, 2022 · 0 comments

Comments

@RiccardoBiosas
Copy link
Contributor

Context
The protocol code-base is currently using require paired with fairly lengthy error strings, which end up being quite expensive from a gas perspective.

Proposal
Solidity has introduced custom errors since v0.8.4, which provide a cheaper alternative to throw exceptions. We can consider using them as a replacement to the current require checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant