Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Contracts are not much Gas Optimized #177

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

Contracts are not much Gas Optimized #177

TradMod opened this issue Aug 22, 2022 · 1 comment

Comments

@TradMod
Copy link

TradMod commented Aug 22, 2022

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

@TradMod
Copy link
Author

TradMod commented Aug 22, 2022

1 contract fixed.
Check PR #178 :)

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

No branches or pull requests

1 participant