The transferErcTokens
function contains a redundant check for the zero address (to == address(0)
). This unnecessary validation not only adds unnecessary computation but also results in slightly increased gas consumption.
The redundant check appears at line 195-197 (second instance):
The to == address(0)
condition is already validated earlier in the function in line 185-187:
While the redundancy does not introduce functional errors, it negatively impacts the gas as it slightly increases the cost during computation. Again, redundant code in smart contracts should NEVER be tolerated.
Manual Code Review
Remove the redundant to == address(0)
check. The revised function should look as follows:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.