Too many loops might result in out of gas error.
In the enter Raffle function
for (uint256 i = 0; i < players.length - 1; i++) {
for (uint256 j = i + 1; j < players.length; j++) {
require(players[i] != players[j], "PuppyRaffle: Duplicate player");
}
}
Nested for loop may result in Out of Gas issue.
As the number of players increases the number of loop iterations will also increases and hence result in out of gas error.
Foundry
Git
Manual review
Avoid using nested loops.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.