ETH Price: $2,516.49 (+2.54%)

Token

KRDAOT (KRDAOT)
 

Overview

Max Total Supply

302 KRDAOT

Holders

9

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 KRDAOT
0xeC5Bb097c6677c3E862388974e37796B37716a74
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
KarineDAO

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 19 : KarineDAO.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";

import "./ERC721AKarine.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

// import "hardhat/console.sol";

contract KarineDAO is ERC721AKarine, Ownable, Pausable, ReentrancyGuard, IERC2981 {
  string private _baseTokenURI;
  mapping(address => bool) private _proxyRegistryAddress;

  uint256[5] private _mosaicDataArr; // 5*256 bit to store 1158 bit location of mosaic nft

  // init swapNFTMapping and alter value when random later
  uint8[147] private _canNotMintNFTMapping; // use for random swap nft

  uint64 private _privateOpenTime;
  uint64 private _publicOpenTime;
  uint64 private _revelationTime;

  uint16 private _startIndex = 0;
  uint16 internal _royalty = 680; // base 10000, 6.8%
  uint32 internal randNonce = 0;
  uint16 private _canMintNFTMinted;
  uint16 private _canMintNFTMintedAfterRevelation;
  uint8 private _canNotMintNFTMinted;
  bool private _revelated = false;

  address payable private _productOwnerAddr;

  // constant
  uint256 public constant VERSION = 10200;
  uint16 public constant BASE = 10000; // base for royalty

  uint8 public immutable MAX_MINT_TIER_1 = 3;
  uint8 public immutable MAX_MINT_TIER_2 = 1;
  uint8 public immutable MAX_MINT_PUBLIC = 10;

  /// @dev NFT JSON ID map : | 210 premint | 1158 can mint | 147 swap only |
  /// @dev NFT ID map : | 210 premint | <= 1158 can mint | 147 swap only ~ can mint left |
  uint16 public immutable TOTAL_PREMINT_NFT;
  uint16 public immutable TOTAL_CAN_MINT_NFT;
  uint16 public immutable TOTAL_CANNOT_MINT_NFT;

  uint256 public immutable PRIVATE_PRICE;
  uint256 public immutable PUBLIC_PRICE;

  constructor(
    string memory baseURI,
    address payable productOwnerAddr,
    uint256[5] memory mosaicDataArr,
    uint64 privateOpenTime,
    uint64 publicOpenTime,
    uint64 revelationTime,
    uint16 totalPremintNFT,
    uint16 totalCanmintNFT,
    uint16 totalCannotmintNFT,
    uint256 privatePrice,
    uint256 publicPrice
  ) ERC721AKarine("KRDAOT", "KRDAOT") {
    _baseTokenURI = baseURI;
    _productOwnerAddr = productOwnerAddr;
    _mosaicDataArr = mosaicDataArr;
    _privateOpenTime = privateOpenTime;
    _publicOpenTime = publicOpenTime;
    _revelationTime = revelationTime;

    // init immutable
    TOTAL_PREMINT_NFT = totalPremintNFT;
    TOTAL_CAN_MINT_NFT = totalCanmintNFT;
    TOTAL_CANNOT_MINT_NFT = totalCannotmintNFT;

    PRIVATE_PRICE = privatePrice;
    PUBLIC_PRICE = publicPrice;

    // init swapNFTMapping and alter value when random later
    for (uint8 i = 0; i < totalCannotmintNFT; i++) {
      _canNotMintNFTMapping[i] = i;
    }
    _safeMint(_productOwnerAddr, totalPremintNFT);
  }

  ///@dev productOwner addr

  function setProductOwner(address addr) external onlyOwner {
    _productOwnerAddr = payable(addr);
  }

  function getProductOwner() external view returns (address) {
    return _productOwnerAddr;
  }

  ///@dev allow set _mosaicDataArr before _revelated to avoid issue
  function setMosaicDataArr(uint256[5] memory mosaicDataArr) external onlyOwner {
    require(!_revelated);
    _mosaicDataArr = mosaicDataArr;
  }

  ///@dev setTime

  function setTime(
    uint64 privateOpenTime,
    uint64 publicOpenTime,
    uint64 revelationTime
  ) external onlyOwner {
    require(!_revelated);
    _privateOpenTime = privateOpenTime;
    _publicOpenTime = publicOpenTime;
    _revelationTime = revelationTime;
  }

  /**
  @dev royalty
   */

  function royaltyInfo(uint256, uint256 _salePrice)
    external
    view
    override
    returns (address receiver, uint256 royaltyAmount)
  {
    return (_productOwnerAddr, (_salePrice * _royalty) / BASE);
  }

  function setRoyalty(uint16 royalty) external onlyOwner {
    _royalty = royalty;
  }

  ///@dev white list

  function addToWhiteList1(address[] memory addrArr) external {
    require((msg.sender == _productOwnerAddr) || (msg.sender == owner()));
    for (uint256 i = 0; i < addrArr.length; i++) {
      _addressData[addrArr[i]].limitPrivateMint = MAX_MINT_TIER_1;
    }
  }

  function addToWhiteList2(address[] memory addrArr) external {
    require((msg.sender == _productOwnerAddr) || (msg.sender == owner()));
    for (uint256 i = 0; i < addrArr.length; i++) {
      _addressData[addrArr[i]].limitPrivateMint = MAX_MINT_TIER_2;
    }
  }

  function removeFromWhiteList(address[] memory addrArr) external {
    require((msg.sender == _productOwnerAddr) || (msg.sender == owner()));
    for (uint256 i = 0; i < addrArr.length; i++) {
      _addressData[addrArr[i]].limitPrivateMint = 0;
    }
  }

  function getPrivateLimitOfAddr(address addr) external view returns (uint8) {
    return _addressData[addr].limitPrivateMint;
  }

  ///@dev cannot underflow if everything correct
  function getMintTimesLeft(address addr, bool isPrivate) external view returns (uint256) {
    if (!_revelated) {
      if (isPrivate) {
        if (_addressData[addr].limitPrivateMint > _addressData[addr].numberPrivateMinted) {
          return _addressData[addr].limitPrivateMint - _addressData[addr].numberPrivateMinted;
        } else {
          return 0;
        }
      } else {
        return MAX_MINT_PUBLIC - (_numberMinted(addr) - _addressData[addr].numberPrivateMinted);
      }
    } else {
      if (addr == _productOwnerAddr) {
        return TOTAL_CAN_MINT_NFT - (_canMintNFTMinted + _canMintNFTMintedAfterRevelation);
      } else {
        return 0;
      }
    }
  }

  // check mosaic nft

  function isMosaic(uint16 tokenId) public view returns (bool) {
    if (!_revelated || tokenId < TOTAL_PREMINT_NFT) {
      return false;
    }
    uint16 indexInCanMintNFT = tokenIdToIndex(tokenId) - TOTAL_PREMINT_NFT;
    uint16 idxInMosaicDataArr = indexInCanMintNFT / 256;
    if (idxInMosaicDataArr >= _mosaicDataArr.length) {
      return false;
    }
    // get bit info
    uint256 bitValue = (_mosaicDataArr[idxInMosaicDataArr] & (1 << (indexInCanMintNFT % 256)));
    return bitValue > 0;
  }

  /// @dev minting

  /**
   * @dev mints `numToken` tokens and assigns it to
   * `msg.sender` by calling _safeMint function.
   *
   * Requirements:
   * - Current timestamp must within period of private sale `_privateOpenTime` - `_publicOpenTime`.
   * - Ether amount sent greater or equal the `PRIVATE_PRICE` multipled by `numToken`.
   * - `numToken` within limits of max number of tokens minted in single txn.
   * @param numToken - Number of tokens to be minted
   */
  function mintPrivateSale(uint8 numToken) external payable whenNotPaused {
    uint256 time = block.timestamp;
    require(
      (!_revelated) &&
        (time >= _privateOpenTime && time < _publicOpenTime) &&
        _addressData[msg.sender].limitPrivateMint > 0,
      "Mint is not open"
    );
    require((_canMintNFTMinted + numToken) <= TOTAL_CAN_MINT_NFT, "Out of stock");
    require(!Address.isContract(msg.sender));
    require(numToken > 0, "Empty numToken");
    require(msg.value >= PRIVATE_PRICE * numToken, "Insufficient ETH");
    require(
      (_addressData[msg.sender].numberPrivateMinted + numToken) <= _addressData[msg.sender].limitPrivateMint,
      "Out of times"
    );
    _addressData[msg.sender].numberPrivateMinted += numToken;
    _canMintNFTMinted += numToken;

    _safeMint(msg.sender, numToken);
  }

  /**
   * @dev mints `numToken` tokens and assigns it to
   * `msg.sender` by calling _safeMint function.
   *
   * Requirements:
   * - Current timestamp must within period of public sale `_publicOpenTime` - `_revelationTime`.
   * - Ether amount sent greater or equal the `PUBLIC_PRICE` multipled by `numToken`.
   * - `numToken` within limits of max number of tokens minted in single txn.
   * @param numToken - Number of tokens to be minted
   */
  function mintPublicSale(uint8 numToken) external payable whenNotPaused {
    uint256 time = block.timestamp;
    require((!_revelated) && (time >= _publicOpenTime && time < _revelationTime), "Mint is not open");
    require((_canMintNFTMinted + numToken) <= TOTAL_CAN_MINT_NFT, "Out of stock");
    require(!Address.isContract(msg.sender));
    require(numToken > 0, "Empty numToken");
    require(msg.value >= PUBLIC_PRICE * numToken, "Insufficient ETH");

    require(
      (_numberMinted(msg.sender) - _addressData[msg.sender].numberPrivateMinted) + numToken <= MAX_MINT_PUBLIC,
      "Out of times"
    );

    _canMintNFTMinted += numToken;

    _safeMint(msg.sender, numToken);
  }

  function mintAndTransferAfterRevelation(uint8 numToken, address addr) external whenNotPaused {
    require(_revelated && msg.sender == _productOwnerAddr);
    require((_canMintNFTMinted + _canMintNFTMintedAfterRevelation + numToken) <= TOTAL_CAN_MINT_NFT, "Out of NFT");
    uint256 startTokenId = _currentIndex;
    for (uint8 i = 0; i < numToken; i++) {
      _ownerships[startTokenId].isCanMintNFT = true;
      _ownerships[startTokenId].mappingIndex = _canMintNFTMinted + _canMintNFTMintedAfterRevelation + i;

      startTokenId++;
    }

    _canMintNFTMintedAfterRevelation += numToken;
    _safeMint(addr, numToken);
  }

  /**
   @dev revelation
   */
  function revelate(string memory baseTokenURI, bool mintAllUnMinted) external onlyOwner {
    require(block.timestamp >= _revelationTime);
    if (mintAllUnMinted) {
      _safeMint(_productOwnerAddr, TOTAL_CAN_MINT_NFT - _canMintNFTMinted);
      _canMintNFTMinted = TOTAL_CAN_MINT_NFT;
    }
    // random _startIndex
    _startIndex = uint16(random(TOTAL_CAN_MINT_NFT));
    _baseTokenURI = baseTokenURI;
    _revelated = true;
  }

  function emergencyUnrevelate() external onlyOwner {
    _revelated = false;
  }

  /**
   @dev swap
   */

  function random(uint256 _modulus) private returns (uint256) {
    randNonce++;
    return uint256(keccak256(abi.encodePacked(block.timestamp, msg.sender, randNonce))) % _modulus;
  }

  function swap(uint16[] memory tokenIds) external whenNotPaused {
    require(block.timestamp >= _revelationTime && _revelated, "Swap is not open");
    require((tokenIds.length % 2) == 0, "Length must be even");
    uint8 numToken = uint8(tokenIds.length / 2);
    require((_canNotMintNFTMinted + numToken) <= TOTAL_CANNOT_MINT_NFT, "Out of NFT");

    for (uint16 i = 0; i < tokenIds.length; i++) {
      require(isMosaic(tokenIds[i]), "Only use mosaic");
    }
    // transfer all mosaic to product owner address
    for (uint16 i = 0; i < tokenIds.length; i++) {
      transferFrom(msg.sender, _productOwnerAddr, tokenIds[i]);
    }

    // random NFT

    uint256 startTokenId = _currentIndex;
    uint8 updatedCanNotMintNFTMinted = _canNotMintNFTMinted;
    for (uint8 i = 0; i < numToken; i++) {
      uint8 randomNumber = updatedCanNotMintNFTMinted +
        uint8(random(TOTAL_CANNOT_MINT_NFT - updatedCanNotMintNFTMinted));
      // swap value in _canNotMintNFTMapping
      uint8 temp = _canNotMintNFTMapping[randomNumber];
      _canNotMintNFTMapping[randomNumber] = _canNotMintNFTMapping[updatedCanNotMintNFTMinted];
      _canNotMintNFTMapping[updatedCanNotMintNFTMinted] = temp;

      _ownerships[startTokenId].isCanMintNFT = false;
      _ownerships[startTokenId].mappingIndex = temp;

      startTokenId++;
      updatedCanNotMintNFTMinted++;
    }
    _canNotMintNFTMinted = updatedCanNotMintNFTMinted;
    // mint NFT to msg.sender
    _safeMint(msg.sender, numToken);
  }

  /**
   @dev tokenUri
   */
  function _baseURI() internal view override returns (string memory) {
    return _baseTokenURI;
  }

  function setBaseURI(string memory baseURI) external onlyOwner {
    require(!_revelated);
    _baseTokenURI = baseURI;
  }

  function tokenIdToIndex(uint256 tokenId) public view returns (uint16) {
    if (!_revelated) {
      return uint16(tokenId);
    }
    uint256 index;
    if (tokenId < TOTAL_PREMINT_NFT) {
      // for premint NFT mint in correct time
      index = tokenId + _startIndex;
      index %= TOTAL_PREMINT_NFT;
    } else if (tokenId < (TOTAL_PREMINT_NFT + _canMintNFTMinted)) {
      // for canmint NFT mint in correct time
      index = (tokenId - TOTAL_PREMINT_NFT) + _startIndex;
      index %= TOTAL_CAN_MINT_NFT;
      index += TOTAL_PREMINT_NFT;
    } else if (_ownerships[tokenId].isCanMintNFT) {
      // for canmint NFT mint after revelation
      index = _ownerships[tokenId].mappingIndex + _startIndex;
      index %= TOTAL_CAN_MINT_NFT;
      index += TOTAL_PREMINT_NFT;
    } else {
      // for can not mint nft
      index = _ownerships[tokenId].mappingIndex + TOTAL_PREMINT_NFT + TOTAL_CAN_MINT_NFT;
    }
    return uint16(index);
  }

  function tokenURI(uint256 tokenId) public view override returns (string memory) {
    if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

    string memory baseURI = _baseURI();
    uint256 index = tokenIdToIndex(tokenId);

    return
      bytes(baseURI).length != 0
        ? string(abi.encodePacked(baseURI, Strings.toString(index), ".json"))
        : string(abi.encodePacked(Strings.toString(index), ".json"));
  }

  /**
   @dev withdraw
   */
  function withdraw() external nonReentrant whenNotPaused {
    require(msg.sender == _productOwnerAddr);
    payable(msg.sender).transfer(address(this).balance);
  }

  /** @dev pause */

  function pause() public onlyOwner {
    _pause();
  }

  function unpause() public onlyOwner {
    _unpause();
  }

  /**
  @dev get tokenId to nft mapping
   */

  function getAllTokenIdToIndex() external view returns (uint16[] memory) {
    uint16[] memory allTokenIdToIndex = new uint16[](_currentIndex);
    for (uint256 i; i < _currentIndex; i++) {
      allTokenIdToIndex[i] = uint16(tokenIdToIndex(i));
    }
    return allTokenIdToIndex;
  }

  function getPrivateOpenTime() external view returns (uint64) {
    return _privateOpenTime;
  }

  function getPublicOpenTime() external view returns (uint64) {
    return _publicOpenTime;
  }

  function getRevelationTime() external view returns (uint64) {
    return _revelationTime;
  }

  function getStartIndex() external view returns (uint16) {
    return _startIndex;
  }

  function getCanMintNFTMinted() external view returns (uint16) {
    return _canMintNFTMinted + _canMintNFTMintedAfterRevelation;
  }

  function getCanNotMintNFTMinted() external view returns (uint16) {
    return _canNotMintNFTMinted;
  }

  function getMosaicDataArr() external view returns (uint256[5] memory) {
    return _mosaicDataArr;
  }

  function getRevelated() external view returns (bool) {
    return _revelated;
  }

  /**
   * Override isApprovedForAll to whitelisted marketplaces to enable gas-free listings.
   *
   */
  function isApprovedForAll(address owner, address operator) public view override returns (bool) {
    // check if this is an approved marketplace
    if (_proxyRegistryAddress[operator]) {
      return true;
    }
    // otherwise, use the default ERC721 isApprovedForAll()
    return super.isApprovedForAll(owner, operator);
  }

  /*
   * Function to set status of proxy contracts addresses
   *
   */
  function setProxy(address proxyAddress, bool value) external onlyOwner {
    _proxyRegistryAddress[proxyAddress] = value;
  }
}

