# Nft

**Inherits:** ERC721Enumerable, [INft](https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/positionbase/inft)

Extensions to ECR-721 to support an image contract and owner enumeration.

### State Variables <a href="#state-variables" id="state-variables"></a>

#### \_nextTokenId <a href="#nexttokenid" id="nexttokenid"></a>

```solidity
uint256 private _nextTokenId = 1;
```

### Functions <a href="#functions" id="functions"></a>

#### constructor <a href="#constructor" id="constructor"></a>

```solidity
constructor(string memory __name, string memory __symbol) ERC721(__name, __symbol);
```

#### \_mint <a href="#mint" id="mint"></a>

Internal function to mint a new NFT and assign it to the specified address.

```solidity
function _mint(address to) internal returns (uint256 tokenId);
```

**Parameters**

| Name | Type      | Description                                  |
| ---- | --------- | -------------------------------------------- |
| `to` | `address` | The address to which the NFT will be minted. |

**Returns**

| Name      | Type      | Description                     |
| --------- | --------- | ------------------------------- |
| `tokenId` | `uint256` | The ID of the newly minted NFT. |

#### onlyTokenIdAuthorizedUser <a href="#onlytokenidauthorizeduser" id="onlytokenidauthorizeduser"></a>

Modifier to restrict access to functions to the owner of a specific NFT by its tokenId.

```solidity
modifier onlyTokenIdAuthorizedUser(uint256 tokenId);
```

#### tokenOfOwnerByIndexExists <a href="#tokenofownerbyindexexists" id="tokenofownerbyindexexists"></a>

Check if an NFT exists for a given owner and index.

```solidity
function tokenOfOwnerByIndexExists(address ownerToCheck, uint256 index) public view returns (bool exists);
```

#### tokenIdsOfOwner <a href="#tokenidsofowner" id="tokenidsofowner"></a>

List of tokenIds by owner.

```solidity
function tokenIdsOfOwner(address owner) public view returns (uint256[] memory tokenIds);
```

#### checkAuthorized <a href="#checkauthorized" id="checkauthorized"></a>

Check if the caller has access to a specific NFT by tokenId.

```solidity
function checkAuthorized(address spender, uint256 tokenId) public view returns (address owner);
```

#### \_update <a href="#update" id="update"></a>

```solidity
function _update(address to, uint256 tokenId, address auth) internal override(ERC721Enumerable) returns (address);
```

#### \_increaseBalance <a href="#increasebalance" id="increasebalance"></a>

```solidity
function _increaseBalance(address account, uint128 value) internal override(ERC721Enumerable);
```

#### name <a href="#name" id="name"></a>

```solidity
function name() public view virtual override(INft, ERC721) returns (string memory);
```

#### symbol <a href="#symbol" id="symbol"></a>

```solidity
function symbol() public view virtual override(INft, ERC721) returns (string memory);
```

#### supportsInterface <a href="#supportsinterface" id="supportsinterface"></a>

```solidity
function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, IERC165) returns (bool);
```

#### tokenURI <a href="#tokenuri" id="tokenuri"></a>

```solidity
function tokenURI(uint256 tokenId) public view virtual override(INft, ERC721) returns (string memory);
```

<br>
