Open vm06007 opened 1 year ago
Team decided not to address this information, as it is not a security concern and a matter of style preference. Team finds this optimization not worth the effort amount of gas/bytecode it allows to save is extremely negligeble and would like to maintain code with using strict comparison such as ==
instead of !=
without using require (if
statement is cheaper)
WSH-05C: Non-Standard Revert Patterns
Description:
The referenced functions will evaluate a condition,
return
early in such a case and otherwiserevert
.Example:
Recommendation:
We advise the functions to inverse their
if
conditions andrevert
in their case, reducing the bytecode signature as well as common-case gas cost of the functions.