NFTs on Ethereum are simply data entries in smart contracts that tell you who owns the NFT, who can transfer the NFT, and what the NFT’s metadata looks like. Here are functions that return information about a given NFT:

Get the Owner of a given NFT

Get the tokenURI of the given NFT

Get the wallet address where a given NFT is approved

When you mint an NFT, you are just setting the value of the data entry owner (wallet address). When you transfer an NFT, you simply change the owner’s value (wallet address). The following two pictures are the codes related to ownership settings in the ERC721 contract:

The mint function in the ERC721 contract

transfer function in ERC721 contract

Most NFT contracts are just that simple. As we saw above, there is no code that enables these NFTs to own other NFTs, ETH, or ERC20 tokens.