MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

no Ownable in constructor

Summary

no Ownable(msg.sender) in constructor

Vulnerability Details

in Pot.sol , line 22. there is no Ownable(msg.sender)

i'm probably wrong , it doesn't seem to be an issue for the compiler and

contract Pot is Ownable(msg.sender) {

seems to work fine, but will submit anyway, didn't find anything on this syntax and chat gpt said it is incorrect

constructor(address[] memory players, uint256[] memory rewards, IERC20 token, uint256 totalRewards) {
i_players = players;
i_rewards = rewards;
i_token = token;
i_totalRewards = totalRewards;
remainingRewards = totalRewards;
i_deployedAt = block.timestamp;
// i_token.transfer(address(this), i_totalRewards);
for (uint256 i = 0; i < i_players.length; i++) {
playersToRewards[i_players[i]] = i_rewards[i];
}
}

Impact

Tools Used

Recommendations

add Ownable(msg.sender)

Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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