Rural Midnight Snail - Unused Error Messages in `IWinnables` and `IWinnablesTicketManager` Interfaces, and Missing `Ownable` Implementation in `WinnablesPrizeManager.sol` #632
Unused Error Messages in IWinnables and IWinnablesTicketManager Interfaces, and Missing Ownable Implementation in WinnablesPrizeManager.sol
Summary
There are multiple error messages defined in the IWinnables and IWinnablesTicketManager interfaces that are not utilised in the current implementation:
Rural Midnight Snail
Low/Info
Unused Error Messages in
IWinnables
andIWinnablesTicketManager
Interfaces, and MissingOwnable
Implementation inWinnablesPrizeManager.sol
Summary
There are multiple error messages defined in the
IWinnables
andIWinnablesTicketManager
interfaces that are not utilised in the current implementation:IWannables
https://github.com/sherlock-audit/2024-08-winnables-raffles/blob/main/public-contracts/contracts/interfaces/IWinnables.sol#L4NothingToWithdraw()
NothingToRefund()
NoWinner()
IWinnablesTicketManager
https://github.com/sherlock-audit/2024-08-winnables-raffles/blob/main/public-contracts/contracts/interfaces/IWinnablesTicket.sol#L6QueryForAddressZero()
NoOp()
Additionally, in the
WinnablesPrizeManager.sol
contract, theOwnable
module from OpenZeppelin is imported but not utilised.Vulnerability Detail
The presence of unused error messages and imports can create confusion for developers and auditors, leading to unnecessary complexity in the codebase.
Impact
The impact is minimal but includes potential confusion and unnecessary lines of code, which can affect code maintainability and clarity.
Tool used
Manual Review
Recommendation
It is best practice to either use the defined error messages and imports or remove them to maintain a clean and understandable codebase.