MOLNFT PDB

MolNFT Smart Contract ABI

Welcome! Below you’ll find a reference for the MolNFT smart contract ABI (with method descriptions).

Smart contract address:

0xd58B01f6C18086e5202cdC5D7Ad3E41790360102

Table of Contents

  1. 1. MolNFT ABI
    1. Full ABI JSON
    2. Method Reference
      1. mintNFT
      2. updateMetadata
      3. getMetadata
      4. getEntireNFT
      5. getChildren
      6. getChildrenPaginated
      7. getCombinedData
      8. tokenExists
      9. ownerOf
      10. balanceOf
      11. transferFrom
      12. safeTransferFrom
      13. approve
      14. setApprovalForAll
      15. getApproved
      16. isApprovedForAll
      17. totalSupply
      18. tokenByIndex
      19. tokenOfOwnerByIndex
      20. searchByIDCODE (+Paginated)
      21. searchByHEADER (+Paginated)
      22. searchByACCESSION_DATE (+Paginated)
      23. searchByCOMPOUND (+Paginated)
      24. searchBySOURCE (+Paginated)
      25. searchByAUTHOR_LIST (+Paginated)
      26. searchByRESOLUTION (+Paginated)
      27. searchByEXPERIMENT_TYPE (+Paginated)
      28. searchBySEQUENCE (+Paginated)

MolNFT ABI

This contract is deployed on GenesisL1 at 0xd58B01f6C18086e5202cdC5D7Ad3E41790360102. The full ABI is below in a collapsible block, followed by a reference table for each function.

Full ABI JSON

