ETH Price: $2,926.24 (+4.36%)
 

Overview

Max Total Supply

1,384 WAIFU

Holders

370

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
25 WAIFU
0xf02de4505027133432df6eb111e4e60588b690e5
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Then you don't want to miss out on our stunning NFT waifus. Planet Waifu come from a distant galaxy and are travelling across the universe to meet .

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PlanetWaifu

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : PlanetWaifu.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

contract PlanetWaifu is ERC721Enumerable, Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;

    uint256 public maxItems;
    uint256 public batchCap;
    uint256 public tokenPrice;
    uint256 public bonusRate = 5;
    uint256 public freeItemsAvailable = 500;
    uint256 public freeItemsMinted = 0;
    uint256 public devItemsMinted = 0;
    uint256 public bonusItemsMinted = 0;
    uint256 public itemsGifted = 0;
    uint256 public freeItemsPerWallet = 1;
    bool public paused = false;
    bool public started = false;
    string _baseTokenURI;

    mapping(address => uint256) public freeItemsReceived;

    mapping(address => uint256) affiliateBalance;
    mapping(address => uint256) affiliateItems;
    uint256 affiliateTotalBalance;
    uint256 affiliateTotalItems;
    mapping(address => uint256) affiliatePercentages;
    mapping(address => uint256) public affiliateDiscounts;

    constructor(
        string memory baseURI,
        string memory tokenName,
        string memory tokenSymbol,
        uint256 _price,
        uint256 _maxItems
    ) ERC721(tokenName, tokenSymbol) {
        _baseTokenURI = baseURI;
        tokenPrice = _price;
        maxItems = _maxItems;
        batchCap = 569;
		freeItemsAvailable = 69;
    }

    // Mint items
    function mintItems(uint256 n, uint256 expectedBonusItems) public payable {
        _mintItems(msg.sender, n, expectedBonusItems, 0);
    }

    // Gift one item
    function giftItem(address addr) public payable {
        _mintItems(addr, 1, 0, 0);
    }

    // Mint n items and credit affiliate
    function mintItemsThroughAffiliate(
        uint256 n,
        uint256 expectedBonusItems,
        address affiliateWallet
    ) external payable {
        _mintItemsThroughAffiliate(
            msg.sender,
            n,
            expectedBonusItems,
            affiliateWallet
        );
    }

    // Git one item and credit affiliate
    function giftItemThroughAffiliate(address addr, address affiliateWallet)
        external
        payable
    {
        _mintItemsThroughAffiliate(addr, 1, 0, affiliateWallet);
    }

    // Mint n items and credit affiliate
    function _mintItemsThroughAffiliate(
        address addr,
        uint256 n,
        uint256 expectedBonusItems,
        address affiliateWallet
    ) private {
        uint256 discount = 0;
        uint256 price = tokenPrice * n;
        uint256 discountPercentage = affiliateDiscounts[affiliateWallet];
        if (discountPercentage > 0) {
            discount = (price * discountPercentage) / 100;
        }

        _mintItems(addr, n, expectedBonusItems, discount);

        uint256 sharePercentage = affiliatePercentages[affiliateWallet];
        if (sharePercentage > 0) {
            uint256 share = ((price - discount) * sharePercentage) / 100;
            affiliateBalance[affiliateWallet] += share;
            affiliateTotalBalance += share;
        }
        if (discountPercentage > 0 || sharePercentage > 0) {
            affiliateItems[affiliateWallet] += n;
            affiliateTotalItems += n;
        }
    }

    // This does the actual minting
    function _mintItems(
        address addr,
        uint256 n,
        uint256 expectedBonusItems,
        uint256 discount
    ) private {
        // Lifecycle
        require(started || msg.sender == owner(), "We haven't started yet");
        require(!paused || msg.sender == owner(), "We're paused");

        // Limit the amount you can mint per call
        require(n <= 20, "Can't mint more than 20 items");

        // Price is incorrect
        require(
            msg.value >= (tokenPrice * n) - discount,
            "Didn't send enough ETH"
        );

        // The user was expecting more bonus items than we're currently giving
        // (ie our numbers changed, or they're trying to cheat)
        uint256 bonusItems = bonusRate > 0 ? n / bonusRate : 0;
        require(expectedBonusItems <= bonusItems, "Different bonus rate");

        bonusItems = expectedBonusItems; // Adjust # of bonus items

        uint256 totalSupplyAfter = totalSupply() + n + bonusItems;

        // Not enough tokens left
        require(
            totalSupplyAfter <= maxItems,
            "Can't fulfill requested items"
        );

        // Not enough tokens left in current batch
        require(
            totalSupplyAfter <= batchCap,
            "Can't fulfill requested items"
        );

        // Phew, that was a lot of checks!
        for (uint256 i = 0; i < n + bonusItems; i++) {
            _safeMint(addr, totalSupply());
        }
        if (bonusItems != 0) bonusItemsMinted += bonusItems;
    }

    // Mint free items, limited amount
    function mintFree() external {
        require(!paused || msg.sender == owner(), "We're paused");
        require(freeItemsAvailable > 0, "No free items available");
        require(totalSupply() < maxItems, "Sold out");
        require(
            receivedFreeItems(msg.sender) < freeItemsPerWallet,
            "Received too many free items"
        );
        _safeMint(msg.sender, totalSupply());
        freeItemsReceived[msg.sender]++;
        freeItemsAvailable--;
        freeItemsMinted++;
    }

    // Mint n items to address (owner only);
    function devMintTo(address addr, uint256 n) external onlyOwner {
        require(totalSupply() < maxItems, "Sold out");
        require(totalSupply() + n <= maxItems, "Can't fulfill requested items");
        for (uint256 i = 0; i < n; i++) {
            _safeMint(addr, totalSupply());
        }
        devItemsMinted += n;
    }

    // Has this address already received a free item?
    function receivedFreeItems(address addr) public view returns (uint256) {
        return freeItemsReceived[addr];
    }

    // Get the base URI (internal)
    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    // Set the token price
    function setTokenPrice(uint256 _price) external onlyOwner {
        tokenPrice = _price;
    }

    // Set the batch cap
    function setBatchCap(uint256 _cap) external onlyOwner {
        batchCap = _cap;
    }

    // Set the base URI
    function setBaseURI(string memory baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    // Get the base URI
    function getBaseURI() external view onlyOwner returns (string memory) {
        return _baseTokenURI;
    }

    // get all tokens owned by an address
    function walletOfOwner(address _owner)
        external
        view
        returns (uint256[] memory)
    {
        uint256 tokenCount = balanceOf(_owner);

        uint256[] memory tokensId = new uint256[](tokenCount);
        for (uint256 i = 0; i < tokenCount; i++) {
            tokensId[i] = tokenOfOwnerByIndex(_owner, i);
        }

        return tokensId;
    }

    // get all wallets with a certain balance
    function walletsWithCertainBalance(uint256 n)
        external
        view
        onlyOwner
        returns (address[] memory)
    {
        uint256 total = totalSupply();
        // This array will be way bigger than needed,
        // because we don't know how large it should be yet
        address[] memory temp = new address[](total);

        uint256 index = 0;
        for (uint256 i = 0; i < total; i++) {
            uint256 token = tokenByIndex(i);
            address owner = ownerOf(token);

            // check if address has enough tokens
            if (balanceOf(owner) < n) continue;

            // check that we haven't added this address yet
            bool alreadyAddded = false;
            for (uint256 j = 0; j < index; j++) {
                if (temp[j] == owner) {
                    alreadyAddded = true;
                    break;
                }
            }
            if (alreadyAddded) continue;

            temp[index] = owner;
            index++;
        }

        // return a shrunken array
        address[] memory ret = new address[](index);
        for (uint256 i = 0; i < index; i++) {
            ret[i] = temp[i];
        }

        return ret;
    }

    // pause/unpause contract
    function pause(bool val) external onlyOwner {
        paused = val;
    }

    // start contract
    function start() external onlyOwner {
        started = true;
    }

    // add n free items
    function addFreeItems(uint256 n) external onlyOwner {
        freeItemsAvailable += n;
    }

    // set free items to n
    function setFreeItemsTo(uint256 n) external onlyOwner {
        freeItemsAvailable = n;
    }

    // set the amount of items needed to get an bonus item
    function setBonusRate(uint256 n) external onlyOwner {
        bonusRate = n;
    }

    // set the amount of free items per wallet
    function setFreeItemsPerWallet(uint256 n) external onlyOwner {
        freeItemsPerWallet = n;
    }

    // return the total amount of free items minted
    function totalFreeItems() external view returns (uint256) {
        return freeItemsMinted + bonusItemsMinted + devItemsMinted;
    }

    // withdraw balance minus what is owed to affiliates
    function withdraw() external onlyOwner {
        payable(msg.sender).transfer(
            address(this).balance - affiliateTotalBalance
        );
    }

    // get our balance
    function balance() external view onlyOwner returns (uint256) {
        return address(this).balance - affiliateTotalBalance;
    }

    // Allows a affiliate to withdraw their balance
    function affiliateWithdraw() external {
        uint256 amount = affiliateBalance[msg.sender];
        require(amount > 0, "Balance is 0");
        payable(msg.sender).transfer(amount);

        // just a sanity check to make sure we never underflow
        if (amount > affiliateTotalBalance) affiliateTotalBalance = 0;
        else affiliateTotalBalance -= amount;

        affiliateBalance[msg.sender] = 0;
    }

    // Configure an affiliate's settings
    function configureAffiliate(
        address addr,
        uint256 percentage,
        uint256 discount
    ) external onlyOwner {
        affiliatePercentages[addr] = percentage;
        affiliateDiscounts[addr] = discount;
    }

    // Used so affiliates can check their balance
    function myAffiliateBalance() external view returns (uint256) {
        return affiliateBalance[msg.sender];
    }

    // Used so affiliates can check how many items got mintend through them
    function myAffiliateItems() external view returns (uint256) {
        return affiliateItems[msg.sender];
    }

    // How much do we owe affiliates?
    function getTotalAffiliateBalance()
        external
        view
        onlyOwner
        returns (uint256)
    {
        return affiliateTotalBalance;
    }

    // How many items minted through affiliates?
    function getTotalAffiliateItems()
        external
        view
        onlyOwner
        returns (uint256)
    {
        return affiliateTotalItems;
    }

    // How much do we owe a specific affiliate?
    function getAffiliateBalance(address addr)
        external
        view
        onlyOwner
        returns (uint256)
    {
        return affiliateBalance[addr];
    }

    // How many items minted through a specific affiliate?
    function getAffiliateItems(address addr)
        external
        view
        onlyOwner
        returns (uint256)
    {
        return affiliateItems[addr];
    }

    // Get the share percentage for a specific affiliate
    function getAffiliatePercentage(address addr)
        external
        view
        onlyOwner
        returns (uint256)
    {
        return affiliatePercentages[addr];
    }

}