File 2 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 3 of 19 : ERC721AKarine.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs
// Custom: Tokenize NFT Team

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintedQueryForZeroAddress();
error BurnedQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerIndexOutOfBounds();
error OwnerQueryForNonexistentToken();
error TokenIndexOutOfBounds();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128).
 */
contract ERC721AKarine is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
  using Address for address;
  using Strings for uint256;

  // Compiler will pack this into a single 256bit word.
  struct TokenOwnership {
    // The address of the owner.
    address addr;
    // Keeps track of the start time of ownership with minimal overhead for tokenomics.
    uint64 startTimestamp;
    // Whether the token has been burned.
    bool burned;
    // Use for custom TokenURI
    bool isCanMintNFT;
    uint16 mappingIndex;
  }

  // Compiler will pack this into a single 256bit word.
  struct AddressData {
    // Realistically, 2**64-1 is more than enough.
    uint64 balance;
    // Keeps track of mint count with minimal overhead for tokenomics.
    uint64 numberMinted;
    // Keeps track of burn count with minimal overhead for tokenomics.
    uint64 numberBurned;
    // for private mint
    uint8 numberPrivateMinted;
    uint8 limitPrivateMint;
  }

  // Compiler will pack the following
  // _currentIndex and _burnCounter into a single 256bit word.

  // The tokenId of the next token to be minted.
  uint128 internal _currentIndex;

  // The number of tokens burned.
  uint128 internal _burnCounter;

  // Token name
  string private _name;

  // Token symbol
  string private _symbol;

  // Mapping from token ID to ownership details
  // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
  mapping(uint256 => TokenOwnership) internal _ownerships;

  // Mapping owner address to address data
  mapping(address => AddressData) internal _addressData;

  // Mapping from token ID to approved address
  mapping(uint256 => address) private _tokenApprovals;

  // Mapping from owner to operator approvals
  mapping(address => mapping(address => bool)) private _operatorApprovals;

  constructor(string memory name_, string memory symbol_) {
    _name = name_;
    _symbol = symbol_;
  }

  /**
   * @dev See {IERC721Enumerable-totalSupply}.
   */
  function totalSupply() public view override returns (uint256) {
    // Counter underflow is impossible as _burnCounter cannot be incremented
    // more than _currentIndex times
    unchecked {
      return _currentIndex - _burnCounter;
    }
  }

  /**
   * @dev See {IERC721Enumerable-tokenByIndex}.
   * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
   * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
   */
  function tokenByIndex(uint256 index) public view override returns (uint256) {
    uint256 numMintedSoFar = _currentIndex;
    uint256 tokenIdsIdx;

    // Counter overflow is impossible as the loop breaks when
    // uint256 i is equal to another uint256 numMintedSoFar.
    unchecked {
      for (uint256 i; i < numMintedSoFar; i++) {
        TokenOwnership memory ownership = _ownerships[i];
        if (!ownership.burned) {
          if (tokenIdsIdx == index) {
            return i;
          }
          tokenIdsIdx++;
        }
      }
    }
    revert TokenIndexOutOfBounds();
  }

  /**
   * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
   * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
   * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
   */
  function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
    if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds();
    uint256 numMintedSoFar = _currentIndex;
    uint256 tokenIdsIdx;
    address currOwnershipAddr;

    // Counter overflow is impossible as the loop breaks when
    // uint256 i is equal to another uint256 numMintedSoFar.
    unchecked {
      for (uint256 i; i < numMintedSoFar; i++) {
        TokenOwnership memory ownership = _ownerships[i];
        if (ownership.burned) {
          continue;
        }
        if (ownership.addr != address(0)) {
          currOwnershipAddr = ownership.addr;
        }
        if (currOwnershipAddr == owner) {
          if (tokenIdsIdx == index) {
            return i;
          }
          tokenIdsIdx++;
        }
      }
    }

    // Execution should never reach this point.
    revert();
  }

  /**
   * @dev See {IERC165-supportsInterface}.
   */
  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
    return
      interfaceId == type(IERC721).interfaceId ||
      interfaceId == type(IERC721Metadata).interfaceId ||
      interfaceId == type(IERC721Enumerable).interfaceId ||
      super.supportsInterface(interfaceId);
  }

  /**
   * @dev See {IERC721-balanceOf}.
   */
  function balanceOf(address owner) public view override returns (uint256) {
    if (owner == address(0)) revert BalanceQueryForZeroAddress();
    return uint256(_addressData[owner].balance);
  }

  function _numberMinted(address owner) internal view returns (uint256) {
    if (owner == address(0)) revert MintedQueryForZeroAddress();
    return uint256(_addressData[owner].numberMinted);
  }

  function _numberBurned(address owner) internal view returns (uint256) {
    if (owner == address(0)) revert BurnedQueryForZeroAddress();
    return uint256(_addressData[owner].numberBurned);
  }

  /**
   * Gas spent here starts off proportional to the maximum mint batch size.
   * It gradually moves to O(1) as tokens get transferred around in the collection over time.
   */
  function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
    uint256 curr = tokenId;

    unchecked {
      if (curr < _currentIndex) {
        TokenOwnership memory ownership = _ownerships[curr];
        if (!ownership.burned) {
          if (ownership.addr != address(0)) {
            return ownership;
          }
          // Invariant:
          // There will always be an ownership that has an address and is not burned
          // before an ownership that does not have an address and is not burned.
          // Hence, curr will not underflow.
          while (true) {
            curr--;
            ownership = _ownerships[curr];
            if (ownership.addr != address(0)) {
              return ownership;
            }
          }
        }
      }
    }
    revert OwnerQueryForNonexistentToken();
  }

  /**
   * @dev See {IERC721-ownerOf}.
   */
  function ownerOf(uint256 tokenId) public view override returns (address) {
    return ownershipOf(tokenId).addr;
  }

  /**
   * @dev See {IERC721Metadata-name}.
   */
  function name() public view virtual override returns (string memory) {
    return _name;
  }

  /**
   * @dev See {IERC721Metadata-symbol}.
   */
  function symbol() public view virtual override returns (string memory) {
    return _symbol;
  }

  /**
   * @dev See {IERC721Metadata-tokenURI}.
   */
  function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

    string memory baseURI = _baseURI();
    return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
  }

  /**
   * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
   * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
   * by default, can be overriden in child contracts.
   */
  function _baseURI() internal view virtual returns (string memory) {
    return "";
  }

  /**
   * @dev See {IERC721-approve}.
   */
  function approve(address to, uint256 tokenId) public override {
    address owner = ERC721AKarine.ownerOf(tokenId);
    if (to == owner) revert ApprovalToCurrentOwner();

    if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
      revert ApprovalCallerNotOwnerNorApproved();
    }

    _approve(to, tokenId, owner);
  }

  /**
   * @dev See {IERC721-getApproved}.
   */
  function getApproved(uint256 tokenId) public view override returns (address) {
    if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

    return _tokenApprovals[tokenId];
  }

  /**
   * @dev See {IERC721-setApprovalForAll}.
   */
  function setApprovalForAll(address operator, bool approved) public override {
    if (operator == _msgSender()) revert ApproveToCaller();

    _operatorApprovals[_msgSender()][operator] = approved;
    emit ApprovalForAll(_msgSender(), operator, approved);
  }

  /**
   * @dev See {IERC721-isApprovedForAll}.
   */
  function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
    return _operatorApprovals[owner][operator];
  }

  /**
   * @dev See {IERC721-transferFrom}.
   */
  function transferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    _transfer(from, to, tokenId);
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    safeTransferFrom(from, to, tokenId, "");
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId,
    bytes memory _data
  ) public virtual override {
    _transfer(from, to, tokenId);
    if (!_checkOnERC721Received(from, to, tokenId, _data)) {
      revert TransferToNonERC721ReceiverImplementer();
    }
  }

  /**
   * @dev Returns whether `tokenId` exists.
   *
   * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
   *
   * Tokens start existing when they are minted (`_mint`),
   */
  function _exists(uint256 tokenId) internal view returns (bool) {
    return tokenId < _currentIndex && !_ownerships[tokenId].burned;
  }

  function _safeMint(address to, uint256 quantity) internal {
    _safeMint(to, quantity, "");
  }

  /**
   * @dev Safely mints `quantity` tokens and transfers them to `to`.
   *
   * Requirements:
   *
   * - If `to` refers to a smart contract, 
            it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
   * - `quantity` must be greater than 0.
   *
   * Emits a {Transfer} event.
   */
  function _safeMint(
    address to,
    uint256 quantity,
    bytes memory _data
  ) internal {
    _mint(to, quantity, _data, true);
  }

  /**
   * @dev Mints `quantity` tokens and transfers them to `to`.
   *
   * Requirements:
   *
   * - `to` cannot be the zero address.
   * - `quantity` must be greater than 0.
   *
   * Emits a {Transfer} event.
   */
  function _mint(
    address to,
    uint256 quantity,
    bytes memory _data,
    bool safe
  ) internal {
    uint256 startTokenId = _currentIndex;
    if (to == address(0)) revert MintToZeroAddress();
    if (quantity == 0) revert MintZeroQuantity();

    _beforeTokenTransfers(address(0), to, startTokenId, quantity);

    // Overflows are incredibly unrealistic.
    // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1
    // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1
    unchecked {
      _addressData[to].balance += uint64(quantity);
      _addressData[to].numberMinted += uint64(quantity);

      _ownerships[startTokenId].addr = to;
      _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

      uint256 updatedIndex = startTokenId;

      for (uint256 i; i < quantity; i++) {
        emit Transfer(address(0), to, updatedIndex);
        if (safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data)) {
          revert TransferToNonERC721ReceiverImplementer();
        }
        updatedIndex++;
      }

      _currentIndex = uint128(updatedIndex);
    }
    _afterTokenTransfers(address(0), to, startTokenId, quantity);
  }

  /**
   * @dev Transfers `tokenId` from `from` to `to`.
   *
   * Requirements:
   *
   * - `to` cannot be the zero address.
   * - `tokenId` token must be owned by `from`.
   *
   * Emits a {Transfer} event.
   */
  function _transfer(
    address from,
    address to,
    uint256 tokenId
  ) private {
    TokenOwnership memory prevOwnership = ownershipOf(tokenId);

    bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
      isApprovedForAll(prevOwnership.addr, _msgSender()) ||
      getApproved(tokenId) == _msgSender());

    if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
    if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
    if (to == address(0)) revert TransferToZeroAddress();

    _beforeTokenTransfers(from, to, tokenId, 1);

    // Clear approvals from the previous owner
    _approve(address(0), tokenId, prevOwnership.addr);

    // Underflow of the sender's balance is impossible because we check for
    // ownership above and the recipient's balance can't realistically overflow.
    // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128.
    unchecked {
      _addressData[from].balance -= 1;
      _addressData[to].balance += 1;

      _ownerships[tokenId].addr = to;
      _ownerships[tokenId].startTimestamp = uint64(block.timestamp);

      // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
      // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
      uint256 nextTokenId = tokenId + 1;
      if (_ownerships[nextTokenId].addr == address(0)) {
        // This will suffice for checking _exists(nextTokenId),
        // as a burned slot cannot contain the zero address.
        if (nextTokenId < _currentIndex) {
          _ownerships[nextTokenId].addr = prevOwnership.addr;
          _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
        }
      }
    }

    emit Transfer(from, to, tokenId);
    _afterTokenTransfers(from, to, tokenId, 1);
  }

  /**
   * @dev Destroys `tokenId`.
   * The approval is cleared when the token is burned.
   *
   * Requirements:
   *
   * - `tokenId` must exist.
   *
   * Emits a {Transfer} event.
   */
  function _burn(uint256 tokenId) internal virtual {
    TokenOwnership memory prevOwnership = ownershipOf(tokenId);

    _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

    // Clear approvals from the previous owner
    _approve(address(0), tokenId, prevOwnership.addr);

    // Underflow of the sender's balance is impossible because we check for
    // ownership above and the recipient's balance can't realistically overflow.
    // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128.
    unchecked {
      _addressData[prevOwnership.addr].balance -= 1;
      _addressData[prevOwnership.addr].numberBurned += 1;

      // Keep track of who burned the token, and the timestamp of burning.
      _ownerships[tokenId].addr = prevOwnership.addr;
      _ownerships[tokenId].startTimestamp = uint64(block.timestamp);
      _ownerships[tokenId].burned = true;

      // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
      // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
      uint256 nextTokenId = tokenId + 1;
      if (_ownerships[nextTokenId].addr == address(0)) {
        // This will suffice for checking _exists(nextTokenId),
        // as a burned slot cannot contain the zero address.
        if (nextTokenId < _currentIndex) {
          _ownerships[nextTokenId].addr = prevOwnership.addr;
          _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
        }
      }
    }

    emit Transfer(prevOwnership.addr, address(0), tokenId);
    _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

    // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
    unchecked {
      _burnCounter++;
    }
  }

  /**
   * @dev Approve `to` to operate on `tokenId`
   *
   * Emits a {Approval} event.
   */
  function _approve(
    address to,
    uint256 tokenId,
    address owner
  ) private {
    _tokenApprovals[tokenId] = to;
    emit Approval(owner, to, tokenId);
  }

  /**
   * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
   * The call is not executed if the target address is not a contract.
   *
   * @param from address representing the previous owner of the given token ID
   * @param to target address that will receive the tokens
   * @param tokenId uint256 ID of the token to be transferred
   * @param _data bytes optional data to send along with the call
   * @return bool whether the call correctly returned the expected magic value
   */
  function _checkOnERC721Received(
    address from,
    address to,
    uint256 tokenId,
    bytes memory _data
  ) private returns (bool) {
    if (to.isContract()) {
      try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
        return retval == IERC721Receiver(to).onERC721Received.selector;
      } catch (bytes memory reason) {
        if (reason.length == 0) {
          revert TransferToNonERC721ReceiverImplementer();
        } else {
          assembly {
            revert(add(32, reason), mload(reason))
          }
        }
      }
    } else {
      return true;
    }
  }

  /**
   * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. 
        This includes minting.
   * And also called before burning one token.
   *
   * startTokenId - the first token id to be transferred
   * quantity - the amount to be transferred
   *
   * Calling conditions:
   *
   * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
   * transferred to `to`.
   * - When `from` is zero, `tokenId` will be minted for `to`.
   * - When `to` is zero, `tokenId` will be burned by `from`.
   * - `from` and `to` are never both zero.
   */
  function _beforeTokenTransfers(
    address from,
    address to,
    uint256 startTokenId,
    uint256 quantity
  ) internal virtual {}

  /**
   * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
   * minting.
   * And also called after one token has been burned.
   *
   * startTokenId - the first token id to be transferred
   * quantity - the amount to be transferred
   *
   * Calling conditions:
   *
   * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
   * transferred to `to`.
   * - When `from` is zero, `tokenId` has been minted for `to`.
   * - When `to` is zero, `tokenId` has been burned by `from`.
   * - `from` and `to` are never both zero.
   */
  function _afterTokenTransfers(
    address from,
    address to,
    uint256 startTokenId,
    uint256 quantity
  ) internal virtual {}
}

