Why is the counter initialized before the constructor? Does it matter? Can I put other variables above the constructor? Could I put the counter variables below the constructor?
"""
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4;
import "[@openzeppelin/contracts/token/ERC721/ERC721.sol](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.3/contracts/token/ERC721/ERC721.sol)";
import "[@openzeppelin/contracts/access/Ownable.sol](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.3/contracts/access/Ownable.sol)";
import "[@openzeppelin/contracts/utils/Counters.sol](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.3/contracts/utils/Counters.sol)";
contract MyToken is ERC721, Ownable { using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
constructor() ERC721("MyToken", "MTK") {}
function safeMint(address to) public onlyOwner {
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId); } }
"""