mapping(address => uint256) public tokenOwned allows each address to have only one token associated with it.This means that, if the address should mint a second token the first token is overwritten;
This mapping(address => uint256) public tokenOwned allows only one token ID associated with it. This means that if a user is to mint a second token the first is overwritten.
This could probably lead to data inconsistency. If a user should own multiple tokens the for example(Token ID1 and Token ID2) the mapping would behave like this:
when the mint token ID2
meaning that the mapping doesn't maintain information about all tokens owned by the address.
The owner would only have the last minted token ID stored.
Using a mapping like this mapping of address => uint256[] is a better way to track ownership when a user can own multiple tokens.
instead of this:
use this:
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.