File 4 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 5 of 19 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 6 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 7 of 19 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 8 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 9 of 19 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 10 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 12 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 14 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 15 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 16 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 17 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 18 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 19 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"address payable","name":"productOwnerAddr","type":"address"},{"internalType":"uint256[5]","name":"mosaicDataArr","type":"uint256[5]"},{"internalType":"uint64","name":"privateOpenTime","type":"uint64"},{"internalType":"uint64","name":"publicOpenTime","type":"uint64"},{"internalType":"uint64","name":"revelationTime","type":"uint64"},{"internalType":"uint16","name":"totalPremintNFT","type":"uint16"},{"internalType":"uint16","name":"totalCanmintNFT","type":"uint16"},{"internalType":"uint16","name":"totalCannotmintNFT","type":"uint16"},{"internalType":"uint256","name":"privatePrice","type":"uint256"},{"internalType":"uint256","name":"publicPrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintedQueryForZeroAddress","type":"error"},{"inputs":[],"name":"OwnerIndexOutOfBounds","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TokenIndexOutOfBounds","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BASE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT_PUBLIC","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT_TIER_1","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT_TIER_2","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRIVATE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_CANNOT_MINT_NFT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_CAN_MINT_NFT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_PREMINT_NFT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrArr","type":"address[]"}],"name":"addToWhiteList1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrArr","type":"address[]"}],"name":"addToWhiteList2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyUnrevelate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllTokenIdToIndex","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCanMintNFTMinted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCanNotMintNFTMinted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"isPrivate","type":"bool"}],"name":"getMintTimesLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMosaicDataArr","outputs":[{"internalType":"uint256[5]","name":"","type":"uint256[5]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getPrivateLimitOfAddr","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrivateOpenTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProductOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPublicOpenTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRevelated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRevelationTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartIndex","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"isMosaic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"numToken","type":"uint8"},{"internalType":"address","name":"addr","type":"address"}],"name":"mintAndTransferAfterRevelation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"numToken","type":"uint8"}],"name":"mintPrivateSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"numToken","type":"uint8"}],"name":"mintPublicSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrArr","type":"address[]"}],"name":"removeFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI","type":"string"},{"internalType":"bool","name":"mintAllUnMinted","type":"bool"}],"name":"revelate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","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":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[5]","name":"mosaicDataArr","type":"uint256[5]"}],"name":"setMosaicDataArr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setProductOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"royalty","type":"uint16"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"privateOpenTime","type":"uint64"},{"internalType":"uint64","name":"publicOpenTime","type":"uint64"},{"internalType":"uint64","name":"revelationTime","type":"uint64"}],"name":"setTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","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":"tokenIdToIndex","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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"},{"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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610180604052601580546001600160c01b0316605560d31b1790556016805460ff60281b191690556003608052600160a052600a60c0523480156200004357600080fd5b506040516200530f3803806200530f8339810160408190526200006691620007b7565b60408051808201825260068082526512d4911053d560d21b602080840182815285518087019096529285528401528151919291620000a791600191620005ad565b508051620000bd906002906020840190620005ad565b505050620000da620000d46200024060201b60201c565b62000244565b6007805460ff60a01b1916905560016008558a51620001019060099060208e0190620005ad565b5060168054600160301b600160d01b03191666010000000000006001600160a01b038d160217905562000138600b8a60056200063c565b50601580546001600160401b03888116600160801b02600160801b600160c01b03198b831668010000000000000000026001600160801b0319909416928d1692909217929092171617905561ffff80861660e0528481166101005283166101205261014082905261016081905260005b8361ffff168160ff16101562000208578060108260ff1660938110620001d257620001d262000907565b602091828204019190066101000a81548160ff021916908360ff1602179055508080620001ff906200091d565b915050620001a8565b506016546200022f90660100000000000090046001600160a01b031661ffff871662000296565b505050505050505050505062000a12565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002b8828260405180602001604052806000815250620002bc60201b60201c565b5050565b620002cb8383836001620002d0565b505050565b6000546001600160801b03166001600160a01b0385166200030357604051622e076360e81b815260040160405180910390fd5b83620003225760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c018116918217680100000000000000006001600160401b031990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015620004395760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48380156200040d57506200040b60008884886200046f565b155b156200042c576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101620003b2565b50600080546001600160801b0319166001600160801b0392909216919091178155620004629050565b5050505050565b50505050565b600062000490846001600160a01b03166200059e60201b620031701760201c565b156200059257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290620004ca9033908990889088906004016200094c565b602060405180830381600087803b158015620004e557600080fd5b505af192505050801562000518575060408051601f3d908101601f191682019092526200051591810190620009a2565b60015b62000577573d80801562000549576040519150601f19603f3d011682016040523d82523d6000602084013e6200054e565b606091505b5080516200056f576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905062000596565b5060015b949350505050565b6001600160a01b03163b151590565b828054620005bb90620009d5565b90600052602060002090601f016020900481019282620005df57600085556200062a565b82601f10620005fa57805160ff19168380011785556200062a565b828001600101855582156200062a579182015b828111156200062a5782518255916020019190600101906200060d565b50620006389291506200066c565b5090565b82600581019282156200062a57916020028201828111156200062a5782518255916020019190600101906200060d565b5b808211156200063857600081556001016200066d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620006c457620006c462000683565b604052919050565b60005b83811015620006e9578181015183820152602001620006cf565b83811115620004695750506000910152565b80516001600160a01b03811681146200071357600080fd5b919050565b600082601f8301126200072a57600080fd5b60405160a081016001600160401b03811182821017156200074f576200074f62000683565b6040528060a08401858111156200076557600080fd5b845b818110156200078157805183526020928301920162000767565b509195945050505050565b80516001600160401b03811681146200071357600080fd5b805161ffff811681146200071357600080fd5b60008060008060008060008060008060006101e08c8e031215620007da57600080fd5b8b516001600160401b0380821115620007f257600080fd5b818e0191508e601f8301126200080757600080fd5b8151818111156200081c576200081c62000683565b62000831601f8201601f191660200162000699565b91508082528f60208285010111156200084957600080fd5b6200085c816020840160208601620006cc565b509b506200086f905060208d01620006fb565b9950620008808d60408e0162000718565b98506200089060e08d016200078c565b9750620008a16101008d016200078c565b9650620008b26101208d016200078c565b9550620008c36101408d01620007a4565b9450620008d46101608d01620007a4565b9350620008e56101808d01620007a4565b92506101a08c015191506101c08c015190509295989b509295989b9093969950565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff8114156200094357634e487b7160e01b600052601160045260246000fd5b60010192915050565b600060018060a01b0380871683528086166020840152508360408301526080606083015282518060808401526200098b8160a0850160208701620006cc565b601f01601f19169190910160a00195945050505050565b600060208284031215620009b557600080fd5b81516001600160e01b031981168114620009ce57600080fd5b9392505050565b600181811c90821680620009ea57607f821691505b6020821081141562000a0c57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051610160516147e162000b2e600039600081816108e10152612c6e015260008181610659015261284d01526000818161088e0152818161113201526112e0015260008181610bcb01528181611628015281816116d5015281816117140152818161180c0152818161236f015281816123a7015281816123d30152818161277301528181612b9401526131410152600081816104b4015281816115220152818161156e015281816115a8015281816115ee015281816116580152818161173a015281816124df015261251a01526000818161091501528181612cf501526130dd015260008181610ac40152611c38015260008181610800015261219701526147e16000f3fe6080604052600436106103b85760003560e01c806359877764116101f2578063a76824d71161010d578063e4361943116100a0578063f2fde38b1161006f578063f2fde38b14610c38578063fb1dbf1414610c58578063feca16fe14610c6d578063ffa1ad7414610c8d57600080fd5b8063e436194314610bb9578063e73fe80914610bed578063e985e9c514610c02578063ec342ad014610c2257600080fd5b8063c31f2d1d116100dc578063c31f2d1d14610b26578063c87b56dd14610b39578063d67a860714610b59578063d75275ad14610b9957600080fd5b8063a76824d714610a9f578063b00c744114610ab2578063b11560c514610ae6578063b88d4fde14610b0657600080fd5b80637e2b314a116101855780638f5d5d90116101545780638f5d5d9014610a1f57806395d89b4114610a4a578063a052e31114610a5f578063a22cb46514610a7f57600080fd5b80637e2b314a146109ac5780638456cb59146109cc5780638cf91e72146109e15780638da5cb5b14610a0157600080fd5b80636352211e116101c15780636352211e146109375780636c5c482d1461095757806370a0823114610977578063715018a61461099757600080fd5b8063598777641461087c5780635c975abb146108b0578063611f3f10146108cf57806363172ac11461090357600080fd5b80632e2047d4116102e257806342842e0e1161027557806351a39a581161024457806351a39a58146107ce57806351f8028f146107ee57806355f804b31461083457806357adae6d1461085457600080fd5b806342842e0e1461074657806346f40814146107665780634d91d7f31461078c5780634f6ccce7146107ae57600080fd5b806336e79a5a116102b157806336e79a5a146106dc57806339289536146106fc5780633ccfd60b1461071c5780633f4ba83a1461073157600080fd5b80632e2047d4146106475780632f745c591461067b57806335da4c031461069b578063369c5f48146106bb57600080fd5b806318ab5dff1161035a57806326ec0fbe1161032957806326ec0fbe146105a6578063274743eb146105c65780632a55205a146105e65780632bcd5d661461062557600080fd5b806318ab5dff146105265780631d3323ca146105465780631e241eda1461056657806323b872dd1461058657600080fd5b8063095ea7b311610396578063095ea7b31461044c5780630a7027301461046e5780630d7e06ba146104a257806318160ddd146104e957600080fd5b806301ffc9a7146103bd57806306fdde03146103f2578063081812fc14610414575b600080fd5b3480156103c957600080fd5b506103dd6103d8366004613dfc565b610ca3565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b50610407610d74565b6040516103e99190613e71565b34801561042057600080fd5b5061043461042f366004613e84565b610e06565b6040516001600160a01b0390911681526020016103e9565b34801561045857600080fd5b5061046c610467366004613eb9565b610e63565b005b34801561047a57600080fd5b5060155467ffffffffffffffff165b60405167ffffffffffffffff90911681526020016103e9565b3480156104ae57600080fd5b506104d67f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff90911681526020016103e9565b3480156104f557600080fd5b506105186000546001600160801b03600160801b82048116918116919091031690565b6040519081526020016103e9565b34801561053257600080fd5b5061046c610541366004613efb565b610f23565b34801561055257600080fd5b5061046c610561366004613fbb565b610ff8565b34801561057257600080fd5b5061046c610581366004614058565b611487565b34801561059257600080fd5b5061046c6105a13660046140d6565b6114f9565b3480156105b257600080fd5b506104d66105c1366004613e84565b611504565b3480156105d257600080fd5b5061046c6105e1366004614123565b61177f565b3480156105f257600080fd5b50610606610601366004614156565b6119bd565b604080516001600160a01b0390931683526020830191909152016103e9565b34801561063157600080fd5b5061063a611a0c565b6040516103e99190614178565b34801561065357600080fd5b506105187f000000000000000000000000000000000000000000000000000000000000000081565b34801561068757600080fd5b50610518610696366004613eb9565b611abd565b3480156106a757600080fd5b5061046c6106b63660046141c0565b611bf4565b3480156106c757600080fd5b5060165465010000000000900460ff166103dd565b3480156106e857600080fd5b5061046c6106f736600461424d565b611cc3565b34801561070857600080fd5b5061046c610717366004614268565b611d47565b34801561072857600080fd5b5061046c611dd3565b34801561073d57600080fd5b5061046c611ecd565b34801561075257600080fd5b5061046c6107613660046140d6565b611f1f565b34801561077257600080fd5b50601554600160801b900467ffffffffffffffff16610489565b34801561079857600080fd5b506107a1611f3a565b6040516103e99190614283565b3480156107ba57600080fd5b506105186107c9366004613e84565b611f75565b3480156107da57600080fd5b5061046c6107e93660046142c4565b61205a565b3480156107fa57600080fd5b506108227f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016103e9565b34801561084057600080fd5b5061046c61084f366004614366565b6120cd565b34801561086057600080fd5b50601654660100000000000090046001600160a01b0316610434565b34801561088857600080fd5b506104d67f000000000000000000000000000000000000000000000000000000000000000081565b3480156108bc57600080fd5b50600754600160a01b900460ff166103dd565b3480156108db57600080fd5b506105187f000000000000000000000000000000000000000000000000000000000000000081565b34801561090f57600080fd5b506108227f000000000000000000000000000000000000000000000000000000000000000081565b34801561094357600080fd5b50610434610952366004613e84565b612141565b34801561096357600080fd5b5061046c6109723660046141c0565b612153565b34801561098357600080fd5b50610518610992366004614268565b612222565b3480156109a357600080fd5b5061046c61228a565b3480156109b857600080fd5b5061046c6109c736600461439b565b6122dc565b3480156109d857600080fd5b5061046c612465565b3480156109ed57600080fd5b50601654640100000000900460ff166104d6565b348015610a0d57600080fd5b506007546001600160a01b0316610434565b348015610a2b57600080fd5b5060155468010000000000000000900467ffffffffffffffff16610489565b348015610a5657600080fd5b506104076124b5565b348015610a6b57600080fd5b506103dd610a7a36600461424d565b6124c4565b348015610a8b57600080fd5b5061046c610a9a3660046142c4565b6125b3565b61046c610aad3660046143e0565b612662565b348015610abe57600080fd5b506108227f000000000000000000000000000000000000000000000000000000000000000081565b348015610af257600080fd5b5061046c610b013660046141c0565b6129bc565b348015610b1257600080fd5b5061046c610b213660046143fb565b612a6c565b61046c610b343660046143e0565b612aa0565b348015610b4557600080fd5b50610407610b54366004613e84565b612d9c565b348015610b6557600080fd5b50610822610b74366004614268565b6001600160a01b0316600090815260046020526040902054600160c81b900460ff1690565b348015610ba557600080fd5b50601554600160c01b900461ffff166104d6565b348015610bc557600080fd5b506104d67f000000000000000000000000000000000000000000000000000000000000000081565b348015610bf957600080fd5b506104d6612e64565b348015610c0e57600080fd5b506103dd610c1d366004614477565b612e85565b348015610c2e57600080fd5b506104d661271081565b348015610c4457600080fd5b5061046c610c53366004614268565b612edf565b348015610c6457600080fd5b5061046c612faf565b348015610c7957600080fd5b50610518610c883660046142c4565b613008565b348015610c9957600080fd5b506105186127d881565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610d0657506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610d3a57506001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b80610d6e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060018054610d8390614493565b80601f0160208091040260200160405190810160405280929190818152602001828054610daf90614493565b8015610dfc5780601f10610dd157610100808354040283529160200191610dfc565b820191906000526020600020905b815481529060010190602001808311610ddf57829003601f168201915b5050505050905090565b6000610e118261317f565b610e47576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e6e82612141565b9050806001600160a01b0316836001600160a01b03161415610ebc576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610edc5750610eda8133612e85565b155b15610f13576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f1e8383836131b3565b505050565b6007546001600160a01b03163314610f705760405162461bcd60e51b8152602060048201819052602482015260008051602061478c83398151915260448201526064015b60405180910390fd5b60165465010000000000900460ff1615610f8957600080fd5b6015805467ffffffffffffffff9485166fffffffffffffffffffffffffffffffff19909116176801000000000000000093851693909302929092177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff16600160801b9190931602919091179055565b600754600160a01b900460ff16156110455760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601554600160801b900467ffffffffffffffff164210801590611073575060165465010000000000900460ff165b6110bf5760405162461bcd60e51b815260206004820152601060248201527f53776170206973206e6f74206f70656e000000000000000000000000000000006044820152606401610f67565b600281516110cd91906144de565b1561111a5760405162461bcd60e51b815260206004820152601360248201527f4c656e677468206d757374206265206576656e000000000000000000000000006044820152606401610f67565b60006002825161112a9190614508565b6016549091507f000000000000000000000000000000000000000000000000000000000000000061ffff169061116c908390640100000000900460ff1661451c565b60ff1611156111aa5760405162461bcd60e51b815260206004820152600a60248201526913dd5d081bd98813919560b21b6044820152606401610f67565b60005b82518161ffff16101561123e576111e0838261ffff16815181106111d3576111d3614541565b60200260200101516124c4565b61122c5760405162461bcd60e51b815260206004820152600f60248201527f4f6e6c7920757365206d6f7361696300000000000000000000000000000000006044820152606401610f67565b8061123681614557565b9150506111ad565b5060005b82518161ffff1610156112a25761129033601660069054906101000a90046001600160a01b0316858461ffff168151811061127f5761127f614541565b602002602001015161ffff166114f9565b8061129a81614557565b915050611242565b50600080546016546001600160801b039091169164010000000090910460ff16905b8360ff168160ff16101561145857600061130d61130460ff85167f0000000000000000000000000000000000000000000000000000000000000000614579565b61ffff1661321c565b611317908461451c565b9050600060108260ff166093811061133157611331614541565b602091828204019190069054906101000a900460ff16905060108460ff166093811061135f5761135f614541565b602091828204019190069054906101000a900460ff1660108360ff166093811061138b5761138b614541565b602091828204019190066101000a81548160ff021916908360ff1602179055508060108560ff16609381106113c2576113c2614541565b6020808204929092018054601f9092166101000a60ff818102199093169483160293909317909255600087815260039091526040902080547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16918316600160f01b02919091179055846114328161459c565b9550508380611440906145b7565b94505050508080611450906145b7565b9150506112c4565b5080601660046101000a81548160ff021916908360ff160217905550611481338460ff166132c7565b50505050565b6007546001600160a01b031633146114cf5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b60165465010000000000900460ff16156114e857600080fd5b6114f5600b826005613d02565b5050565b610f1e8383836132e1565b60165460009065010000000000900460ff1661151e575090565b60007f000000000000000000000000000000000000000000000000000000000000000061ffff1683101561159b5760155461156490600160c01b900461ffff16846145d7565b905061159461ffff7f000000000000000000000000000000000000000000000000000000000000000016826144de565b9050610d6e565b6016546115cc9061ffff167f00000000000000000000000000000000000000000000000000000000000000006145ef565b61ffff1683101561167e5760155461ffff600160c01b909104811690611614907f00000000000000000000000000000000000000000000000000000000000000001685614615565b61161e91906145d7565b905061164e61ffff7f000000000000000000000000000000000000000000000000000000000000000016826144de565b905061159461ffff7f000000000000000000000000000000000000000000000000000000000000000016826145d7565b600083815260036020526040902054600160e81b900460ff1615611703576015546000848152600360205260409020546116cd9161ffff600160c01b909104811691600160f01b9004166145ef565b61ffff1690507f000000000000000000000000000000000000000000000000000000000000000061ffff168161164e91906144de565b6000838152600360205260409020547f00000000000000000000000000000000000000000000000000000000000000009061176a907f000000000000000000000000000000000000000000000000000000000000000090600160f01b900461ffff166145ef565b61177491906145ef565b61ffff169392505050565b600754600160a01b900460ff16156117cc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b60165465010000000000900460ff1680156117fb5750601654660100000000000090046001600160a01b031633145b61180457600080fd5b60165461ffff7f000000000000000000000000000000000000000000000000000000000000000081169160ff85169161184691620100008104821691166145ef565b61185091906145ef565b61ffff16111561188f5760405162461bcd60e51b815260206004820152600a60248201526913dd5d081bd98813919560b21b6044820152606401610f67565b600080546001600160801b0316905b8360ff168160ff16101561197357600082815260036020526040902080547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e81b17905560165460ff8216906119049061ffff620100008204811691166145ef565b61190e91906145ef565b6000838152600360205260409020805461ffff92909216600160f01b027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092169190911790558161195d8161459c565b925050808061196b906145b7565b91505061189e565b508260ff16601660028282829054906101000a900461ffff1661199691906145ef565b92506101000a81548161ffff021916908361ffff160217905550610f1e828460ff166132c7565b601654601554600091829166010000000000009091046001600160a01b031690612710906119f79061ffff600160d01b909104168661462c565b611a019190614508565b915091509250929050565b60008054606091906001600160801b031667ffffffffffffffff811115611a3557611a35613f3e565b604051908082528060200260200182016040528015611a5e578160200160208202803683370190505b50905060005b6000546001600160801b0316811015611ab757611a8081611504565b828281518110611a9257611a92614541565b61ffff9092166020928302919091019091015280611aaf8161459c565b915050611a64565b50919050565b6000611ac883612222565b8210611b00576040517f0ddac30e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160801b03169080805b83811015611bee57600081815260036020908152604091829020825160a08101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b820460ff90811615801594830194909452600160e81b83041615156060820152600160f01b90910461ffff16608082015290611b9a5750611be6565b80516001600160a01b031615611baf57805192505b876001600160a01b0316836001600160a01b03161415611be45786841415611bdd57509350610d6e92505050565b6001909301925b505b600101611b11565b50600080fd5b601654660100000000000090046001600160a01b0316331480611c2157506007546001600160a01b031633145b611c2a57600080fd5b60005b81518110156114f5577f000000000000000000000000000000000000000000000000000000000000000060046000848481518110611c6d57611c6d614541565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160196101000a81548160ff021916908360ff1602179055508080611cbb9061459c565b915050611c2d565b6007546001600160a01b03163314611d0b5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6015805461ffff909216600160d01b027fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6007546001600160a01b03163314611d8f5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b601680546001600160a01b039092166601000000000000027fffffffffffff0000000000000000000000000000000000000000ffffffffffff909216919091179055565b60026008541415611e265760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f67565b6002600855600754600160a01b900460ff1615611e785760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601654660100000000000090046001600160a01b03163314611e9957600080fd5b60405133904780156108fc02916000818181858888f19350505050158015611ec5573d6000803e3d6000fd5b506001600855565b6007546001600160a01b03163314611f155760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b611f1d61354c565b565b610f1e83838360405180602001604052806000815250612a6c565b611f42613d40565b6040805160a081019182905290600b9060059082845b815481526020019060010190808311611f58575050505050905090565b600080546001600160801b031681805b8281101561202757600081815260036020908152604091829020825160a08101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b820460ff9081161515938201849052600160e81b83041615156060820152600160f01b90910461ffff1660808201529061201e57858314156120175750949350505050565b6001909201915b50600101611f85565b506040517fa723001c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007546001600160a01b031633146120a25760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6007546001600160a01b031633146121155760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b60165465010000000000900460ff161561212e57600080fd5b80516114f5906009906020840190613d5e565b600061214c826135f2565b5192915050565b601654660100000000000090046001600160a01b031633148061218057506007546001600160a01b031633145b61218957600080fd5b60005b81518110156114f5577f0000000000000000000000000000000000000000000000000000000000000000600460008484815181106121cc576121cc614541565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160196101000a81548160ff021916908360ff160217905550808061221a9061459c565b91505061218c565b60006001600160a01b038216612264576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526004602052604090205467ffffffffffffffff1690565b6007546001600160a01b031633146122d25760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b611f1d6000613782565b6007546001600160a01b031633146123245760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b601554600160801b900467ffffffffffffffff1642101561234457600080fd5b80156123ce5760165461239c906001600160a01b036601000000000000820416906123939061ffff167f0000000000000000000000000000000000000000000000000000000000000000614579565b61ffff166132c7565b6016805461ffff19167f000000000000000000000000000000000000000000000000000000000000000061ffff161790555b6123fb7f000000000000000000000000000000000000000000000000000000000000000061ffff1661321c565b6015805461ffff92909216600160c01b027fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff9092169190911790558151612449906009906020850190613d5e565b50506016805465ff000000000019166501000000000017905550565b6007546001600160a01b031633146124ad5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b611f1d6137e1565b606060028054610d8390614493565b60165460009065010000000000900460ff16158061250957507f000000000000000000000000000000000000000000000000000000000000000061ffff168261ffff16105b1561251657506000919050565b60007f00000000000000000000000000000000000000000000000000000000000000006125468461ffff16611504565b6125509190614579565b905060006125606101008361464b565b905060058161ffff1610612578575060009392505050565b60006125866101008461466c565b61ffff166001901b600b8361ffff16600581106125a5576125a5614541565b015416151595945050505050565b6001600160a01b0382163314156125f6576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600754600160a01b900460ff16156126af5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601654429065010000000000900460ff161580156126fb575060155467ffffffffffffffff1681108015906126fb575060155468010000000000000000900467ffffffffffffffff1681105b801561271f575033600090815260046020526040902054600160c81b900460ff1615155b61276b5760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610f67565b60165461ffff7f00000000000000000000000000000000000000000000000000000000000000008116916127a49160ff861691166145ef565b61ffff1611156127e55760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662073746f636b60a01b6044820152606401610f67565b333b156127f157600080fd5b60008260ff16116128445760405162461bcd60e51b815260206004820152600e60248201527f456d707479206e756d546f6b656e0000000000000000000000000000000000006044820152606401610f67565b61287160ff83167f000000000000000000000000000000000000000000000000000000000000000061462c565b3410156128c05760405162461bcd60e51b815260206004820152601060248201527f496e73756666696369656e7420455448000000000000000000000000000000006044820152606401610f67565b3360009081526004602052604090205460ff600160c81b82048116916128ef918591600160c01b90041661451c565b60ff16111561292f5760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662074696d657360a01b6044820152606401610f67565b336000908152600460205260409020805483919060189061295b908490600160c01b900460ff1661451c565b92506101000a81548160ff021916908360ff1602179055508160ff16601660008282829054906101000a900461ffff1661299591906145ef565b92506101000a81548161ffff021916908361ffff1602179055506114f5338360ff166132c7565b601654660100000000000090046001600160a01b03163314806129e957506007546001600160a01b031633145b6129f257600080fd5b60005b81518110156114f557600060046000848481518110612a1657612a16614541565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160196101000a81548160ff021916908360ff1602179055508080612a649061459c565b9150506129f5565b612a778484846132e1565b612a8384848484613869565b611481576040516368d2bf6b60e11b815260040160405180910390fd5b600754600160a01b900460ff1615612aed5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601654429065010000000000900460ff16158015612b40575060155468010000000000000000900467ffffffffffffffff168110801590612b405750601554600160801b900467ffffffffffffffff1681105b612b8c5760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610f67565b60165461ffff7f0000000000000000000000000000000000000000000000000000000000000000811691612bc59160ff861691166145ef565b61ffff161115612c065760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662073746f636b60a01b6044820152606401610f67565b333b15612c1257600080fd5b60008260ff1611612c655760405162461bcd60e51b815260206004820152600e60248201527f456d707479206e756d546f6b656e0000000000000000000000000000000000006044820152606401610f67565b612c9260ff83167f000000000000000000000000000000000000000000000000000000000000000061462c565b341015612ce15760405162461bcd60e51b815260206004820152601060248201527f496e73756666696369656e7420455448000000000000000000000000000000006044820152606401610f67565b3360008181526004602052604090205460ff7f000000000000000000000000000000000000000000000000000000000000000081169285821692600160c01b900490911690612d2f90613977565b612d399190614615565b612d4391906145d7565b1115612d805760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662074696d657360a01b6044820152606401610f67565b6016805460ff8416919060009061299590849061ffff166145ef565b6060612da78261317f565b612ddd576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612de76139eb565b90506000612df484611504565b61ffff169050815160001415612e3157612e0d816139fa565b604051602001612e1d919061468d565b604051602081830303815290604052612e5c565b81612e3b826139fa565b604051602001612e4c9291906146b6565b6040516020818303038152906040525b949350505050565b601654600090612e809061ffff620100008204811691166145ef565b905090565b6001600160a01b0381166000908152600a602052604081205460ff1615612eae57506001610d6e565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff165b9392505050565b6007546001600160a01b03163314612f275760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6001600160a01b038116612fa35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f67565b612fac81613782565b50565b6007546001600160a01b03163314612ff75760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6016805465ff000000000019169055565b60165460009065010000000000900460ff1661310257811561309f576001600160a01b03831660009081526004602052604090205460ff600160c01b82048116600160c81b909204161115613097576001600160a01b03831660009081526004602052604090205461308d9060ff600160c01b8204811691600160c81b9004166146f5565b60ff169050610d6e565b506000610d6e565b6001600160a01b038316600090815260046020526040902054600160c01b900460ff166130cb84613977565b6130d59190614615565b6115949060ff7f000000000000000000000000000000000000000000000000000000000000000016614615565b6016546001600160a01b0384811666010000000000009092041614156130975760165461313b9061ffff620100008204811691166145ef565b613165907f0000000000000000000000000000000000000000000000000000000000000000614579565b61ffff169050610d6e565b6001600160a01b03163b151590565b600080546001600160801b031682108015610d6e575050600090815260036020526040902054600160e01b900460ff161590565b600082815260056020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60158054600091600160e01b90910463ffffffff1690601c61323d83614718565b82546101009290920a63ffffffff81810219909316919092169190910217905550601554604080514260208201523360601b6bffffffffffffffffffffffff191691810191909152600160e01b90910460e01b6001600160e01b031916605482015282906058016040516020818303038152906040528051906020012060001c610d6e91906144de565b6114f5828260405180602001604052806000815250613b2c565b60006132ec826135f2565b80519091506000906001600160a01b0316336001600160a01b0316148061331a5750815161331a9033612e85565b8061333557503361332a84610e06565b6001600160a01b0316145b90508061336e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146133bd576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166133fd576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61340d60008484600001516131b3565b6001600160a01b038581166000908152600460209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116613502576000546001600160801b0316811015613502578251600082815260036020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b600754600160a01b900460ff166135a55760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f67565b6007805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101829052905482906001600160801b031681101561375057600081815260036020908152604091829020825160a08101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b820460ff9081161515938201849052600160e81b83041615156060820152600160f01b90910461ffff1660808201529061374e5780516001600160a01b0316156136c0579392505050565b5060001901600081815260036020908152604091829020825160a08101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b810460ff908116151594830194909452600160e81b810490931615156060820152600160f01b90920461ffff16608083015215613749579392505050565b6136c0565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600754600160a01b900460ff161561382e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b6007805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586135d53390565b60006001600160a01b0384163b1561396c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906138ad903390899088908890600401614732565b602060405180830381600087803b1580156138c757600080fd5b505af19250505080156138f7575060408051601f3d908101601f191682019092526138f49181019061476e565b60015b613952573d808015613925576040519150601f19603f3d011682016040523d82523d6000602084013e61392a565b606091505b50805161394a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612e5c565b506001949350505050565b60006001600160a01b0382166139b9576040517f35ebb31900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526004602052604090205468010000000000000000900467ffffffffffffffff1690565b606060098054610d8390614493565b606081613a3a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613a645780613a4e8161459c565b9150613a5d9050600a83614508565b9150613a3e565b60008167ffffffffffffffff811115613a7f57613a7f613f3e565b6040519080825280601f01601f191660200182016040528015613aa9576020820181803683370190505b5090505b8415612e5c57613abe600183614615565b9150613acb600a866144de565b613ad69060306145d7565b60f81b818381518110613aeb57613aeb614541565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613b25600a86614508565b9450613aad565b610f1e83838360016000546001600160801b03166001600160a01b038516613b80576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83613bb7576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015613cd35760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015613ca95750613ca76000888488613869565b155b15613cc7576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101613c52565b50600080546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055613545565b8260058101928215613d30579160200282015b82811115613d30578251825591602001919060010190613d15565b50613d3c929150613dd1565b5090565b6040518060a001604052806005906020820280368337509192915050565b828054613d6a90614493565b90600052602060002090601f016020900481019282613d8c5760008555613d30565b82601f10613da557805160ff1916838001178555613d30565b82800160010185558215613d305791820182811115613d30578251825591602001919060010190613d15565b5b80821115613d3c5760008155600101613dd2565b6001600160e01b031981168114612fac57600080fd5b600060208284031215613e0e57600080fd5b8135612ed881613de6565b60005b83811015613e34578181015183820152602001613e1c565b838111156114815750506000910152565b60008151808452613e5d816020860160208601613e19565b601f01601f19169290920160200192915050565b602081526000612ed86020830184613e45565b600060208284031215613e9657600080fd5b5035919050565b80356001600160a01b0381168114613eb457600080fd5b919050565b60008060408385031215613ecc57600080fd5b613ed583613e9d565b946020939093013593505050565b803567ffffffffffffffff81168114613eb457600080fd5b600080600060608486031215613f1057600080fd5b613f1984613ee3565b9250613f2760208501613ee3565b9150613f3560408501613ee3565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f7d57613f7d613f3e565b604052919050565b600067ffffffffffffffff821115613f9f57613f9f613f3e565b5060051b60200190565b803561ffff81168114613eb457600080fd5b60006020808385031215613fce57600080fd5b823567ffffffffffffffff811115613fe557600080fd5b8301601f81018513613ff657600080fd5b803561400961400482613f85565b613f54565b81815260059190911b8201830190838101908783111561402857600080fd5b928401925b8284101561404d5761403e84613fa9565b8252928401929084019061402d565b979650505050505050565b600060a0828403121561406a57600080fd5b82601f83011261407957600080fd5b60405160a0810181811067ffffffffffffffff8211171561409c5761409c613f3e565b6040528060a08401858111156140b157600080fd5b845b818110156140cb5780358352602092830192016140b3565b509195945050505050565b6000806000606084860312156140eb57600080fd5b6140f484613e9d565b925061410260208501613e9d565b9150604084013590509250925092565b803560ff81168114613eb457600080fd5b6000806040838503121561413657600080fd5b61413f83614112565b915061414d60208401613e9d565b90509250929050565b6000806040838503121561416957600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156141b457835161ffff1683529284019291840191600101614194565b50909695505050505050565b600060208083850312156141d357600080fd5b823567ffffffffffffffff8111156141ea57600080fd5b8301601f810185136141fb57600080fd5b803561420961400482613f85565b81815260059190911b8201830190838101908783111561422857600080fd5b928401925b8284101561404d5761423e84613e9d565b8252928401929084019061422d565b60006020828403121561425f57600080fd5b612ed882613fa9565b60006020828403121561427a57600080fd5b612ed882613e9d565b60a08101818360005b60058110156142ab57815183526020928301929091019060010161428c565b50505092915050565b80358015158114613eb457600080fd5b600080604083850312156142d757600080fd5b6142e083613e9d565b915061414d602084016142b4565b600067ffffffffffffffff83111561430857614308613f3e565b61431b601f8401601f1916602001613f54565b905082815283838301111561432f57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261435757600080fd5b612ed8838335602085016142ee565b60006020828403121561437857600080fd5b813567ffffffffffffffff81111561438f57600080fd5b612e5c84828501614346565b600080604083850312156143ae57600080fd5b823567ffffffffffffffff8111156143c557600080fd5b6143d185828601614346565b92505061414d602084016142b4565b6000602082840312156143f257600080fd5b612ed882614112565b6000806000806080858703121561441157600080fd5b61441a85613e9d565b935061442860208601613e9d565b925060408501359150606085013567ffffffffffffffff81111561444b57600080fd5b8501601f8101871361445c57600080fd5b61446b878235602084016142ee565b91505092959194509250565b6000806040838503121561448a57600080fd5b61413f83613e9d565b600181811c908216806144a757607f821691505b60208210811415611ab757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826144ed576144ed6144c8565b500690565b634e487b7160e01b600052601160045260246000fd5b600082614517576145176144c8565b500490565b600060ff821660ff84168060ff03821115614539576145396144f2565b019392505050565b634e487b7160e01b600052603260045260246000fd5b600061ffff8083168181141561456f5761456f6144f2565b6001019392505050565b600061ffff83811690831681811015614594576145946144f2565b039392505050565b60006000198214156145b0576145b06144f2565b5060010190565b600060ff821660ff8114156145ce576145ce6144f2565b60010192915050565b600082198211156145ea576145ea6144f2565b500190565b600061ffff80831681851680830382111561460c5761460c6144f2565b01949350505050565b600082821015614627576146276144f2565b500390565b6000816000190483118215151615614646576146466144f2565b500290565b600061ffff80841680614660576146606144c8565b92169190910492915050565b600061ffff80841680614681576146816144c8565b92169190910692915050565b6000825161469f818460208701613e19565b64173539b7b760d91b920191825250600501919050565b600083516146c8818460208801613e19565b8351908301906146dc818360208801613e19565b64173539b7b760d91b9101908152600501949350505050565b600060ff821660ff84168082101561470f5761470f6144f2565b90039392505050565b600063ffffffff8083168181141561456f5761456f6144f2565b60006001600160a01b038087168352808616602084015250836040830152608060608301526147646080830184613e45565b9695505050505050565b60006020828403121561478057600080fd5b8151612ed881613de656fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212202342a95dcd341f62867c8b24f2d64bb5f73190825b0246595649890b29e91c7264736f6c6343000809003300000000000000000000000000000000000000000000000000000000000001e00000000000000000000000005a7e314068c14149fc9eaad971e4cfa4f4f652f34000c054008444001041010060822c310012014040026a100a0a529002202201718500000990b2090c2c0056e08c0a08003b66181042481bc06001c00822100028082d048441000704103821081412a000818040086880de010442561c0546b1005702001d9c003210d40e0921522b0840e1b0320c0c029401c08768183480950000000000000000000000000000001d039048289c3a46111010142a0003580300000000000000000000000000000000000000000000000000000000622bd47000000000000000000000000000000000000000000000000000000000622c28d000000000000000000000000000000000000000000000000000000000622c7d3000000000000000000000000000000000000000000000000000000000000000d2000000000000000000000000000000000000000000000000000000000000048600000000000000000000000000000000000000000000000000000000000000930000000000000000000000000000000000000000000000000001c6bf526340000000000000000000000000000000000000000000000000000002aa1efb94e0000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d564d7365716b7661624a7956524e76374d4a6b5837597a777259725679334346376b57336a726633484672682f00000000000000000000

