ETH Price: $3,059.71 (+1.18%)
Gas: 3 Gwei

Token

Fables (FAB)
 

Overview

Max Total Supply

474 FAB

Holders

174

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 FAB
0xE53f63d80A493Ab55d04499F05055aA86317e502
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:
Fables

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : Fables.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "./ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "./modules/Permission.sol";
import "./ERC721A.sol";

contract Fables is
    Context,
    Permission,
    ERC721URIStorage
{
    using Strings for uint256;
    uint private _tokenIdTracker;

    mapping(uint8 => string) private _baseTokenURI;
    mapping(address => bool) public alreadymint;
    mapping(uint256 => uint8) public fablesLevel;
    mapping(uint8 => uint) public startTime;
    mapping(uint8 => uint) public endTime;
    mapping(uint8 => mapping(address => bool)) public whitelist;
    mapping(address => uint256) public investor;

    constructor(
        string memory name,
        string memory symbol,
        uint256 maxBatchSize,
        uint256 collectionSize,
        string memory baseTokenURI
    ) ERC721A(name, symbol,  maxBatchSize, collectionSize) {
        _baseTokenURI[0] = baseTokenURI;
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(
        _exists(tokenId),
        "ERC721Metadata: URI query for nonexistent token"
        );

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

    function setSellTime(uint8 _item, uint _start, uint _end) external onlyRole(MANAGER_ROLE){
        startTime[_item] = _start;
        endTime[_item] = _end;
    }


    function setWhitelist(uint8 _table, address[] memory setAmount )external onlyRole(MANAGER_ROLE){
        for(uint16 i = 0; i < setAmount.length; i ++){
            whitelist[_table][setAmount[i]] = true;
        }
    }

    function mintBatch(
        address recipients,
        uint256  _amount
    ) external onlyRole(MINTER_ROLE){
        require(_tokenIdTracker + _amount <= 3000,"NFT is already limited");
        _tokenIdTracker = _tokenIdTracker + _amount;
        _safeMint(recipients, _amount);
    }

    function mint(address _send) public virtual  onlyRole(MINTER_ROLE){
        require(_tokenIdTracker + 1 <= 3000,"NFT is already limited");
        _tokenIdTracker = _tokenIdTracker + 1;
        _safeMint(_send, 1);
    }

    function mintBatchInvestor() external{
        uint256 _amount = investor[msg.sender];
        require(_amount > 0,"You can not mint!");
        require(_tokenIdTracker + _amount <= 3000,"NFT is already limited");
        require(block.timestamp >= startTime[1] && block.timestamp < endTime[1], "It is not sellTime");
        require(!alreadymint[msg.sender],"You are already minted");
        _tokenIdTracker = _tokenIdTracker + _amount;
        // investor[msg.sender] = 0;
        alreadymint[msg.sender] = true;
        _safeMint(msg.sender, _amount);
    }

    function mintVIP() public virtual{
        require(!alreadymint[msg.sender],"You are already minted");
        require(block.timestamp >= startTime[1] && block.timestamp < endTime[1], "It is not sellTime");
        require(whitelist[1][msg.sender],"You are not VIP");
        require(_tokenIdTracker + 1 <= 3000,"NFT is already limited");
        alreadymint[msg.sender] = true;
        _tokenIdTracker = _tokenIdTracker + 1;
        _safeMint(msg.sender, 1);
    }

    function mintWhitelist() public virtual{
        require(!alreadymint[msg.sender],"You are already minted");
        require(block.timestamp >= startTime[2] && block.timestamp < endTime[2], "It is not sellTime");
        require(whitelist[2][msg.sender] || whitelist[1][msg.sender],"You are not whitelist or VIP");
        require(_tokenIdTracker + 1 <= 3000,"NFT is already limited");
        alreadymint[msg.sender] = true;
        _tokenIdTracker = _tokenIdTracker + 1;
        _safeMint(msg.sender, 1);
    }
    
    function mintPublic() public virtual{
        require(!alreadymint[msg.sender],"You are already minted");
        require(block.timestamp >= startTime[3] && block.timestamp < endTime[3], "It is not sellTime");
        require(_tokenIdTracker + 1 <= 3000,"NFT is already limited");
        alreadymint[msg.sender] = true;
        _tokenIdTracker = _tokenIdTracker + 1;
        _safeMint(msg.sender, 1);
    }

    function isContract(address addr) internal view returns (bool) {
        uint256 size;
        assembly { size := extcodesize(addr) }
        return size > 0;
    }

    function addLevel(uint256 tokenId) external onlyRole(MINTER_ROLE){
        fablesLevel[tokenId] = fablesLevel[tokenId] + 1;
    }

    function redLevel(uint256 tokenId) external onlyRole(MINTER_ROLE){
        require(fablesLevel[tokenId] >= 1,"Level is lowest!");
        fablesLevel[tokenId] = fablesLevel[tokenId] - 1;
    }

//only manager
    function setInvestor(address _investor, uint256 _amount) external onlyRole(MANAGER_ROLE){
        investor[_investor] = _amount;
    }

    function setBaseURI(string memory baseURI, uint8 _base) external onlyRole(MANAGER_ROLE){
        _baseTokenURI[_base] = baseURI;
    }

    function setTokenURI(uint256 tokenId, string memory _tokenURI) external onlyRole(MANAGER_ROLE){
        _setTokenURI(tokenId, _tokenURI);
    }

//overwrite
    function _baseURI(uint8 _base) internal view virtual returns (string memory) {
        return _baseTokenURI[_base];
    }

//other

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControl, ERC721A)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
    
}

File 2 of 16 : 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 3 of 16 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "./ERC721A.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721A {
    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;
    }

}

File 4 of 16 : 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 5 of 16 : Permission.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/AccessControl.sol";

abstract contract Permission is AccessControl{
    bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    
    constructor(){
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(MANAGER_ROLE, _msgSender());
        _setupRole(MINTER_ROLE, _msgSender());
    }

    function grantMinter(address account) external onlyRole(MANAGER_ROLE){
        _grantRole(MINTER_ROLE, account);
    }

    function revokeMinter(address account) external onlyRole(MANAGER_ROLE){
        _revokeRole(MINTER_ROLE, account);
    }

    function grantManager(address account) external onlyRole(DEFAULT_ADMIN_ROLE){
        _grantRole(MANAGER_ROLE, account);
    }

    function revokeManager(address account) external onlyRole(DEFAULT_ADMIN_ROLE){
        _revokeRole(MANAGER_ROLE, account);
    }

    function transferAdmin(address account) external onlyRole(DEFAULT_ADMIN_ROLE){
        _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _grantRole(DEFAULT_ADMIN_ROLE, account);
    }

}

File 6 of 16 : ERC721A.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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";

/**
 * @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 the number of issuable tokens (collection size) is capped and fits in a uint128.
 *
 * Does not support burning tokens to address(0).
 */
