Rock Paper Scissors

First Flight #38
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

[L-1] Consider making `RockPaperScissors::tokenOwner()` external instead of public

Summary

I found that the function tokenOwner() at RockPaperScissors.sol was set to public and it is not used inside the contract

Vulnerability Details

The function was not called inside the contract, but was set to public at https://github.com/CodeHawks-Contests/2025-04-rock-paper-scissors/blob/25cf9f29c3accd96a532e416eee6198808ba5271/src/RockPaperScissors.sol#L378

function tokenOwner() public view returns (address) {
return winningToken.owner();
}

Impact

external functions are slightly cheaper in gas than public

Tools Used

  • aderyn
    -Manual review

Recommendations

Consider replacing the following code

- function tokenOwner() public view returns (address) {
+ function tokenOwner() external view returns (address) {
Updates

Appeal created

m3dython Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational

Code suggestions or observations that do not pose a direct security risk.

m3dython Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational

Code suggestions or observations that do not pose a direct security risk.

Support

FAQs

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