Deployed Bytecode

0x6080604052600436106103b85760003560e01c806359877764116101f2578063a76824d71161010d578063e4361943116100a0578063f2fde38b1161006f578063f2fde38b14610c38578063fb1dbf1414610c58578063feca16fe14610c6d578063ffa1ad7414610c8d57600080fd5b8063e436194314610bb9578063e73fe80914610bed578063e985e9c514610c02578063ec342ad014610c2257600080fd5b8063c31f2d1d116100dc578063c31f2d1d14610b26578063c87b56dd14610b39578063d67a860714610b59578063d75275ad14610b9957600080fd5b8063a76824d714610a9f578063b00c744114610ab2578063b11560c514610ae6578063b88d4fde14610b0657600080fd5b80637e2b314a116101855780638f5d5d90116101545780638f5d5d9014610a1f57806395d89b4114610a4a578063a052e31114610a5f578063a22cb46514610a7f57600080fd5b80637e2b314a146109ac5780638456cb59146109cc5780638cf91e72146109e15780638da5cb5b14610a0157600080fd5b80636352211e116101c15780636352211e146109375780636c5c482d1461095757806370a0823114610977578063715018a61461099757600080fd5b8063598777641461087c5780635c975abb146108b0578063611f3f10146108cf57806363172ac11461090357600080fd5b80632e2047d4116102e257806342842e0e1161027557806351a39a581161024457806351a39a58146107ce57806351f8028f146107ee57806355f804b31461083457806357adae6d1461085457600080fd5b806342842e0e1461074657806346f40814146107665780634d91d7f31461078c5780634f6ccce7146107ae57600080fd5b806336e79a5a116102b157806336e79a5a146106dc57806339289536146106fc5780633ccfd60b1461071c5780633f4ba83a1461073157600080fd5b80632e2047d4146106475780632f745c591461067b57806335da4c031461069b578063369c5f48146106bb57600080fd5b806318ab5dff1161035a57806326ec0fbe1161032957806326ec0fbe146105a6578063274743eb146105c65780632a55205a146105e65780632bcd5d661461062557600080fd5b806318ab5dff146105265780631d3323ca146105465780631e241eda1461056657806323b872dd1461058657600080fd5b8063095ea7b311610396578063095ea7b31461044c5780630a7027301461046e5780630d7e06ba146104a257806318160ddd146104e957600080fd5b806301ffc9a7146103bd57806306fdde03146103f2578063081812fc14610414575b600080fd5b3480156103c957600080fd5b506103dd6103d8366004613dfc565b610ca3565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b50610407610d74565b6040516103e99190613e71565b34801561042057600080fd5b5061043461042f366004613e84565b610e06565b6040516001600160a01b0390911681526020016103e9565b34801561045857600080fd5b5061046c610467366004613eb9565b610e63565b005b34801561047a57600080fd5b5060155467ffffffffffffffff165b60405167ffffffffffffffff90911681526020016103e9565b3480156104ae57600080fd5b506104d67f00000000000000000000000000000000000000000000000000000000000000d281565b60405161ffff90911681526020016103e9565b3480156104f557600080fd5b506105186000546001600160801b03600160801b82048116918116919091031690565b6040519081526020016103e9565b34801561053257600080fd5b5061046c610541366004613efb565b610f23565b34801561055257600080fd5b5061046c610561366004613fbb565b610ff8565b34801561057257600080fd5b5061046c610581366004614058565b611487565b34801561059257600080fd5b5061046c6105a13660046140d6565b6114f9565b3480156105b257600080fd5b506104d66105c1366004613e84565b611504565b3480156105d257600080fd5b5061046c6105e1366004614123565b61177f565b3480156105f257600080fd5b50610606610601366004614156565b6119bd565b604080516001600160a01b0390931683526020830191909152016103e9565b34801561063157600080fd5b5061063a611a0c565b6040516103e99190614178565b34801561065357600080fd5b506105187f0000000000000000000000000000000000000000000000000001c6bf5263400081565b34801561068757600080fd5b50610518610696366004613eb9565b611abd565b3480156106a757600080fd5b5061046c6106b63660046141c0565b611bf4565b3480156106c757600080fd5b5060165465010000000000900460ff166103dd565b3480156106e857600080fd5b5061046c6106f736600461424d565b611cc3565b34801561070857600080fd5b5061046c610717366004614268565b611d47565b34801561072857600080fd5b5061046c611dd3565b34801561073d57600080fd5b5061046c611ecd565b34801561075257600080fd5b5061046c6107613660046140d6565b611f1f565b34801561077257600080fd5b50601554600160801b900467ffffffffffffffff16610489565b34801561079857600080fd5b506107a1611f3a565b6040516103e99190614283565b3480156107ba57600080fd5b506105186107c9366004613e84565b611f75565b3480156107da57600080fd5b5061046c6107e93660046142c4565b61205a565b3480156107fa57600080fd5b506108227f000000000000000000000000000000000000000000000000000000000000000381565b60405160ff90911681526020016103e9565b34801561084057600080fd5b5061046c61084f366004614366565b6120cd565b34801561086057600080fd5b50601654660100000000000090046001600160a01b0316610434565b34801561088857600080fd5b506104d67f000000000000000000000000000000000000000000000000000000000000009381565b3480156108bc57600080fd5b50600754600160a01b900460ff166103dd565b3480156108db57600080fd5b506105187f0000000000000000000000000000000000000000000000000002aa1efb94e00081565b34801561090f57600080fd5b506108227f000000000000000000000000000000000000000000000000000000000000000a81565b34801561094357600080fd5b50610434610952366004613e84565b612141565b34801561096357600080fd5b5061046c6109723660046141c0565b612153565b34801561098357600080fd5b50610518610992366004614268565b612222565b3480156109a357600080fd5b5061046c61228a565b3480156109b857600080fd5b5061046c6109c736600461439b565b6122dc565b3480156109d857600080fd5b5061046c612465565b3480156109ed57600080fd5b50601654640100000000900460ff166104d6565b348015610a0d57600080fd5b506007546001600160a01b0316610434565b348015610a2b57600080fd5b5060155468010000000000000000900467ffffffffffffffff16610489565b348015610a5657600080fd5b506104076124b5565b348015610a6b57600080fd5b506103dd610a7a36600461424d565b6124c4565b348015610a8b57600080fd5b5061046c610a9a3660046142c4565b6125b3565b61046c610aad3660046143e0565b612662565b348015610abe57600080fd5b506108227f000000000000000000000000000000000000000000000000000000000000000181565b348015610af257600080fd5b5061046c610b013660046141c0565b6129bc565b348015610b1257600080fd5b5061046c610b213660046143fb565b612a6c565b61046c610b343660046143e0565b612aa0565b348015610b4557600080fd5b50610407610b54366004613e84565b612d9c565b348015610b6557600080fd5b50610822610b74366004614268565b6001600160a01b0316600090815260046020526040902054600160c81b900460ff1690565b348015610ba557600080fd5b50601554600160c01b900461ffff166104d6565b348015610bc557600080fd5b506104d67f000000000000000000000000000000000000000000000000000000000000048681565b348015610bf957600080fd5b506104d6612e64565b348015610c0e57600080fd5b506103dd610c1d366004614477565b612e85565b348015610c2e57600080fd5b506104d661271081565b348015610c4457600080fd5b5061046c610c53366004614268565b612edf565b348015610c6457600080fd5b5061046c612faf565b348015610c7957600080fd5b50610518610c883660046142c4565b613008565b348015610c9957600080fd5b506105186127d881565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610d0657506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610d3a57506001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b80610d6e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060018054610d8390614493565b80601f0160208091040260200160405190810160405280929190818152602001828054610daf90614493565b8015610dfc5780601f10610dd157610100808354040283529160200191610dfc565b820191906000526020600020905b815481529060010190602001808311610ddf57829003601f168201915b5050505050905090565b6000610e118261317f565b610e47576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610e6e82612141565b9050806001600160a01b0316836001600160a01b03161415610ebc576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610edc5750610eda8133612e85565b155b15610f13576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f1e8383836131b3565b505050565b6007546001600160a01b03163314610f705760405162461bcd60e51b8152602060048201819052602482015260008051602061478c83398151915260448201526064015b60405180910390fd5b60165465010000000000900460ff1615610f8957600080fd5b6015805467ffffffffffffffff9485166fffffffffffffffffffffffffffffffff19909116176801000000000000000093851693909302929092177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff16600160801b9190931602919091179055565b600754600160a01b900460ff16156110455760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601554600160801b900467ffffffffffffffff164210801590611073575060165465010000000000900460ff165b6110bf5760405162461bcd60e51b815260206004820152601060248201527f53776170206973206e6f74206f70656e000000000000000000000000000000006044820152606401610f67565b600281516110cd91906144de565b1561111a5760405162461bcd60e51b815260206004820152601360248201527f4c656e677468206d757374206265206576656e000000000000000000000000006044820152606401610f67565b60006002825161112a9190614508565b6016549091507f000000000000000000000000000000000000000000000000000000000000009361ffff169061116c908390640100000000900460ff1661451c565b60ff1611156111aa5760405162461bcd60e51b815260206004820152600a60248201526913dd5d081bd98813919560b21b6044820152606401610f67565b60005b82518161ffff16101561123e576111e0838261ffff16815181106111d3576111d3614541565b60200260200101516124c4565b61122c5760405162461bcd60e51b815260206004820152600f60248201527f4f6e6c7920757365206d6f7361696300000000000000000000000000000000006044820152606401610f67565b8061123681614557565b9150506111ad565b5060005b82518161ffff1610156112a25761129033601660069054906101000a90046001600160a01b0316858461ffff168151811061127f5761127f614541565b602002602001015161ffff166114f9565b8061129a81614557565b915050611242565b50600080546016546001600160801b039091169164010000000090910460ff16905b8360ff168160ff16101561145857600061130d61130460ff85167f0000000000000000000000000000000000000000000000000000000000000093614579565b61ffff1661321c565b611317908461451c565b9050600060108260ff166093811061133157611331614541565b602091828204019190069054906101000a900460ff16905060108460ff166093811061135f5761135f614541565b602091828204019190069054906101000a900460ff1660108360ff166093811061138b5761138b614541565b602091828204019190066101000a81548160ff021916908360ff1602179055508060108560ff16609381106113c2576113c2614541565b6020808204929092018054601f9092166101000a60ff818102199093169483160293909317909255600087815260039091526040902080547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16918316600160f01b02919091179055846114328161459c565b9550508380611440906145b7565b94505050508080611450906145b7565b9150506112c4565b5080601660046101000a81548160ff021916908360ff160217905550611481338460ff166132c7565b50505050565b6007546001600160a01b031633146114cf5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b60165465010000000000900460ff16156114e857600080fd5b6114f5600b826005613d02565b5050565b610f1e8383836132e1565b60165460009065010000000000900460ff1661151e575090565b60007f00000000000000000000000000000000000000000000000000000000000000d261ffff1683101561159b5760155461156490600160c01b900461ffff16846145d7565b905061159461ffff7f00000000000000000000000000000000000000000000000000000000000000d216826144de565b9050610d6e565b6016546115cc9061ffff167f00000000000000000000000000000000000000000000000000000000000000d26145ef565b61ffff1683101561167e5760155461ffff600160c01b909104811690611614907f00000000000000000000000000000000000000000000000000000000000000d21685614615565b61161e91906145d7565b905061164e61ffff7f000000000000000000000000000000000000000000000000000000000000048616826144de565b905061159461ffff7f00000000000000000000000000000000000000000000000000000000000000d216826145d7565b600083815260036020526040902054600160e81b900460ff1615611703576015546000848152600360205260409020546116cd9161ffff600160c01b909104811691600160f01b9004166145ef565b61ffff1690507f000000000000000000000000000000000000000000000000000000000000048661ffff168161164e91906144de565b6000838152600360205260409020547f00000000000000000000000000000000000000000000000000000000000004869061176a907f00000000000000000000000000000000000000000000000000000000000000d290600160f01b900461ffff166145ef565b61177491906145ef565b61ffff169392505050565b600754600160a01b900460ff16156117cc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b60165465010000000000900460ff1680156117fb5750601654660100000000000090046001600160a01b031633145b61180457600080fd5b60165461ffff7f000000000000000000000000000000000000000000000000000000000000048681169160ff85169161184691620100008104821691166145ef565b61185091906145ef565b61ffff16111561188f5760405162461bcd60e51b815260206004820152600a60248201526913dd5d081bd98813919560b21b6044820152606401610f67565b600080546001600160801b0316905b8360ff168160ff16101561197357600082815260036020526040902080547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e81b17905560165460ff8216906119049061ffff620100008204811691166145ef565b61190e91906145ef565b6000838152600360205260409020805461ffff92909216600160f01b027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092169190911790558161195d8161459c565b925050808061196b906145b7565b91505061189e565b508260ff16601660028282829054906101000a900461ffff1661199691906145ef565b92506101000a81548161ffff021916908361ffff160217905550610f1e828460ff166132c7565b601654601554600091829166010000000000009091046001600160a01b031690612710906119f79061ffff600160d01b909104168661462c565b611a019190614508565b915091509250929050565b60008054606091906001600160801b031667ffffffffffffffff811115611a3557611a35613f3e565b604051908082528060200260200182016040528015611a5e578160200160208202803683370190505b50905060005b6000546001600160801b0316811015611ab757611a8081611504565b828281518110611a9257611a92614541565b61ffff9092166020928302919091019091015280611aaf8161459c565b915050611a64565b50919050565b6000611ac883612222565b8210611b00576040517f0ddac30e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160801b03169080805b83811015611bee57600081815260036020908152604091829020825160a08101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b820460ff90811615801594830194909452600160e81b83041615156060820152600160f01b90910461ffff16608082015290611b9a5750611be6565b80516001600160a01b031615611baf57805192505b876001600160a01b0316836001600160a01b03161415611be45786841415611bdd57509350610d6e92505050565b6001909301925b505b600101611b11565b50600080fd5b601654660100000000000090046001600160a01b0316331480611c2157506007546001600160a01b031633145b611c2a57600080fd5b60005b81518110156114f5577f000000000000000000000000000000000000000000000000000000000000000160046000848481518110611c6d57611c6d614541565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160196101000a81548160ff021916908360ff1602179055508080611cbb9061459c565b915050611c2d565b6007546001600160a01b03163314611d0b5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6015805461ffff909216600160d01b027fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6007546001600160a01b03163314611d8f5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b601680546001600160a01b039092166601000000000000027fffffffffffff0000000000000000000000000000000000000000ffffffffffff909216919091179055565b60026008541415611e265760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f67565b6002600855600754600160a01b900460ff1615611e785760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601654660100000000000090046001600160a01b03163314611e9957600080fd5b60405133904780156108fc02916000818181858888f19350505050158015611ec5573d6000803e3d6000fd5b506001600855565b6007546001600160a01b03163314611f155760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b611f1d61354c565b565b610f1e83838360405180602001604052806000815250612a6c565b611f42613d40565b6040805160a081019182905290600b9060059082845b815481526020019060010190808311611f58575050505050905090565b600080546001600160801b031681805b8281101561202757600081815260036020908152604091829020825160a08101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b820460ff9081161515938201849052600160e81b83041615156060820152600160f01b90910461ffff1660808201529061201e57858314156120175750949350505050565b6001909201915b50600101611f85565b506040517fa723001c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007546001600160a01b031633146120a25760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6007546001600160a01b031633146121155760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b60165465010000000000900460ff161561212e57600080fd5b80516114f5906009906020840190613d5e565b600061214c826135f2565b5192915050565b601654660100000000000090046001600160a01b031633148061218057506007546001600160a01b031633145b61218957600080fd5b60005b81518110156114f5577f0000000000000000000000000000000000000000000000000000000000000003600460008484815181106121cc576121cc614541565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160196101000a81548160ff021916908360ff160217905550808061221a9061459c565b91505061218c565b60006001600160a01b038216612264576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526004602052604090205467ffffffffffffffff1690565b6007546001600160a01b031633146122d25760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b611f1d6000613782565b6007546001600160a01b031633146123245760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b601554600160801b900467ffffffffffffffff1642101561234457600080fd5b80156123ce5760165461239c906001600160a01b036601000000000000820416906123939061ffff167f0000000000000000000000000000000000000000000000000000000000000486614579565b61ffff166132c7565b6016805461ffff19167f000000000000000000000000000000000000000000000000000000000000048661ffff161790555b6123fb7f000000000000000000000000000000000000000000000000000000000000048661ffff1661321c565b6015805461ffff92909216600160c01b027fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff9092169190911790558151612449906009906020850190613d5e565b50506016805465ff000000000019166501000000000017905550565b6007546001600160a01b031633146124ad5760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b611f1d6137e1565b606060028054610d8390614493565b60165460009065010000000000900460ff16158061250957507f00000000000000000000000000000000000000000000000000000000000000d261ffff168261ffff16105b1561251657506000919050565b60007f00000000000000000000000000000000000000000000000000000000000000d26125468461ffff16611504565b6125509190614579565b905060006125606101008361464b565b905060058161ffff1610612578575060009392505050565b60006125866101008461466c565b61ffff166001901b600b8361ffff16600581106125a5576125a5614541565b015416151595945050505050565b6001600160a01b0382163314156125f6576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600754600160a01b900460ff16156126af5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601654429065010000000000900460ff161580156126fb575060155467ffffffffffffffff1681108015906126fb575060155468010000000000000000900467ffffffffffffffff1681105b801561271f575033600090815260046020526040902054600160c81b900460ff1615155b61276b5760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610f67565b60165461ffff7f00000000000000000000000000000000000000000000000000000000000004868116916127a49160ff861691166145ef565b61ffff1611156127e55760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662073746f636b60a01b6044820152606401610f67565b333b156127f157600080fd5b60008260ff16116128445760405162461bcd60e51b815260206004820152600e60248201527f456d707479206e756d546f6b656e0000000000000000000000000000000000006044820152606401610f67565b61287160ff83167f0000000000000000000000000000000000000000000000000001c6bf5263400061462c565b3410156128c05760405162461bcd60e51b815260206004820152601060248201527f496e73756666696369656e7420455448000000000000000000000000000000006044820152606401610f67565b3360009081526004602052604090205460ff600160c81b82048116916128ef918591600160c01b90041661451c565b60ff16111561292f5760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662074696d657360a01b6044820152606401610f67565b336000908152600460205260409020805483919060189061295b908490600160c01b900460ff1661451c565b92506101000a81548160ff021916908360ff1602179055508160ff16601660008282829054906101000a900461ffff1661299591906145ef565b92506101000a81548161ffff021916908361ffff1602179055506114f5338360ff166132c7565b601654660100000000000090046001600160a01b03163314806129e957506007546001600160a01b031633145b6129f257600080fd5b60005b81518110156114f557600060046000848481518110612a1657612a16614541565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160196101000a81548160ff021916908360ff1602179055508080612a649061459c565b9150506129f5565b612a778484846132e1565b612a8384848484613869565b611481576040516368d2bf6b60e11b815260040160405180910390fd5b600754600160a01b900460ff1615612aed5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b601654429065010000000000900460ff16158015612b40575060155468010000000000000000900467ffffffffffffffff168110801590612b405750601554600160801b900467ffffffffffffffff1681105b612b8c5760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610f67565b60165461ffff7f0000000000000000000000000000000000000000000000000000000000000486811691612bc59160ff861691166145ef565b61ffff161115612c065760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662073746f636b60a01b6044820152606401610f67565b333b15612c1257600080fd5b60008260ff1611612c655760405162461bcd60e51b815260206004820152600e60248201527f456d707479206e756d546f6b656e0000000000000000000000000000000000006044820152606401610f67565b612c9260ff83167f0000000000000000000000000000000000000000000000000002aa1efb94e00061462c565b341015612ce15760405162461bcd60e51b815260206004820152601060248201527f496e73756666696369656e7420455448000000000000000000000000000000006044820152606401610f67565b3360008181526004602052604090205460ff7f000000000000000000000000000000000000000000000000000000000000000a81169285821692600160c01b900490911690612d2f90613977565b612d399190614615565b612d4391906145d7565b1115612d805760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662074696d657360a01b6044820152606401610f67565b6016805460ff8416919060009061299590849061ffff166145ef565b6060612da78261317f565b612ddd576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612de76139eb565b90506000612df484611504565b61ffff169050815160001415612e3157612e0d816139fa565b604051602001612e1d919061468d565b604051602081830303815290604052612e5c565b81612e3b826139fa565b604051602001612e4c9291906146b6565b6040516020818303038152906040525b949350505050565b601654600090612e809061ffff620100008204811691166145ef565b905090565b6001600160a01b0381166000908152600a602052604081205460ff1615612eae57506001610d6e565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff165b9392505050565b6007546001600160a01b03163314612f275760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6001600160a01b038116612fa35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f67565b612fac81613782565b50565b6007546001600160a01b03163314612ff75760405162461bcd60e51b8152602060048201819052602482015260008051602061478c8339815191526044820152606401610f67565b6016805465ff000000000019169055565b60165460009065010000000000900460ff1661310257811561309f576001600160a01b03831660009081526004602052604090205460ff600160c01b82048116600160c81b909204161115613097576001600160a01b03831660009081526004602052604090205461308d9060ff600160c01b8204811691600160c81b9004166146f5565b60ff169050610d6e565b506000610d6e565b6001600160a01b038316600090815260046020526040902054600160c01b900460ff166130cb84613977565b6130d59190614615565b6115949060ff7f000000000000000000000000000000000000000000000000000000000000000a16614615565b6016546001600160a01b0384811666010000000000009092041614156130975760165461313b9061ffff620100008204811691166145ef565b613165907f0000000000000000000000000000000000000000000000000000000000000486614579565b61ffff169050610d6e565b6001600160a01b03163b151590565b600080546001600160801b031682108015610d6e575050600090815260036020526040902054600160e01b900460ff161590565b600082815260056020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60158054600091600160e01b90910463ffffffff1690601c61323d83614718565b82546101009290920a63ffffffff81810219909316919092169190910217905550601554604080514260208201523360601b6bffffffffffffffffffffffff191691810191909152600160e01b90910460e01b6001600160e01b031916605482015282906058016040516020818303038152906040528051906020012060001c610d6e91906144de565b6114f5828260405180602001604052806000815250613b2c565b60006132ec826135f2565b80519091506000906001600160a01b0316336001600160a01b0316148061331a5750815161331a9033612e85565b8061333557503361332a84610e06565b6001600160a01b0316145b90508061336e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146133bd576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166133fd576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61340d60008484600001516131b3565b6001600160a01b038581166000908152600460209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116613502576000546001600160801b0316811015613502578251600082815260036020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b600754600160a01b900460ff166135a55760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f67565b6007805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101829052905482906001600160801b031681101561375057600081815260036020908152604091829020825160a08101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b820460ff9081161515938201849052600160e81b83041615156060820152600160f01b90910461ffff1660808201529061374e5780516001600160a01b0316156136c0579392505050565b5060001901600081815260036020908152604091829020825160a08101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b810460ff908116151594830194909452600160e81b810490931615156060820152600160f01b90920461ffff16608083015215613749579392505050565b6136c0565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600754600160a01b900460ff161561382e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f67565b6007805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586135d53390565b60006001600160a01b0384163b1561396c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906138ad903390899088908890600401614732565b602060405180830381600087803b1580156138c757600080fd5b505af19250505080156138f7575060408051601f3d908101601f191682019092526138f49181019061476e565b60015b613952573d808015613925576040519150601f19603f3d011682016040523d82523d6000602084013e61392a565b606091505b50805161394a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612e5c565b506001949350505050565b60006001600160a01b0382166139b9576040517f35ebb31900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526004602052604090205468010000000000000000900467ffffffffffffffff1690565b606060098054610d8390614493565b606081613a3a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613a645780613a4e8161459c565b9150613a5d9050600a83614508565b9150613a3e565b60008167ffffffffffffffff811115613a7f57613a7f613f3e565b6040519080825280601f01601f191660200182016040528015613aa9576020820181803683370190505b5090505b8415612e5c57613abe600183614615565b9150613acb600a866144de565b613ad69060306145d7565b60f81b818381518110613aeb57613aeb614541565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613b25600a86614508565b9450613aad565b610f1e83838360016000546001600160801b03166001600160a01b038516613b80576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83613bb7576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015613cd35760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015613ca95750613ca76000888488613869565b155b15613cc7576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101613c52565b50600080546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055613545565b8260058101928215613d30579160200282015b82811115613d30578251825591602001919060010190613d15565b50613d3c929150613dd1565b5090565b6040518060a001604052806005906020820280368337509192915050565b828054613d6a90614493565b90600052602060002090601f016020900481019282613d8c5760008555613d30565b82601f10613da557805160ff1916838001178555613d30565b82800160010185558215613d305791820182811115613d30578251825591602001919060010190613d15565b5b80821115613d3c5760008155600101613dd2565b6001600160e01b031981168114612fac57600080fd5b600060208284031215613e0e57600080fd5b8135612ed881613de6565b60005b83811015613e34578181015183820152602001613e1c565b838111156114815750506000910152565b60008151808452613e5d816020860160208601613e19565b601f01601f19169290920160200192915050565b602081526000612ed86020830184613e45565b600060208284031215613e9657600080fd5b5035919050565b80356001600160a01b0381168114613eb457600080fd5b919050565b60008060408385031215613ecc57600080fd5b613ed583613e9d565b946020939093013593505050565b803567ffffffffffffffff81168114613eb457600080fd5b600080600060608486031215613f1057600080fd5b613f1984613ee3565b9250613f2760208501613ee3565b9150613f3560408501613ee3565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f7d57613f7d613f3e565b604052919050565b600067ffffffffffffffff821115613f9f57613f9f613f3e565b5060051b60200190565b803561ffff81168114613eb457600080fd5b60006020808385031215613fce57600080fd5b823567ffffffffffffffff811115613fe557600080fd5b8301601f81018513613ff657600080fd5b803561400961400482613f85565b613f54565b81815260059190911b8201830190838101908783111561402857600080fd5b928401925b8284101561404d5761403e84613fa9565b8252928401929084019061402d565b979650505050505050565b600060a0828403121561406a57600080fd5b82601f83011261407957600080fd5b60405160a0810181811067ffffffffffffffff8211171561409c5761409c613f3e565b6040528060a08401858111156140b157600080fd5b845b818110156140cb5780358352602092830192016140b3565b509195945050505050565b6000806000606084860312156140eb57600080fd5b6140f484613e9d565b925061410260208501613e9d565b9150604084013590509250925092565b803560ff81168114613eb457600080fd5b6000806040838503121561413657600080fd5b61413f83614112565b915061414d60208401613e9d565b90509250929050565b6000806040838503121561416957600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156141b457835161ffff1683529284019291840191600101614194565b50909695505050505050565b600060208083850312156141d357600080fd5b823567ffffffffffffffff8111156141ea57600080fd5b8301601f810185136141fb57600080fd5b803561420961400482613f85565b81815260059190911b8201830190838101908783111561422857600080fd5b928401925b8284101561404d5761423e84613e9d565b8252928401929084019061422d565b60006020828403121561425f57600080fd5b612ed882613fa9565b60006020828403121561427a57600080fd5b612ed882613e9d565b60a08101818360005b60058110156142ab57815183526020928301929091019060010161428c565b50505092915050565b80358015158114613eb457600080fd5b600080604083850312156142d757600080fd5b6142e083613e9d565b915061414d602084016142b4565b600067ffffffffffffffff83111561430857614308613f3e565b61431b601f8401601f1916602001613f54565b905082815283838301111561432f57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261435757600080fd5b612ed8838335602085016142ee565b60006020828403121561437857600080fd5b813567ffffffffffffffff81111561438f57600080fd5b612e5c84828501614346565b600080604083850312156143ae57600080fd5b823567ffffffffffffffff8111156143c557600080fd5b6143d185828601614346565b92505061414d602084016142b4565b6000602082840312156143f257600080fd5b612ed882614112565b6000806000806080858703121561441157600080fd5b61441a85613e9d565b935061442860208601613e9d565b925060408501359150606085013567ffffffffffffffff81111561444b57600080fd5b8501601f8101871361445c57600080fd5b61446b878235602084016142ee565b91505092959194509250565b6000806040838503121561448a57600080fd5b61413f83613e9d565b600181811c908216806144a757607f821691505b60208210811415611ab757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826144ed576144ed6144c8565b500690565b634e487b7160e01b600052601160045260246000fd5b600082614517576145176144c8565b500490565b600060ff821660ff84168060ff03821115614539576145396144f2565b019392505050565b634e487b7160e01b600052603260045260246000fd5b600061ffff8083168181141561456f5761456f6144f2565b6001019392505050565b600061ffff83811690831681811015614594576145946144f2565b039392505050565b60006000198214156145b0576145b06144f2565b5060010190565b600060ff821660ff8114156145ce576145ce6144f2565b60010192915050565b600082198211156145ea576145ea6144f2565b500190565b600061ffff80831681851680830382111561460c5761460c6144f2565b01949350505050565b600082821015614627576146276144f2565b500390565b6000816000190483118215151615614646576146466144f2565b500290565b600061ffff80841680614660576146606144c8565b92169190910492915050565b600061ffff80841680614681576146816144c8565b92169190910692915050565b6000825161469f818460208701613e19565b64173539b7b760d91b920191825250600501919050565b600083516146c8818460208801613e19565b8351908301906146dc818360208801613e19565b64173539b7b760d91b9101908152600501949350505050565b600060ff821660ff84168082101561470f5761470f6144f2565b90039392505050565b600063ffffffff8083168181141561456f5761456f6144f2565b60006001600160a01b038087168352808616602084015250836040830152608060608301526147646080830184613e45565b9695505050505050565b60006020828403121561478057600080fd5b8151612ed881613de656fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212202342a95dcd341f62867c8b24f2d64bb5f73190825b0246595649890b29e91c7264736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000001e00000000000000000000000005a7e314068c14149fc9eaad971e4cfa4f4f652f34000c054008444001041010060822c310012014040026a100a0a529002202201718500000990b2090c2c0056e08c0a08003b66181042481bc06001c00822100028082d048441000704103821081412a000818040086880de010442561c0546b1005702001d9c003210d40e0921522b0840e1b0320c0c029401c08768183480950000000000000000000000000000001d039048289c3a46111010142a0003580300000000000000000000000000000000000000000000000000000000622bd47000000000000000000000000000000000000000000000000000000000622c28d000000000000000000000000000000000000000000000000000000000622c7d3000000000000000000000000000000000000000000000000000000000000000d2000000000000000000000000000000000000000000000000000000000000048600000000000000000000000000000000000000000000000000000000000000930000000000000000000000000000000000000000000000000001c6bf526340000000000000000000000000000000000000000000000000000002aa1efb94e0000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d564d7365716b7661624a7956524e76374d4a6b5837597a777259725679334346376b57336a726633484672682f00000000000000000000

