TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: low
Invalid

Unused function `TempleGold::_update()` with missing implementation `super._update` should be deleted

Summary

Unused functions should be deleted from a contract to avoid unintended consequences.

Vulnerability Details

Despite the presence of comments, this function's purpose is not clear.

  • TempleGold::_update()

    function _update(address from, address to, uint256 value) internal override {
    /// can only transfer to or from whitelisted addreess
    /// @dev skip check on mint and burn. function `send` checks from == to
    if (from != address(0) && to != address(0)) {
    if (!authorized[from] && !authorized[to]) { revert ITempleGold.NonTransferrable(from, to); }
    }
    super._update(from, to, value);
    }

The super._update is supposed to have the implementation, but it is not inherited from anywhere. Nevertheless, the TempleGold::_update() function wasn't invoked within the contract, so it should be deleted.

Impact

Tools Used

Manual Review

Recommendations

Either delete the TempleGold::_update() function or inherit the appropriate contract so that super._update works correctly.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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