To understand how ERC-721 tokens work, it's best to look at the functions that define an ERC-721 token so that you can understand how they work internally. These functions are described in the following list:
- balanceOf(owner): Returns the count of all the tokens a user has in their possession for the given address.
- ownerOf(tokenId): Returns the address that owns a specific token ID.
- safeTransferFrom(from, to, tokenId, data): Sends a token from one address to another after giving an allowance, just as this phrase does with ERC-20 tokens. It's called safe because if the receiver is a contract, it checks that the contract is capable of receiving ERC-721 tokens, meaning that the receiver contract has implemented ...