tokamak-network / gem-nft-contract

Project Opal contract repository
MIT License
1 stars 1 forks source link

[Code review: Contract Bugs]: Duplicate code can be reused using modifier or function #43

Closed Zena-park closed 4 minutes ago

Zena-park commented 8 hours ago

Describe the bug

Impact

It can reduce the code byte size.

It makes code management easier.

Exploit Scenario

No response

Recommendation

Replace duplicate above code with _checkNonAddress functions.

  function _checkNonAddress(address account) internal  {
          if(account == address(0))   revert InvalidAddress();
   }
mehdi-defiesta commented 4 hours ago

@Zena-park Thank you. Here is the update.

Zena-park commented 4 minutes ago

I confirmed. Thank you.