Click to show/hide entire ABI
[
      {
        "inputs": [],
        "name": "ERC721EnumerableForbiddenBatchMint",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "sender",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          },
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          }
        ],
        "name": "ERC721IncorrectOwner",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "operator",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "ERC721InsufficientApproval",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "approver",
            "type": "address"
          }
        ],
        "name": "ERC721InvalidApprover",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "operator",
            "type": "address"
          }
        ],
        "name": "ERC721InvalidOperator",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          }
        ],
        "name": "ERC721InvalidOwner",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "receiver",
            "type": "address"
          }
        ],
        "name": "ERC721InvalidReceiver",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "sender",
            "type": "address"
          }
        ],
        "name": "ERC721InvalidSender",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "ERC721NonexistentToken",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "index",
            "type": "uint256"
          }
        ],
        "name": "ERC721OutOfBoundsIndex",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          }
        ],
        "name": "OwnableInvalidOwner",
        "type": "error"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "account",
            "type": "address"
          }
        ],
        "name": "OwnableUnauthorizedAccount",
        "type": "error"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "approved",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "Approval",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "operator",
            "type": "address"
          },
          {
            "indexed": false,
            "internalType": "bool",
            "name": "approved",
            "type": "bool"
          }
        ],
        "name": "ApprovalForAll",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          },
          {
            "indexed": true,
            "internalType": "uint256",
            "name": "parentId",
            "type": "uint256"
          }
        ],
        "name": "ChildNFTMinted",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "previousOwner",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "newOwner",
            "type": "address"
          }
        ],
        "name": "OwnershipTransferred",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "ParentNFTMinted",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "from",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "Transfer",
        "type": "event"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "approve",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "IDCODE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "HEADER",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "ACCESSION_DATE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "COMPOUND",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SOURCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "AUTHOR_LIST",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "RESOLUTION",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "EXPERIMENT_TYPE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SEQUENCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "imageBase64",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "fileBase64",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "parentId",
            "type": "uint256"
          }
        ],
        "name": "mintNFT",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "renounceOwnership",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "from",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "safeTransferFrom",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "from",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          },
          {
            "internalType": "bytes",
            "name": "data",
            "type": "bytes"
          }
        ],
        "name": "safeTransferFrom",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "operator",
            "type": "address"
          },
          {
            "internalType": "bool",
            "name": "approved",
            "type": "bool"
          }
        ],
        "name": "setApprovalForAll",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "bool",
            "name": "status",
            "type": "bool"
          }
        ],
        "name": "setOnlyDeployerCanMint",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "from",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "transferFrom",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "newOwner",
            "type": "address"
          }
        ],
        "name": "transferOwnership",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          },
          {
            "internalType": "string",
            "name": "IDCODE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "HEADER",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "ACCESSION_DATE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "COMPOUND",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SOURCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "AUTHOR_LIST",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "RESOLUTION",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "EXPERIMENT_TYPE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SEQUENCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "imageBase64",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "fileBase64",
            "type": "string"
          }
        ],
        "name": "updateMetadata",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
      },
      {
        "inputs": [],
        "stateMutability": "nonpayable",
        "type": "constructor"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          }
        ],
        "name": "balanceOf",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "getApproved",
        "outputs": [
          {
            "internalType": "address",
            "name": "",
            "type": "address"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "parentId",
            "type": "uint256"
          }
        ],
        "name": "getChildren",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "childIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "parentId",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "getChildrenPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "childIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "parentId",
            "type": "uint256"
          }
        ],
        "name": "getCombinedData",
        "outputs": [
          {
            "internalType": "string",
            "name": "combinedFileBase64",
            "type": "string"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "parentId",
            "type": "uint256"
          }
        ],
        "name": "getEntireNFT",
        "outputs": [
          {
            "internalType": "string",
            "name": "IDCODE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "HEADER",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "ACCESSION_DATE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "COMPOUND",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SOURCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "AUTHOR_LIST",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "RESOLUTION",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "EXPERIMENT_TYPE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SEQUENCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "imageBase64",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "combinedFileBase64",
            "type": "string"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "getMetadata",
        "outputs": [
          {
            "internalType": "string",
            "name": "IDCODE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "HEADER",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "ACCESSION_DATE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "COMPOUND",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SOURCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "AUTHOR_LIST",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "RESOLUTION",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "EXPERIMENT_TYPE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "SEQUENCE",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "imageBase64",
            "type": "string"
          },
          {
            "internalType": "string",
            "name": "fileBase64",
            "type": "string"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "getParent",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "operator",
            "type": "address"
          }
        ],
        "name": "isApprovedForAll",
        "outputs": [
          {
            "internalType": "bool",
            "name": "",
            "type": "bool"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "name",
        "outputs": [
          {
            "internalType": "string",
            "name": "",
            "type": "string"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "nextChildId",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "nextNFTId",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "onlyDeployerCanMint",
        "outputs": [
          {
            "internalType": "bool",
            "name": "",
            "type": "bool"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "owner",
        "outputs": [
          {
            "internalType": "address",
            "name": "",
            "type": "address"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "ownerOf",
        "outputs": [
          {
            "internalType": "address",
            "name": "",
            "type": "address"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByACCESSION_DATE",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByACCESSION_DATEPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByAUTHOR_LIST",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByAUTHOR_LISTPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByCOMPOUND",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByCOMPOUNDPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByEXPERIMENT_TYPE",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByEXPERIMENT_TYPEPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByHEADER",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByHEADERPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByIDCODE",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByIDCODEPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchByRESOLUTION",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchByRESOLUTIONPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchBySEQUENCE",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchBySEQUENCEPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          }
        ],
        "name": "searchBySOURCE",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "string",
            "name": "searchTerm",
            "type": "string"
          },
          {
            "internalType": "uint256",
            "name": "offset",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "limit",
            "type": "uint256"
          }
        ],
        "name": "searchBySOURCEPaginated",
        "outputs": [
          {
            "internalType": "uint256[]",
            "name": "tokenIds",
            "type": "uint256[]"
          },
          {
            "internalType": "uint256",
            "name": "total",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "bytes4",
            "name": "interfaceId",
            "type": "bytes4"
          }
        ],
        "name": "supportsInterface",
        "outputs": [
          {
            "internalType": "bool",
            "name": "",
            "type": "bool"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "symbol",
        "outputs": [
          {
            "internalType": "string",
            "name": "",
            "type": "string"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "index",
            "type": "uint256"
          }
        ],
        "name": "tokenByIndex",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "tokenExists",
        "outputs": [
          {
            "internalType": "bool",
            "name": "",
            "type": "bool"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "owner",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "index",
            "type": "uint256"
          }
        ],
        "name": "tokenOfOwnerByIndex",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [
          {
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "tokenURI",
        "outputs": [
          {
            "internalType": "string",
            "name": "",
            "type": "string"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
      {
        "inputs": [],
        "name": "totalSupply",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      }
    ];
    

Method Reference

The table below lists each function, its parameters, and usage notes.

Function Name Parameters / Returns Description / Usage
mintNFT Inputs:
(string IDCODE, string HEADER, string ACCESSION_DATE, string COMPOUND,
string SOURCE, string AUTHOR_LIST, string RESOLUTION, string EXPERIMENT_TYPE,
string SEQUENCE, string imageBase64, string fileBase64,
uint256 parentId)
Mints a new NFT with these metadata fields. If parentId != 0, minted as a child NFT under parentId.
updateMetadata Inputs:
(uint256 tokenId, same string fields as mintNFT)
Updates the metadata for an existing tokenId. Must be called by the owner or an approved operator.
getMetadata (uint256 tokenId) -> returns [IDCODE, HEADER, ACCESSION_DATE, COMPOUND, SOURCE, AUTHOR_LIST, RESOLUTION, EXPERIMENT_TYPE, SEQUENCE, imageBase64, fileBase64] Fetches metadata from on-chain storage for tokenId.
getEntireNFT (uint256 parentId) -> returns extended metadata + combinedFileBase64 Returns parent NFT's full data plus combinedFileBase64 if children exist.
getChildren (uint256 parentId) -> returns uint256[] childIds Lists IDs of child NFTs under parentId.
getChildrenPaginated (uint256 parentId, uint256 offset, uint256 limit) -> [childIds[], total] Same as getChildren but paginated.
getCombinedData (uint256 parentId) -> returns string combinedFileBase64 Returns combined data from parent + children (if stored).
tokenExists (uint256 tokenId) -> bool Checks if tokenId is valid/minted.
ownerOf (uint256 tokenId) -> address owner Standard ERC721 method for retrieving the current owner.
balanceOf (address owner) -> uint256 Standard ERC721: how many NFTs does owner have?
transferFrom (address from, address to, uint256 tokenId) Non-safe transfer from from to to. Must be approved or owner.
safeTransferFrom Overloads:
  • (address from, address to, uint256 tokenId)
  • (address from, address to, uint256 tokenId, bytes data)
Safe ERC721 transfer with checks on the receiving contract.
approve (address to, uint256 tokenId) Approve to to manage tokenId once.
setApprovalForAll (address operator, bool approved) Approves or revokes operator for all tokens of the sender.
getApproved (uint256 tokenId) -> address Returns the currently-approved address for tokenId.
isApprovedForAll (address owner, address operator) -> bool Checks if operator is approved for all tokens of owner.
totalSupply () -> uint256 Returns how many NFTs exist (not burned).
tokenByIndex (uint256 index) -> uint256 tokenId Enumerates all tokens (ERC721Enumerable).
tokenOfOwnerByIndex (address owner, uint256 index) -> uint256 tokenId Enumerates tokens of owner at a given index (ERC721Enumerable).
searchByIDCODE / searchByIDCODEPaginated (string searchTerm, [uint offset, uint limit]) -> uint256[] tokenIds On-chain substring search for IDCODE.
searchByHEADER / searchByHEADERPaginated (string, offset, limit) -> tokens matching HEADER On-chain substring search for HEADER.
searchByACCESSION_DATE / searchByACCESSION_DATEPaginated (string, offset, limit) On-chain substring search for ACCESSION_DATE.
searchByCOMPOUND / searchByCOMPOUNDPaginated (string, offset, limit) On-chain substring search for COMPOUND.
searchBySOURCE / searchBySOURCEPaginated (string, offset, limit) On-chain substring search for SOURCE.
searchByAUTHOR_LIST / searchByAUTHOR_LISTPaginated (string, offset, limit) On-chain substring search for AUTHOR_LIST.
searchByRESOLUTION / searchByRESOLUTIONPaginated (string, offset, limit) On-chain substring search for RESOLUTION.
searchByEXPERIMENT_TYPE / searchByEXPERIMENT_TYPEPaginated (string, offset, limit) On-chain substring search for EXPERIMENT_TYPE.
searchBySEQUENCE / searchBySEQUENCEPaginated (string, offset, limit) On-chain substring search for SEQUENCE.

Note: The on-chain search methods can be expensive if data is large. Off-chain or specialized solutions are often recommended for heavy search tasks, while on-chain queries are best for direct chain verification.

End of Documentation

We hope this single page helps you integrate with the MolNFT smart contract. Enjoy!