creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "BoxJsonParser.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.2;\n\ncontract BoxJsonParser {\n\n\tfunction generateTokenUriPart1(uint256 _tokenId, string memory _series, string memory _name, string memory _theme) public pure returns(string memory) {\n\t\treturn string(\n\t\t\tabi.encodePacked(\n\t\t\t\tbytes('data:application/json;utf8,{\"name\":\"'),\n\t\t\t\t_getName(_name, _tokenId),\n\t\t\t\tbytes('\",\"description\":\"'),\n\t\t\t\t\"NFTBoxes are a curated monthly box of NFTs on the newest gold standard of NFT technology.\"\n\t\t\t)\n\t\t);\n\t}\n\n\tfunction generateTokenUriPart2(uint256 _boxId, uint256 _tokenId, uint256 _max, string memory _series, string memory _hash, string memory _theme) public pure returns(string memory) {\n\t\treturn string(\n\t\t\tabi.encodePacked(\n\t\t\t\tbytes('\",\"attributes\":['),\n\t\t\t\t_traitBoxId(_boxId),\n\t\t\t\t_traitBoxSeries(_series),\n\t\t\t\t_traitBoxTheme(_theme),\n\t\t\t\t_traitBoxEdition(_tokenId, _max),\n\t\t\t\tbytes(',\"image\":\"'),\n\t\t\t\t_getImageCache(_hash),bytes('\"}')\n\t\t\t)\n\t\t);\n\t}\n\n\tfunction _traitBoxId(uint256 _boxId) internal pure returns(string memory) {\n\t\treturn string(abi.encodePacked(bytes('{\"trait_type\": \"box id\",\"value\":\"'), _uint2str(_boxId), bytes('\"},')));\n\t}\n\n\tfunction _traitBoxSeries(string memory _series) internal pure returns(string memory) {\n\t\treturn string(abi.encodePacked(bytes('{\"trait_type\": \"box series\",\"value\":\"'), _series, bytes('\"},')));\n\t}\n\n\tfunction _traitBoxTheme(string memory _theme) internal pure returns(string memory) {\n\t\treturn string(abi.encodePacked(bytes('{\"trait_type\": \"box theme\",\"value\":\"'), _theme, bytes('\"},')));\n\t}\n\n\tfunction _traitBoxEdition(uint256 _tokenId, uint256 _maxEdition) internal pure returns(string memory) {\n\t\treturn string(abi.encodePacked(bytes('{\"trait_type\": \"box edition\",\"value\":\"'), _uint2str(_tokenId), bytes(' of '), _uint2str(_maxEdition), bytes('\"}]')));\n\t}\n\n\tfunction _getName(string memory _name, uint256 _tokenId) internal pure returns(string memory) {\n\t\treturn string(abi.encodePacked(_name, \" #\", _uint2str(_tokenId)));\n\t}\n\n\tfunction _getImageCache(string memory _hash) internal pure returns(string memory) {\n\t\treturn string(abi.encodePacked(\"https://ipfs.io/ipfs/\", _hash));\n\t}\n\n\tfunction _uint2str(uint _i) internal pure returns (string memory _uintAsString) {\n\t\tif (_i == 0) {\n\t\t\treturn \"0\";\n\t\t}\n\t\tuint j = _i;\n\t\tuint len;\n\t\twhile (j != 0) {\n\t\t\tlen++;\n\t\t\tj /= 10;\n\t\t}\n\t\tbytes memory bstr = new bytes(len);\n\t\tuint k = len;\n\t\twhile (_i != 0) {\n\t\t\tk = k-1;\n\t\t\tuint8 temp = (48 + uint8(_i - _i / 10 * 10));\n\t\t\tbytes1 b1 = bytes1(temp);\n\t\t\tbstr[k] = b1;\n\t\t\t_i /= 10;\n\t\t}\n\t\treturn string(bstr);\n\t}\n}"
      }
    },
    "settings": {
      "evmVersion": "istanbul",
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "libraries": {
        "BoxJsonParser.sol": {}
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}