Rock Paper Scissors

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

`GameState.Revealed` is not used in `RockPaperScissors` contract

Summary

The GameState.Revealed state is not used in the RockPaperScissors contract. This state is defined in the GameState enum but is never assigned or checked in any of the contract's functions.

enum GameState {
Created,
Committed,
Revealed,
Finished
}

Vulnerability Details

Impact

Maybe the GameState.Revealed state was intended to be used to indicate that both players have revealed their moves. However, it is not currently being used in the contract, which could lead to confusion or errors in the game logic.

Tools Used

Manual review.

Recommendations

Either remove the GameState.Revealed state from the enum or implement it in the game logic to indicate that both players have revealed their moves. This could be done by checking if both players have revealed their moves and then setting the game state to GameState.Revealed.

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.