Using require VS if / revert custom Error

Viewed 152

When checking effects on a Solidity function, are there any benefits or trade-offs using require VS using if (!condition) revert CustomError(), or is it just a matter of preference?

I'm thinking gas consumption, logging, etc...

0 Answers
Related