contract ERC721A is
  Context,
  ERC165,
  IERC721,
  IERC721Metadata,
  IERC721Enumerable
{
  using Address for address;
  using Strings for uint256;

  struct TokenOwnership {
    address addr;
    uint64 startTimestamp;
  }

  struct AddressData {
    uint128 balance;
    uint128 numberMinted;
  }

  uint256 private currentIndex = 1;  //  currentIndex = 0  =>  currentIndex = 1

  uint256 internal immutable collectionSize;
  uint256 internal immutable maxBatchSize;

  // 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) private _ownerships;

  // Mapping owner address to address data
  mapping(address => AddressData) private _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;

  /**
   * @dev
   * `maxBatchSize` refers to how much a minter can mint at a time.
   * `collectionSize_` refers to how many tokens are in the collection.
   */
  constructor(
    string memory name_,
    string memory symbol_,
    uint256 maxBatchSize_,
    uint256 collectionSize_
  ) {
    require(
      collectionSize_ > 0,
      "ERC721A: collection must have a nonzero supply"
    );
    require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero");
    _name = name_;
    _symbol = symbol_;
    maxBatchSize = maxBatchSize_;
    collectionSize = collectionSize_;
  }

  /**
   * @dev See {IERC721Enumerable-totalSupply}.
   */
  function totalSupply() public view override returns (uint256) {
    return currentIndex - 1; // currentIndex  =>  currentIndex - 1
  }

  /**
   * @dev See {IERC721Enumerable-tokenByIndex}.
   */
  function tokenByIndex(uint256 index) public view override returns (uint256) {
    require(index <= totalSupply(), "ERC721A: global index out of bounds");  //  index < totalSupply()  =>  index <= totalSupply()
    return index;
  }

  /**
   * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
   * This read function is O(collectionSize). 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)
  {
    require(index < balanceOf(owner), "ERC721A: owner index out of bounds");
    uint256 numMintedSoFar = totalSupply();
    uint256 tokenIdsIdx = 0;
    address currOwnershipAddr = address(0);
    for (uint256 i = 0; i <= numMintedSoFar; i++) {  //  <  =>  <=
      TokenOwnership memory ownership = _ownerships[i];
      if (ownership.addr != address(0)) {
        currOwnershipAddr = ownership.addr;
      }
      if (currOwnershipAddr == owner) {
        if (tokenIdsIdx == index) {
          return i;
        }
        tokenIdsIdx++;
      }
    }
    revert("ERC721A: unable to get token of owner by index");
  }

  /**
   * @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) {
    require(owner != address(0), "ERC721A: balance query for the zero address");
    return uint256(_addressData[owner].balance);
  }

  function _numberMinted(address owner) internal view returns (uint256) {
    require(
      owner != address(0),
      "ERC721A: number minted query for the zero address"
    );
    return uint256(_addressData[owner].numberMinted);
  }

  function ownershipOf(uint256 tokenId)
    internal
    view
    returns (TokenOwnership memory)
  {
    require(_exists(tokenId), "ERC721A: owner query for nonexistent token");

    uint256 lowestTokenToCheck;
    if (tokenId >= maxBatchSize) {
      lowestTokenToCheck = tokenId - maxBatchSize + 1;
    }

    for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
      TokenOwnership memory ownership = _ownerships[curr];
      if (ownership.addr != address(0)) {
        return ownership;
      }
    }

    revert("ERC721A: unable to determine the owner of token");
  }

  /**
   * @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)
  {
    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 override {
    address owner = ERC721A.ownerOf(tokenId);
    require(to != owner, "ERC721A: approval to current owner");

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

    _approve(to, tokenId, owner);
  }

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

    return _tokenApprovals[tokenId];
  }

  /**
   * @dev See {IERC721-setApprovalForAll}.
   */
  function setApprovalForAll(address operator, bool approved) public override {
    require(operator != _msgSender(), "ERC721A: approve to caller");

    _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 override {
    _transfer(from, to, tokenId);
  }

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

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId,
    bytes memory _data
  ) public override {
    _transfer(from, to, tokenId);
    require(
      _checkOnERC721Received(from, to, tokenId, _data),
      "ERC721A: 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`),
   */
  function _exists(uint256 tokenId) internal view returns (bool) {
    return tokenId < currentIndex;
  }

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

  /**
   * @dev Mints `quantity` tokens and transfers them to `to`.
   *
   * Requirements:
   *
   * - there must be `quantity` tokens remaining unminted in the total collection.
   * - `to` cannot be the zero address.
   * - `quantity` cannot be larger than the max batch size.
   *
   * Emits a {Transfer} event.
   */
  function _safeMint(
    address to,
    uint256 quantity,
    bytes memory _data
  ) internal {
    uint256 startTokenId = currentIndex;
    require(to != address(0), "ERC721A: mint to the zero address");
    // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
    require(!_exists(startTokenId), "ERC721A: token already minted");
    require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high");

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

    AddressData memory addressData = _addressData[to];
    _addressData[to] = AddressData(
      addressData.balance + uint128(quantity),
      addressData.numberMinted + uint128(quantity)
    );
    _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

    uint256 updatedIndex = startTokenId;

    for (uint256 i = 0; i < quantity; i++) {
      emit Transfer(address(0), to, updatedIndex);
      require(
        _checkOnERC721Received(address(0), to, updatedIndex, _data),
        "ERC721A: transfer to non ERC721Receiver implementer"
      );
      updatedIndex++;
    }

    currentIndex = 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 ||
      getApproved(tokenId) == _msgSender() ||
      isApprovedForAll(prevOwnership.addr, _msgSender()));

    require(
      isApprovedOrOwner,
      "ERC721A: transfer caller is not owner nor approved"
    );

    require(
      prevOwnership.addr == from,
      "ERC721A: transfer from incorrect owner"
    );
    require(to != address(0), "ERC721A: transfer to the zero address");

    _beforeTokenTransfers(from, to, tokenId, 1);

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

    _addressData[from].balance -= 1;
    _addressData[to].balance += 1;
    _ownerships[tokenId] = TokenOwnership(to, 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)) {
      if (_exists(nextTokenId)) {
        _ownerships[nextTokenId] = TokenOwnership(
          prevOwnership.addr,
          prevOwnership.startTimestamp
        );
      }
    }

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

  /**
   * @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);
  }

  uint256 public nextOwnerToExplicitlySet = 0;

  /**
   * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
   */
  function _setOwnersExplicit(uint256 quantity) internal {
    uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
    require(quantity > 0, "quantity must be nonzero");
    uint256 endIndex = oldNextOwnerToSet + quantity - 1;
    if (endIndex > collectionSize) {  // endIndex > collectionSize - 1  =>  endIndex > collectionSize
      endIndex = collectionSize;  // endIndex > collectionSize - 1  =>  endIndex > collectionSize
    }
    // We know if the last one in the group exists, all in the group exist, due to serial ordering.
    require(_exists(endIndex), "not enough minted yet for this cleanup");
    for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
      if (_ownerships[i].addr == address(0)) {
        TokenOwnership memory ownership = ownershipOf(i);
        _ownerships[i] = TokenOwnership(
          ownership.addr,
          ownership.startTimestamp
        );
      }
    }
    nextOwnerToExplicitlySet = endIndex + 1;
  }

  /**
   * @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("ERC721A: transfer to non ERC721Receiver implementer");
        } 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.
   *
   * 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`.
   */
  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.
   *
   * 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` and `to` are never both zero.
   */
  function _afterTokenTransfers(
    address from,
    address to,
    uint256 startTokenId,
    uint256 quantity
  ) internal virtual {}
}

File 7 of 16 : 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 8 of 16 : 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 9 of 16 : 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 10 of 16 : 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 11 of 16 : 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 12 of 16 : 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 13 of 16 : 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 14 of 16 : 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 16 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 16 of 16 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"maxBatchSize","type":"uint256"},{"internalType":"uint256","name":"collectionSize","type":"uint256"},{"internalType":"string","name":"baseTokenURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"addLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"alreadymint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fablesLevel","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"investor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_send","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipients","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintBatchInvestor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintVIP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"redLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"uint8","name":"_base","type":"uint8"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_investor","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setInvestor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_item","type":"uint8"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"setSellTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_table","type":"uint8"},{"internalType":"address[]","name":"setAmount","type":"address[]"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"account","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60c06040526001805560006008553480156200001a57600080fd5b50604051620035c6380380620035c68339810160408190526200003d9162000419565b848484846200004e600033620001f6565b6200007a7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0833620001f6565b620000a67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620001f6565b60008111620001135760405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20636f6c6c656374696f6e206d757374206861766520612060448201526d6e6f6e7a65726f20737570706c7960901b60648201526084015b60405180910390fd5b60008211620001755760405162461bcd60e51b815260206004820152602760248201527f455243373231413a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b60648201526084016200010a565b83516200018a906002906020870190620002a6565b508251620001a0906003906020860190620002a6565b5060a091909152608052505060008052600b60209081528151620001ea917fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f769190840190620002a6565b505050505050620004fb565b62000202828262000206565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000202576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002623390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620002b490620004be565b90600052602060002090601f016020900481019282620002d8576000855562000323565b82601f10620002f357805160ff191683800117855562000323565b8280016001018555821562000323579182015b828111156200032357825182559160200191906001019062000306565b506200033192915062000335565b5090565b5b8082111562000331576000815560010162000336565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200037457600080fd5b81516001600160401b03808211156200039157620003916200034c565b604051601f8301601f19908116603f01168101908282118183101715620003bc57620003bc6200034c565b81604052838152602092508683858801011115620003d957600080fd5b600091505b83821015620003fd5785820183015181830184015290820190620003de565b838211156200040f5760008385830101525b9695505050505050565b600080600080600060a086880312156200043257600080fd5b85516001600160401b03808211156200044a57600080fd5b6200045889838a0162000362565b965060208801519150808211156200046f57600080fd5b6200047d89838a0162000362565b955060408801519450606088015193506080880151915080821115620004a257600080fd5b50620004b18882890162000362565b9150509295509295909350565b600181811c90821680620004d357607f821691505b60208210811415620004f557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161309a6200052c60003960008181611e8901528181611eb301526124df01526000505061309a6000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c80634f6ccce711610182578063a22cb465116100e9578063d5391393116100a2578063e985e9c51161007c578063e985e9c514610690578063ec87621c146106cc578063f135af1e146106e1578063f8e45422146106f457600080fd5b8063d53913931461065f578063d547741f14610674578063d7224ba01461068757600080fd5b8063a22cb465146105e0578063b5070e24146105f3578063b88d4fde14610613578063c4b95b5c14610626578063c87b56dd14610639578063cfbd48851461064c57600080fd5b8063898bc9c11161013b578063898bc9c11461057f5780638c874ebd146105a25780638e327dd3146105aa57806391d14854146105bd57806395d89b41146105d0578063a217fddf146105d857600080fd5b80634f6ccce7146105005780636352211e146105135780636a6278421461052657806370a082311461053957806375829def1461054c5780637aa8b5891461055f57600080fd5b8063248a9ca3116102265780632f745c59116101df5780632f745c591461048e57806336568abe146104a1578063377e32e6146104b45780633a1ad046146104c757806342842e0e146104da57806348539e37146104ed57600080fd5b8063248a9ca3146103f5578063248b71fc1461041857806324ecff3e1461042b578063261707fa146104605780632d3df31f146104735780632f2ff15d1461047b57600080fd5b80630e801b56116102785780630e801b561461037e5780631458f8e214610386578063162094c41461039957806318160ddd146103ac5780631b1cd4ff146103c257806323b872dd146103e257600080fd5b806301ffc9a7146102c057806305100a6a146102e857806306fdde03146102fd578063081812fc14610312578063095ea7b31461033d5780630b635b8c14610350575b600080fd5b6102d36102ce3660046127a2565b6106fc565b60405190151581526020015b60405180910390f35b6102fb6102f63660046127bf565b61070d565b005b6103056107c4565b6040516102df9190612830565b6103256103203660046127bf565b610856565b6040516001600160a01b0390911681526020016102df565b6102fb61034b36600461285f565b6108e1565b6102d361035e36600461289a565b601060209081526000928352604080842090915290825290205460ff1681565b6102fb6109f9565b6102fb610394366004612913565b610b62565b6102fb6103a7366004612a49565b610c03565b6103b4610c26565b6040519081526020016102df565b6103b46103d0366004612a8f565b60116020526000908152604090205481565b6102fb6103f0366004612aaa565b610c3b565b6103b46104033660046127bf565b60009081526020819052604090206001015490565b6102fb61042636600461285f565b610c46565b61044e6104393660046127bf565b600d6020526000908152604090205460ff1681565b60405160ff90911681526020016102df565b6102fb61046e366004612a8f565b610ca9565b6102fb610cde565b6102fb610489366004612ae6565b610eaf565b6103b461049c36600461285f565b610ed5565b6102fb6104af366004612ae6565b61104b565b6102fb6104c2366004612a8f565b6110c5565b6102fb6104d53660046127bf565b6110e9565b6102fb6104e8366004612aaa565b61111f565b6102fb6104fb366004612b09565b61113a565b6103b461050e3660046127bf565b611176565b6103256105213660046127bf565b6111df565b6102fb610534366004612a8f565b6111f1565b6103b4610547366004612a8f565b611256565b6102fb61055a366004612a8f565b6112e7565b6103b461056d366004612b4d565b600f6020526000908152604090205481565b6102d361058d366004612a8f565b600c6020526000908152604090205460ff1681565b6102fb611309565b6102fb6105b836600461285f565b6113ba565b6102d36105cb366004612ae6565b6113f0565b610305611419565b6103b4600081565b6102fb6105ee366004612b68565b611428565b6103b4610601366004612b4d565b600e6020526000908152604090205481565b6102fb610621366004612ba4565b6114ed565b6102fb610634366004612a8f565b611520565b6103056106473660046127bf565b611544565b6102fb61065a366004612a8f565b611622565b6103b460008051602061304583398151915281565b6102fb610682366004612ae6565b611653565b6103b460085481565b6102d361069e366004612c1f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103b460008051602061302583398151915281565b6102fb6106ef366004612c3b565b611679565b6102fb6116b5565b6000610707826117d6565b92915050565b6000805160206130458339815191526107268133611831565b6000828152600d6020526040902054600160ff90911610156107825760405162461bcd60e51b815260206004820152601060248201526f4c6576656c206973206c6f776573742160801b60448201526064015b60405180910390fd5b6000828152600d60205260409020546107a09060019060ff16612c84565b6000928352600d6020526040909220805460ff191660ff9093169290921790915550565b6060600280546107d390612ca7565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612ca7565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b5050505050905090565b6000610863826001541190565b6108c55760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610779565b506000908152600660205260409020546001600160a01b031690565b60006108ec826111df565b9050806001600160a01b0316836001600160a01b0316141561095b5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610779565b336001600160a01b03821614806109775750610977813361069e565b6109e95760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610779565b6109f4838383611895565b505050565b3360009081526011602052604090205480610a4a5760405162461bcd60e51b8152602060048201526011602482015270596f752063616e206e6f74206d696e742160781b6044820152606401610779565b610bb881600a54610a5b9190612ce2565b1115610a795760405162461bcd60e51b815260040161077990612cfa565b6001600052600e6020527fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be958207544210801590610ade57506001600052600f6020527f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f5442105b610afa5760405162461bcd60e51b815260040161077990612d2a565b336000908152600c602052604090205460ff1615610b2a5760405162461bcd60e51b815260040161077990612d56565b80600a54610b389190612ce2565b600a55336000818152600c60205260409020805460ff19166001179055610b5f90826118f1565b50565b600080516020613025833981519152610b7b8133611831565b60005b82518161ffff161015610bfd5760ff84166000908152601060205260408120845160019290869061ffff8616908110610bb957610bb9612d86565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610bf581612d9c565b915050610b7e565b50505050565b600080516020613025833981519152610c1c8133611831565b6109f4838361190b565b600060018054610c369190612dbe565b905090565b6109f4838383611998565b600080516020613045833981519152610c5f8133611831565b610bb882600a54610c709190612ce2565b1115610c8e5760405162461bcd60e51b815260040161077990612cfa565b81600a54610c9c9190612ce2565b600a556109f483836118f1565b600080516020613025833981519152610cc28133611831565b610cda60008051602061304583398151915283611d1e565b5050565b336000908152600c602052604090205460ff1615610d0e5760405162461bcd60e51b815260040161077990612d56565b6002600052600e6020527f9adb202b1492743bc00c81d33cdc6423fa8c79109027eb6a845391e8fc1f0481544210801590610d7357506002600052600f6020527fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeead5442105b610d8f5760405162461bcd60e51b815260040161077990612d2a565b3360009081527f853b2fefe141400fef543280f93d98bd49996069f632d0d20236afeeed8e46a2602052604090205460ff1680610dfa57503360009081527f8c6065603763fec3f5742441d3833f3f43b982453612d76adb39a885e3006b5f602052604090205460ff165b610e465760405162461bcd60e51b815260206004820152601c60248201527f596f7520617265206e6f742077686974656c697374206f7220564950000000006044820152606401610779565b610bb8600a546001610e589190612ce2565b1115610e765760405162461bcd60e51b815260040161077990612cfa565b336000908152600c60205260409020805460ff19166001908117909155600a54610e9f91612ce2565b600a55610ead3360016118f1565b565b600082815260208190526040902060010154610ecb8133611831565b6109f48383611d1e565b6000610ee083611256565b8210610f395760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610779565b6000610f43610c26565b905060008060005b838111610feb576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610f9c57805192505b876001600160a01b0316836001600160a01b03161415610fd85786841415610fca5750935061070792505050565b83610fd481612dd5565b9450505b5080610fe381612dd5565b915050610f4b565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610779565b6001600160a01b03811633146110bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610779565b610cda8282611da2565b60006110d18133611831565b610cda60008051602061302583398151915283611da2565b6000805160206130458339815191526111028133611831565b6000828152600d60205260409020546107a09060ff166001612df0565b6109f4838383604051806020016040528060008152506114ed565b6000805160206130258339815191526111538133611831565b60ff82166000908152600b602090815260409091208451610bfd928601906126fc565b6000611180610c26565b8211156111db5760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610779565b5090565b60006111ea82611e07565b5192915050565b60008051602061304583398151915261120a8133611831565b610bb8600a54600161121c9190612ce2565b111561123a5760405162461bcd60e51b815260040161077990612cfa565b600a54611248906001612ce2565b600a55610cda8260016118f1565b60006001600160a01b0382166112c25760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610779565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b60006112f38133611831565b6112fe600033611da2565b610cda600083611d1e565b336000908152600c602052604090205460ff16156113395760405162461bcd60e51b815260040161077990612d56565b6003600052600e6020527fe0283e559c29e31ee7f56467acc9dd307779c843a883aeeb3bf5c6128c90814454421080159061139e57506003600052600f6020527f45f76dafbbad695564362934e24d72eedc57f9fc1a65f39bca62176cc82968285442105b610e465760405162461bcd60e51b815260040161077990612d2a565b6000805160206130258339815191526113d38133611831565b506001600160a01b03909116600090815260116020526040902055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546107d390612ca7565b6001600160a01b0382163314156114815760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610779565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6114f8848484611998565b61150484848484611fb0565b610bfd5760405162461bcd60e51b815260040161077990612e15565b600061152c8133611831565b610cda60008051602061302583398151915283611d1e565b6060611551826001541190565b6115b55760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610779565b6000828152600d60205260408120546115d09060ff166120af565b905060008151116115f0576040518060200160405280600081525061161b565b806115fa84612155565b60405160200161160b929190612e68565b6040516020818303038152906040525b9392505050565b60008051602061302583398151915261163b8133611831565b610cda60008051602061304583398151915283611da2565b60008281526020819052604090206001015461166f8133611831565b6109f48383611da2565b6000805160206130258339815191526116928133611831565b5060ff9092166000908152600e6020908152604080832093909355600f90522055565b336000908152600c602052604090205460ff16156116e55760405162461bcd60e51b815260040161077990612d56565b6001600052600e6020527fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be95820754421080159061174a57506001600052600f6020527f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f5442105b6117665760405162461bcd60e51b815260040161077990612d2a565b3360009081527f8c6065603763fec3f5742441d3833f3f43b982453612d76adb39a885e3006b5f602052604090205460ff16610e465760405162461bcd60e51b815260206004820152600f60248201526e0596f7520617265206e6f742056495608c1b6044820152606401610779565b60006001600160e01b031982166380ac58cd60e01b148061180757506001600160e01b03198216635b5e139f60e01b145b8061182257506001600160e01b0319821663780e9d6360e01b145b80610707575061070782612252565b61183b82826113f0565b610cda57611853816001600160a01b03166014612287565b61185e836020612287565b60405160200161186f929190612e97565b60408051601f198184030181529082905262461bcd60e51b825261077991600401612830565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610cda828260405180602001604052806000815250612422565b611916826001541190565b6119795760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610779565b600082815260096020908152604090912082516109f4928401906126fc565b60006119a382611e07565b80519091506000906001600160a01b0316336001600160a01b031614806119da5750336119cf84610856565b6001600160a01b0316145b806119ec575081516119ec903361069e565b905080611a565760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610779565b846001600160a01b031682600001516001600160a01b031614611aca5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610779565b6001600160a01b038416611b2e5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610779565b611b3e6000848460000151611895565b6001600160a01b0385166000908152600560205260408120805460019290611b709084906001600160801b0316612f0c565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b03861660009081526005602052604081208054600194509092611bbc91859116612f34565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055611c43846001612ce2565b6000818152600460205260409020549091506001600160a01b0316611cd457611c6d816001541190565b15611cd45760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b611d2882826113f0565b610cda576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611d5e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611dac82826113f0565b15610cda576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040805180820190915260008082526020820152611e26826001541190565b611e855760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610779565b60007f00000000000000000000000000000000000000000000000000000000000000008310611ee657611ed87f000000000000000000000000000000000000000000000000000000000000000084612dbe565b611ee3906001612ce2565b90505b825b818110611f4f576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215611f3c57949350505050565b5080611f4781612f56565b915050611ee8565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610779565b60006001600160a01b0384163b156120a357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ff4903390899088908890600401612f6d565b6020604051808303816000875af192505050801561202f575060408051601f3d908101601f1916820190925261202c91810190612faa565b60015b612089573d80801561205d576040519150601f19603f3d011682016040523d82523d6000602084013e612062565b606091505b5080516120815760405162461bcd60e51b815260040161077990612e15565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506120a7565b5060015b949350505050565b60ff81166000908152600b602052604090208054606091906120d090612ca7565b80601f01602080910402602001604051908101604052809291908181526020018280546120fc90612ca7565b80156121495780601f1061211e57610100808354040283529160200191612149565b820191906000526020600020905b81548152906001019060200180831161212c57829003601f168201915b50505050509050919050565b6060816121795750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121a3578061218d81612dd5565b915061219c9050600a83612fdd565b915061217d565b6000816001600160401b038111156121bd576121bd6128cd565b6040519080825280601f01601f1916602001820160405280156121e7576020820181803683370190505b5090505b84156120a7576121fc600183612dbe565b9150612209600a86612ff1565b612214906030612ce2565b60f81b81838151811061222957612229612d86565b60200101906001600160f81b031916908160001a90535061224b600a86612fdd565b94506121eb565b60006001600160e01b03198216637965db0b60e01b148061070757506301ffc9a760e01b6001600160e01b0319831614610707565b60606000612296836002613005565b6122a1906002612ce2565b6001600160401b038111156122b8576122b86128cd565b6040519080825280601f01601f1916602001820160405280156122e2576020820181803683370190505b509050600360fc1b816000815181106122fd576122fd612d86565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061232c5761232c612d86565b60200101906001600160f81b031916908160001a9053506000612350846002613005565b61235b906001612ce2565b90505b60018111156123d3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061238f5761238f612d86565b1a60f81b8282815181106123a5576123a5612d86565b60200101906001600160f81b031916908160001a90535060049490941c936123cc81612f56565b905061235e565b50831561161b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610779565b6001546001600160a01b0384166124855760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610779565b612490816001541190565b156124dd5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610779565b7f00000000000000000000000000000000000000000000000000000000000000008311156125585760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610779565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b90910416918101919091528151808301909252805190919081906125b4908790612f34565b6001600160801b031681526020018583602001516125d29190612f34565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156126f15760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46126b56000888488611fb0565b6126d15760405162461bcd60e51b815260040161077990612e15565b816126db81612dd5565b92505080806126e990612dd5565b915050612668565b506001819055611d16565b82805461270890612ca7565b90600052602060002090601f01602090048101928261272a5760008555612770565b82601f1061274357805160ff1916838001178555612770565b82800160010185558215612770579182015b82811115612770578251825591602001919060010190612755565b506111db9291505b808211156111db5760008155600101612778565b6001600160e01b031981168114610b5f57600080fd5b6000602082840312156127b457600080fd5b813561161b8161278c565b6000602082840312156127d157600080fd5b5035919050565b60005b838110156127f35781810151838201526020016127db565b83811115610bfd5750506000910152565b6000815180845261281c8160208601602086016127d8565b601f01601f19169290920160200192915050565b60208152600061161b6020830184612804565b80356001600160a01b038116811461285a57600080fd5b919050565b6000806040838503121561287257600080fd5b61287b83612843565b946020939093013593505050565b803560ff8116811461285a57600080fd5b600080604083850312156128ad57600080fd5b6128b683612889565b91506128c460208401612843565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561290b5761290b6128cd565b604052919050565b6000806040838503121561292657600080fd5b61292f83612889565b91506020808401356001600160401b038082111561294c57600080fd5b818601915086601f83011261296057600080fd5b813581811115612972576129726128cd565b8060051b91506129838483016128e3565b818152918301840191848101908984111561299d57600080fd5b938501935b838510156129c2576129b385612843565b825293850193908501906129a2565b8096505050505050509250929050565b60006001600160401b038311156129eb576129eb6128cd565b6129fe601f8401601f19166020016128e3565b9050828152838383011115612a1257600080fd5b828260208301376000602084830101529392505050565b600082601f830112612a3a57600080fd5b61161b838335602085016129d2565b60008060408385031215612a5c57600080fd5b8235915060208301356001600160401b03811115612a7957600080fd5b612a8585828601612a29565b9150509250929050565b600060208284031215612aa157600080fd5b61161b82612843565b600080600060608486031215612abf57600080fd5b612ac884612843565b9250612ad660208501612843565b9150604084013590509250925092565b60008060408385031215612af957600080fd5b823591506128c460208401612843565b60008060408385031215612b1c57600080fd5b82356001600160401b03811115612b3257600080fd5b612b3e85828601612a29565b9250506128c460208401612889565b600060208284031215612b5f57600080fd5b61161b82612889565b60008060408385031215612b7b57600080fd5b612b8483612843565b915060208301358015158114612b9957600080fd5b809150509250929050565b60008060008060808587031215612bba57600080fd5b612bc385612843565b9350612bd160208601612843565b92506040850135915060608501356001600160401b03811115612bf357600080fd5b8501601f81018713612c0457600080fd5b612c13878235602084016129d2565b91505092959194509250565b60008060408385031215612c3257600080fd5b6128b683612843565b600080600060608486031215612c5057600080fd5b612c5984612889565b95602085013595506040909401359392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff841680821015612c9e57612c9e612c6e565b90039392505050565b600181811c90821680612cbb57607f821691505b60208210811415612cdc57634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115612cf557612cf5612c6e565b500190565b602080825260169082015275139195081a5cc8185b1c9958591e481b1a5b5a5d195960521b604082015260600190565b6020808252601290820152714974206973206e6f742073656c6c54696d6560701b604082015260600190565b602080825260169082015275165bdd48185c9948185b1c9958591e481b5a5b9d195960521b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600061ffff80831681811415612db457612db4612c6e565b6001019392505050565b600082821015612dd057612dd0612c6e565b500390565b6000600019821415612de957612de9612c6e565b5060010190565b600060ff821660ff84168060ff03821115612e0d57612e0d612c6e565b019392505050565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60008351612e7a8184602088016127d8565b835190830190612e8e8183602088016127d8565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ecf8160178501602088016127d8565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612f008160288401602088016127d8565b01602801949350505050565b60006001600160801b0383811690831681811015612f2c57612f2c612c6e565b039392505050565b60006001600160801b03808316818516808303821115612e8e57612e8e612c6e565b600081612f6557612f65612c6e565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612fa090830184612804565b9695505050505050565b600060208284031215612fbc57600080fd5b815161161b8161278c565b634e487b7160e01b600052601260045260246000fd5b600082612fec57612fec612fc7565b500490565b60008261300057613000612fc7565b500690565b600081600019048311821515161561301f5761301f612c6e565b50029056fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b089f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220d2c0ffad305bdb6fca74e1272796ed21a849c133bb388176b63b7901c309334b64736f6c634300080c003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000064661626c6573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034641420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005868747470733a2f2f7472617274676174657761792e6d7970696e6174612e636c6f75642f697066732f516d5358576a5046435535777546334e63696e6d324879656a5950387070516e327366594874745746457878536d2f0000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102bb5760003560e01c80634f6ccce711610182578063a22cb465116100e9578063d5391393116100a2578063e985e9c51161007c578063e985e9c514610690578063ec87621c146106cc578063f135af1e146106e1578063f8e45422146106f457600080fd5b8063d53913931461065f578063d547741f14610674578063d7224ba01461068757600080fd5b8063a22cb465146105e0578063b5070e24146105f3578063b88d4fde14610613578063c4b95b5c14610626578063c87b56dd14610639578063cfbd48851461064c57600080fd5b8063898bc9c11161013b578063898bc9c11461057f5780638c874ebd146105a25780638e327dd3146105aa57806391d14854146105bd57806395d89b41146105d0578063a217fddf146105d857600080fd5b80634f6ccce7146105005780636352211e146105135780636a6278421461052657806370a082311461053957806375829def1461054c5780637aa8b5891461055f57600080fd5b8063248a9ca3116102265780632f745c59116101df5780632f745c591461048e57806336568abe146104a1578063377e32e6146104b45780633a1ad046146104c757806342842e0e146104da57806348539e37146104ed57600080fd5b8063248a9ca3146103f5578063248b71fc1461041857806324ecff3e1461042b578063261707fa146104605780632d3df31f146104735780632f2ff15d1461047b57600080fd5b80630e801b56116102785780630e801b561461037e5780631458f8e214610386578063162094c41461039957806318160ddd146103ac5780631b1cd4ff146103c257806323b872dd146103e257600080fd5b806301ffc9a7146102c057806305100a6a146102e857806306fdde03146102fd578063081812fc14610312578063095ea7b31461033d5780630b635b8c14610350575b600080fd5b6102d36102ce3660046127a2565b6106fc565b60405190151581526020015b60405180910390f35b6102fb6102f63660046127bf565b61070d565b005b6103056107c4565b6040516102df9190612830565b6103256103203660046127bf565b610856565b6040516001600160a01b0390911681526020016102df565b6102fb61034b36600461285f565b6108e1565b6102d361035e36600461289a565b601060209081526000928352604080842090915290825290205460ff1681565b6102fb6109f9565b6102fb610394366004612913565b610b62565b6102fb6103a7366004612a49565b610c03565b6103b4610c26565b6040519081526020016102df565b6103b46103d0366004612a8f565b60116020526000908152604090205481565b6102fb6103f0366004612aaa565b610c3b565b6103b46104033660046127bf565b60009081526020819052604090206001015490565b6102fb61042636600461285f565b610c46565b61044e6104393660046127bf565b600d6020526000908152604090205460ff1681565b60405160ff90911681526020016102df565b6102fb61046e366004612a8f565b610ca9565b6102fb610cde565b6102fb610489366004612ae6565b610eaf565b6103b461049c36600461285f565b610ed5565b6102fb6104af366004612ae6565b61104b565b6102fb6104c2366004612a8f565b6110c5565b6102fb6104d53660046127bf565b6110e9565b6102fb6104e8366004612aaa565b61111f565b6102fb6104fb366004612b09565b61113a565b6103b461050e3660046127bf565b611176565b6103256105213660046127bf565b6111df565b6102fb610534366004612a8f565b6111f1565b6103b4610547366004612a8f565b611256565b6102fb61055a366004612a8f565b6112e7565b6103b461056d366004612b4d565b600f6020526000908152604090205481565b6102d361058d366004612a8f565b600c6020526000908152604090205460ff1681565b6102fb611309565b6102fb6105b836600461285f565b6113ba565b6102d36105cb366004612ae6565b6113f0565b610305611419565b6103b4600081565b6102fb6105ee366004612b68565b611428565b6103b4610601366004612b4d565b600e6020526000908152604090205481565b6102fb610621366004612ba4565b6114ed565b6102fb610634366004612a8f565b611520565b6103056106473660046127bf565b611544565b6102fb61065a366004612a8f565b611622565b6103b460008051602061304583398151915281565b6102fb610682366004612ae6565b611653565b6103b460085481565b6102d361069e366004612c1f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103b460008051602061302583398151915281565b6102fb6106ef366004612c3b565b611679565b6102fb6116b5565b6000610707826117d6565b92915050565b6000805160206130458339815191526107268133611831565b6000828152600d6020526040902054600160ff90911610156107825760405162461bcd60e51b815260206004820152601060248201526f4c6576656c206973206c6f776573742160801b60448201526064015b60405180910390fd5b6000828152600d60205260409020546107a09060019060ff16612c84565b6000928352600d6020526040909220805460ff191660ff9093169290921790915550565b6060600280546107d390612ca7565b80601f01602080910402602001604051908101604052809291908181526020018280546107ff90612ca7565b801561084c5780601f106108215761010080835404028352916020019161084c565b820191906000526020600020905b81548152906001019060200180831161082f57829003601f168201915b5050505050905090565b6000610863826001541190565b6108c55760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610779565b506000908152600660205260409020546001600160a01b031690565b60006108ec826111df565b9050806001600160a01b0316836001600160a01b0316141561095b5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610779565b336001600160a01b03821614806109775750610977813361069e565b6109e95760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610779565b6109f4838383611895565b505050565b3360009081526011602052604090205480610a4a5760405162461bcd60e51b8152602060048201526011602482015270596f752063616e206e6f74206d696e742160781b6044820152606401610779565b610bb881600a54610a5b9190612ce2565b1115610a795760405162461bcd60e51b815260040161077990612cfa565b6001600052600e6020527fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be958207544210801590610ade57506001600052600f6020527f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f5442105b610afa5760405162461bcd60e51b815260040161077990612d2a565b336000908152600c602052604090205460ff1615610b2a5760405162461bcd60e51b815260040161077990612d56565b80600a54610b389190612ce2565b600a55336000818152600c60205260409020805460ff19166001179055610b5f90826118f1565b50565b600080516020613025833981519152610b7b8133611831565b60005b82518161ffff161015610bfd5760ff84166000908152601060205260408120845160019290869061ffff8616908110610bb957610bb9612d86565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610bf581612d9c565b915050610b7e565b50505050565b600080516020613025833981519152610c1c8133611831565b6109f4838361190b565b600060018054610c369190612dbe565b905090565b6109f4838383611998565b600080516020613045833981519152610c5f8133611831565b610bb882600a54610c709190612ce2565b1115610c8e5760405162461bcd60e51b815260040161077990612cfa565b81600a54610c9c9190612ce2565b600a556109f483836118f1565b600080516020613025833981519152610cc28133611831565b610cda60008051602061304583398151915283611d1e565b5050565b336000908152600c602052604090205460ff1615610d0e5760405162461bcd60e51b815260040161077990612d56565b6002600052600e6020527f9adb202b1492743bc00c81d33cdc6423fa8c79109027eb6a845391e8fc1f0481544210801590610d7357506002600052600f6020527fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeead5442105b610d8f5760405162461bcd60e51b815260040161077990612d2a565b3360009081527f853b2fefe141400fef543280f93d98bd49996069f632d0d20236afeeed8e46a2602052604090205460ff1680610dfa57503360009081527f8c6065603763fec3f5742441d3833f3f43b982453612d76adb39a885e3006b5f602052604090205460ff165b610e465760405162461bcd60e51b815260206004820152601c60248201527f596f7520617265206e6f742077686974656c697374206f7220564950000000006044820152606401610779565b610bb8600a546001610e589190612ce2565b1115610e765760405162461bcd60e51b815260040161077990612cfa565b336000908152600c60205260409020805460ff19166001908117909155600a54610e9f91612ce2565b600a55610ead3360016118f1565b565b600082815260208190526040902060010154610ecb8133611831565b6109f48383611d1e565b6000610ee083611256565b8210610f395760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610779565b6000610f43610c26565b905060008060005b838111610feb576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610f9c57805192505b876001600160a01b0316836001600160a01b03161415610fd85786841415610fca5750935061070792505050565b83610fd481612dd5565b9450505b5080610fe381612dd5565b915050610f4b565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610779565b6001600160a01b03811633146110bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610779565b610cda8282611da2565b60006110d18133611831565b610cda60008051602061302583398151915283611da2565b6000805160206130458339815191526111028133611831565b6000828152600d60205260409020546107a09060ff166001612df0565b6109f4838383604051806020016040528060008152506114ed565b6000805160206130258339815191526111538133611831565b60ff82166000908152600b602090815260409091208451610bfd928601906126fc565b6000611180610c26565b8211156111db5760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610779565b5090565b60006111ea82611e07565b5192915050565b60008051602061304583398151915261120a8133611831565b610bb8600a54600161121c9190612ce2565b111561123a5760405162461bcd60e51b815260040161077990612cfa565b600a54611248906001612ce2565b600a55610cda8260016118f1565b60006001600160a01b0382166112c25760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610779565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b60006112f38133611831565b6112fe600033611da2565b610cda600083611d1e565b336000908152600c602052604090205460ff16156113395760405162461bcd60e51b815260040161077990612d56565b6003600052600e6020527fe0283e559c29e31ee7f56467acc9dd307779c843a883aeeb3bf5c6128c90814454421080159061139e57506003600052600f6020527f45f76dafbbad695564362934e24d72eedc57f9fc1a65f39bca62176cc82968285442105b610e465760405162461bcd60e51b815260040161077990612d2a565b6000805160206130258339815191526113d38133611831565b506001600160a01b03909116600090815260116020526040902055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546107d390612ca7565b6001600160a01b0382163314156114815760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610779565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6114f8848484611998565b61150484848484611fb0565b610bfd5760405162461bcd60e51b815260040161077990612e15565b600061152c8133611831565b610cda60008051602061302583398151915283611d1e565b6060611551826001541190565b6115b55760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610779565b6000828152600d60205260408120546115d09060ff166120af565b905060008151116115f0576040518060200160405280600081525061161b565b806115fa84612155565b60405160200161160b929190612e68565b6040516020818303038152906040525b9392505050565b60008051602061302583398151915261163b8133611831565b610cda60008051602061304583398151915283611da2565b60008281526020819052604090206001015461166f8133611831565b6109f48383611da2565b6000805160206130258339815191526116928133611831565b5060ff9092166000908152600e6020908152604080832093909355600f90522055565b336000908152600c602052604090205460ff16156116e55760405162461bcd60e51b815260040161077990612d56565b6001600052600e6020527fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be95820754421080159061174a57506001600052600f6020527f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f5442105b6117665760405162461bcd60e51b815260040161077990612d2a565b3360009081527f8c6065603763fec3f5742441d3833f3f43b982453612d76adb39a885e3006b5f602052604090205460ff16610e465760405162461bcd60e51b815260206004820152600f60248201526e0596f7520617265206e6f742056495608c1b6044820152606401610779565b60006001600160e01b031982166380ac58cd60e01b148061180757506001600160e01b03198216635b5e139f60e01b145b8061182257506001600160e01b0319821663780e9d6360e01b145b80610707575061070782612252565b61183b82826113f0565b610cda57611853816001600160a01b03166014612287565b61185e836020612287565b60405160200161186f929190612e97565b60408051601f198184030181529082905262461bcd60e51b825261077991600401612830565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610cda828260405180602001604052806000815250612422565b611916826001541190565b6119795760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610779565b600082815260096020908152604090912082516109f4928401906126fc565b60006119a382611e07565b80519091506000906001600160a01b0316336001600160a01b031614806119da5750336119cf84610856565b6001600160a01b0316145b806119ec575081516119ec903361069e565b905080611a565760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610779565b846001600160a01b031682600001516001600160a01b031614611aca5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610779565b6001600160a01b038416611b2e5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610779565b611b3e6000848460000151611895565b6001600160a01b0385166000908152600560205260408120805460019290611b709084906001600160801b0316612f0c565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b03861660009081526005602052604081208054600194509092611bbc91859116612f34565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055611c43846001612ce2565b6000818152600460205260409020549091506001600160a01b0316611cd457611c6d816001541190565b15611cd45760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b611d2882826113f0565b610cda576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611d5e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611dac82826113f0565b15610cda576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040805180820190915260008082526020820152611e26826001541190565b611e855760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610779565b60007f00000000000000000000000000000000000000000000000000000000000000c88310611ee657611ed87f00000000000000000000000000000000000000000000000000000000000000c884612dbe565b611ee3906001612ce2565b90505b825b818110611f4f576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215611f3c57949350505050565b5080611f4781612f56565b915050611ee8565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610779565b60006001600160a01b0384163b156120a357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ff4903390899088908890600401612f6d565b6020604051808303816000875af192505050801561202f575060408051601f3d908101601f1916820190925261202c91810190612faa565b60015b612089573d80801561205d576040519150601f19603f3d011682016040523d82523d6000602084013e612062565b606091505b5080516120815760405162461bcd60e51b815260040161077990612e15565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506120a7565b5060015b949350505050565b60ff81166000908152600b602052604090208054606091906120d090612ca7565b80601f01602080910402602001604051908101604052809291908181526020018280546120fc90612ca7565b80156121495780601f1061211e57610100808354040283529160200191612149565b820191906000526020600020905b81548152906001019060200180831161212c57829003601f168201915b50505050509050919050565b6060816121795750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121a3578061218d81612dd5565b915061219c9050600a83612fdd565b915061217d565b6000816001600160401b038111156121bd576121bd6128cd565b6040519080825280601f01601f1916602001820160405280156121e7576020820181803683370190505b5090505b84156120a7576121fc600183612dbe565b9150612209600a86612ff1565b612214906030612ce2565b60f81b81838151811061222957612229612d86565b60200101906001600160f81b031916908160001a90535061224b600a86612fdd565b94506121eb565b60006001600160e01b03198216637965db0b60e01b148061070757506301ffc9a760e01b6001600160e01b0319831614610707565b60606000612296836002613005565b6122a1906002612ce2565b6001600160401b038111156122b8576122b86128cd565b6040519080825280601f01601f1916602001820160405280156122e2576020820181803683370190505b509050600360fc1b816000815181106122fd576122fd612d86565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061232c5761232c612d86565b60200101906001600160f81b031916908160001a9053506000612350846002613005565b61235b906001612ce2565b90505b60018111156123d3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061238f5761238f612d86565b1a60f81b8282815181106123a5576123a5612d86565b60200101906001600160f81b031916908160001a90535060049490941c936123cc81612f56565b905061235e565b50831561161b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610779565b6001546001600160a01b0384166124855760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610779565b612490816001541190565b156124dd5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610779565b7f00000000000000000000000000000000000000000000000000000000000000c88311156125585760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610779565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b90910416918101919091528151808301909252805190919081906125b4908790612f34565b6001600160801b031681526020018583602001516125d29190612f34565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156126f15760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46126b56000888488611fb0565b6126d15760405162461bcd60e51b815260040161077990612e15565b816126db81612dd5565b92505080806126e990612dd5565b915050612668565b506001819055611d16565b82805461270890612ca7565b90600052602060002090601f01602090048101928261272a5760008555612770565b82601f1061274357805160ff1916838001178555612770565b82800160010185558215612770579182015b82811115612770578251825591602001919060010190612755565b506111db9291505b808211156111db5760008155600101612778565b6001600160e01b031981168114610b5f57600080fd5b6000602082840312156127b457600080fd5b813561161b8161278c565b6000602082840312156127d157600080fd5b5035919050565b60005b838110156127f35781810151838201526020016127db565b83811115610bfd5750506000910152565b6000815180845261281c8160208601602086016127d8565b601f01601f19169290920160200192915050565b60208152600061161b6020830184612804565b80356001600160a01b038116811461285a57600080fd5b919050565b6000806040838503121561287257600080fd5b61287b83612843565b946020939093013593505050565b803560ff8116811461285a57600080fd5b600080604083850312156128ad57600080fd5b6128b683612889565b91506128c460208401612843565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561290b5761290b6128cd565b604052919050565b6000806040838503121561292657600080fd5b61292f83612889565b91506020808401356001600160401b038082111561294c57600080fd5b818601915086601f83011261296057600080fd5b813581811115612972576129726128cd565b8060051b91506129838483016128e3565b818152918301840191848101908984111561299d57600080fd5b938501935b838510156129c2576129b385612843565b825293850193908501906129a2565b8096505050505050509250929050565b60006001600160401b038311156129eb576129eb6128cd565b6129fe601f8401601f19166020016128e3565b9050828152838383011115612a1257600080fd5b828260208301376000602084830101529392505050565b600082601f830112612a3a57600080fd5b61161b838335602085016129d2565b60008060408385031215612a5c57600080fd5b8235915060208301356001600160401b03811115612a7957600080fd5b612a8585828601612a29565b9150509250929050565b600060208284031215612aa157600080fd5b61161b82612843565b600080600060608486031215612abf57600080fd5b612ac884612843565b9250612ad660208501612843565b9150604084013590509250925092565b60008060408385031215612af957600080fd5b823591506128c460208401612843565b60008060408385031215612b1c57600080fd5b82356001600160401b03811115612b3257600080fd5b612b3e85828601612a29565b9250506128c460208401612889565b600060208284031215612b5f57600080fd5b61161b82612889565b60008060408385031215612b7b57600080fd5b612b8483612843565b915060208301358015158114612b9957600080fd5b809150509250929050565b60008060008060808587031215612bba57600080fd5b612bc385612843565b9350612bd160208601612843565b92506040850135915060608501356001600160401b03811115612bf357600080fd5b8501601f81018713612c0457600080fd5b612c13878235602084016129d2565b91505092959194509250565b60008060408385031215612c3257600080fd5b6128b683612843565b600080600060608486031215612c5057600080fd5b612c5984612889565b95602085013595506040909401359392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff841680821015612c9e57612c9e612c6e565b90039392505050565b600181811c90821680612cbb57607f821691505b60208210811415612cdc57634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115612cf557612cf5612c6e565b500190565b602080825260169082015275139195081a5cc8185b1c9958591e481b1a5b5a5d195960521b604082015260600190565b6020808252601290820152714974206973206e6f742073656c6c54696d6560701b604082015260600190565b602080825260169082015275165bdd48185c9948185b1c9958591e481b5a5b9d195960521b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600061ffff80831681811415612db457612db4612c6e565b6001019392505050565b600082821015612dd057612dd0612c6e565b500390565b6000600019821415612de957612de9612c6e565b5060010190565b600060ff821660ff84168060ff03821115612e0d57612e0d612c6e565b019392505050565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60008351612e7a8184602088016127d8565b835190830190612e8e8183602088016127d8565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ecf8160178501602088016127d8565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612f008160288401602088016127d8565b01602801949350505050565b60006001600160801b0383811690831681811015612f2c57612f2c612c6e565b039392505050565b60006001600160801b03808316818516808303821115612e8e57612e8e612c6e565b600081612f6557612f65612c6e565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612fa090830184612804565b9695505050505050565b600060208284031215612fbc57600080fd5b815161161b8161278c565b634e487b7160e01b600052601260045260246000fd5b600082612fec57612fec612fc7565b500490565b60008261300057613000612fc7565b500690565b600081600019048311821515161561301f5761301f612c6e565b50029056fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b089f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220d2c0ffad305bdb6fca74e1272796ed21a849c133bb388176b63b7901c309334b64736f6c634300080c0033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000064661626c6573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034641420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005868747470733a2f2f7472617274676174657761792e6d7970696e6174612e636c6f75642f697066732f516d5358576a5046435535777546334e63696e6d324879656a5950387070516e327366594874745746457878536d2f0000000000000000

-----Decoded View---------------
Arg [0] : name (string): Fables
Arg [1] : symbol (string): FAB
Arg [2] : maxBatchSize (uint256): 200
Arg [3] : collectionSize (uint256): 3000
Arg [4] : baseTokenURI (string): https://trartgateway.mypinata.cloud/ipfs/QmSXWjPFCU5wuF3Ncinm2HyejYP8ppQn2sfYHttWFExxSm/

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000bb8
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [6] : 4661626c65730000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 4641420000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000058
Arg [10] : 68747470733a2f2f7472617274676174657761792e6d7970696e6174612e636c
Arg [11] : 6f75642f697066732f516d5358576a5046435535777546334e63696e6d324879
Arg [12] : 656a5950387070516e327366594874745746457878536d2f0000000000000000


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.