NFTs are currently one of the most interesting topics in the cryptocurrency world with several large companies ready to integrate them and plenty of projects ready to come out. The implementations and utilities of these tokens are very often debatable but the asset digitization process put in place by non-fungible tokens is there for all to see.
From a technical point of view, non-fungible tokens live within a Smart Contract, specifically the ERC721 standard. This standard defines a minimum interface that the Smart Contract must implement to allow the unique tokens to be managed, owned and exchanged. But how does this contract work?

The standard makes available to developers variables and functions for the management of NFT. The internal variables of ERC721 are:
owners, which maps the token ID to the owner's address;
balances, which defines the amount of tokens owned by a given address;
tokenApproval, which defines the ability of external operators to do operations on a given token.
The main functions that manage these variables and allow to modify the state of the Smart Contract are:
ownerOf, which, given an input token ID, returns the owner;
balanceOf, which, given an address as input, returns the amount of tokens owned;
safeTransferFrom, which allows to transfer the property of the token;
tokenURI, which allows to receive the url related to the token metadata;
mint, to mint the token and assign it to an address;
approve, which, given an address, provides privileges to transfer a given token.
It must be emphasized that ERC721 does not impose a standard for token metadata and has been expressly developed with an extension in mind. At the moment there are several extensions for NFTs such as the possibility of saving metadata within it, the possibility of adding voting logic for DAOs or the possibility of having royalties