File 2 of 14 : ERC721.sol
// SPDX-License-Identifier: MIT

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 {
        require(operator != _msgSender(), "ERC721: 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 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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

    /**
     * @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 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("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 {}
}

File 3 of 14 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

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

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 4 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 14 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 6 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT

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 7 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 8 of 14 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 9 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private 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 10 of 14 : Context.sol
// SPDX-License-Identifier: MIT

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 11 of 14 : Strings.sol
// SPDX-License-Identifier: MIT

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 14 : ERC165.sol
// SPDX-License-Identifier: MIT

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 14 : IERC165.sol
// SPDX-License-Identifier: MIT

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 14 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 tokenId);

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_maxItems","type":"uint256"}],"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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"addFreeItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"affiliateDiscounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"affiliateWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusItemsMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"},{"internalType":"uint256","name":"discount","type":"uint256"}],"name":"configureAffiliate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devItemsMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"devMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeItemsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeItemsMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeItemsPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeItemsReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getAffiliateBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getAffiliateItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getAffiliatePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAffiliateBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAffiliateItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"giftItem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"affiliateWallet","type":"address"}],"name":"giftItemThroughAffiliate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemsGifted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"},{"internalType":"uint256","name":"expectedBonusItems","type":"uint256"}],"name":"mintItems","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"},{"internalType":"uint256","name":"expectedBonusItems","type":"uint256"},{"internalType":"address","name":"affiliateWallet","type":"address"}],"name":"mintItemsThroughAffiliate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"myAffiliateBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"myAffiliateItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"val","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"receivedFreeItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setBatchCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"setBonusRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"setFreeItemsPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"setFreeItemsTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"tokenPrice","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":"totalFreeItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"walletsWithCertainBalance","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526005600e556101f4600f55600060108190556011819055601281905560135560016014556015805461ffff191690553480156200004057600080fd5b5060405162003a8d38038062003a8d833981016040819052620000639162000289565b8351849084906200007c90600090602085019062000138565b5080516200009290600190602084019062000138565b505050620000af620000a9620000e260201b60201c565b620000e6565b8451620000c490601690602088019062000138565b50600d91909155600b555050610239600c55506045600f556200037c565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001469062000329565b90600052602060002090601f0160209004810192826200016a5760008555620001b5565b82601f106200018557805160ff1916838001178555620001b5565b82800160010185558215620001b5579182015b82811115620001b557825182559160200191906001019062000198565b50620001c3929150620001c7565b5090565b5b80821115620001c35760008155600101620001c8565b600082601f830112620001ef578081fd5b81516001600160401b03808211156200020c576200020c62000366565b6040516020601f8401601f191682018101838111838210171562000234576200023462000366565b60405283825285840181018710156200024b578485fd5b8492505b838310156200026e57858301810151828401820152918201916200024f565b838311156200027f57848185840101525b5095945050505050565b600080600080600060a08688031215620002a1578081fd5b85516001600160401b0380821115620002b8578283fd5b620002c689838a01620001de565b96506020880151915080821115620002dc578283fd5b620002ea89838a01620001de565b9550604088015191508082111562000300578283fd5b506200030f88828901620001de565b606088015160809098015196999598509695949350505050565b6002810460018216806200033e57607f821691505b602082108114156200036057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b613701806200038c6000396000f3fe6080604052600436106103c35760003560e01c80637cf84799116101f2578063c1ff2c1a1161010d578063e4fcf329116100a0578063ee315bed1161006f578063ee315bed14610a44578063ee72814114610a64578063f07c3bd514610a79578063f2fde38b14610a99576103c3565b8063e4fcf329146109cf578063e985e9c5146109ef578063ec9f7c8f14610a0f578063ed3a749214610a2f576103c3565b8063cb889cbe116100dc578063cb889cbe14610965578063d41e432614610985578063de6711ca1461099a578063e1a7e065146109af576103c3565b8063c1ff2c1a146108fd578063c877d3271461091d578063c87b56dd14610932578063c97f372014610952576103c3565b80639e77613011610185578063b69ef8a811610154578063b69ef8a814610893578063b88d4fde146108a8578063bc912720146108c8578063be9a6555146108e8576103c3565b80639e77613014610829578063a22cb4651461083e578063a42b6acd1461085e578063a95b0a6e14610873576103c3565b80638c52fa78116101c15780638c52fa78146107ca5780638da5cb5b146107ea57806395d89b41146107ff5780639dd5890a14610814576103c3565b80637cf847991461076b5780637f139d7c1461078b5780637ff9b596146107a05780638ab53447146107b5576103c3565b8063438b6300116102e25780636d36611e11610275578063715018a611610244578063715018a6146106f657806372bd923b1461070b57806377fed2041461072b5780637acdf94714610758576103c3565b80636d36611e1461068c5780636f2a7add146106a157806370a08231146106c1578063714c5398146106e1576103c3565b80635c975abb116102b15780635c975abb146106225780635d7ae62f146106375780636352211e1461064c5780636a61e5fc1461066c576103c3565b8063438b6300146105a05780634f6ccce7146105cd57806355f804b3146105ed5780635af123f41461060d576103c3565b80631971ca5f1161035a5780633508880f116103295780633508880f146105415780633c010a3e146105565780633ccfd60b1461056b57806342842e0e14610580576103c3565b80631971ca5f146104d95780631f2698ab146104ec57806323b872dd146105015780632f745c5914610521576103c3565b8063095ea7b311610396578063095ea7b31461046f5780630ca554791461048f5780630ee7d0b0146104a257806318160ddd146104b7576103c3565b806301ffc9a7146103c857806302329a29146103fe57806306fdde0314610420578063081812fc14610442575b600080fd5b3480156103d457600080fd5b506103e86103e3366004612c4c565b610ab9565b6040516103f59190612e68565b60405180910390f35b34801561040a57600080fd5b5061041e610419366004612c32565b610ae6565b005b34801561042c57600080fd5b50610435610b41565b6040516103f59190612e73565b34801561044e57600080fd5b5061046261045d366004612cca565b610bd3565b6040516103f59190612d92565b34801561047b57600080fd5b5061041e61048a366004612bd7565b610c16565b61041e61049d366004612ce2565b610cae565b3480156104ae57600080fd5b5061041e610cbf565b3480156104c357600080fd5b506104cc610d59565b6040516103f5919061355b565b61041e6104e7366004612d03565b610d5f565b3480156104f857600080fd5b506103e8610d6b565b34801561050d57600080fd5b5061041e61051c366004612afa565b610d79565b34801561052d57600080fd5b506104cc61053c366004612bd7565b610db1565b34801561054d57600080fd5b506104cc610e03565b34801561056257600080fd5b506104cc610e4b565b34801561057757600080fd5b5061041e610e51565b34801561058c57600080fd5b5061041e61059b366004612afa565b610ece565b3480156105ac57600080fd5b506105c06105bb366004612aae565b610ee9565b6040516103f59190612e30565b3480156105d957600080fd5b506104cc6105e8366004612cca565b610fa7565b3480156105f957600080fd5b5061041e610608366004612c84565b611002565b34801561061957600080fd5b506104cc611054565b34801561062e57600080fd5b506103e861105a565b34801561064357600080fd5b506104cc611063565b34801561065857600080fd5b50610462610667366004612cca565b611076565b34801561067857600080fd5b5061041e610687366004612cca565b6110ab565b34801561069857600080fd5b506104cc6110ef565b3480156106ad57600080fd5b5061041e6106bc366004612bd7565b611137565b3480156106cd57600080fd5b506104cc6106dc366004612aae565b61121c565b3480156106ed57600080fd5b50610435611260565b34801561070257600080fd5b5061041e6112ae565b34801561071757600080fd5b5061041e610726366004612cca565b6112f9565b34801561073757600080fd5b5061074b610746366004612cca565b61133d565b6040516103f59190612de3565b61041e610766366004612ac8565b6115cc565b34801561077757600080fd5b506104cc610786366004612aae565b6115da565b34801561079757600080fd5b506104cc6115ec565b3480156107ac57600080fd5b506104cc611610565b3480156107c157600080fd5b5061041e611616565b3480156107d657600080fd5b5061041e6107e5366004612c00565b611727565b3480156107f657600080fd5b5061046261178e565b34801561080b57600080fd5b5061043561179d565b34801561082057600080fd5b506104cc6117ac565b34801561083557600080fd5b506104cc6117b2565b34801561084a57600080fd5b5061041e610859366004612bae565b6117b8565b34801561086a57600080fd5b506104cc611886565b34801561087f57600080fd5b506104cc61088e366004612aae565b61188c565b34801561089f57600080fd5b506104cc6118e9565b3480156108b457600080fd5b5061041e6108c3366004612b35565b611937565b3480156108d457600080fd5b506104cc6108e3366004612aae565b611976565b3480156108f457600080fd5b5061041e611991565b34801561090957600080fd5b506104cc610918366004612aae565b6119e1565b34801561092957600080fd5b506104cc611a3e565b34801561093e57600080fd5b5061043561094d366004612cca565b611a51565b61041e610960366004612aae565b611ad4565b34801561097157600080fd5b506104cc610980366004612aae565b611ae2565b34801561099157600080fd5b506104cc611af4565b3480156109a657600080fd5b506104cc611afa565b3480156109bb57600080fd5b506104cc6109ca366004612aae565b611b00565b3480156109db57600080fd5b5061041e6109ea366004612cca565b611b5d565b3480156109fb57600080fd5b506103e8610a0a366004612ac8565b611ba1565b348015610a1b57600080fd5b5061041e610a2a366004612cca565b611bcf565b348015610a3b57600080fd5b506104cc611c28565b348015610a5057600080fd5b5061041e610a5f366004612cca565b611c2e565b348015610a7057600080fd5b506104cc611c72565b348015610a8557600080fd5b5061041e610a94366004612cca565b611c78565b348015610aa557600080fd5b5061041e610ab4366004612aae565b611cbc565b60006001600160e01b0319821663780e9d6360e01b1480610ade5750610ade82611d2a565b90505b919050565b610aee611d6a565b6001600160a01b0316610aff61178e565b6001600160a01b031614610b2e5760405162461bcd60e51b8152600401610b259061329c565b60405180910390fd5b6015805460ff1916911515919091179055565b606060008054610b5090613609565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7c90613609565b8015610bc95780601f10610b9e57610100808354040283529160200191610bc9565b820191906000526020600020905b815481529060010190602001808311610bac57829003601f168201915b5050505050905090565b6000610bde82611d6e565b610bfa5760405162461bcd60e51b8152600401610b2590613250565b506000908152600460205260409020546001600160a01b031690565b6000610c2182611076565b9050806001600160a01b0316836001600160a01b03161415610c555760405162461bcd60e51b8152600401610b25906133c6565b806001600160a01b0316610c67611d6a565b6001600160a01b03161480610c835750610c8381610a0a611d6a565b610c9f5760405162461bcd60e51b8152600401610b2590613105565b610ca98383611d8b565b505050565b610cbb3383836000611df9565b5050565b3360009081526018602052604090205480610cec5760405162461bcd60e51b8152600401610b259061322a565b604051339082156108fc029083906000818181858888f19350505050158015610d19573d6000803e3d6000fd5b50601a54811115610d2e576000601a55610d46565b80601a6000828254610d4091906135af565b90915550505b5033600090815260186020526040812055565b60085490565b610ca933848484611fe4565b601554610100900460ff1681565b610d8a610d84611d6a565b82612130565b610da65760405162461bcd60e51b8152600401610b259061343e565b610ca98383836121b5565b6000610dbc8361121c565b8210610dda5760405162461bcd60e51b8152600401610b2590612eed565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000610e0d611d6a565b6001600160a01b0316610e1e61178e565b6001600160a01b031614610e445760405162461bcd60e51b8152600401610b259061329c565b50601b5490565b600b5481565b610e59611d6a565b6001600160a01b0316610e6a61178e565b6001600160a01b031614610e905760405162461bcd60e51b8152600401610b259061329c565b601a5433906108fc90610ea390476135af565b6040518115909202916000818181858888f19350505050158015610ecb573d6000803e3d6000fd5b50565b610ca983838360405180602001604052806000815250611937565b60606000610ef68361121c565b905060008167ffffffffffffffff811115610f2157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f4a578160200160208202803683370190505b50905060005b82811015610f9f57610f628582610db1565b828281518110610f8257634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610f9781613644565b915050610f50565b509392505050565b6000610fb1610d59565b8210610fcf5760405162461bcd60e51b8152600401610b25906134b1565b60088281548110610ff057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b61100a611d6a565b6001600160a01b031661101b61178e565b6001600160a01b0316146110415760405162461bcd60e51b8152600401610b259061329c565b8051610cbb90601690602084019061297e565b600e5481565b60155460ff1681565b3360009081526019602052604090205490565b6000818152600260205260408120546001600160a01b031680610ade5760405162461bcd60e51b8152600401610b25906131ac565b6110b3611d6a565b6001600160a01b03166110c461178e565b6001600160a01b0316146110ea5760405162461bcd60e51b8152600401610b259061329c565b600d55565b60006110f9611d6a565b6001600160a01b031661110a61178e565b6001600160a01b0316146111305760405162461bcd60e51b8152600401610b259061329c565b50601a5490565b61113f611d6a565b6001600160a01b031661115061178e565b6001600160a01b0316146111765760405162461bcd60e51b8152600401610b259061329c565b600b54611181610d59565b1061119e5760405162461bcd60e51b8152600401610b259061348f565b600b54816111aa610d59565b6111b49190613564565b11156111d25760405162461bcd60e51b8152600401610b259061338f565b60005b81811015611200576111ee836111e9610d59565b6122e2565b806111f881613644565b9150506111d5565b5080601160008282546112139190613564565b90915550505050565b60006001600160a01b0382166112445760405162461bcd60e51b8152600401610b2590613162565b506001600160a01b031660009081526003602052604090205490565b606061126a611d6a565b6001600160a01b031661127b61178e565b6001600160a01b0316146112a15760405162461bcd60e51b8152600401610b259061329c565b60168054610b5090613609565b6112b6611d6a565b6001600160a01b03166112c761178e565b6001600160a01b0316146112ed5760405162461bcd60e51b8152600401610b259061329c565b6112f760006122fc565b565b611301611d6a565b6001600160a01b031661131261178e565b6001600160a01b0316146113385760405162461bcd60e51b8152600401610b259061329c565b600c55565b6060611347611d6a565b6001600160a01b031661135861178e565b6001600160a01b03161461137e5760405162461bcd60e51b8152600401610b259061329c565b6000611388610d59565b905060008167ffffffffffffffff8111156113b357634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113dc578160200160208202803683370190505b5090506000805b838110156114ef5760006113f682610fa7565b9050600061140382611076565b90508761140f8261121c565b101561141c5750506114dd565b6000805b8581101561148457826001600160a01b031687828151811061145257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156114725760019150611484565b8061147c81613644565b915050611420565b508015611493575050506114dd565b818686815181106114b457634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152846114d681613644565b9550505050505b806114e781613644565b9150506113e3565b5060008167ffffffffffffffff81111561151957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611542578160200160208202803683370190505b50905060005b828110156115c25783818151811061157057634e487b7160e01b600052603260045260246000fd5b602002602001015182828151811061159857634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806115ba81613644565b915050611548565b5095945050505050565b610cbb826001600084611fe4565b60176020526000908152604090205481565b60006011546012546010546116019190613564565b61160b9190613564565b905090565b600d5481565b60155460ff161580611640575061162b61178e565b6001600160a01b0316336001600160a01b0316145b61165c5760405162461bcd60e51b8152600401610b25906132d1565b6000600f541161167e5760405162461bcd60e51b8152600401610b2590613007565b600b54611689610d59565b106116a65760405162461bcd60e51b8152600401610b259061348f565b6014546116b233611976565b106116cf5760405162461bcd60e51b8152600401610b2590612eb6565b6116db336111e9610d59565b3360009081526017602052604081208054916116f683613644565b9091555050600f805490600061170b836135f2565b90915550506010805490600061172083613644565b9190505550565b61172f611d6a565b6001600160a01b031661174061178e565b6001600160a01b0316146117665760405162461bcd60e51b8152600401610b259061329c565b6001600160a01b039092166000908152601c6020908152604080832093909355601d90522055565b600a546001600160a01b031690565b606060018054610b5090613609565b60145481565b60135481565b6117c0611d6a565b6001600160a01b0316826001600160a01b031614156117f15760405162461bcd60e51b8152600401610b2590613082565b80600560006117fe611d6a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611842611d6a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161187a9190612e68565b60405180910390a35050565b600f5481565b6000611896611d6a565b6001600160a01b03166118a761178e565b6001600160a01b0316146118cd5760405162461bcd60e51b8152600401610b259061329c565b506001600160a01b03166000908152601c602052604090205490565b60006118f3611d6a565b6001600160a01b031661190461178e565b6001600160a01b03161461192a5760405162461bcd60e51b8152600401610b259061329c565b601a5461160b90476135af565b611948611942611d6a565b83612130565b6119645760405162461bcd60e51b8152600401610b259061343e565b6119708484848461234e565b50505050565b6001600160a01b031660009081526017602052604090205490565b611999611d6a565b6001600160a01b03166119aa61178e565b6001600160a01b0316146119d05760405162461bcd60e51b8152600401610b259061329c565b6015805461ff001916610100179055565b60006119eb611d6a565b6001600160a01b03166119fc61178e565b6001600160a01b031614611a225760405162461bcd60e51b8152600401610b259061329c565b506001600160a01b031660009081526019602052604090205490565b3360009081526018602052604090205490565b6060611a5c82611d6e565b611a785760405162461bcd60e51b8152600401610b2590613340565b6000611a82612381565b90506000815111611aa25760405180602001604052806000815250611acd565b80611aac84612390565b604051602001611abd929190612d63565b6040516020818303038152906040525b9392505050565b610ecb816001600080611df9565b601d6020526000908152604090205481565b600c5481565b60115481565b6000611b0a611d6a565b6001600160a01b0316611b1b61178e565b6001600160a01b031614611b415760405162461bcd60e51b8152600401610b259061329c565b506001600160a01b031660009081526018602052604090205490565b611b65611d6a565b6001600160a01b0316611b7661178e565b6001600160a01b031614611b9c5760405162461bcd60e51b8152600401610b259061329c565b600e55565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611bd7611d6a565b6001600160a01b0316611be861178e565b6001600160a01b031614611c0e5760405162461bcd60e51b8152600401610b259061329c565b80600f6000828254611c209190613564565b909155505050565b60125481565b611c36611d6a565b6001600160a01b0316611c4761178e565b6001600160a01b031614611c6d5760405162461bcd60e51b8152600401610b259061329c565b601455565b60105481565b611c80611d6a565b6001600160a01b0316611c9161178e565b6001600160a01b031614611cb75760405162461bcd60e51b8152600401610b259061329c565b600f55565b611cc4611d6a565b6001600160a01b0316611cd561178e565b6001600160a01b031614611cfb5760405162461bcd60e51b8152600401610b259061329c565b6001600160a01b038116611d215760405162461bcd60e51b8152600401610b2590612f8a565b610ecb816122fc565b60006001600160e01b031982166380ac58cd60e01b1480611d5b57506001600160e01b03198216635b5e139f60e01b145b80610ade5750610ade826124ab565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611dc082611076565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b601554610100900460ff1680611e275750611e1261178e565b6001600160a01b0316336001600160a01b0316145b611e435760405162461bcd60e51b8152600401610b2590612e86565b60155460ff161580611e6d5750611e5861178e565b6001600160a01b0316336001600160a01b0316145b611e895760405162461bcd60e51b8152600401610b25906132d1565b6014831115611eaa5760405162461bcd60e51b8152600401610b2590613407565b8083600d54611eb99190613590565b611ec391906135af565b341015611ee25760405162461bcd60e51b8152600401610b259061352b565b600080600e5411611ef4576000611f01565b600e54611f01908561357c565b905080831115611f235760405162461bcd60e51b8152600401610b25906134fd565b508160008185611f31610d59565b611f3b9190613564565b611f459190613564565b9050600b54811115611f695760405162461bcd60e51b8152600401610b259061338f565b600c54811115611f8b5760405162461bcd60e51b8152600401610b259061338f565b60005b611f988387613564565b811015611fbd57611fab876111e9610d59565b80611fb581613644565b915050611f8e565b508115611fdc578160126000828254611fd69190613564565b90915550505b505050505050565b60008084600d54611ff59190613590565b6001600160a01b0384166000908152601d602052604090205490915080156120305760646120238284613590565b61202d919061357c565b92505b61203c87878786611df9565b6001600160a01b0384166000908152601c602052604090205480156120cb57600060648261206a87876135af565b6120749190613590565b61207e919061357c565b6001600160a01b0387166000908152601860205260408120805492935083929091906120ab908490613564565b9250508190555080601a60008282546120c49190613564565b9091555050505b60008211806120da5750600081115b15612126576001600160a01b03851660009081526019602052604081208054899290612107908490613564565b9250508190555086601b60008282546121209190613564565b90915550505b5050505050505050565b600061213b82611d6e565b6121575760405162461bcd60e51b8152600401610b25906130b9565b600061216283611076565b9050806001600160a01b0316846001600160a01b0316148061219d5750836001600160a01b031661219284610bd3565b6001600160a01b0316145b806121ad57506121ad8185611ba1565b949350505050565b826001600160a01b03166121c882611076565b6001600160a01b0316146121ee5760405162461bcd60e51b8152600401610b25906132f7565b6001600160a01b0382166122145760405162461bcd60e51b8152600401610b259061303e565b61221f8383836124c4565b61222a600082611d8b565b6001600160a01b03831660009081526003602052604081208054600192906122539084906135af565b90915550506001600160a01b0382166000908152600360205260408120805460019290612281908490613564565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610cbb82826040518060200160405280600081525061254d565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6123598484846121b5565b61236584848484612580565b6119705760405162461bcd60e51b8152600401610b2590612f38565b606060168054610b5090613609565b6060816123b557506040805180820190915260018152600360fc1b6020820152610ae1565b8160005b81156123df57806123c981613644565b91506123d89050600a8361357c565b91506123b9565b60008167ffffffffffffffff81111561240857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612432576020820181803683370190505b5090505b84156121ad576124476001836135af565b9150612454600a8661365f565b61245f906030613564565b60f81b81838151811061248257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506124a4600a8661357c565b9450612436565b6001600160e01b031981166301ffc9a760e01b14919050565b6124cf838383610ca9565b6001600160a01b0383166124eb576124e68161269b565b61250e565b816001600160a01b0316836001600160a01b03161461250e5761250e83826126df565b6001600160a01b03821661252a576125258161277c565b610ca9565b826001600160a01b0316826001600160a01b031614610ca957610ca98282612855565b6125578383612899565b6125646000848484612580565b610ca95760405162461bcd60e51b8152600401610b2590612f38565b6000612594846001600160a01b0316612978565b1561269057836001600160a01b031663150b7a026125b0611d6a565b8786866040518563ffffffff1660e01b81526004016125d29493929190612da6565b602060405180830381600087803b1580156125ec57600080fd5b505af192505050801561261c575060408051601f3d908101601f1916820190925261261991810190612c68565b60015b612676573d80801561264a576040519150601f19603f3d011682016040523d82523d6000602084013e61264f565b606091505b50805161266e5760405162461bcd60e51b8152600401610b2590612f38565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506121ad565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016126ec8461121c565b6126f691906135af565b600083815260076020526040902054909150808214612749576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061278e906001906135af565b600083815260096020526040812054600880549394509092849081106127c457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106127f357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061283957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006128608361121c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166128bf5760405162461bcd60e51b8152600401610b25906131f5565b6128c881611d6e565b156128e55760405162461bcd60e51b8152600401610b2590612fd0565b6128f1600083836124c4565b6001600160a01b038216600090815260036020526040812080546001929061291a908490613564565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b82805461298a90613609565b90600052602060002090601f0160209004810192826129ac57600085556129f2565b82601f106129c557805160ff19168380011785556129f2565b828001600101855582156129f2579182015b828111156129f25782518255916020019190600101906129d7565b506129fe929150612a02565b5090565b5b808211156129fe5760008155600101612a03565b600067ffffffffffffffff80841115612a3257612a3261369f565b604051601f8501601f191681016020018281118282101715612a5657612a5661369f565b604052848152915081838501861015612a6e57600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b0381168114610ae157600080fd5b80358015158114610ae157600080fd5b600060208284031215612abf578081fd5b611acd82612a87565b60008060408385031215612ada578081fd5b612ae383612a87565b9150612af160208401612a87565b90509250929050565b600080600060608486031215612b0e578081fd5b612b1784612a87565b9250612b2560208501612a87565b9150604084013590509250925092565b60008060008060808587031215612b4a578081fd5b612b5385612a87565b9350612b6160208601612a87565b925060408501359150606085013567ffffffffffffffff811115612b83578182fd5b8501601f81018713612b93578182fd5b612ba287823560208401612a17565b91505092959194509250565b60008060408385031215612bc0578182fd5b612bc983612a87565b9150612af160208401612a9e565b60008060408385031215612be9578182fd5b612bf283612a87565b946020939093013593505050565b600080600060608486031215612c14578283fd5b612c1d84612a87565b95602085013595506040909401359392505050565b600060208284031215612c43578081fd5b611acd82612a9e565b600060208284031215612c5d578081fd5b8135611acd816136b5565b600060208284031215612c79578081fd5b8151611acd816136b5565b600060208284031215612c95578081fd5b813567ffffffffffffffff811115612cab578182fd5b8201601f81018413612cbb578182fd5b6121ad84823560208401612a17565b600060208284031215612cdb578081fd5b5035919050565b60008060408385031215612cf4578182fd5b50508035926020909101359150565b600080600060608486031215612d17578283fd5b8335925060208401359150612d2e60408501612a87565b90509250925092565b60008151808452612d4f8160208601602086016135c6565b601f01601f19169290920160200192915050565b60008351612d758184602088016135c6565b835190830190612d898183602088016135c6565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612dd990830184612d37565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e245783516001600160a01b031683529284019291840191600101612dff565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e2457835183529284019291840191600101612e4c565b901515815260200190565b600060208252611acd6020830184612d37565b60208082526016908201527515d9481a185d995b89dd081cdd185c9d1959081e595d60521b604082015260600190565b6020808252601c908201527f526563656976656420746f6f206d616e792066726565206974656d7300000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526017908201527f4e6f2066726565206974656d7320617661696c61626c65000000000000000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252600c908201526b042616c616e636520697320360a41b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600c908201526b15d949dc99481c185d5cd95960a21b604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601d908201527f43616e27742066756c66696c6c20726571756573746564206974656d73000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601d908201527f43616e2774206d696e74206d6f7265207468616e203230206974656d73000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526008908201526714dbdb19081bdd5d60c21b604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b602080825260149082015273446966666572656e7420626f6e7573207261746560601b604082015260600190565b602080825260169082015275088d2c8dc4ee840e6cadcc840cadcdeeaced0408aa8960531b604082015260600190565b90815260200190565b6000821982111561357757613577613673565b500190565b60008261358b5761358b613689565b500490565b60008160001904831182151516156135aa576135aa613673565b500290565b6000828210156135c1576135c1613673565b500390565b60005b838110156135e15781810151838201526020016135c9565b838111156119705750506000910152565b60008161360157613601613673565b506000190190565b60028104600182168061361d57607f821691505b6020821081141561363e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561365857613658613673565b5060010190565b60008261366e5761366e613689565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610ecb57600080fdfea26469706673582212202b9c1b5a1fbca26b19d67a81987fdd9cce71fd5b9ecc4d49060e106e9aec45fc64736f6c6343000800003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000002b67000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f63646e2e706c616e657477616966752e636f6d2f70726576696577732f6d6574612f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c506c616e6574205761696675000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055741494655000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106103c35760003560e01c80637cf84799116101f2578063c1ff2c1a1161010d578063e4fcf329116100a0578063ee315bed1161006f578063ee315bed14610a44578063ee72814114610a64578063f07c3bd514610a79578063f2fde38b14610a99576103c3565b8063e4fcf329146109cf578063e985e9c5146109ef578063ec9f7c8f14610a0f578063ed3a749214610a2f576103c3565b8063cb889cbe116100dc578063cb889cbe14610965578063d41e432614610985578063de6711ca1461099a578063e1a7e065146109af576103c3565b8063c1ff2c1a146108fd578063c877d3271461091d578063c87b56dd14610932578063c97f372014610952576103c3565b80639e77613011610185578063b69ef8a811610154578063b69ef8a814610893578063b88d4fde146108a8578063bc912720146108c8578063be9a6555146108e8576103c3565b80639e77613014610829578063a22cb4651461083e578063a42b6acd1461085e578063a95b0a6e14610873576103c3565b80638c52fa78116101c15780638c52fa78146107ca5780638da5cb5b146107ea57806395d89b41146107ff5780639dd5890a14610814576103c3565b80637cf847991461076b5780637f139d7c1461078b5780637ff9b596146107a05780638ab53447146107b5576103c3565b8063438b6300116102e25780636d36611e11610275578063715018a611610244578063715018a6146106f657806372bd923b1461070b57806377fed2041461072b5780637acdf94714610758576103c3565b80636d36611e1461068c5780636f2a7add146106a157806370a08231146106c1578063714c5398146106e1576103c3565b80635c975abb116102b15780635c975abb146106225780635d7ae62f146106375780636352211e1461064c5780636a61e5fc1461066c576103c3565b8063438b6300146105a05780634f6ccce7146105cd57806355f804b3146105ed5780635af123f41461060d576103c3565b80631971ca5f1161035a5780633508880f116103295780633508880f146105415780633c010a3e146105565780633ccfd60b1461056b57806342842e0e14610580576103c3565b80631971ca5f146104d95780631f2698ab146104ec57806323b872dd146105015780632f745c5914610521576103c3565b8063095ea7b311610396578063095ea7b31461046f5780630ca554791461048f5780630ee7d0b0146104a257806318160ddd146104b7576103c3565b806301ffc9a7146103c857806302329a29146103fe57806306fdde0314610420578063081812fc14610442575b600080fd5b3480156103d457600080fd5b506103e86103e3366004612c4c565b610ab9565b6040516103f59190612e68565b60405180910390f35b34801561040a57600080fd5b5061041e610419366004612c32565b610ae6565b005b34801561042c57600080fd5b50610435610b41565b6040516103f59190612e73565b34801561044e57600080fd5b5061046261045d366004612cca565b610bd3565b6040516103f59190612d92565b34801561047b57600080fd5b5061041e61048a366004612bd7565b610c16565b61041e61049d366004612ce2565b610cae565b3480156104ae57600080fd5b5061041e610cbf565b3480156104c357600080fd5b506104cc610d59565b6040516103f5919061355b565b61041e6104e7366004612d03565b610d5f565b3480156104f857600080fd5b506103e8610d6b565b34801561050d57600080fd5b5061041e61051c366004612afa565b610d79565b34801561052d57600080fd5b506104cc61053c366004612bd7565b610db1565b34801561054d57600080fd5b506104cc610e03565b34801561056257600080fd5b506104cc610e4b565b34801561057757600080fd5b5061041e610e51565b34801561058c57600080fd5b5061041e61059b366004612afa565b610ece565b3480156105ac57600080fd5b506105c06105bb366004612aae565b610ee9565b6040516103f59190612e30565b3480156105d957600080fd5b506104cc6105e8366004612cca565b610fa7565b3480156105f957600080fd5b5061041e610608366004612c84565b611002565b34801561061957600080fd5b506104cc611054565b34801561062e57600080fd5b506103e861105a565b34801561064357600080fd5b506104cc611063565b34801561065857600080fd5b50610462610667366004612cca565b611076565b34801561067857600080fd5b5061041e610687366004612cca565b6110ab565b34801561069857600080fd5b506104cc6110ef565b3480156106ad57600080fd5b5061041e6106bc366004612bd7565b611137565b3480156106cd57600080fd5b506104cc6106dc366004612aae565b61121c565b3480156106ed57600080fd5b50610435611260565b34801561070257600080fd5b5061041e6112ae565b34801561071757600080fd5b5061041e610726366004612cca565b6112f9565b34801561073757600080fd5b5061074b610746366004612cca565b61133d565b6040516103f59190612de3565b61041e610766366004612ac8565b6115cc565b34801561077757600080fd5b506104cc610786366004612aae565b6115da565b34801561079757600080fd5b506104cc6115ec565b3480156107ac57600080fd5b506104cc611610565b3480156107c157600080fd5b5061041e611616565b3480156107d657600080fd5b5061041e6107e5366004612c00565b611727565b3480156107f657600080fd5b5061046261178e565b34801561080b57600080fd5b5061043561179d565b34801561082057600080fd5b506104cc6117ac565b34801561083557600080fd5b506104cc6117b2565b34801561084a57600080fd5b5061041e610859366004612bae565b6117b8565b34801561086a57600080fd5b506104cc611886565b34801561087f57600080fd5b506104cc61088e366004612aae565b61188c565b34801561089f57600080fd5b506104cc6118e9565b3480156108b457600080fd5b5061041e6108c3366004612b35565b611937565b3480156108d457600080fd5b506104cc6108e3366004612aae565b611976565b3480156108f457600080fd5b5061041e611991565b34801561090957600080fd5b506104cc610918366004612aae565b6119e1565b34801561092957600080fd5b506104cc611a3e565b34801561093e57600080fd5b5061043561094d366004612cca565b611a51565b61041e610960366004612aae565b611ad4565b34801561097157600080fd5b506104cc610980366004612aae565b611ae2565b34801561099157600080fd5b506104cc611af4565b3480156109a657600080fd5b506104cc611afa565b3480156109bb57600080fd5b506104cc6109ca366004612aae565b611b00565b3480156109db57600080fd5b5061041e6109ea366004612cca565b611b5d565b3480156109fb57600080fd5b506103e8610a0a366004612ac8565b611ba1565b348015610a1b57600080fd5b5061041e610a2a366004612cca565b611bcf565b348015610a3b57600080fd5b506104cc611c28565b348015610a5057600080fd5b5061041e610a5f366004612cca565b611c2e565b348015610a7057600080fd5b506104cc611c72565b348015610a8557600080fd5b5061041e610a94366004612cca565b611c78565b348015610aa557600080fd5b5061041e610ab4366004612aae565b611cbc565b60006001600160e01b0319821663780e9d6360e01b1480610ade5750610ade82611d2a565b90505b919050565b610aee611d6a565b6001600160a01b0316610aff61178e565b6001600160a01b031614610b2e5760405162461bcd60e51b8152600401610b259061329c565b60405180910390fd5b6015805460ff1916911515919091179055565b606060008054610b5090613609565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7c90613609565b8015610bc95780601f10610b9e57610100808354040283529160200191610bc9565b820191906000526020600020905b815481529060010190602001808311610bac57829003601f168201915b5050505050905090565b6000610bde82611d6e565b610bfa5760405162461bcd60e51b8152600401610b2590613250565b506000908152600460205260409020546001600160a01b031690565b6000610c2182611076565b9050806001600160a01b0316836001600160a01b03161415610c555760405162461bcd60e51b8152600401610b25906133c6565b806001600160a01b0316610c67611d6a565b6001600160a01b03161480610c835750610c8381610a0a611d6a565b610c9f5760405162461bcd60e51b8152600401610b2590613105565b610ca98383611d8b565b505050565b610cbb3383836000611df9565b5050565b3360009081526018602052604090205480610cec5760405162461bcd60e51b8152600401610b259061322a565b604051339082156108fc029083906000818181858888f19350505050158015610d19573d6000803e3d6000fd5b50601a54811115610d2e576000601a55610d46565b80601a6000828254610d4091906135af565b90915550505b5033600090815260186020526040812055565b60085490565b610ca933848484611fe4565b601554610100900460ff1681565b610d8a610d84611d6a565b82612130565b610da65760405162461bcd60e51b8152600401610b259061343e565b610ca98383836121b5565b6000610dbc8361121c565b8210610dda5760405162461bcd60e51b8152600401610b2590612eed565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000610e0d611d6a565b6001600160a01b0316610e1e61178e565b6001600160a01b031614610e445760405162461bcd60e51b8152600401610b259061329c565b50601b5490565b600b5481565b610e59611d6a565b6001600160a01b0316610e6a61178e565b6001600160a01b031614610e905760405162461bcd60e51b8152600401610b259061329c565b601a5433906108fc90610ea390476135af565b6040518115909202916000818181858888f19350505050158015610ecb573d6000803e3d6000fd5b50565b610ca983838360405180602001604052806000815250611937565b60606000610ef68361121c565b905060008167ffffffffffffffff811115610f2157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f4a578160200160208202803683370190505b50905060005b82811015610f9f57610f628582610db1565b828281518110610f8257634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610f9781613644565b915050610f50565b509392505050565b6000610fb1610d59565b8210610fcf5760405162461bcd60e51b8152600401610b25906134b1565b60088281548110610ff057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b61100a611d6a565b6001600160a01b031661101b61178e565b6001600160a01b0316146110415760405162461bcd60e51b8152600401610b259061329c565b8051610cbb90601690602084019061297e565b600e5481565b60155460ff1681565b3360009081526019602052604090205490565b6000818152600260205260408120546001600160a01b031680610ade5760405162461bcd60e51b8152600401610b25906131ac565b6110b3611d6a565b6001600160a01b03166110c461178e565b6001600160a01b0316146110ea5760405162461bcd60e51b8152600401610b259061329c565b600d55565b60006110f9611d6a565b6001600160a01b031661110a61178e565b6001600160a01b0316146111305760405162461bcd60e51b8152600401610b259061329c565b50601a5490565b61113f611d6a565b6001600160a01b031661115061178e565b6001600160a01b0316146111765760405162461bcd60e51b8152600401610b259061329c565b600b54611181610d59565b1061119e5760405162461bcd60e51b8152600401610b259061348f565b600b54816111aa610d59565b6111b49190613564565b11156111d25760405162461bcd60e51b8152600401610b259061338f565b60005b81811015611200576111ee836111e9610d59565b6122e2565b806111f881613644565b9150506111d5565b5080601160008282546112139190613564565b90915550505050565b60006001600160a01b0382166112445760405162461bcd60e51b8152600401610b2590613162565b506001600160a01b031660009081526003602052604090205490565b606061126a611d6a565b6001600160a01b031661127b61178e565b6001600160a01b0316146112a15760405162461bcd60e51b8152600401610b259061329c565b60168054610b5090613609565b6112b6611d6a565b6001600160a01b03166112c761178e565b6001600160a01b0316146112ed5760405162461bcd60e51b8152600401610b259061329c565b6112f760006122fc565b565b611301611d6a565b6001600160a01b031661131261178e565b6001600160a01b0316146113385760405162461bcd60e51b8152600401610b259061329c565b600c55565b6060611347611d6a565b6001600160a01b031661135861178e565b6001600160a01b03161461137e5760405162461bcd60e51b8152600401610b259061329c565b6000611388610d59565b905060008167ffffffffffffffff8111156113b357634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113dc578160200160208202803683370190505b5090506000805b838110156114ef5760006113f682610fa7565b9050600061140382611076565b90508761140f8261121c565b101561141c5750506114dd565b6000805b8581101561148457826001600160a01b031687828151811061145257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156114725760019150611484565b8061147c81613644565b915050611420565b508015611493575050506114dd565b818686815181106114b457634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152846114d681613644565b9550505050505b806114e781613644565b9150506113e3565b5060008167ffffffffffffffff81111561151957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611542578160200160208202803683370190505b50905060005b828110156115c25783818151811061157057634e487b7160e01b600052603260045260246000fd5b602002602001015182828151811061159857634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806115ba81613644565b915050611548565b5095945050505050565b610cbb826001600084611fe4565b60176020526000908152604090205481565b60006011546012546010546116019190613564565b61160b9190613564565b905090565b600d5481565b60155460ff161580611640575061162b61178e565b6001600160a01b0316336001600160a01b0316145b61165c5760405162461bcd60e51b8152600401610b25906132d1565b6000600f541161167e5760405162461bcd60e51b8152600401610b2590613007565b600b54611689610d59565b106116a65760405162461bcd60e51b8152600401610b259061348f565b6014546116b233611976565b106116cf5760405162461bcd60e51b8152600401610b2590612eb6565b6116db336111e9610d59565b3360009081526017602052604081208054916116f683613644565b9091555050600f805490600061170b836135f2565b90915550506010805490600061172083613644565b9190505550565b61172f611d6a565b6001600160a01b031661174061178e565b6001600160a01b0316146117665760405162461bcd60e51b8152600401610b259061329c565b6001600160a01b039092166000908152601c6020908152604080832093909355601d90522055565b600a546001600160a01b031690565b606060018054610b5090613609565b60145481565b60135481565b6117c0611d6a565b6001600160a01b0316826001600160a01b031614156117f15760405162461bcd60e51b8152600401610b2590613082565b80600560006117fe611d6a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611842611d6a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161187a9190612e68565b60405180910390a35050565b600f5481565b6000611896611d6a565b6001600160a01b03166118a761178e565b6001600160a01b0316146118cd5760405162461bcd60e51b8152600401610b259061329c565b506001600160a01b03166000908152601c602052604090205490565b60006118f3611d6a565b6001600160a01b031661190461178e565b6001600160a01b03161461192a5760405162461bcd60e51b8152600401610b259061329c565b601a5461160b90476135af565b611948611942611d6a565b83612130565b6119645760405162461bcd60e51b8152600401610b259061343e565b6119708484848461234e565b50505050565b6001600160a01b031660009081526017602052604090205490565b611999611d6a565b6001600160a01b03166119aa61178e565b6001600160a01b0316146119d05760405162461bcd60e51b8152600401610b259061329c565b6015805461ff001916610100179055565b60006119eb611d6a565b6001600160a01b03166119fc61178e565b6001600160a01b031614611a225760405162461bcd60e51b8152600401610b259061329c565b506001600160a01b031660009081526019602052604090205490565b3360009081526018602052604090205490565b6060611a5c82611d6e565b611a785760405162461bcd60e51b8152600401610b2590613340565b6000611a82612381565b90506000815111611aa25760405180602001604052806000815250611acd565b80611aac84612390565b604051602001611abd929190612d63565b6040516020818303038152906040525b9392505050565b610ecb816001600080611df9565b601d6020526000908152604090205481565b600c5481565b60115481565b6000611b0a611d6a565b6001600160a01b0316611b1b61178e565b6001600160a01b031614611b415760405162461bcd60e51b8152600401610b259061329c565b506001600160a01b031660009081526018602052604090205490565b611b65611d6a565b6001600160a01b0316611b7661178e565b6001600160a01b031614611b9c5760405162461bcd60e51b8152600401610b259061329c565b600e55565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611bd7611d6a565b6001600160a01b0316611be861178e565b6001600160a01b031614611c0e5760405162461bcd60e51b8152600401610b259061329c565b80600f6000828254611c209190613564565b909155505050565b60125481565b611c36611d6a565b6001600160a01b0316611c4761178e565b6001600160a01b031614611c6d5760405162461bcd60e51b8152600401610b259061329c565b601455565b60105481565b611c80611d6a565b6001600160a01b0316611c9161178e565b6001600160a01b031614611cb75760405162461bcd60e51b8152600401610b259061329c565b600f55565b611cc4611d6a565b6001600160a01b0316611cd561178e565b6001600160a01b031614611cfb5760405162461bcd60e51b8152600401610b259061329c565b6001600160a01b038116611d215760405162461bcd60e51b8152600401610b2590612f8a565b610ecb816122fc565b60006001600160e01b031982166380ac58cd60e01b1480611d5b57506001600160e01b03198216635b5e139f60e01b145b80610ade5750610ade826124ab565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611dc082611076565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b601554610100900460ff1680611e275750611e1261178e565b6001600160a01b0316336001600160a01b0316145b611e435760405162461bcd60e51b8152600401610b2590612e86565b60155460ff161580611e6d5750611e5861178e565b6001600160a01b0316336001600160a01b0316145b611e895760405162461bcd60e51b8152600401610b25906132d1565b6014831115611eaa5760405162461bcd60e51b8152600401610b2590613407565b8083600d54611eb99190613590565b611ec391906135af565b341015611ee25760405162461bcd60e51b8152600401610b259061352b565b600080600e5411611ef4576000611f01565b600e54611f01908561357c565b905080831115611f235760405162461bcd60e51b8152600401610b25906134fd565b508160008185611f31610d59565b611f3b9190613564565b611f459190613564565b9050600b54811115611f695760405162461bcd60e51b8152600401610b259061338f565b600c54811115611f8b5760405162461bcd60e51b8152600401610b259061338f565b60005b611f988387613564565b811015611fbd57611fab876111e9610d59565b80611fb581613644565b915050611f8e565b508115611fdc578160126000828254611fd69190613564565b90915550505b505050505050565b60008084600d54611ff59190613590565b6001600160a01b0384166000908152601d602052604090205490915080156120305760646120238284613590565b61202d919061357c565b92505b61203c87878786611df9565b6001600160a01b0384166000908152601c602052604090205480156120cb57600060648261206a87876135af565b6120749190613590565b61207e919061357c565b6001600160a01b0387166000908152601860205260408120805492935083929091906120ab908490613564565b9250508190555080601a60008282546120c49190613564565b9091555050505b60008211806120da5750600081115b15612126576001600160a01b03851660009081526019602052604081208054899290612107908490613564565b9250508190555086601b60008282546121209190613564565b90915550505b5050505050505050565b600061213b82611d6e565b6121575760405162461bcd60e51b8152600401610b25906130b9565b600061216283611076565b9050806001600160a01b0316846001600160a01b0316148061219d5750836001600160a01b031661219284610bd3565b6001600160a01b0316145b806121ad57506121ad8185611ba1565b949350505050565b826001600160a01b03166121c882611076565b6001600160a01b0316146121ee5760405162461bcd60e51b8152600401610b25906132f7565b6001600160a01b0382166122145760405162461bcd60e51b8152600401610b259061303e565b61221f8383836124c4565b61222a600082611d8b565b6001600160a01b03831660009081526003602052604081208054600192906122539084906135af565b90915550506001600160a01b0382166000908152600360205260408120805460019290612281908490613564565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610cbb82826040518060200160405280600081525061254d565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6123598484846121b5565b61236584848484612580565b6119705760405162461bcd60e51b8152600401610b2590612f38565b606060168054610b5090613609565b6060816123b557506040805180820190915260018152600360fc1b6020820152610ae1565b8160005b81156123df57806123c981613644565b91506123d89050600a8361357c565b91506123b9565b60008167ffffffffffffffff81111561240857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612432576020820181803683370190505b5090505b84156121ad576124476001836135af565b9150612454600a8661365f565b61245f906030613564565b60f81b81838151811061248257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506124a4600a8661357c565b9450612436565b6001600160e01b031981166301ffc9a760e01b14919050565b6124cf838383610ca9565b6001600160a01b0383166124eb576124e68161269b565b61250e565b816001600160a01b0316836001600160a01b03161461250e5761250e83826126df565b6001600160a01b03821661252a576125258161277c565b610ca9565b826001600160a01b0316826001600160a01b031614610ca957610ca98282612855565b6125578383612899565b6125646000848484612580565b610ca95760405162461bcd60e51b8152600401610b2590612f38565b6000612594846001600160a01b0316612978565b1561269057836001600160a01b031663150b7a026125b0611d6a565b8786866040518563ffffffff1660e01b81526004016125d29493929190612da6565b602060405180830381600087803b1580156125ec57600080fd5b505af192505050801561261c575060408051601f3d908101601f1916820190925261261991810190612c68565b60015b612676573d80801561264a576040519150601f19603f3d011682016040523d82523d6000602084013e61264f565b606091505b50805161266e5760405162461bcd60e51b8152600401610b2590612f38565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506121ad565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016126ec8461121c565b6126f691906135af565b600083815260076020526040902054909150808214612749576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061278e906001906135af565b600083815260096020526040812054600880549394509092849081106127c457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106127f357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061283957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006128608361121c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166128bf5760405162461bcd60e51b8152600401610b25906131f5565b6128c881611d6e565b156128e55760405162461bcd60e51b8152600401610b2590612fd0565b6128f1600083836124c4565b6001600160a01b038216600090815260036020526040812080546001929061291a908490613564565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b82805461298a90613609565b90600052602060002090601f0160209004810192826129ac57600085556129f2565b82601f106129c557805160ff19168380011785556129f2565b828001600101855582156129f2579182015b828111156129f25782518255916020019190600101906129d7565b506129fe929150612a02565b5090565b5b808211156129fe5760008155600101612a03565b600067ffffffffffffffff80841115612a3257612a3261369f565b604051601f8501601f191681016020018281118282101715612a5657612a5661369f565b604052848152915081838501861015612a6e57600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b0381168114610ae157600080fd5b80358015158114610ae157600080fd5b600060208284031215612abf578081fd5b611acd82612a87565b60008060408385031215612ada578081fd5b612ae383612a87565b9150612af160208401612a87565b90509250929050565b600080600060608486031215612b0e578081fd5b612b1784612a87565b9250612b2560208501612a87565b9150604084013590509250925092565b60008060008060808587031215612b4a578081fd5b612b5385612a87565b9350612b6160208601612a87565b925060408501359150606085013567ffffffffffffffff811115612b83578182fd5b8501601f81018713612b93578182fd5b612ba287823560208401612a17565b91505092959194509250565b60008060408385031215612bc0578182fd5b612bc983612a87565b9150612af160208401612a9e565b60008060408385031215612be9578182fd5b612bf283612a87565b946020939093013593505050565b600080600060608486031215612c14578283fd5b612c1d84612a87565b95602085013595506040909401359392505050565b600060208284031215612c43578081fd5b611acd82612a9e565b600060208284031215612c5d578081fd5b8135611acd816136b5565b600060208284031215612c79578081fd5b8151611acd816136b5565b600060208284031215612c95578081fd5b813567ffffffffffffffff811115612cab578182fd5b8201601f81018413612cbb578182fd5b6121ad84823560208401612a17565b600060208284031215612cdb578081fd5b5035919050565b60008060408385031215612cf4578182fd5b50508035926020909101359150565b600080600060608486031215612d17578283fd5b8335925060208401359150612d2e60408501612a87565b90509250925092565b60008151808452612d4f8160208601602086016135c6565b601f01601f19169290920160200192915050565b60008351612d758184602088016135c6565b835190830190612d898183602088016135c6565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612dd990830184612d37565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e245783516001600160a01b031683529284019291840191600101612dff565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e2457835183529284019291840191600101612e4c565b901515815260200190565b600060208252611acd6020830184612d37565b60208082526016908201527515d9481a185d995b89dd081cdd185c9d1959081e595d60521b604082015260600190565b6020808252601c908201527f526563656976656420746f6f206d616e792066726565206974656d7300000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526017908201527f4e6f2066726565206974656d7320617661696c61626c65000000000000000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252600c908201526b042616c616e636520697320360a41b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600c908201526b15d949dc99481c185d5cd95960a21b604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601d908201527f43616e27742066756c66696c6c20726571756573746564206974656d73000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601d908201527f43616e2774206d696e74206d6f7265207468616e203230206974656d73000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526008908201526714dbdb19081bdd5d60c21b604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b602080825260149082015273446966666572656e7420626f6e7573207261746560601b604082015260600190565b602080825260169082015275088d2c8dc4ee840e6cadcc840cadcdeeaced0408aa8960531b604082015260600190565b90815260200190565b6000821982111561357757613577613673565b500190565b60008261358b5761358b613689565b500490565b60008160001904831182151516156135aa576135aa613673565b500290565b6000828210156135c1576135c1613673565b500390565b60005b838110156135e15781810151838201526020016135c9565b838111156119705750506000910152565b60008161360157613601613673565b506000190190565b60028104600182168061361d57607f821691505b6020821081141561363e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561365857613658613673565b5060010190565b60008261366e5761366e613689565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610ecb57600080fdfea26469706673582212202b9c1b5a1fbca26b19d67a81987fdd9cce71fd5b9ecc4d49060e106e9aec45fc64736f6c63430008000033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000002b67000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f63646e2e706c616e657477616966752e636f6d2f70726576696577732f6d6574612f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c506c616e6574205761696675000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055741494655000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : baseURI (string): https://cdn.planetwaifu.com/previews/meta/
Arg [1] : tokenName (string): Planet Waifu
Arg [2] : tokenSymbol (string): WAIFU
Arg [3] : _price (uint256): 10000000000000000
Arg [4] : _maxItems (uint256): 11111

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000000000000000000000000000002386f26fc10000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000002b67
Arg [5] : 000000000000000000000000000000000000000000000000000000000000002a
Arg [6] : 68747470733a2f2f63646e2e706c616e657477616966752e636f6d2f70726576
Arg [7] : 696577732f6d6574612f00000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [9] : 506c616e65742057616966750000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [11] : 5741494655000000000000000000000000000000000000000000000000000000


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.