ChoosingRam::increaseValuesOfParticipants
check for tokenIdOfAnyPerticipent
allows the user to enter nonexisting tokenId for their opponent.
Let's say, there are only 2 NFTs created for now. After each NFT creation, the tokeCounter increases its value by 1, therefore, after that the tokenCounter
will equal 2
.
The first NFT created will be with tokenId equal to 0
The second NFT created will be with tokenId equal to 1
So if a user decides to call ChoosingRam::increaseValuesOfParticipants
with 2
as an argument for tokenIdOfAnyPerticipent
, the check below will pass, although, such a NFT token does not exist.
To test paste the code below in Dussehra.t.sol
The challenger user will be participating against no one, so he can keep calling increaseValuesOfParticipants
with either him becoming the Ram
or making address 0 the Ram
. If the 0 address, becomes the Ram
then the user can call Dussehra::killRavana
and send the reward to the 0 address.
Manual review
Unit test
Change the if check to:
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.