Know Your NFT: What is NFT standard ERC721?



Explanation:



Pioneered by CryptoKitties, ERC721 was the first standard for representing non-fungible digital assets. ERC721 is an inheritable Solidity smart contract standard, meaning that developers can easily create new ERC721-compliant contracts by importing it from the OpenZeppelin library (we have a helpful tutorial on creating your first ERC721 contract here). ERC721 is actually relatively simple: it provides a mapping of unique identifiers (each of which represents a single asset) to addresses, which represent the owner of that identifier. ERC721 also provides a permissioned way to transfer these assets, using the transferFrom method.


interface ERC721 { function ownerOf(uint256 _tokenId) external view returns (address); function transferFrom(address _from, address _to, uint256 _tokenId) external payable; }


If you think about it, these two methods are really all you need to represent an NFT: a way to check who owns what and a way to move things around. There are a few other bells and whistles to the standard (some of which turn out to be very important for NFT marketplaces), but the core of ERC721 is quite basic.





Next Question: What is NFT standard ERC1155?.