August 2019
Intermediate to advanced
486 pages
13h 52m
English
The mapping is used to find the number of tokens an address owns. _ownedTokensCount is a mapping from address to uint256, which stores the mapping for a wallet address and the corresponding number of NFTs it owns. In the code, it's defined as follows:
mapping (address => uint256) private _ownedTokensCount;
The mapping variable is private, and the balanceOf() accessor function reads the data from this state variable.