-----Decoded View---------------
Arg [0] : baseURI (string): ipfs://QmVMseqkvabJyVRNv7MJkX7YzwrYrVy3CF7kW3jrf3HFrh/
Arg [1] : productOwnerAddr (address): 0x5a7E314068c14149fC9EAad971E4cfa4F4f652f3
Arg [2] : mosaicDataArr (uint256[5]): 28949349709317563607370830884348472736727387853093819675903672117933031563777,51346342550531961882865034119192679048422849630883416236461198130436345303040,18106959420202236846887990130831684161810401384607261337769684819104900662961,153729501246644468192723647037815867890979060119598007209840615845694570645,9872925478993167276836000832733659224067
Arg [3] : privateOpenTime (uint64): 1647039600
Arg [4] : publicOpenTime (uint64): 1647061200
Arg [5] : revelationTime (uint64): 1647082800
Arg [6] : totalPremintNFT (uint16): 210
Arg [7] : totalCanmintNFT (uint16): 1158
Arg [8] : totalCannotmintNFT (uint16): 147
Arg [9] : privatePrice (uint256): 500000000000000
Arg [10] : publicPrice (uint256): 750000000000000

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [1] : 0000000000000000000000005a7e314068c14149fc9eaad971e4cfa4f4f652f3
Arg [2] : 4000c054008444001041010060822c310012014040026a100a0a529002202201
Arg [3] : 718500000990b2090c2c0056e08c0a08003b66181042481bc06001c008221000
Arg [4] : 28082d048441000704103821081412a000818040086880de010442561c0546b1
Arg [5] : 005702001d9c003210d40e0921522b0840e1b0320c0c029401c0876818348095
Arg [6] : 0000000000000000000000000000001d039048289c3a46111010142a00035803
Arg [7] : 00000000000000000000000000000000000000000000000000000000622bd470
Arg [8] : 00000000000000000000000000000000000000000000000000000000622c28d0
Arg [9] : 00000000000000000000000000000000000000000000000000000000622c7d30
Arg [10] : 00000000000000000000000000000000000000000000000000000000000000d2
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000486
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000093
Arg [13] : 0000000000000000000000000000000000000000000000000001c6bf52634000
Arg [14] : 0000000000000000000000000000000000000000000000000002aa1efb94e000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [16] : 697066733a2f2f516d564d7365716b7661624a7956524e76374d4a6b5837597a
Arg [17] : 777259725679334346376b57336a726633484672682f00000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.