protocol icon indicating copy to clipboard operation
protocol copied to clipboard

Replace require functions with custom errors

Open RiccardoBiosas opened this issue 4 years ago • 0 comments

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.

RiccardoBiosas avatar May 10 '22 06:05 RiccardoBiosas