Closed code423n4 closed 2 years ago
Check if uint256 is not zero with num != 0 instead of num > 0 to save gas
num != 0
num > 0
https://github.com/code-423n4/2022-09-nouns-builder/blob/debe9b792cc70510eadf9b3728cde5b0f2ec9a1f/src/lib/token/ERC721Votes.sol#L203
Use private instead of public for constants to save gas
private
public
https://github.com/code-423n4/2022-09-nouns-builder/blob/debe9b792cc70510eadf9b3728cde5b0f2ec9a1f/src/governance/governor/Governor.sol#L27
Both are not going to save gas for end users
Check if uint256 is not zero with
num != 0
instead ofnum > 0
to save gashttps://github.com/code-423n4/2022-09-nouns-builder/blob/debe9b792cc70510eadf9b3728cde5b0f2ec9a1f/src/lib/token/ERC721Votes.sol#L203
Use
private
instead ofpublic
for constants to save gashttps://github.com/code-423n4/2022-09-nouns-builder/blob/debe9b792cc70510eadf9b3728cde5b0f2ec9a1f/src/governance/governor/Governor.sol#L27