I've read here that it is possible to mint 2^256 nfts in a single transaction. I've tried to achieve this by directly assigning _owners and _balances mappings but ofc these are private variables so i can't change them. I tried making an _mint() override but that also didn't work. How does this process work?
Here's the override function i tried. It doesn't work because _balances
and _owners
are private variables
function _mint(address to, uint256 tokenId) internal override {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
// emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}