ERC-721 standard
Just like tokens on Ethereum have the ERC-20 standard, NFTs on Ethereum have the ERC-721 standard. To make a smart contract ERC-721 compliant, a smart contract needs to fulfill the ERC-721 standard and the ERC-165 standard. This standard is useful if you want your NFT smart contract to be interoperable with other smart contracts, for example, if you want other people to be able to trade NFT tokens from your NFT smart contract.
To fulfill the ERC-721 standard, you need to implement these events and function signatures:
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address...