Let’s understand this with an example: We want to build an emoji πŸ™‚ NFTs.

What are the main Components and Interactions?

  1. There should be an NFT contract. What makes a contract NFT?
  2. It should have basic operations like transfer, allow, balance, etc
  3. Users should be able to mint it at a fixed price.
  4. Users should be able to breed the NFT to generate new NFT. Maybe the minting logic should be built on an external contract that has minting rights? How do we handle different kinds of access?

Should it have to follow standards like ERC20, ERC721, and ERC1155? πŸ“„

interface ERC721 {
    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 _to, uint256 _tokenId, bytes data) external payable;

    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;

    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;

    function approve(address _approved, uint256 _tokenId) external payable;

    function setApprovalForAll(address _operator, bool _approved) external;

    function getApproved(uint256 _tokenId) external view returns (address);

    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

Quick Recap of External Calls

Is the contract Upgradable? If so which Upgradable Patterns?