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

Contracts are not much Gas Optimized #177

Open
ShaheenRehman opened this issue Aug 22, 2022 · 1 comment
Open

Contracts are not much Gas Optimized #177

ShaheenRehman opened this issue Aug 22, 2022 · 1 comment

Comments

@ShaheenRehman
Copy link

Most of the Zora-V3 contracts are using require statements for reverting errors. Which is not a very gas-efficient way to revert errors. The require statements stores Strings which costs a lot of Gas (deploying + function Calling & Reverting).
And as the protocol aims to be Gas Efficient, Then it would be much better to not use require statements to revert the errors.
Instead, use Custom Errors. Which is a new solidity feature (introduced in 0.8.*)
Custom errors do the same thing but cost much less gas than the require statements.
For more info read this

Thanks,
AB Dee

@ShaheenRehman
Copy link
Author

1 contract fixed.
Check PR #178 :)

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

No branches or pull requests

1 participant