15,000 USDC
View results
Submission Details
Severity: gas
Valid

Use assembly to check for `address(0)`

Summary

Vulnerability Details

Inline Assembly more gas efficient and Saving Gas with Simple Inlining.

There is 1 instance of this issue:

Impact

Tools Used

Recommendations

Use assembly to check for address(0):

function addrNotZero(address _addr) public pure {
assembly {
if iszero(_addr) {
mstore(0x00, "zero address")
revert(0x00, 0x20)
}
}
}

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.