creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/SlothMintV17.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"./interfaces/ISlothV3.sol\";\nimport \"./interfaces/ISlothItemV5.sol\";\nimport \"./interfaces/ISpecialSlothItemV5.sol\";\nimport \"./interfaces/ISlothMintV5.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\ncontract SlothMintV17 is Initializable, OwnableUpgradeable, ISlothMintV5 {\n    address private _slothAddr;\n    address private _slothItemAddr;\n    address private _specialSlothItemAddr;\n    address private _piementAddress;\n    bool public publicSale;\n    mapping(uint256 => bool) public forSaleCollabo;\n    mapping(uint256 => uint256) public collaboSaleEndTimes;\n    mapping(uint256 => uint256) public collaboSalePricePatterns;\n    uint256 public collectionSize;\n    uint256 public itemCollectionSize;\n    uint256 public clothesSize;\n    uint256 public itemSize;\n    uint256 public currentItemCount;\n    uint256 public currentClothesCount;\n    mapping(uint256 => uint256) public collaboItemSizes;\n    mapping(uint256 => uint256) public currentCollaboItemCounts;\n\n    address private _treasuryAddress;\n    uint256 private _MINT_WITH_CLOTHES_PRICE;\n    uint256 private _MINT_WITH_COLLABO_PRICE;\n    uint256 private _MINT_WITH_COLLABO_PRICE2;\n    uint256 private _MINT_COLLABO_PRICE;\n    uint256 private _MINT_COLLABO_PRICE2;\n    address private _lightSlothAddr;\n    uint256 private _MINT_SLOTH_COLLECTION_PRICE;\n    uint256 private _MINT_SLOTH_BODY_PRICE;\n    uint256 private _MINT_SLOTH_CLOTHES_PRICE;\n    mapping(uint256 => uint256) private specialTypeSaleEndTime;\n    mapping(uint256 => uint256) private slothCollectionPrice;\n    mapping(uint256 => uint256) private slothCollectionSetPrice;\n\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor() {\n        _disableInitializers();\n    }\n\n    function initialize(uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) initializer public {\n        __Ownable_init();\n        collectionSize = newCollectionSize;\n        itemCollectionSize = newItemCollectionSize;\n        clothesSize = newClothesSize;\n        itemSize = newItemSize;\n        currentClothesCount = newCurrentClothesCount;\n        currentItemCount = newCurrentItemCount;\n\n        _treasuryAddress = payable(0x452Ccc6d4a818D461e20837B417227aB70C72B56);\n        _MINT_WITH_CLOTHES_PRICE = 0.021 ether;\n        _MINT_WITH_COLLABO_PRICE = 0.03 ether;\n        _MINT_WITH_COLLABO_PRICE2 = 0.04 ether;\n        _MINT_COLLABO_PRICE = 0.01 ether;\n        _MINT_COLLABO_PRICE2 = 0.02 ether;\n    }\n\n    function setSlothAddr(address newSlothAddr) external onlyOwner {\n        _slothAddr = newSlothAddr;\n    }\n    function setSlothItemAddr(address newSlothItemAddr) external onlyOwner {\n        _slothItemAddr = newSlothItemAddr;\n    }\n    function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner {\n        _specialSlothItemAddr = newSpecialSlothItemAddr;\n    }\n    function setPiementAddress(address newPiementAddress) external onlyOwner {\n        _piementAddress = newPiementAddress;\n    }\n    function setLightSlothAddr(address newLightSlothAddr) external onlyOwner {\n        _lightSlothAddr = newLightSlothAddr;\n    }\n    function setSlothCollectionPrice(uint256[] calldata specialTypeArray, uint256[] calldata priceArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          slothCollectionPrice[specialTypeArray[i]] = priceArray[i];\n        }\n    }\n    function setSlothCollectionPriceAll(uint256[] calldata specialTypeArray, uint256[] calldata priceArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          slothCollectionSetPrice[specialTypeArray[i]] = priceArray[i];\n        }\n    }\n    function setSlothBodyPrice(uint256 newPrice) external onlyOwner {\n        _MINT_SLOTH_BODY_PRICE = newPrice;\n    }\n    function setSlothClothesPrice(uint256 newPrice) external onlyOwner {\n        _MINT_SLOTH_CLOTHES_PRICE = newPrice;\n    }\n\n    function publicMintBody(uint8 quantity) payable public {\n        require(publicSale, \"inactive\");\n        require(ISlothV3(_slothAddr).totalSupply() + quantity <= collectionSize, \"exceeds collection size\");\n        require(msg.value == _MINT_SLOTH_BODY_PRICE * quantity, \"wrong price\");\n\n        _mintBody(quantity, msg.sender);\n        emit mintBody(quantity, false);\n    }\n    function _mintBody(uint8 quantity, address sender) internal {\n        ISlothV3(_slothAddr).mint(sender, quantity);\n    }\n    function publicMintBodyForPiement(address transferAddress, uint8 quantity) payable external {\n        require(publicSale, \"inactive\");\n        require(ISlothV3(_slothAddr).totalSupply() + quantity <= collectionSize, \"exceeds collection size\");\n        require(msg.value == _MINT_SLOTH_BODY_PRICE * quantity, \"wrong price\");\n        require(msg.sender == _piementAddress, \"wrong address\");\n\n        ISlothV3(_slothAddr).mint(transferAddress, quantity);\n        emit mintBody(quantity, true);\n    }\n\n    function _publicMint(uint8 quantity, address to) private {\n        require(publicSale, \"inactive\");\n        require(ISlothV3(_slothAddr).totalSupply() + quantity <= collectionSize, \"exceeds collection size\");\n        require(currentClothesCount + quantity <= clothesSize, \"exceeds clothes size\");\n\n        ISlothV3(_slothAddr).mint(to, quantity);\n        ISlothItemV5(_slothItemAddr).clothesMint(to, quantity);\n        currentClothesCount += quantity;\n    }\n\n    function _isSaleEnded(uint256 specialType) internal view returns (bool) {\n        if (collaboSaleEndTimes[specialType] == 0) {\n          return false;\n        }\n        return block.timestamp >= collaboSaleEndTimes[specialType];\n    }\n\n    function publicMintSlothCollectionDecemberAll(uint256 setQuantity) payable public {\n        require(forSaleCollabo[59], \"inactive collabo\");\n        require(setQuantity > 0, \"quantity must be greater than 0\");\n        require(msg.value == (0.02 ether * setQuantity), \"wrong price\");\n        for (uint8 clothType = 0; clothType < 3; clothType++) {\n          _mintSlothCollection(msg.sender, setQuantity, clothType, 59);\n          emit mintSlothCollection(setQuantity, 59, clothType, false);\n        }\n    }\n    function publicMintSlothCollectionDecember(uint256 quantity, uint8 clothType) payable public {\n        require(forSaleCollabo[59], \"inactive collabo\");\n        require(quantity > 0, \"quantity must be greater than 0\");\n        require(msg.value == (slothCollectionPrice[59] * quantity), \"wrong price\");\n        _mintSlothCollection(msg.sender, quantity, clothType, 59);\n        emit mintSlothCollection(quantity, 59, clothType, false);\n    }\n    function publicMintSlothCollectionDecemberAllForPiement(address transferAddress, uint256 setQuantity) payable public {\n        require(forSaleCollabo[59], \"inactive collabo\");\n        require(setQuantity > 0, \"quantity must be greater than 0\");\n        require(msg.sender == _piementAddress, \"worng address\");\n        require(msg.value == (0.02 ether * setQuantity), \"wrong price\");\n        for (uint8 clothType = 0; clothType < 3; clothType++) {\n          _mintSlothCollection(transferAddress, setQuantity, clothType, 59);\n          emit mintSlothCollection(setQuantity, 59, clothType, true);\n        }\n    }\n    function publicMintSlothCollection(uint256 quantity, uint8 clothType, uint256 specialType) payable public {\n        require(forSaleCollabo[specialType], \"inactive collabo\");\n        require(quantity > 0, \"quantity must be greater than 0\");\n        require(msg.value == (slothCollectionPrice[specialType] * quantity), \"wrong price\");\n        _mintSlothCollection(msg.sender, quantity, clothType, specialType);\n        emit mintSlothCollection(quantity, specialType, clothType, false);\n    }\n    function publicMintSlothCollectionAll(uint256 setQuantity, uint256 specialType) payable public {\n        require(forSaleCollabo[specialType], \"inactive collabo\");\n        require(setQuantity > 0, \"quantity must be greater than 0\");\n        require(msg.value == (slothCollectionSetPrice[specialType] * setQuantity), \"wrong price\");\n        _mintSlothCollectionAll(msg.sender, setQuantity, specialType);\n        emit mintSlothCollectionAll(setQuantity, specialType, false);\n    }\n    function publicMintSlothCollectionAllForPiemment(address transferAddress, uint256 setQuantity, uint256 specialType) payable public {\n        require(forSaleCollabo[specialType], \"inactive collabo\");\n        require(setQuantity > 0, \"quantity must be greater than 0\");\n        require(msg.sender == _piementAddress, \"worng address\");\n        require(msg.value == (slothCollectionSetPrice[specialType] * setQuantity), \"wrong price\");\n        _mintSlothCollectionAll(transferAddress, setQuantity, specialType);\n        emit mintSlothCollectionAll(setQuantity, specialType, true);\n    }\n    function _mintSlothCollection(address transferAddress, uint256 quantity, uint8 clothType, uint256 specialType) internal {\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintSlothCollection(transferAddress, quantity, clothType, specialType);\n    }\n    function _mintSlothCollectionAll(address transferAddress, uint256 setQuantity, uint256 specialType) internal {\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintSlothCollectionAll(transferAddress, setQuantity, specialType);\n    }\n\n    function checkAllowCollaboMint(uint8 quantity, uint256 specialType) internal view {\n        require(forSaleCollabo[specialType], \"inactive collabo\");\n        require(!_isSaleEnded(specialType), \"ended\");\n        require(currentCollaboItemCounts[specialType] + quantity <= collaboItemSizes[specialType], \"collabo sold out\");\n    }\n\n    function collaboMintValue(uint8 quantity, uint256 specialType) internal view returns (uint256) {\n        if (collaboSalePricePatterns[specialType] == 1) {\n          return _MINT_COLLABO_PRICE2 * quantity;\n        }\n        return _MINT_COLLABO_PRICE * quantity;\n    }\n\n    function bodyWithCollaboMintValue(uint8 quantity, uint256 specialType) internal view returns (uint256) {\n        if (collaboSalePricePatterns[specialType] == 1) {\n          return _MINT_COLLABO_PRICE2 * quantity + _MINT_SLOTH_BODY_PRICE * quantity;\n        }\n        return _MINT_COLLABO_PRICE * quantity + _MINT_SLOTH_BODY_PRICE * quantity;\n    }\n    function bodyAndClothWithCollaboMintValue(uint8 quantity, uint256 specialType) internal view returns (uint256) {\n        if (collaboSalePricePatterns[specialType] == 1) {\n          return _MINT_WITH_COLLABO_PRICE2 * quantity;\n        }\n        return _MINT_WITH_COLLABO_PRICE * quantity;\n    }\n\n    function mintCollaboWithBody(uint8 quantity, uint256 specialType) internal {\n        checkAllowCollaboMint(quantity, specialType);\n        require(msg.value ==  bodyWithCollaboMintValue(quantity, specialType), \"wrong price\");\n\n        _mintBody(quantity, msg.sender);\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintCollaboCloth(msg.sender, quantity, specialType);\n        currentCollaboItemCounts[specialType] += quantity;\n    }\n\n    function mintCollaboCloth(uint8 quantity, uint256 specialType) internal {\n        checkAllowCollaboMint(quantity, specialType);\n        require(msg.value ==  collaboMintValue(quantity, specialType), \"wrong price\");\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintCollaboCloth(msg.sender, quantity, specialType);\n        currentCollaboItemCounts[specialType] += quantity;\n    }\n\n    function publicMintBodyWithCollabo(uint256 specialType, uint8 quantity) payable external {\n        mintCollaboWithBody(quantity, specialType);\n        emit mintWithClothAndCollabo(quantity, specialType, false);\n    }\n    function publicMintBodyWithCollaboForPiement(address transferAddress, uint256 specialType) payable external {\n        checkAllowCollaboMint(1, specialType);\n        require(msg.value ==  bodyWithCollaboMintValue(1, specialType), \"wrong price\");\n        require(msg.sender == _piementAddress, \"worng address\");\n\n        _mintBody(1, transferAddress);\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintCollaboCloth(transferAddress, 1, specialType);\n        currentCollaboItemCounts[specialType] += 1;\n        emit mintWithClothAndCollabo(1, specialType, true);\n    }\n    function publicMintWithClothesAndCollaboForPiement(address transferAddress, uint256 specialType) payable external {\n        checkAllowCollaboMint(1, specialType);\n        require(ISlothItemV5(_slothItemAddr).totalSupply() + 1 <= itemCollectionSize, \"exceeds item collection size\");\n        require(currentClothesCount + 1 <= clothesSize, \"exceeds clothes size\");\n        require(msg.value ==  bodyAndClothWithCollaboMintValue(1, specialType), \"wrong price\");\n        if (msg.sender == owner()) {\n          _publicMint(1, transferAddress);\n          ISpecialSlothItemV5(_specialSlothItemAddr).mintCollaboCloth(transferAddress, 1, specialType);\n          currentCollaboItemCounts[specialType] += 1;\n          return;\n        }\n        require(msg.sender == _piementAddress, \"worng address\");\n        _publicMint(1, transferAddress);\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintCollaboCloth(transferAddress, 1, specialType);\n        currentCollaboItemCounts[specialType] += 1;\n        emit mintWithClothAndCollabo(1, specialType, true);\n    }\n    function publicMintWithClothesAndCollabo(uint256 specialType, uint8 quantity) payable external {\n        checkAllowCollaboMint(quantity, specialType);\n        require(msg.value ==  bodyAndClothWithCollaboMintValue(quantity, specialType), \"wrong price\");\n        _publicMint(quantity, msg.sender);\n        ISpecialSlothItemV5(_specialSlothItemAddr).mintCollaboCloth(msg.sender, quantity, specialType);\n        currentCollaboItemCounts[specialType] += quantity;\n        emit mintWithClothAndCollabo(quantity, specialType, false);\n    }\n    function publicMintOnlyCollabo(uint256 specialType, uint8 quantity) payable external {\n        mintCollaboCloth(quantity, specialType);\n        emit mintCollabo(quantity, specialType);\n    }\n\n    function mintAnyItem(IItemTypeV2.ItemType itemType, uint256 itemId) payable external {\n        if (itemType == IItemTypeV2.ItemType.CLOTHES) {\n          require(msg.value == _MINT_SLOTH_CLOTHES_PRICE, \"wrong price\");\n        } else if (itemType == IItemTypeV2.ItemType.HEAD || itemType == IItemTypeV2.ItemType.HAND || itemType == IItemTypeV2.ItemType.FOOT) {\n          require(msg.value == 0.02 ether, \"wrong price\");\n        }\n        ISlothItemV5.anyItemMintItem memory item = ISlothItemV5.anyItemMintItem(itemType, itemId);\n        ISlothItemV5(_slothItemAddr).anyItemMint(msg.sender, item);\n    }\n    function mintAnyItemMulti(ISlothItemV5.anyItemMintItem[] calldata items) payable external {\n        _mintAnyItemPirceCheck(items);\n        ISlothItemV5(_slothItemAddr).anyItemMintMulti(msg.sender, items);\n    }\n    function _mintAnyItemPirceCheck(ISlothItemV5.anyItemMintItem[] calldata items) internal view {\n        uint256 price = 0;\n        uint256[2] memory itemTypeCount;\n        for (uint256 i = 0; i < items.length; i++) {\n          if (items[i].itemType == IItemTypeV2.ItemType.CLOTHES) {\n            itemTypeCount[0] = itemTypeCount[0] + 1;\n            continue;\n          }\n          if (items[i].itemType == IItemTypeV2.ItemType.BACKGROUND) {\n            continue;\n          }\n          itemTypeCount[1] = itemTypeCount[1] + 1;\n        }\n        price = price + _MINT_SLOTH_CLOTHES_PRICE * itemTypeCount[0];\n        price = price + (0.02 ether * itemTypeCount[1]);\n        require(msg.value == price, \"wrong price\");\n    }\n\n    function checkHaveAnyNFT(address wallet) internal view returns (bool) {\n      return ISlothV3(_slothAddr).balanceOf(wallet) > 0 || ISlothV3(_lightSlothAddr).balanceOf(wallet) > 0;\n    }\n    function mintLiteracyTestFreeMint() external {\n      require(checkHaveAnyNFT(msg.sender), \"no nft\");\n      _mintSlothCollection(msg.sender, 1, 0, 76);\n    }\n\n    function setPublicSale(bool newPublicSale) external onlyOwner {\n        publicSale = newPublicSale;\n    }\n    function setSaleCollabo(uint256[] calldata specialTypeArray, bool[] calldata newSaleCollaboArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          forSaleCollabo[specialTypeArray[i]] = newSaleCollaboArray[i];\n        }\n    }\n    function setCollaboItemSizes(uint256[] calldata specialTypeArray, uint256[] calldata itemSizeArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          collaboItemSizes[specialTypeArray[i]] = itemSizeArray[i];\n        }\n    }\n    function setCollaboSaleEndTimes(uint256[] calldata specialTypeArray, uint256[] calldata endTimeArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          collaboSaleEndTimes[specialTypeArray[i]] = endTimeArray[i];\n        }\n    }\n    function setCollaboSalePricePatterns(uint256[] calldata specialTypeArray, uint256[] calldata pricePatternArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          collaboSalePricePatterns[specialTypeArray[i]] = pricePatternArray[i];\n        }\n    }\n    function setCurrentCollaboItemCount(uint256[] calldata specialTypeArray, uint256[] calldata itemCountArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          currentCollaboItemCounts[specialTypeArray[i]] = itemCountArray[i];\n        }\n    }\n    function setSecialTypeSaleEndTime(uint256[] calldata specialTypeArray, uint256[] calldata endTimeArray) external onlyOwner {\n        for (uint256 i = 0; i < specialTypeArray.length; i++) {\n          specialTypeSaleEndTime[specialTypeArray[i]] = endTimeArray[i];\n        }\n    }\n\n    function withdraw() external onlyOwner {\n        (bool sent,) = _treasuryAddress.call{value: address(this).balance}(\"\");\n        require(sent, \"Failed to send Ether\");\n    }\n\n    function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner {\n        require(ISlothItemV5(_slothItemAddr).totalSupply() + (quantity + itemQuantity) <= itemCollectionSize, \"exceeds item collection size\");\n\n        if (quantity > 0) {\n          _publicMint(quantity, msg.sender);\n        }\n    }\n}"
      },
      "contracts/interfaces/ISlothV3.sol": {
        "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IERC721AQueryableUpgradeable } from \"erc721a-upgradeable/contracts/interfaces/IERC721AQueryableUpgradeable.sol\";\nimport { IEquipmentV2 } from \"./IEquipmentV2.sol\";\nimport { IItemTypeV2 } from \"./IItemTypeV2.sol\";\n\ninterface ISlothV3 is IERC721AQueryableUpgradeable {\n  function mint(address sender, uint8 quantity) external;\n  function numberMinted(address sender) external view returns (uint256);\n  function setItem(uint256 _tokenId, IEquipmentV2.EquipmentTargetItem memory _targetItem, IItemTypeV2.ItemType _targetItemType, address sender) external returns (address);\n  function receiveItem(address tokenOwner, address itemContractAddress, uint256 itemTokenId) external;\n  function sendItem(address tokenOwner, address itemContractAddress, uint256 itemTokenId) external;\n}"
      },
      "contracts/interfaces/ISlothItemV5.sol": {
        "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IERC721AQueryableUpgradeable } from \"erc721a-upgradeable/contracts/interfaces/IERC721AQueryableUpgradeable.sol\";\nimport \"./IItemTypeV2.sol\";\n\ninterface ISlothItemV5 is IERC721AQueryableUpgradeable {\n  struct anyItemMintItem {\n    IItemTypeV2.ItemType itemType;\n    uint256 itemId;\n  }\n  function getItemType(uint256 tokenId) external view returns (IItemTypeV2.ItemType);\n  function getItemMintCount(address sender) external view returns (uint256);\n  function exists(uint256 tokenId) external view returns (bool);\n  function clothesMint(address sender, uint256 quantity) external;\n  function itemMint(address sender, uint256 quantity) external;\n  function anyItemMint(address sender, anyItemMintItem calldata item) external;\n  function anyItemMintMulti(address sender, anyItemMintItem[] calldata items) external;\n}"
      },
      "contracts/interfaces/ISpecialSlothItemV5.sol": {
        "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"./IItemTypeV2.sol\";\nimport { IERC721AQueryableUpgradeable } from \"erc721a-upgradeable/contracts/interfaces/IERC721AQueryableUpgradeable.sol\";\n\ninterface ISpecialSlothItemV5 is IERC721AQueryableUpgradeable, IItemTypeV2 {\n  function getItemType(uint256 tokenId) external view returns (IItemTypeV2.ItemType);\n  function getSpecialType(uint256 tokenId) external view returns (uint256);\n  function getClothType(uint256 tokenId) external view returns (uint256);\n  function exists(uint256 tokenId) external view returns (bool);\n  function isCombinational(uint256 _specialType) external view returns (bool);\n  function mintPoupelle(address sender, uint256 quantity) external;\n  function mintCollaboCloth(address sender, uint256 quantity, uint256 _specialType) external;\n  function mintHalloweenJiangshiSet(address sender, uint256 quantity) external;\n  function mintHalloweenJacKOLanternSet(address sender, uint256 quantity) external;\n  function mintHalloweenGhostSet(address sender, uint256 quantity) external;\n  function mintSlothCollectionNovember(address sender, uint256 quantity, uint8 clothType) external;\n  function mintSlothCollection(address sender, uint256 quantity, uint8 clothType, uint256 specialType) external;\n  function mintSlothCollectionAll(address sender, uint256 setQuantity, uint256 specialType) external;\n}\n"
      },
      "contracts/interfaces/ISlothMintV5.sol": {
        "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/**\n * @title Interface for Auction Houses\n */\ninterface ISlothMintV5 {\n  event mintWithCloth(\n    uint256 quantity\n  );\n  event mintWithClothAndItem(\n    uint256 quantity,\n    uint256 itemQuantity,\n    bool piement\n  );\n  event mintWithClothAndPoupelle(\n    uint256 quantity,\n    bool piement\n  );\n  event mintPoupelle(\n    uint256 quantity\n  );\n  event mintItem(\n    uint256 quantity,\n    bool piement\n  );\n  event mintWithClothAndCollabo(\n    uint256 quantity,\n    uint256 specialType,\n    bool piement\n  );\n  event mintCollabo(\n    uint256 quantity,\n    uint256 specialType\n  );\n  event mintSlothCollection(\n    uint256 quantity,\n    uint256 specialType,\n    uint256 clothType,\n    bool piement\n  );\n  event mintSlothCollectionAll(\n    uint256 quantity,\n    uint256 specialType,\n    bool piement\n  );\n  event mintBody(\n    uint256 quantity,\n    bool piement\n  );\n  event mintClothes(\n    uint quantity,\n    bool piement\n  );\n}"
      },
      "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0-rc.1) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        require(\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n            \"Initializable: contract is already initialized\"\n        );\n        _initialized = 1;\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n        _initialized = version;\n        _initializing = true;\n        _;\n        _initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        require(!_initializing, \"Initializable: contract is initializing\");\n        if (_initialized < type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Internal function that returns the initialized version. Returns `_initialized`\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _initialized;\n    }\n\n    /**\n     * @dev Internal function that returns the initialized version. Returns `_initializing`\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _initializing;\n    }\n}\n"
      },
      "contracts/interfaces/IItemTypeV2.sol": {
        "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IItemTypeV2 {\n  enum ItemType { CLOTHES, HEAD, HAND, FOOT, STAMP, BACKGROUND }\n  enum ItemMintType { SLOTH_ITEM, SPECIAL_SLOTH_ITEM, USER_GENERATED_SLOTH_ITEM }\n} "
      },
      "contracts/interfaces/IEquipmentV2.sol": {
        "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"./IItemTypeV2.sol\";\n\ninterface IEquipmentV2 {\n  struct EquipmentTargetItem {\n    uint256 itemTokenId;\n    IItemTypeV2.ItemMintType itemMintType; \n  }\n  struct Equipment {\n    uint256 itemId;\n    address itemAddr;\n  }\n  struct EquipmentTargetSpecial {\n    uint256 specialType;\n    bool combinationable;\n  }\n}"
      },
      "erc721a-upgradeable/contracts/interfaces/IERC721AQueryableUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.2\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport '../extensions/IERC721AQueryableUpgradeable.sol';\n"
      },
      "erc721a-upgradeable/contracts/extensions/IERC721AQueryableUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.2\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport '../IERC721AUpgradeable.sol';\n\n/**\n * @dev Interface of ERC721AQueryable.\n */\ninterface IERC721AQueryableUpgradeable is IERC721AUpgradeable {\n    /**\n     * Invalid query range (`start` >= `stop`).\n     */\n    error InvalidQueryRange();\n\n    /**\n     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n     *\n     * If the `tokenId` is out of bounds:\n     *\n     * - `addr = address(0)`\n     * - `startTimestamp = 0`\n     * - `burned = false`\n     * - `extraData = 0`\n     *\n     * If the `tokenId` is burned:\n     *\n     * - `addr = <Address of owner before token was burned>`\n     * - `startTimestamp = <Timestamp when token was burned>`\n     * - `burned = true`\n     * - `extraData = <Extra data when token was burned>`\n     *\n     * Otherwise:\n     *\n     * - `addr = <Address of owner>`\n     * - `startTimestamp = <Timestamp of start of ownership>`\n     * - `burned = false`\n     * - `extraData = <Extra data at start of ownership>`\n     */\n    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);\n\n    /**\n     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n     * See {ERC721AQueryable-explicitOwnershipOf}\n     */\n    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);\n\n    /**\n     * @dev Returns an array of token IDs owned by `owner`,\n     * in the range [`start`, `stop`)\n     * (i.e. `start <= tokenId < stop`).\n     *\n     * This function allows for tokens to be queried if the collection\n     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n     *\n     * Requirements:\n     *\n     * - `start < stop`\n     */\n    function tokensOfOwnerIn(\n        address owner,\n        uint256 start,\n        uint256 stop\n    ) external view returns (uint256[] memory);\n\n    /**\n     * @dev Returns an array of token IDs owned by `owner`.\n     *\n     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.\n     * It is meant to be called off-chain.\n     *\n     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n     * multiple smaller scans if the collection is large enough to cause\n     * an out-of-gas error (10K collections should be fine).\n     */\n    function tokensOfOwner(address owner) external view returns (uint256[] memory);\n}\n"
      },
      "erc721a-upgradeable/contracts/IERC721AUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.2\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\n/**\n * @dev Interface of ERC721A.\n */\ninterface IERC721AUpgradeable {\n    /**\n     * The caller must own the token or be an approved operator.\n     */\n    error ApprovalCallerNotOwnerNorApproved();\n\n    /**\n     * The token does not exist.\n     */\n    error ApprovalQueryForNonexistentToken();\n\n    /**\n     * The caller cannot approve to their own address.\n     */\n    error ApproveToCaller();\n\n    /**\n     * Cannot query the balance for the zero address.\n     */\n    error BalanceQueryForZeroAddress();\n\n    /**\n     * Cannot mint to the zero address.\n     */\n    error MintToZeroAddress();\n\n    /**\n     * The quantity of tokens minted must be more than zero.\n     */\n    error MintZeroQuantity();\n\n    /**\n     * The token does not exist.\n     */\n    error OwnerQueryForNonexistentToken();\n\n    /**\n     * The caller must own the token or be an approved operator.\n     */\n    error TransferCallerNotOwnerNorApproved();\n\n    /**\n     * The token must be owned by `from`.\n     */\n    error TransferFromIncorrectOwner();\n\n    /**\n     * Cannot safely transfer to a contract that does not implement the\n     * ERC721Receiver interface.\n     */\n    error TransferToNonERC721ReceiverImplementer();\n\n    /**\n     * Cannot transfer to the zero address.\n     */\n    error TransferToZeroAddress();\n\n    /**\n     * The token does not exist.\n     */\n    error URIQueryForNonexistentToken();\n\n    /**\n     * The `quantity` minted with ERC2309 exceeds the safety limit.\n     */\n    error MintERC2309QuantityExceedsLimit();\n\n    /**\n     * The `extraData` cannot be set on an unintialized ownership slot.\n     */\n    error OwnershipNotInitializedForExtraData();\n\n    // =============================================================\n    //                            STRUCTS\n    // =============================================================\n\n    struct TokenOwnership {\n        // The address of the owner.\n        address addr;\n        // Stores the start time of ownership with minimal overhead for tokenomics.\n        uint64 startTimestamp;\n        // Whether the token has been burned.\n        bool burned;\n        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.\n        uint24 extraData;\n    }\n\n    // =============================================================\n    //                         TOKEN COUNTERS\n    // =============================================================\n\n    /**\n     * @dev Returns the total number of tokens in existence.\n     * Burned tokens will reduce the count.\n     * To get the total number of tokens minted, please see {_totalMinted}.\n     */\n    function totalSupply() external view returns (uint256);\n\n    // =============================================================\n    //                            IERC165\n    // =============================================================\n\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n    // =============================================================\n    //                            IERC721\n    // =============================================================\n\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables\n     * (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in `owner`'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`,\n     * checking first that contract recipients are aware of the ERC721 protocol\n     * to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be have been allowed to move\n     * this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement\n     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom}\n     * whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token\n     * by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the\n     * zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom}\n     * for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n    // =============================================================\n    //                        IERC721Metadata\n    // =============================================================\n\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n\n    // =============================================================\n    //                           IERC2309\n    // =============================================================\n\n    /**\n     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`\n     * (inclusive) is transferred from `from` to `to`, as defined in the\n     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.\n     *\n     * See {_mintERC2309} for more details.\n     */\n    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0-rc.1) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}