Closed code423n4 closed 2 years ago
defsec
!= 0 is a cheaper operation compared to > 0, when dealing with uint.
!= 0
> 0
"https://github.com/code-423n4/2021-11-nested/blob/5d113967cdf7c9ee29802e1ecb176c656386fe9b/contracts/NestedFactory.sol#L481"
"" https://github.com/code-423n4/2021-11-nested/blob/5d113967cdf7c9ee29802e1ecb176c656386fe9b/contracts/NestedFactory.sol#L84 ""
Code Review
Use "!=0" instead of ">0" for the gas optimization.
duplicate #8
Handle
defsec
Vulnerability details
Impact
!= 0
is a cheaper operation compared to> 0
, when dealing with uint.Proof of Concept
"https://github.com/code-423n4/2021-11-nested/blob/5d113967cdf7c9ee29802e1ecb176c656386fe9b/contracts/NestedFactory.sol#L481"
"" https://github.com/code-423n4/2021-11-nested/blob/5d113967cdf7c9ee29802e1ecb176c656386fe9b/contracts/NestedFactory.sol#L84 ""
Tools Used
Code Review
Recommended Mitigation Steps
Use "!=0" instead of ">0" for the gas optimization.