According to README.md
: "getNextTokenId - Allows the users to get the next token id."
However, the current implementation returns the most recent tokenId
,
function testGetNextTokenIdGetsCurrentTokenId() public {
assertEq(ramNFT.getNextTokenId(), 0);
vm.prank(organiser);
ramNFT.mintRamNFT(organiser);
assertEq(ramNFT.getNextTokenId(), 1);
}
Since this function is not called within the scope, it does not have any immediate impact.
However, should there be any external contracts that calls getNextTokenId()
, it may become a vulnerability.
Manual Review
I suggest the return value to be `tokenCounter + 1"
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.