Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 830 Bytes

Unnecessary `require` Statement.md

File metadata and controls

26 lines (22 loc) · 830 Bytes

The following require statement in Blacklistable.sol can be removed: require(to != address(0));

Indeed, this check is implemented in the _transfer() function in the ERC20.sol smart contract.

Recommendation:

Consider removing the require statement for gas saving purposes.


Slide Screenshot

174.jpg


Slide Text

  • Sigma Prime Audit InfiniGold Finding INF-09
  • Error Checking
  • Unnecessary require()
  • Zero-address Check
  • ERC20 _transfer()
  • Remove Check -> Gas

References


Tags