ETH Price: $3,261.72 (-2.80%)

Token

LonelyPop (LP)
 

Overview

Max Total Supply

10,000 LP

Holders

3,984

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 LP
0xf3Bc38756bdd873162d396f6e4CF13cafb3Cc11B
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

LonelyPop is an art centered and community focused collectible NFT project residing on the Ethereum blockchain as a collection of unique, non-fungible tokens (NFTs) contrived of a combination of traits associated with underlying personalities & characteristics.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Otoro

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 27 : Otoro.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/BlockbasedSale.sol";
import "./lib/Roles.sol";
import "./lib/Revealable.sol";
import "./lib/RequestSigning.sol";

contract Otoro is
    Ownable,
    ERC721,
    ERC721Enumerable,
    ReentrancyGuard,
    Roles,
    Revealable,
    BlockbasedSale,
    RequestSigning
{
    using Address for address;
    using SafeMath for uint256;

    event Airdrop(address[] addresses, uint256 amount);
    event Purchased(address indexed account, uint256 indexed index);
    event WithdrawNonPurchaseFund(uint256 balance);
    event Release(address account);

    
    mapping(address => uint256) private _privateSaleClaimed;
    mapping(address => uint256) private _ogClaimed;
    PaymentSplitter private _splitter;

    struct ChainLinkParams {
        address coordinator;
        address linkToken;
        bytes32 keyHash;
    }

    struct RevenueShareParams {
        address[] payees;
        uint256[] shares;
    }

    struct MintInfo {
        uint128 price;
        uint8 amount;
    }

    mapping(address => MintInfo[]) public fairDAInfo;

    modifier shareHolderOnly() {
        require(
            _splitter.shares(msg.sender) > 0 || owner() == _msgSender(),
            "not shareholder/owner"
        );
        _;
    }

    constructor(
        string memory _tokenName,
        string memory _symbol,
        uint256 _maxSupply,
        uint256 _startPrice,
        string memory _defaultURI,
        ChainLinkParams memory chainLinkParams,
        RevenueShareParams memory revenueShare
    )
        ERC721(_tokenName, _symbol)
        Revealable(
            _defaultURI,
            chainLinkParams.coordinator,
            chainLinkParams.linkToken,
            chainLinkParams.keyHash
        )
        RequestSigning(_symbol)
    {
        _splitter = new PaymentSplitter(
            revenueShare.payees,
            revenueShare.shares
        );
        maxSupply = _maxSupply;
        publicSaleBeginPrice = _startPrice;
        finalDAPrice = _startPrice;
    }

    function airdrop(address[] memory addresses, uint256 amount)
        external
        nonReentrant
        onlyOperator
    {
        require(
            totalSupply().add(addresses.length.mul(amount)) <= maxSupply,
            "Exceed max supply limit."
        );

        require(
            saleStats.totalReserveMinted.add(addresses.length.mul(amount)) <=
                maxReserve,
            "Insufficient reserve."
        );

        saleStats.totalReserveMinted = saleStats.totalReserveMinted.add(
            addresses.length.mul(amount)
        );

        for (uint256 i = 0; i < addresses.length; i++) {
            _mintToken(addresses[i], amount);
        }
        emit Airdrop(addresses, amount);
    }

    function mintOg(bytes calldata signature)
        external
        payable
        nonReentrant
        returns (bool)
    {
        require(msg.sender == tx.origin, "Contract is not allowed.");
        require(
            getState() == SaleState.PrivateSaleDuring,
            "Sale not available."
        );

        require(isOG(signature), "Not OG whitelisted.");
        require(_ogClaimed[msg.sender] == 0, "Already Claimed OG.");
        require(
            totalPrivateSaleMinted().add(1) <= privateSaleCapped,
            "Exceed Private Sale Limit"
        );

        require(msg.value >= getPriceByMode(), "Insufficient funds.");

        _ogClaimed[msg.sender] = _ogClaimed[msg.sender] + 1;
        saleStats.totalOGMinted = saleStats.totalOGMinted.add(1);

        _mintToken(msg.sender, 1);

        payable(_splitter).transfer(msg.value);

        return true;
    }

    function mintToken(uint256 amount, bytes calldata signature)
        external
        payable
        nonReentrant
        returns (bool)
    {
        SaleState state = getState();
        require(msg.sender == tx.origin, "Contract is not allowed.");
        require(
            state == SaleState.PrivateSaleDuring ||
                state == SaleState.PublicSaleDuring ||
                state == SaleState.DutchAuctionDuring,
            "Sale not available."
        );
        require(
            msg.value >= amount.mul(getPriceByMode()),
            "Insufficient funds."
        );

        if (state == SaleState.DutchAuctionDuring) {
            require(
                amount <= saleConfig.maxDAMintPerTx,
                "Mint exceed transaction limits."
            );
            require(
                saleStats.totalDAMinted.add(amount) <= dutchAuctionCapped,
                "Purchase exceed limit."
            );
        }

        if (state == SaleState.PublicSaleDuring) {
            require(
                amount <= saleConfig.maxFMMintPerTx,
                "Mint exceed transaction limits."
            );
            require(
                totalSupply().add(amount).add(availableReserve()) <= maxSupply,
                "Purchase exceed max supply."
            );
        }

        if (state == SaleState.PrivateSaleDuring) {
            require(isWhiteListed(signature), "Not whitelisted.");
            require(amount <= 2, "Mint exceed transaction limits");
            require(
                _privateSaleClaimed[msg.sender] + amount <= 2,
                "Mint limit per wallet exceeded."
            );
            require(
                totalPrivateSaleMinted().add(amount) <= privateSaleCapped,
                "Purchase exceed sale capped."
            );
        }

        _mintToken(msg.sender, amount);
        if (state == SaleState.DutchAuctionDuring) {
            saleStats.totalDAMinted = saleStats.totalDAMinted.add(amount);

            uint256 mintPrice = msg.value.div(amount);

            fairDAInfo[msg.sender].push(
                MintInfo(uint128(mintPrice), uint8(amount))
            );

            if (mintPrice < finalDAPrice) {
                finalDAPrice = mintPrice;
            }
        }
        if (state == SaleState.PublicSaleDuring) {
            saleStats.totalFMMinted = saleStats.totalFMMinted.add(amount);
        }
        if (state == SaleState.PrivateSaleDuring) {
            _privateSaleClaimed[msg.sender] =
                _privateSaleClaimed[msg.sender] +
                amount;
            saleStats.totalWLMinted = saleStats.totalWLMinted.add(amount);
        }
        payable(_splitter).transfer(msg.value);

        return true;
    }

    function dutchAuctionInfo(address user)
        external
        view
        returns (MintInfo[] memory)
    {
        return fairDAInfo[user];
    }

    function _mintToken(address addr, uint256 amount) internal returns (bool) {
        for (uint256 i = 0; i < amount; i++) {
            uint256 tokenIndex = totalSupply();
            if (tokenIndex < maxSupply) {
                _safeMint(addr, tokenIndex + 1);
                emit Purchased(addr, tokenIndex);
            }
        }
        return true;
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721)
        returns (string memory)
    {
        require(tokenId <= totalSupply(), "Token not exist.");

        return
            isRevealed()
                ? string(
                    abi.encodePacked(
                        revealedBaseURI,
                        getShuffledId(totalSupply(), maxSupply, tokenId, 1),
                        ".json"
                    )
                )
                : defaultURI;
    }

    function release(address payable account) external virtual shareHolderOnly {
        require(
            msg.sender == account || msg.sender == owner(),
            "Release: no permission"
        );

        _splitter.release(account);
        emit Release(address(account));
    }

    function withdraw() external onlyOperator {
        uint256 balance = address(this).balance;
        payable(msg.sender).transfer(balance);
        emit WithdrawNonPurchaseFund(balance);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721, ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

File 2 of 27 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + totalReleased();
        uint256 payment = _pendingPayment(account, totalReceived, released(account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 3 of 27 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

File 4 of 27 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

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 5 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 7 of 27 : BlockbasedSale.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./Roles.sol";

contract BlockbasedSale is Ownable, Roles {
    using SafeMath for uint256;

    event AssignDutchAuction(bool flag);
    event AssignDutchAuctionCap(uint256 cap);
    event AssignPrivateSaleCap(uint256 cap);
    event AssignPriceDecayParameter(
        uint256 size,
        uint256 _lowerBoundPrice,
        uint256 _priceFactor
    );
    event AssignTransactionLimit(uint256 _dutchAuction, uint256 _freeMarket);
    event AssignPrivateSaleConfig(uint256 beginBlock, uint256 endBlock);
    event AssignPublicSaleConfig(uint256 beginBlock, uint256 endBlock);
    event AssignDutchAuctionConfig(uint256 beginBlock, uint256 endBlock);
    event AssignPrivateSalePrice(uint256 price);
    event AssignPublicSalePrice(uint256 price);
    event AssignReserveLimit(uint256 limit);
    event AssignPrivateSapeCap(uint256 cap);
    event EnablePublicSale();
    event EnablePrivateSale();
    event EnableFairDutchAuction();
    event ForceCloseSale();
    event ForcePauseSale();
    event ResetOverridedSaleState();
    event OverrideFinalDAPrice(uint256 price);

    enum SaleState {
        NotStarted,
        DutchAuctionBeforeWithoutBlock,
        DutchAuctionBeforeWithBlock,
        DutchAuctionDuring,
        DutchAuctionEnd,
        DutchAuctionEndSoldOut,
        PrivateSaleBeforeWithoutBlock,
        PrivateSaleBeforeWithBlock,
        PrivateSaleDuring,
        PrivateSaleEnd,
        PrivateSaleEndSoldOut,
        PublicSaleBeforeWithoutBlock,
        PublicSaleBeforeWithBlock,
        PublicSaleDuring,
        PublicSaleEnd,
        PublicSaleEndSoldOut,
        PauseSale,
        AllSalesEnd
    }

    enum SalePhase {
        None,
        DutchAuction,
        Private,
        Public
    }

    enum OverrideSaleState {
        None,
        Pause,
        Close
    }

    struct SalesBlock {
        uint256 beginBlock;
        uint256 endBlock;
    }

    struct DutchAuctionConfig {
        uint256 discountBlockSize;
        uint256 lowerBoundPrice;
        uint256 priceFactor;
    }

    struct SaleStats {
        uint256 totalReserveMinted;
        uint256 totalDAMinted;
        uint256 totalOGMinted;
        uint256 totalWLMinted;
        uint256 totalFMMinted;
    }

    struct SaleConfig {
        uint256 maxDAMintPerTx;
        uint256 maxFMMintPerTx;
    }

    SalesBlock public dutchAuction;
    SalesBlock public privateSale;
    SalesBlock public publicSale;

    OverrideSaleState public overridedSaleState = OverrideSaleState.None;
    SalePhase public salePhase = SalePhase.None;

    DutchAuctionConfig public dutchAuctionConfig;
    SaleStats public saleStats;
    SaleConfig public saleConfig;

    uint256 public maxSupply = 10000;
    uint256 public maxReserve;
    uint256 public privateSalePriceCapped = 500000000000000000;
    uint256 public publicSaleBeginPrice;
    uint256 public finalDAPrice;
    uint256 public privateSaleCapped;
    uint256 public dutchAuctionCapped;

    function setDutchAuctionBlocks(SalesBlock memory _dutchAuction)
        external
        onlyOperator
    {
        dutchAuction = _dutchAuction;
        emit AssignDutchAuctionConfig(
            _dutchAuction.beginBlock,
            _dutchAuction.endBlock
        );
    }

    function setPrivateSaleBlocks(SalesBlock memory _privateSale)
        external
        onlyOperator
    {
        privateSale = _privateSale;
        emit AssignPrivateSaleConfig(
            _privateSale.beginBlock,
            _privateSale.endBlock
        );
    }

    function setPublicSaleBlocks(SalesBlock memory _publicSale)
        external
        onlyOperator
    {
        publicSale = _publicSale;
        emit AssignPublicSaleConfig(
            _publicSale.beginBlock,
            _publicSale.endBlock
        );
    }

    function setOverrideFinalDAPrice(uint256 price) external onlyOperator {
        finalDAPrice = price;
        emit OverrideFinalDAPrice(price);
    }

    function setDutchAuctionParam(
        uint256 size,
        uint256 lowerBoundPrice,
        uint256 factor
    ) external onlyOperator {
        dutchAuctionConfig.discountBlockSize = size;
        dutchAuctionConfig.lowerBoundPrice = lowerBoundPrice;
        dutchAuctionConfig.priceFactor = factor;
        emit AssignPriceDecayParameter(size, lowerBoundPrice, factor);
    }

    function setTransactionLimit(uint256 _dutchAuction, uint256 _freeMarket)
        external
        onlyOperator
    {
        saleConfig.maxDAMintPerTx = _dutchAuction;
        saleConfig.maxFMMintPerTx = _freeMarket;
        emit AssignTransactionLimit(_dutchAuction, _freeMarket);
    }

    function setPublicSalePrice(uint256 _price) external onlyOperator {
        publicSaleBeginPrice = _price;
        emit AssignPublicSalePrice(_price);
    }

    function setPrivateSaleCapPrice(uint256 _price) external onlyOperator {
        privateSalePriceCapped = _price;
        emit AssignPrivateSalePrice(_price);
    }

    function setCloseSale() external onlyOperator {
        overridedSaleState = OverrideSaleState.Close;
        emit ForceCloseSale();
    }

    function setPauseSale() external onlyOperator {
        overridedSaleState = OverrideSaleState.Pause;
        emit ForcePauseSale();
    }

    function resetOverridedSaleState() external onlyOperator {
        overridedSaleState = OverrideSaleState.None;
        emit ResetOverridedSaleState();
    }

    function setReserve(uint256 reserve) external onlyOperator {
        maxReserve = reserve;
        emit AssignReserveLimit(reserve);
    }

    function setDutchAuctionCap(uint256 cap) external onlyOperator {
        dutchAuctionCapped = cap;
        emit AssignDutchAuctionCap(cap);
    }

    function setPrivateSaleCap(uint256 cap) external onlyOperator {
        privateSaleCapped = cap;
        emit AssignPrivateSaleCap(cap);
    }

    function enableDutchAuction() external onlyOperator {
        salePhase = SalePhase.DutchAuction;
        emit EnableFairDutchAuction();
    }

    function enablePublicSale() external onlyOperator {
        salePhase = SalePhase.Public;
        emit EnablePublicSale();
    }

    function enablePrivateSale() external onlyOperator {
        salePhase = SalePhase.Private;
        emit EnablePrivateSale();
    }

    function getStartSaleBlock() external view returns (uint256) {
        if (salePhase == SalePhase.DutchAuction) {
            return dutchAuction.beginBlock;
        }

        if (salePhase == SalePhase.Private) {
            return privateSale.beginBlock;
        }

        if (salePhase == SalePhase.Public) {
            return publicSale.beginBlock;
        }

        return 0;
    }

    function getEndSaleBlock() external view returns (uint256) {
        if (salePhase == SalePhase.DutchAuction) {
            return dutchAuction.endBlock;
        }

        if (salePhase == SalePhase.Private) {
            return privateSale.endBlock;
        }

        if (salePhase == SalePhase.Public) {
            return publicSale.endBlock;
        }

        return 0;
    }

    function availableReserve() public view returns (uint256) {
        return maxReserve - saleStats.totalReserveMinted;
    }

    function getMaxSupplyByMode() external view returns (uint256) {
        SaleState state = getState();
        if (state == SaleState.DutchAuctionDuring)
            return dutchAuctionCapped;
        if (state == SaleState.PrivateSaleDuring) return privateSaleCapped;
        if (state == SaleState.PublicSaleDuring)
            return
                maxSupply -
                saleStats.totalOGMinted -
                saleStats.totalWLMinted -
                maxReserve -
                saleStats.totalDAMinted;
        return 0;
    }

    function getMintedByMode() external view returns (uint256) {
        SaleState state = getState();
        if (state == SaleState.PrivateSaleDuring)
            return saleStats.totalOGMinted + saleStats.totalWLMinted;
        if (state == SaleState.PublicSaleDuring)
            return saleStats.totalFMMinted;
        if (state == SaleState.DutchAuctionDuring)
            return saleStats.totalDAMinted;
        return 0;
    }

    function getTransactionCappedByMode() external view returns (uint256) {
        if (getState() == SaleState.DutchAuctionDuring)
            return saleConfig.maxDAMintPerTx;
        if (getState() == SaleState.PublicSaleDuring)
            return saleConfig.maxFMMintPerTx;
        return 2;
    }

    function getPriceByMode() public view returns (uint256) {
        SaleState state = getState();
        if (state == SaleState.DutchAuctionDuring) {
            uint256 passedBlock = block.number - dutchAuction.beginBlock;
            uint256 discountPrice = passedBlock
                .div(dutchAuctionConfig.discountBlockSize)
                .mul(dutchAuctionConfig.priceFactor);

            if (
                discountPrice >=
                publicSaleBeginPrice.sub(dutchAuctionConfig.lowerBoundPrice)
            ) {
                return dutchAuctionConfig.lowerBoundPrice;
            } else {
                return publicSaleBeginPrice.sub(discountPrice);
            }
        }

        if (state == SaleState.PrivateSaleDuring) {
            uint256 halfFinalPrice = finalDAPrice.div(2);
            return
                (halfFinalPrice > privateSalePriceCapped)
                    ? privateSalePriceCapped
                    : halfFinalPrice;
        }

        if (state == SaleState.PublicSaleDuring) {
            return finalDAPrice;
        }

        return publicSaleBeginPrice;
    }

    function totalPrivateSaleMinted() public view returns (uint256) {
        return saleStats.totalWLMinted + saleStats.totalOGMinted;
    }

    function isPrivateSaleSoldOut() public view returns (bool) {
        return totalPrivateSaleMinted() == privateSaleCapped;
    }

    function isDASoldOut() public view returns (bool) {
        return dutchAuctionCapped == saleStats.totalDAMinted;
    }

    function isSoldOut() public view returns (bool) {
        uint256 supplyWithoutReserve = maxSupply - maxReserve;
        uint256 mintedWithoutReserve = saleStats.totalDAMinted +
            saleStats.totalFMMinted +
            saleStats.totalOGMinted + 
            saleStats.totalWLMinted;
        return supplyWithoutReserve == mintedWithoutReserve;
    }

    function getStateName() external view returns (string memory) {
        SaleState state = getState();
        if (state == SaleState.DutchAuctionBeforeWithoutBlock)
            return "DutchAuctionBeforeWithoutBlock";
        if (state == SaleState.DutchAuctionBeforeWithBlock)
            return "DutchAuctionBeforeWithBlock";
        if (state == SaleState.DutchAuctionDuring) return "DutchAuctionDuring";
        if (state == SaleState.DutchAuctionEnd) return "DutchAuctionEnd";
        if (state == SaleState.DutchAuctionEndSoldOut)
            return "DutchAuctionEndSoldOut";
        if (state == SaleState.PrivateSaleBeforeWithoutBlock)
            return "PrivateSaleBeforeWithoutBlock";
        if (state == SaleState.PrivateSaleBeforeWithBlock)
            return "PrivateSaleBeforeWithBlock";
        if (state == SaleState.PrivateSaleDuring) return "PrivateSaleDuring";
        if (state == SaleState.PrivateSaleEnd) return "PrivateSaleEnd";
        if (state == SaleState.PrivateSaleEndSoldOut)
            return "PrivateSaleEndSoldOut";
        if (state == SaleState.PublicSaleBeforeWithoutBlock)
            return "PublicSaleBeforeWithoutBlock";
        if (state == SaleState.PublicSaleBeforeWithBlock)
            return "PublicSaleBeforeWithBlock";
        if (state == SaleState.PublicSaleDuring) return "PublicSaleDuring";
        if (state == SaleState.PublicSaleEnd) return "PublicSaleEnd";
        if (state == SaleState.PublicSaleEndSoldOut)
            return "PublicSaleEndSoldOut";
        if (state == SaleState.PauseSale) return "PauseSale";
        if (state == SaleState.AllSalesEnd) return "AllSalesEnd";

        return "NotStarted";
    }

    function getState() public view returns (SaleState) {
        if (overridedSaleState == OverrideSaleState.Close) {
            return SaleState.AllSalesEnd;
        }

        if (overridedSaleState == OverrideSaleState.Pause) {
            return SaleState.PauseSale;
        }

        if (salePhase == SalePhase.None) {
            return SaleState.NotStarted;
        }

        /******* Public Sale Phase Determination  *******/

        if (salePhase == SalePhase.Public) {
            if (isSoldOut()) {
                return SaleState.PublicSaleEndSoldOut;
            }

            if (publicSale.endBlock > 0 && block.number > publicSale.endBlock) {
                return SaleState.PublicSaleEnd;
            }

            if (
                publicSale.beginBlock > 0 &&
                block.number >= publicSale.beginBlock
            ) {
                return SaleState.PublicSaleDuring;
            }

            if (
                publicSale.beginBlock > 0 &&
                block.number < publicSale.beginBlock &&
                block.number > privateSale.endBlock
            ) {
                return SaleState.PublicSaleBeforeWithBlock;
            }

            if (
                publicSale.beginBlock == 0 &&
                block.number > privateSale.endBlock
            ) {
                return SaleState.PublicSaleBeforeWithoutBlock;
            }
        }
        /******* Private Sale Phase Determination  *******/
        if (salePhase == SalePhase.Private) {
            if (isPrivateSaleSoldOut()) {
                return SaleState.PrivateSaleEndSoldOut;
            }

            if (
                privateSale.endBlock > 0 && block.number > privateSale.endBlock
            ) {
                return SaleState.PrivateSaleEnd;
            }

            if (
                privateSale.beginBlock > 0 &&
                block.number >= privateSale.beginBlock
            ) {
                return SaleState.PrivateSaleDuring;
            }

            if (
                privateSale.beginBlock > 0 &&
                block.number < privateSale.beginBlock
            ) {
                return SaleState.PrivateSaleBeforeWithBlock;
            }

            if (privateSale.beginBlock == 0) {
                return SaleState.PrivateSaleBeforeWithoutBlock;
            }
        }
        /******* Dutch Auction Phase Determination  *******/
        if (salePhase == SalePhase.DutchAuction) {
            if (isDASoldOut()) {
                return SaleState.DutchAuctionEndSoldOut;
            }

            if (
                dutchAuction.endBlock > 0 &&
                block.number > dutchAuction.endBlock
            ) {
                return SaleState.DutchAuctionEnd;
            }

            if (
                dutchAuction.beginBlock > 0 &&
                block.number >= dutchAuction.beginBlock
            ) {
                return SaleState.DutchAuctionDuring;
            }

            if (
                dutchAuction.beginBlock > 0 &&
                block.number < dutchAuction.beginBlock
            ) {
                return SaleState.DutchAuctionBeforeWithBlock;
            }

            if (dutchAuction.beginBlock == 0) {
                return SaleState.DutchAuctionBeforeWithoutBlock;
            }
        }

        return SaleState.NotStarted;
    }
}

File 8 of 27 : Roles.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

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

abstract contract Roles is Ownable {
    address public operatorAddress;
    address public governorAddress;

    event AssignGovernorAddress(address indexed _address);
    event AssignOperatorAddress(address indexed _address);

    constructor() {}

    modifier onlyOperator() {
        require(
            msg.sender == operatorAddress,
            "Only operator allowed."
        );
        _;
    }

    modifier onlyGovernor() {
        require(
            msg.sender == governorAddress,
            "Only governor allowed."
        );
        _;
    }

    function setOperatorAddress(address _operator) external onlyOwner {
        require(_operator != address(0), "Cannot assign 0x0");
        operatorAddress = _operator;
        emit AssignOperatorAddress(_operator);
    }

    function setGovernorAddress(address _governor) external onlyOwner {
        require(_governor != address(0), "Cannot assign 0x0");
        governorAddress = _governor;
        emit AssignGovernorAddress(_governor);
    }
}

File 9 of 27 : Revealable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Roles.sol";

abstract contract Revealable is VRFConsumerBase, Roles {
    bool public randomseedRequested;
    bytes32 public keyHash;
    uint256 public revealBlock;
    uint256 public seed;
    string public revealedBaseURI;
    string public defaultURI;

    event RandomseedRequested(uint256 timestamp);
    event RandomseedFulfilmentSuccess(
        uint256 timestamp,
        bytes32 requestId,
        uint256 seed
    );
    event RandomseedFulfilmentFail(uint256 timestamp, bytes32 requestId);
    event SetRevealedBaseURI(string _baseURI);
    event SetRevealBlock(uint256 blockNumber);
    event SetDefaultURI(string uri);

    constructor(
        string memory _defaultUri,
        address _coordinator,
        address _linkToken,
        bytes32 _keyHash
    ) VRFConsumerBase(_coordinator, _linkToken) {
        defaultURI = _defaultUri;
        keyHash = _keyHash;
    }

    function setDefaultURI(string memory _defaultURI) external onlyOperator {
        require(!isRevealed(), "Already revealed");

        defaultURI = _defaultURI;
        emit SetDefaultURI(_defaultURI);
    }

    function setRevealBlock(uint256 blockNumber) external onlyOperator {
        revealBlock = blockNumber;
        emit SetRevealBlock(blockNumber);
    }

    function setRevealedBaseURI(string memory _baseURI) external onlyOperator {
        revealedBaseURI = _baseURI;
        emit SetRevealedBaseURI(_baseURI);
    }

    function requestChainlinkVRF() external onlyOperator {
        require(!randomseedRequested, "Chainlink VRF already requested");
        require(
            LINK.balanceOf(address(this)) >= 2000000000000000000,
            "Insufficient LINK"
        );
        requestRandomness(keyHash, 2000000000000000000);
        randomseedRequested = true;
        emit RandomseedRequested(block.timestamp);
    }

    function fulfillRandomness(bytes32 requestId, uint256 randomNumber)
        internal
        override
    {
        if (randomNumber > 0) {
            seed = randomNumber;
            emit RandomseedFulfilmentSuccess(block.timestamp, requestId, seed);
        } else {
            seed = 1;
            emit RandomseedFulfilmentFail(block.timestamp, requestId);
        }
    }

    function isRevealed() public view returns (bool) {
        return seed > 0 && revealBlock > 0 && block.number > revealBlock;
    }

    function getShuffledId(
        uint256 totalSupply,
        uint256 maxSupply,
        uint256 tokenId,
        uint256 startIndex
    ) public view returns (string memory) {
        if (_msgSender() != owner()) {
            require(tokenId <= totalSupply, "Token not exists");
        }

        if (!isRevealed()) return "default";

        uint256[] memory metadata = new uint256[](maxSupply + 1);

        for (uint256 i = 1; i <= maxSupply; i += 1) {
            metadata[i] = i;
        }

        for (uint256 i = startIndex; i <= maxSupply; i += 1) {
            uint256 j = (uint256(keccak256(abi.encode(seed, i))) %
                (maxSupply)) + 1;

            (metadata[i], metadata[j]) = (metadata[j], metadata[i]);
        }

        return Strings.toString(metadata[tokenId]);
    }
}

File 10 of 27 : RequestSigning.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Roles.sol";

abstract contract RequestSigning is Ownable, Roles {
    using ECDSA for bytes32;

    event AssignWhitelistSigningKey(address indexed _address);
    event AssignOgSigningKey(address indexed _address);

    // The key(s) used to sign whitelist signatures.
    // We will check to ensure that the key that signed the signature
    // is this one that we expect.
    address public whitelistKey = address(0);
    address public ogKey = address(0);

    // Domain Separator is the EIP-712 defined structure that defines what contract
    // and chain these signatures can be used for.  This ensures people can't take
    // a signature used to mint on one contract and use it for another, or a signature
    // from testnet to replay on mainnet.
    // It has to be created in the constructor so we can dynamically grab the chainId.
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator
    bytes32 public domainSeparator;

    // The typehash for the data type specified in the structured data
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash
    // This should match whats in the client side whitelist signing code
    bytes32 public constant MINTER_TYPEHASH =
        keccak256("Minter(address wallet)");

    constructor(string memory _schemeName) {
        // This should match whats in the client side whitelist signing code
        domainSeparator = keccak256(
            abi.encode(
                keccak256(
                    "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
                ),
                // This should match the domain you set in your client side signing.
                keccak256(bytes.concat(bytes(_schemeName), bytes("Whitelist"))),
                keccak256(bytes("1")),
                block.chainid,
                address(this)
            )
        );
    }

    function setWhitelistSigningKey(address newSigningKey)
        external
        onlyOperator
    {
        whitelistKey = newSigningKey;
        emit AssignWhitelistSigningKey(newSigningKey);
    }

    function setOgSigningKey(address newSigningKey) external onlyOperator {
        ogKey = newSigningKey;
        emit AssignOgSigningKey(newSigningKey);
    }

    function isWhiteListed(bytes calldata signature)
        public
        view
        returns (bool)
    {
        require(whitelistKey != address(0), "WL key not assigned");
        return getEIP712RecoverAddress(signature) == whitelistKey;
    }

    function isOG(bytes calldata signature) public view returns (bool) {
        require(ogKey != address(0), "OG key not assigned");
        return getEIP712RecoverAddress(signature) == ogKey;
    }

    function getEIP712RecoverAddress(bytes calldata signature)
        internal
        view
        returns (address)
    {
        // Verify EIP-712 signature by recreating the data structure
        // that we signed on the client side, and then using that to recover
        // the address that signed the signature for this data.
        // Signature begin with \x19\x01, see: https://eips.ethereum.org/EIPS/eip-712
        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                keccak256(abi.encode(MINTER_TYPEHASH, msg.sender))
            )
        );

        // Use the recover method to see what address was used to create
        // the signature on this data.
        // Note that if the digest doesn't exactly match what was signed we'll
        // get a random recovered address.
        return digest.recover(signature);
    }
}

File 11 of 27 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 14 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 15 of 27 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * 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;

    /**
     * @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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 16 of 27 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 21 of 27 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 24 of 27 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {
  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBase expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomness the VRF output
   */
  function fulfillRandomness(bytes32 requestId, uint256 randomness) internal virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 private constant USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(bytes32 _keyHash, uint256 _fee) internal returns (bytes32 requestId) {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* nonce */
    private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(address _vrfCoordinator, address _link) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 25 of 27 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 26 of 27 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {
  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  ) internal pure returns (uint256) {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

File 27 of 27 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_startPrice","type":"uint256"},{"internalType":"string","name":"_defaultURI","type":"string"},{"components":[{"internalType":"address","name":"coordinator","type":"address"},{"internalType":"address","name":"linkToken","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"internalType":"struct Otoro.ChainLinkParams","name":"chainLinkParams","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct Otoro.RevenueShareParams","name":"revenueShare","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Airdrop","type":"event"},{"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":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"AssignDutchAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignDutchAuctionCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignDutchAuctionConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignGovernorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignOgSigningKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignOperatorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lowerBoundPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_priceFactor","type":"uint256"}],"name":"AssignPriceDecayParameter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignPrivateSaleCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignPrivateSaleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AssignPrivateSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignPrivateSapeCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignPublicSaleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AssignPublicSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"AssignReserveLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_dutchAuction","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_freeMarket","type":"uint256"}],"name":"AssignTransactionLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignWhitelistSigningKey","type":"event"},{"anonymous":false,"inputs":[],"name":"EnableFairDutchAuction","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePrivateSale","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePublicSale","type":"event"},{"anonymous":false,"inputs":[],"name":"ForceCloseSale","type":"event"},{"anonymous":false,"inputs":[],"name":"ForcePauseSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"OverrideFinalDAPrice","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":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Purchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RandomseedFulfilmentFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"}],"name":"RandomseedFulfilmentSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RandomseedRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Release","type":"event"},{"anonymous":false,"inputs":[],"name":"ResetOverridedSaleState","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetDefaultURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"SetRevealBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_baseURI","type":"string"}],"name":"SetRevealedBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"WithdrawNonPurchaseFund","type":"event"},{"inputs":[],"name":"MINTER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","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":"availableReserve","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":"defaultURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuction","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionConfig","outputs":[{"internalType":"uint256","name":"discountBlockSize","type":"uint256"},{"internalType":"uint256","name":"lowerBoundPrice","type":"uint256"},{"internalType":"uint256","name":"priceFactor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"dutchAuctionInfo","outputs":[{"components":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint8","name":"amount","type":"uint8"}],"internalType":"struct Otoro.MintInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableDutchAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enablePrivateSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enablePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"fairDAInfo","outputs":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint8","name":"amount","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalDAPrice","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":"getEndSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxSupplyByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startIndex","type":"uint256"}],"name":"getShuffledId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"internalType":"enum BlockbasedSale.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStateName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransactionCappedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDASoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isOG","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPrivateSaleSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isWhiteListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintOg","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overridedSaleState","outputs":[{"internalType":"enum BlockbasedSale.OverrideSaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSaleCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSalePriceCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleBeginPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomseedRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestChainlinkVRF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetOverridedSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revealedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleConfig","outputs":[{"internalType":"uint256","name":"maxDAMintPerTx","type":"uint256"},{"internalType":"uint256","name":"maxFMMintPerTx","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePhase","outputs":[{"internalType":"enum BlockbasedSale.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStats","outputs":[{"internalType":"uint256","name":"totalReserveMinted","type":"uint256"},{"internalType":"uint256","name":"totalDAMinted","type":"uint256"},{"internalType":"uint256","name":"totalOGMinted","type":"uint256"},{"internalType":"uint256","name":"totalWLMinted","type":"uint256"},{"internalType":"uint256","name":"totalFMMinted","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setCloseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_defaultURI","type":"string"}],"name":"setDefaultURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_dutchAuction","type":"tuple"}],"name":"setDutchAuctionBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setDutchAuctionCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"lowerBoundPrice","type":"uint256"},{"internalType":"uint256","name":"factor","type":"uint256"}],"name":"setDutchAuctionParam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"setGovernorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setOgSigningKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setOverrideFinalDAPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_privateSale","type":"tuple"}],"name":"setPrivateSaleBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setPrivateSaleCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrivateSaleCapPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_publicSale","type":"tuple"}],"name":"setPublicSaleBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reserve","type":"uint256"}],"name":"setReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"setRevealBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setRevealedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dutchAuction","type":"uint256"},{"internalType":"uint256","name":"_freeMarket","type":"uint256"}],"name":"setTransactionLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setWhitelistSigningKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPrivateSaleMinted","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":[],"name":"whitelistKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052601a805461ffff191690556127106025556706f05b59d3b20000602755602c80546001600160a01b0319908116909155602d805490911690553480156200004a57600080fd5b5060405162007857380380620078578339810160408190526200006d916200066a565b8151602083015160408401516001600160a01b0380841660a05282166080528892869290918b856200009f3362000248565b8151620000b49060029060208501906200029a565b508051620000ca9060039060208401906200029a565b50506001600c55508351620000e79060139060208701906200029a565b50600f555050604080518082018252600981526815da1a5d195b1a5cdd60ba1b60208083019190915291517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f93506200014492859291016200074c565b60408051808303601f190181528282528051602091820120838301835260018452603160f81b938201939093528151908101939093528201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152908290528051602091820120602e5583519084015190925090620001e39062000329565b620001f09291906200077f565b604051809103906000f0801580156200020d573d6000803e3d6000fd5b50603180546001600160a01b0319166001600160a01b0392909216919091179055505050602591909155602881905560295550620008439050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002a89062000807565b90600052602060002090601f016020900481019282620002cc576000855562000317565b82601f10620002e757805160ff191683800117855562000317565b8280016001018555821562000317579182015b8281111562000317578251825591602001919060010190620002fa565b506200032592915062000337565b5090565b61116080620066f783390190565b5b8082111562000325576000815560010162000338565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200038957620003896200034e565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620003ba57620003ba6200034e565b604052919050565b60005b83811015620003df578181015183820152602001620003c5565b83811115620003ef576000848401525b50505050565b600082601f8301126200040757600080fd5b81516001600160401b038111156200042357620004236200034e565b62000438601f8201601f19166020016200038f565b8181528460208386010111156200044e57600080fd5b62000461826020830160208701620003c2565b949350505050565b80516001600160a01b03811681146200048157600080fd5b919050565b6000606082840312156200049957600080fd5b604051606081016001600160401b0381118282101715620004be57620004be6200034e565b604052905080620004cf8362000469565b8152620004df6020840162000469565b6020820152604083015160408201525092915050565b60006001600160401b038211156200051157620005116200034e565b5060051b60200190565b600082601f8301126200052d57600080fd5b81516020620005466200054083620004f5565b6200038f565b82815260059290921b840181019181810190868411156200056657600080fd5b8286015b848110156200058357805183529183019183016200056a565b509695505050505050565b600060408284031215620005a157600080fd5b620005ab62000364565b82519091506001600160401b0380821115620005c657600080fd5b818401915084601f830112620005db57600080fd5b81516020620005ee6200054083620004f5565b82815260059290921b840181019181810190888411156200060e57600080fd5b948201945b838610156200063757620006278662000469565b8252948201949082019062000613565b865250858101519350828411156200064e57600080fd5b6200065c878588016200051b565b818601525050505092915050565b6000806000806000806000610120888a0312156200068757600080fd5b87516001600160401b03808211156200069f57600080fd5b620006ad8b838c01620003f5565b985060208a0151915080821115620006c457600080fd5b620006d28b838c01620003f5565b975060408a0151965060608a0151955060808a0151915080821115620006f757600080fd5b620007058b838c01620003f5565b9450620007168b60a08c0162000486565b93506101008a01519150808211156200072e57600080fd5b506200073d8a828b016200058e565b91505092959891949750929550565b6000835162000760818460208801620003c2565b83519083019062000776818360208801620003c2565b01949350505050565b604080825283519082018190526000906020906060840190828701845b82811015620007c35781516001600160a01b0316845292840192908401906001016200079c565b5050508381038285015284518082528583019183019060005b81811015620007fa57835183529284019291840191600101620007dc565b5090979650505050505050565b600181811c908216806200081c57607f821691505b6020821081036200083d57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051615e8062000877600039600081816135620152614948015260008181613bd601526149190152615e806000f3fe6080604052600436106105235760003560e01c8063791a2519116102a2578063c67e8b6811610165578063dddb91ba116100cc578063efc4bc7c11610085578063efc4bc7c14610fd8578063f15c85b414610fee578063f2fde38b1461100e578063f3b3a9fa1461102e578063f698da2514611044578063fa4d280c1461105a57600080fd5b8063dddb91ba14610ecd578063df20ad8f14610eed578063dfe363ef14610f2e578063e4f2487a14610f43578063e83d508b14610f6f578063e985e9c514610f8f57600080fd5b8063d1fe033d1161011e578063d1fe033d14610e20578063d2c1f20614610e35578063d5abeb0114610e4a578063d5b1ae5e14610e60578063da1b9e0814610e8d578063da324a3014610ead57600080fd5b8063c67e8b6814610d8c578063c87b56dd14610dac578063c91621c214610dcc578063c9a8d9f714610de1578063ccc5d84714610df6578063d0b77ab414610e0b57600080fd5b806395d89b4111610209578063b6eb6d69116101c2578063b6eb6d6914610ce6578063b78ef4cb14610d06578063b88d4fde14610d1c578063ba1f879f14610d3c578063be008ccb14610d57578063c204642c14610d6c57600080fd5b806395d89b4114610c445780639b154a7114610c595780639da0d7d414610c6e578063a22cb46514610c89578063a2fb7b5d14610ca9578063aab4b09e14610cd057600080fd5b8063870843131161025b5780638708431314610b9d5780638da5cb5b14610bbd5780639024fc9614610bdb57806390aa0b0f14610bf0578063933edbb814610c0b57806394985ddd14610c2457600080fd5b8063791a251914610ad8578063792bce7014610af85780637a9e1d0314610b185780637bd07f8b14610b385780637d94792a14610b725780637ee7866114610b8857600080fd5b806333bc1c5c116103ea5780635626e404116103515780636c635d3f1161030a5780636c635d3f14610a395780636e83843a14610a5957806370a0823114610a79578063715018a614610a9957806373b19e8f14610aae578063776451b014610ac357600080fd5b80635626e404146109a55780635e9f9613146109c557806361728f39146109da5780636238e9f4146109f05780636352211e14610a0357806366bb81c714610a2357600080fd5b80634256dbe3116103a35780634256dbe3146108fb57806342842e0e1461091b578063447321801461093b57806349aaa5d9146109505780634f6ccce71461097057806354214f691461099057600080fd5b806333bc1c5c146108565780633584602814610886578063398c0ec11461089c5780633a367a67146108b15780633ccfd60b146108c65780633da65fc1146108db57600080fd5b8063191655871161048e578063276f1c4111610447578063276f1c41146107ab5780632da5ea17146107cb5780632ee723fb146107e05780632f1d5a60146107f65780632f745c591461081657806330878ba91461083657600080fd5b806319165587146106f65780631bae492e146107165780631cbe14c91461073657806320510b55146107565780632316b4da1461077657806323b872dd1461078b57600080fd5b80630f30cde0116104e05780630f30cde01461061d5780631197705e14610630578063127effb214610650578063166ca2bc1461067057806318160ddd146106bf5780631865c57d146106d457600080fd5b806301ffc9a71461052857806302410f471461055d578063031ab9f51461057e57806306fdde03146105a1578063081812fc146105c3578063095ea7b3146105fb575b600080fd5b34801561053457600080fd5b506105486105433660046153e5565b61108e565b60405190151581526020015b60405180910390f35b34801561056957600080fd5b50600e5461054890600160a01b900460ff1681565b34801561058a57600080fd5b5061059361109f565b604051908152602001610554565b3480156105ad57600080fd5b506105b6611125565b604051610554919061545a565b3480156105cf57600080fd5b506105e36105de36600461546d565b6111b7565b6040516001600160a01b039091168152602001610554565b34801561060757600080fd5b5061061b61061636600461549b565b611251565b005b61054861062b366004615509565b611366565b34801561063c57600080fd5b5061061b61064b366004615555565b611972565b34801561065c57600080fd5b50600d546105e3906001600160a01b031681565b34801561067c57600080fd5b50601e54601f54602054602154602254610697949392919085565b604080519586526020860194909452928401919091526060830152608082015260a001610554565b3480156106cb57600080fd5b50600a54610593565b3480156106e057600080fd5b506106e9611a30565b6040516105549190615588565b34801561070257600080fd5b5061061b610711366004615555565b611c94565b34801561072257600080fd5b50602c546105e3906001600160a01b031681565b34801561074257600080fd5b5061061b6107513660046155a2565b611e61565b34801561076257600080fd5b5061061b610771366004615555565b611ed3565b34801561078257600080fd5b5061061b611f47565b34801561079757600080fd5b5061061b6107a63660046155c4565b611fab565b3480156107b757600080fd5b50600e546105e3906001600160a01b031681565b3480156107d757600080fd5b50610548611fdc565b3480156107ec57600080fd5b50610593602b5481565b34801561080257600080fd5b5061061b610811366004615555565b612029565b34801561082257600080fd5b5061059361083136600461549b565b6120e7565b34801561084257600080fd5b506105b6610851366004615605565b61217d565b34801561086257600080fd5b50601854601954610871919082565b60408051928352602083019190915201610554565b34801561089257600080fd5b5061059360295481565b3480156108a857600080fd5b506105936123b2565b3480156108bd57600080fd5b506105b66124b2565b3480156108d257600080fd5b5061061b612540565b3480156108e757600080fd5b506105486108f6366004615637565b6125ca565b34801561090757600080fd5b5061061b61091636600461546d565b612642565b34801561092757600080fd5b5061061b6109363660046155c4565b6126a1565b34801561094757600080fd5b5061061b6126bc565b34801561095c57600080fd5b5061061b61096b36600461546d565b61271b565b34801561097c57600080fd5b5061059361098b36600461546d565b61277a565b34801561099c57600080fd5b5061054861280d565b3480156109b157600080fd5b5061061b6109c036600461546d565b612834565b3480156109d157600080fd5b50610593612893565b3480156109e657600080fd5b50610593600f5481565b6105486109fe366004615637565b6128a5565b348015610a0f57600080fd5b506105e3610a1e36600461546d565b612b55565b348015610a2f57600080fd5b5061059360105481565b348015610a4557600080fd5b5061061b610a5436600461546d565b612bcc565b348015610a6557600080fd5b5061061b610a74366004615718565b612c2b565b348015610a8557600080fd5b50610593610a94366004615555565b612c98565b348015610aa557600080fd5b5061061b612d1f565b348015610aba57600080fd5b50610593612d55565b348015610acf57600080fd5b50610593612e02565b348015610ae457600080fd5b5061061b610af336600461546d565b612e7a565b348015610b0457600080fd5b5061061b610b13366004615761565b612ed9565b348015610b2457600080fd5b50610548610b33366004615637565b612f58565b348015610b4457600080fd5b50601b54601c54601d54610b5792919083565b60408051938452602084019290925290820152606001610554565b348015610b7e57600080fd5b5061059360115481565b348015610b9457600080fd5b506105b6612fbf565b348015610ba957600080fd5b5061061b610bb836600461578d565b6134d6565b348015610bc957600080fd5b506001546001600160a01b03166105e3565b348015610be757600080fd5b50610593613545565b348015610bfc57600080fd5b50602354602454610871919082565b348015610c1757600080fd5b50601f54602b5414610548565b348015610c3057600080fd5b5061061b610c3f3660046155a2565b613557565b348015610c5057600080fd5b506105b66135dd565b348015610c6557600080fd5b506105b66135ec565b348015610c7a57600080fd5b50601454601554610871919082565b348015610c9557600080fd5b5061061b610ca43660046157ea565b6135f9565b348015610cb557600080fd5b50601a54610cc39060ff1681565b6040516105549190615823565b348015610cdc57600080fd5b5061059360275481565b348015610cf257600080fd5b5061061b610d01366004615555565b613604565b348015610d1257600080fd5b5061059360285481565b348015610d2857600080fd5b5061061b610d37366004615837565b613678565b348015610d4857600080fd5b50601654601754610871919082565b348015610d6357600080fd5b5061061b6136b0565b348015610d7857600080fd5b5061061b610d873660046158b7565b613712565b348015610d9857600080fd5b5061061b610da736600461578d565b6138c6565b348015610db857600080fd5b506105b6610dc736600461546d565b613935565b348015610dd857600080fd5b50610593613a5d565b348015610ded57600080fd5b50610593613ab3565b348015610e0257600080fd5b5061061b613b33565b348015610e1757600080fd5b50610548613cef565b348015610e2c57600080fd5b5061061b613d02565b348015610e4157600080fd5b5061061b613d66565b348015610e5657600080fd5b5061059360255481565b348015610e6c57600080fd5b50610e80610e7b366004615555565b613dca565b604051610554919061596f565b348015610e9957600080fd5b5061061b610ea8366004615718565b613e56565b348015610eb957600080fd5b5061061b610ec836600461546d565b613f0b565b348015610ed957600080fd5b5061061b610ee836600461578d565b613f6a565b348015610ef957600080fd5b50610f0d610f0836600461549b565b613fd8565b604080516001600160801b03909316835260ff909116602083015201610554565b348015610f3a57600080fd5b5061061b61401b565b348015610f4f57600080fd5b50601a54610f6290610100900460ff1681565b60405161055491906159ca565b348015610f7b57600080fd5b5061061b610f8a36600461546d565b61407d565b348015610f9b57600080fd5b50610548610faa3660046159de565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610fe457600080fd5b50610593602a5481565b348015610ffa57600080fd5b50602d546105e3906001600160a01b031681565b34801561101a57600080fd5b5061061b611029366004615555565b6140dc565b34801561103a57600080fd5b5061059360265481565b34801561105057600080fd5b50610593602e5481565b34801561106657600080fd5b506105937f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b600061109982614177565b92915050565b60006001601a54610100900460ff1660038111156110bf576110bf615572565b036110cb575060155490565b6002601a54610100900460ff1660038111156110e9576110e9615572565b036110f5575060175490565b6003601a54610100900460ff16600381111561111357611113615572565b0361111f575060195490565b50600090565b60606002805461113490615a0c565b80601f016020809104026020016040519081016040528092919081815260200182805461116090615a0c565b80156111ad5780601f10611182576101008083540402835291602001916111ad565b820191906000526020600020905b81548152906001019060200180831161119057829003601f168201915b5050505050905090565b6000818152600460205260408120546001600160a01b03166112355760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061125c82612b55565b9050806001600160a01b0316836001600160a01b0316036112c95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161122c565b336001600160a01b03821614806112e557506112e58133610faa565b6113575760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161122c565b611361838361419c565b505050565b60006002600c540361138a5760405162461bcd60e51b815260040161122c90615a46565b6002600c556000611399611a30565b90503332146113e55760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b60088160118111156113f9576113f9615572565b14806114165750600d81601181111561141457611414615572565b145b806114325750600381601181111561143057611430615572565b145b6114745760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b61148661147f6123b2565b869061420a565b3410156114cb5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b60038160118111156114df576114df615572565b0361158d576023548511156115365760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b602b54601f54611546908761421d565b111561158d5760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b604482015260640161122c565b600d8160118111156115a1576115a1615572565b03611667576024548511156115f85760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b602554611619611606612893565b61161388611613600a5490565b9061421d565b11156116675760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e0000000000604482015260640161122c565b600881601181111561167b5761167b615572565b036117e35761168a84846125ca565b6116c95760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b604482015260640161122c565b600285111561171a5760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974730000604482015260640161122c565b336000908152602f6020526040902054600290611738908790615a93565b11156117865760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e00604482015260640161122c565b602a5461179586611613613545565b11156117e35760405162461bcd60e51b815260206004820152601c60248201527f5075726368617365206578636565642073616c65206361707065642e00000000604482015260640161122c565b6117ed3386614229565b50600381601181111561180257611802615572565b036118a857601f54611814908661421d565b601f55600061182334876142b4565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b0270ffffffffffffffffffffffffffffffffff199093169116171790556029549091508110156118a65760298190555b505b600d8160118111156118bc576118bc615572565b036118d2576022546118ce908661421d565b6022555b60088160118111156118e6576118e6615572565b0361192757336000908152602f6020526040902054611906908690615a93565b336000908152602f6020526040902055602154611923908661421d565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611960573d6000803e3d6000fd5b5060019150506001600c559392505050565b6001546001600160a01b0316331461199c5760405162461bcd60e51b815260040161122c90615aab565b6001600160a01b0381166119e65760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff166002811115611a4b57611a4b615572565b03611a565750601190565b6001601a5460ff166002811115611a6f57611a6f615572565b03611a7a5750601090565b6000601a54610100900460ff166003811115611a9857611a98615572565b03611aa35750600090565b6003601a54610100900460ff166003811115611ac157611ac1615572565b03611b5a57611ace611fdc565b15611ad95750600f90565b60195415801590611aeb575060195443115b15611af65750600e90565b60185415801590611b0957506018544310155b15611b145750600d90565b60185415801590611b26575060185443105b8015611b33575060175443115b15611b3e5750600c90565b601854158015611b4f575060175443115b15611b5a5750600b90565b6002601a54610100900460ff166003811115611b7857611b78615572565b03611bf857611b85613cef565b15611b905750600a90565b60175415801590611ba2575060175443115b15611bad5750600990565b60165415801590611bc057506016544310155b15611bcb5750600890565b60165415801590611bdd575060165443105b15611be85750600790565b601654600003611bf85750600690565b6001601a54610100900460ff166003811115611c1657611c16615572565b0361111f57601f54602b5403611c2c5750600590565b60155415801590611c3e575060155443115b15611c495750600490565b60145415801590611c5c57506014544310155b15611c675750600390565b60145415801590611c79575060145443105b15611c845750600290565b60145460000361111f5750600190565b60315460405163673e156160e11b81523360048201526000916001600160a01b03169063ce7c2ac290602401602060405180830381865afa158015611cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d019190615ae0565b1180611d1757506001546001600160a01b031633145b611d5b5760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b604482015260640161122c565b336001600160a01b0382161480611d7c57506001546001600160a01b031633145b611dc15760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b604482015260640161122c565b603154604051631916558760e01b81526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015611e0857600080fd5b505af1158015611e1c573d6000803e3d6000fd5b50506040516001600160a01b03841681527f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba205925060200190505b60405180910390a150565b600d546001600160a01b03163314611e8b5760405162461bcd60e51b815260040161122c90615af9565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611efd5760405162461bcd60e51b815260040161122c90615af9565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611f715760405162461bcd60e51b815260040161122c90615af9565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b611fb533826142c0565b611fd15760405162461bcd60e51b815260040161122c90615b29565b6113618383836143b6565b600080602654602554611fef9190615b7a565b602154602054602254601f5493945060009361200b9190615a93565b6120159190615a93565b61201f9190615a93565b9190911492915050565b6001546001600160a01b031633146120535760405162461bcd60e51b815260040161122c90615aab565b6001600160a01b03811661209d5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b60006120f283612c98565b82106121545760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161122c565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b60606121916001546001600160a01b031690565b6001600160a01b0316336001600160a01b0316146121ec57848311156121ec5760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b604482015260640161122c565b6121f461280d565b61221c5750604080518082019091526007815266191959985d5b1d60ca1b60208201526123aa565b6000612229856001615a93565b67ffffffffffffffff81111561224157612241615679565b60405190808252806020026020018201604052801561226a578160200160208202803683370190505b50905060015b8581116122a7578082828151811061228a5761228a615b91565b60209081029190910101526122a0600182615a93565b9050612270565b50825b85811161238357600086601154836040516020016122d2929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6122f59190615bbd565b612300906001615a93565b905082818151811061231457612314615b91565b602002602001015183838151811061232e5761232e615b91565b602002602001015184848151811061234857612348615b91565b6020026020010185848151811061236157612361615b91565b6020908102919091010191909152525061237c600182615a93565b90506122aa565b506123a681858151811061239957612399615b91565b602002602001015161455d565b9150505b949350505050565b6000806123bd611a30565b905060038160118111156123d3576123d3615572565b03612443576014546000906123e89043615b7a565b601d54601b5491925060009161240a91906124049085906142b4565b9061420a565b601c5460285491925061241d919061465e565b811061242e575050601c5492915050565b60285461243b908261465e565b935050505090565b600881601181111561245757612457615572565b036124895760295460009061246d9060026142b4565b9050602754811161247e5780612482565b6027545b9250505090565b600d81601181111561249d5761249d615572565b036124aa57505060295490565b505060285490565b601380546124bf90615a0c565b80601f01602080910402602001604051908101604052809291908181526020018280546124eb90615a0c565b80156125385780601f1061250d57610100808354040283529160200191612538565b820191906000526020600020905b81548152906001019060200180831161251b57829003601f168201915b505050505081565b600d546001600160a01b0316331461256a5760405162461bcd60e51b815260040161122c90615af9565b6040514790339082156108fc029083906000818181858888f19350505050158015612599573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611e56565b602c546000906001600160a01b031661261b5760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602c546001600160a01b0316612631848461466a565b6001600160a01b0316149392505050565b600d546001600160a01b0316331461266c5760405162461bcd60e51b815260040161122c90615af9565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611e56565b61136183838360405180602001604052806000815250613678565b600d546001600160a01b031633146126e65760405162461bcd60e51b815260040161122c90615af9565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b031633146127455760405162461bcd60e51b815260040161122c90615af9565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611e56565b6000612785600a5490565b82106127e85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161122c565b600a82815481106127fb576127fb615b91565b90600052602060002001549050919050565b60008060115411801561282257506000601054115b801561282f575060105443115b905090565b600d546001600160a01b0316331461285e5760405162461bcd60e51b815260040161122c90615af9565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611e56565b601e5460265460009161282f91615b7a565b60006002600c54036128c95760405162461bcd60e51b815260040161122c90615a46565b6002600c553332146129185760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b6008612922611a30565b601181111561293357612933615572565b146129765760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b6129808383612f58565b6129c25760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b604482015260640161122c565b3360009081526030602052604090205415612a155760405162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9021b630b4b6b2b21027a39760691b604482015260640161122c565b602a54612a256001611613613545565b1115612a735760405162461bcd60e51b815260206004820152601960248201527f45786365656420507269766174652053616c65204c696d697400000000000000604482015260640161122c565b612a7b6123b2565b341015612ac05760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b33600090815260306020526040902054612adb906001615a93565b3360009081526030602090815260409091209190915554612afd90600161421d565b602055612b0b336001614229565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015612b45573d6000803e3d6000fd5b50600190506001600c5592915050565b6000818152600460205260408120546001600160a01b0316806110995760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161122c565b600d546001600160a01b03163314612bf65760405162461bcd60e51b815260040161122c90615af9565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611e56565b600d546001600160a01b03163314612c555760405162461bcd60e51b815260040161122c90615af9565b8051612c68906012906020840190615336565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611e56919061545a565b60006001600160a01b038216612d035760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161122c565b506001600160a01b031660009081526005602052604090205490565b6001546001600160a01b03163314612d495760405162461bcd60e51b815260040161122c90615aab565b612d53600061473e565b565b600080612d60611a30565b90506003816011811115612d7657612d76615572565b03612d83575050602b5490565b6008816011811115612d9757612d97615572565b03612da4575050602a5490565b600d816011811115612db857612db8615572565b03612dfa57601f54602654602154602054602554612dd69190615b7a565b612de09190615b7a565b612dea9190615b7a565b612df49190615b7a565b91505090565b600091505090565b600080612e0d611a30565b90506008816011811115612e2357612e23615572565b03612e3857602154602054612df49190615a93565b600d816011811115612e4c57612e4c615572565b03612e5957505060225490565b6003816011811115612e6d57612e6d615572565b03612dfa575050601f5490565b600d546001600160a01b03163314612ea45760405162461bcd60e51b815260040161122c90615af9565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611e56565b600d546001600160a01b03163314612f035760405162461bcd60e51b815260040161122c90615af9565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b0316612fa95760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602d546001600160a01b0316612631848461466a565b60606000612fcb611a30565b90506001816011811115612fe157612fe1615572565b0361301f57505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b600281601181111561303357613033615572565b0361307157505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b600381601181111561308557613085615572565b036130b8575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b60048160118111156130cc576130cc615572565b036130fc57505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b600581601181111561311057613110615572565b03613147575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b600681601181111561315b5761315b615572565b0361319957505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b60078160118111156131ad576131ad615572565b036131eb57505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b60088160118111156131ff576131ff615572565b036132315750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b600981601181111561324557613245615572565b0361327457505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a81601181111561328857613288615572565b036132be575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b8160118111156132d2576132d2615572565b0361331057505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c81601181111561332457613324615572565b0361336257505060408051808201909152601981527f5075626c696353616c654265666f726557697468426c6f636b00000000000000602082015290565b600d81601181111561337657613376615572565b036133a757505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e8160118111156133bb576133bb615572565b036133e957505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f8160118111156133fd576133fd615572565b03613432575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b601081601181111561344657613446615572565b03613470575050604080518082019091526009815268506175736553616c6560b81b602082015290565b601181601181111561348457613484615572565b036134b057505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b031633146135005760405162461bcd60e51b815260040161122c90615af9565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611e56565b60205460215460009161282f91615a93565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146135cf5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161122c565b6135d98282614790565b5050565b60606003805461113490615a0c565b601280546124bf90615a0c565b6135d9338383614814565b600d546001600160a01b0316331461362e5760405162461bcd60e51b815260040161122c90615af9565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b61368233836142c0565b61369e5760405162461bcd60e51b815260040161122c90615b29565b6136aa848484846148e2565b50505050565b600d546001600160a01b031633146136da5760405162461bcd60e51b815260040161122c90615af9565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b6002600c54036137345760405162461bcd60e51b815260040161122c90615a46565b6002600c55600d546001600160a01b031633146137635760405162461bcd60e51b815260040161122c90615af9565b602554825161377e90613776908461420a565b600a54611613565b11156137cc5760405162461bcd60e51b815260206004820152601860248201527f457863656564206d617820737570706c79206c696d69742e0000000000000000604482015260640161122c565b60265482516137e8906137df908461420a565b601e549061421d565b111561382e5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b604482015260640161122c565b815161383e906137df908361420a565b601e5560005b82518110156138835761387083828151811061386257613862615b91565b602002602001015183614229565b508061387b81615bd1565b915050613844565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc82826040516138b5929190615bea565b60405180910390a150506001600c55565b600d546001600160a01b031633146138f05760405162461bcd60e51b815260040161122c90615af9565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611e56565b6060613940600a5490565b8211156139825760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b604482015260640161122c565b61398a61280d565b613a1e576013805461399b90615a0c565b80601f01602080910402602001604051908101604052809291908181526020018280546139c790615a0c565b8015613a145780601f106139e957610100808354040283529160200191613a14565b820191906000526020600020905b8154815290600101906020018083116139f757829003601f168201915b5050505050611099565b6012613a37613a2c600a5490565b60255485600161217d565b604051602001613a48929190615c57565b60405160208183030381529060405292915050565b60006003613a69611a30565b6011811115613a7a57613a7a615572565b03613a86575060235490565b600d613a90611a30565b6011811115613aa157613aa1615572565b03613aad575060245490565b50600290565b60006001601a54610100900460ff166003811115613ad357613ad3615572565b03613adf575060145490565b6002601a54610100900460ff166003811115613afd57613afd615572565b03613b09575060165490565b6003601a54610100900460ff166003811115613b2757613b27615572565b0361111f575060185490565b600d546001600160a01b03163314613b5d5760405162461bcd60e51b815260040161122c90615af9565b600e54600160a01b900460ff1615613bb75760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c72656164792072657175657374656400604482015260640161122c565b6040516370a0823160e01b8152306004820152671bc16d674ec80000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015613c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c499190615ae0565b1015613c8b5760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b604482015260640161122c565b613c9f600f54671bc16d674ec80000614915565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f90613ce59042815260200190565b60405180910390a1565b6000602a54613cfc613545565b14905090565b600d546001600160a01b03163314613d2c5760405162461bcd60e51b815260040161122c90615af9565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b03163314613d905760405162461bcd60e51b815260040161122c90615af9565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613e4b57600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff1681830152825260019092019101613e02565b505050509050919050565b600d546001600160a01b03163314613e805760405162461bcd60e51b815260040161122c90615af9565b613e8861280d565b15613ec85760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b604482015260640161122c565b8051613edb906013906020840190615336565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611e56919061545a565b600d546001600160a01b03163314613f355760405162461bcd60e51b815260040161122c90615af9565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611e56565b600d546001600160a01b03163314613f945760405162461bcd60e51b815260040161122c90615af9565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611e56565b60326020528160005260406000208181548110613ff457600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b031633146140455760405162461bcd60e51b815260040161122c90615af9565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b031633146140a75760405162461bcd60e51b815260040161122c90615af9565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611e56565b6001546001600160a01b031633146141065760405162461bcd60e51b815260040161122c90615aab565b6001600160a01b03811661416b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161122c565b6141748161473e565b50565b60006001600160e01b0319821663780e9d6360e01b1480611099575061109982614a8c565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906141d182612b55565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006142168284615d11565b9392505050565b60006142168284615a93565b6000805b828110156142aa576000614240600a5490565b9050602554811015614297576142608561425b836001615a93565b614adc565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b50806142a281615bd1565b91505061422d565b5060019392505050565b60006142168284615d30565b6000818152600460205260408120546001600160a01b03166143395760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161122c565b600061434483612b55565b9050806001600160a01b0316846001600160a01b0316148061438b57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806123aa5750836001600160a01b03166143a4846111b7565b6001600160a01b031614949350505050565b826001600160a01b03166143c982612b55565b6001600160a01b03161461442d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161122c565b6001600160a01b03821661448f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161122c565b61449a838383614af6565b6144a560008261419c565b6001600160a01b03831660009081526005602052604081208054600192906144ce908490615b7a565b90915550506001600160a01b03821660009081526005602052604081208054600192906144fc908490615a93565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060816000036145845750506040805180820190915260018152600360fc1b602082015290565b8160005b81156145ae578061459881615bd1565b91506145a79050600a83615d30565b9150614588565b60008167ffffffffffffffff8111156145c9576145c9615679565b6040519080825280601f01601f1916602001820160405280156145f3576020820181803683370190505b5090505b84156123aa57614608600183615b7a565b9150614615600a86615bbd565b614620906030615a93565b60f81b81838151811061463557614635615b91565b60200101906001600160f81b031916908160001a905350614657600a86615d30565b94506145f7565b60006142168284615b7a565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000918291606001604051602081830303815290604052805190602001206040516020016146e492919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506123aa84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050614b019050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156147d957601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611ec7565b600160115560408051428152602081018490527fd9b030358bf0114e16959cea6c935e1cb862740b4d1056049f91711662fb3f959101611ec7565b816001600160a01b0316836001600160a01b0316036148755760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161122c565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6148ed8484846143b6565b6148f984848484614b25565b6136aa5760405162461bcd60e51b815260040161122c90615d44565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001614985929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016149b293929190615d96565b6020604051808303816000875af11580156149d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149f59190615dbd565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152614a4f906001615a93565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206123aa565b60006001600160e01b031982166380ac58cd60e01b1480614abd57506001600160e01b03198216635b5e139f60e01b145b8061109957506301ffc9a760e01b6001600160e01b0319831614611099565b6135d9828260405180602001604052806000815250614c23565b611361838383614c56565b6000806000614b108585614d0e565b91509150614b1d81614d7c565b509392505050565b60006001600160a01b0384163b15614c1b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614b69903390899088908890600401615dda565b6020604051808303816000875af1925050508015614ba4575060408051601f3d908101601f19168201909252614ba191810190615e17565b60015b614c01573d808015614bd2576040519150601f19603f3d011682016040523d82523d6000602084013e614bd7565b606091505b508051600003614bf95760405162461bcd60e51b815260040161122c90615d44565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123aa565b5060016123aa565b614c2d8383614f32565b614c3a6000848484614b25565b6113615760405162461bcd60e51b815260040161122c90615d44565b6001600160a01b038316614cb157614cac81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614cd4565b816001600160a01b0316836001600160a01b031614614cd457614cd48382615080565b6001600160a01b038216614ceb576113618161511d565b826001600160a01b0316826001600160a01b0316146113615761136182826151cc565b6000808251604103614d445760208301516040840151606085015160001a614d3887828585615210565b94509450505050614d75565b8251604003614d6d5760208301516040840151614d628683836152fd565b935093505050614d75565b506000905060025b9250929050565b6000816004811115614d9057614d90615572565b03614d985750565b6001816004811115614dac57614dac615572565b03614df95760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161122c565b6002816004811115614e0d57614e0d615572565b03614e5a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161122c565b6003816004811115614e6e57614e6e615572565b03614ec65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161122c565b6004816004811115614eda57614eda615572565b036141745760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161122c565b6001600160a01b038216614f885760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161122c565b6000818152600460205260409020546001600160a01b031615614fed5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161122c565b614ff960008383614af6565b6001600160a01b0382166000908152600560205260408120805460019290615022908490615a93565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161508d84612c98565b6150979190615b7a565b6000838152600960205260409020549091508082146150ea576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a5460009061512f90600190615b7a565b6000838152600b6020526040812054600a805493945090928490811061515757615157615b91565b9060005260206000200154905080600a838154811061517857615178615b91565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a8054806151b0576151b0615e34565b6001900381819060005260206000200160009055905550505050565b60006151d783612c98565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561524757506000905060036152f4565b8460ff16601b1415801561525f57508460ff16601c14155b1561527057506000905060046152f4565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156152c4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166152ed576000600192509250506152f4565b9150600090505b94509492505050565b6000806001600160ff1b0383168161531a60ff86901c601b615a93565b905061532887828885615210565b935093505050935093915050565b82805461534290615a0c565b90600052602060002090601f01602090048101928261536457600085556153aa565b82601f1061537d57805160ff19168380011785556153aa565b828001600101855582156153aa579182015b828111156153aa57825182559160200191906001019061538f565b506153b69291506153ba565b5090565b5b808211156153b657600081556001016153bb565b6001600160e01b03198116811461417457600080fd5b6000602082840312156153f757600080fd5b8135614216816153cf565b60005b8381101561541d578181015183820152602001615405565b838111156136aa5750506000910152565b60008151808452615446816020860160208601615402565b601f01601f19169290920160200192915050565b602081526000614216602083018461542e565b60006020828403121561547f57600080fd5b5035919050565b6001600160a01b038116811461417457600080fd5b600080604083850312156154ae57600080fd5b82356154b981615486565b946020939093013593505050565b60008083601f8401126154d957600080fd5b50813567ffffffffffffffff8111156154f157600080fd5b602083019150836020828501011115614d7557600080fd5b60008060006040848603121561551e57600080fd5b83359250602084013567ffffffffffffffff81111561553c57600080fd5b615548868287016154c7565b9497909650939450505050565b60006020828403121561556757600080fd5b813561421681615486565b634e487b7160e01b600052602160045260246000fd5b602081016012831061559c5761559c615572565b91905290565b600080604083850312156155b557600080fd5b50508035926020909101359150565b6000806000606084860312156155d957600080fd5b83356155e481615486565b925060208401356155f481615486565b929592945050506040919091013590565b6000806000806080858703121561561b57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806020838503121561564a57600080fd5b823567ffffffffffffffff81111561566157600080fd5b61566d858286016154c7565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156156b8576156b8615679565b604052919050565b600067ffffffffffffffff8311156156da576156da615679565b6156ed601f8401601f191660200161568f565b905082815283838301111561570157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561572a57600080fd5b813567ffffffffffffffff81111561574157600080fd5b8201601f8101841361575257600080fd5b6123aa848235602084016156c0565b60008060006060848603121561577657600080fd5b505081359360208301359350604090920135919050565b60006040828403121561579f57600080fd5b6040516040810181811067ffffffffffffffff821117156157c2576157c2615679565b604052823581526020928301359281019290925250919050565b801515811461417457600080fd5b600080604083850312156157fd57600080fd5b823561580881615486565b91506020830135615818816157dc565b809150509250929050565b602081016003831061559c5761559c615572565b6000806000806080858703121561584d57600080fd5b843561585881615486565b9350602085013561586881615486565b925060408501359150606085013567ffffffffffffffff81111561588b57600080fd5b8501601f8101871361589c57600080fd5b6158ab878235602084016156c0565b91505092959194509250565b600080604083850312156158ca57600080fd5b823567ffffffffffffffff808211156158e257600080fd5b818501915085601f8301126158f657600080fd5b813560208282111561590a5761590a615679565b8160051b925061591b81840161568f565b828152928401810192818101908985111561593557600080fd5b948201945b8486101561595f578535935061594f84615486565b838252948201949082019061593a565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b828110156159bd57815180516001600160801b0316855286015160ff1686850152928401929085019060010161598c565b5091979650505050505050565b602081016004831061559c5761559c615572565b600080604083850312156159f157600080fd5b82356159fc81615486565b9150602083013561581881615486565b600181811c90821680615a2057607f821691505b602082108103615a4057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115615aa657615aa6615a7d565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215615af257600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082821015615b8c57615b8c615a7d565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615bcc57615bcc615ba7565b500690565b600060018201615be357615be3615a7d565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615c2c5781516001600160a01b031684529284019290840190600101615c07565b50505092019290925292915050565b60008151615c4d818560208601615402565b9290920192915050565b600080845481600182811c915080831680615c7357607f831692505b60208084108203615c9257634e487b7160e01b86526022600452602486fd5b818015615ca65760018114615cb757615ce4565b60ff19861689528489019650615ce4565b60008b81526020902060005b86811015615cdc5781548b820152908501908301615cc3565b505084890196505b505050505050615d08615cf78286615c3b565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615615d2b57615d2b615a7d565b500290565b600082615d3f57615d3f615ba7565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615d08606083018461542e565b600060208284031215615dcf57600080fd5b8151614216816157dc565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615e0d9083018461542e565b9695505050505050565b600060208284031215615e2957600080fd5b8151614216816153cf565b634e487b7160e01b600052603160045260246000fdfea264697066735822122021443ba77f32cab4c3fae4d2e222c46b53f4f50bc5ba4457a8bc381fe287c9a064736f6c634300080e00336080604052604051620011603803806200116083398101604081905262000026916200042e565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b82518110156200015757620001428382815181106200011157620001116200050c565b60200260200101518383815181106200012e576200012e6200050c565b60200260200101516200016060201b60201c565b806200014e8162000538565b915050620000ee565b5050506200056f565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000554565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d6200034c565b604052919050565b60006001600160401b03821115620003b157620003b16200034c565b5060051b60200190565b600082601f830112620003cd57600080fd5b81516020620003e6620003e08362000395565b62000362565b82815260059290921b840181019181810190868411156200040657600080fd5b8286015b848110156200042357805183529183019183016200040a565b509695505050505050565b600080604083850312156200044257600080fd5b82516001600160401b03808211156200045a57600080fd5b818501915085601f8301126200046f57600080fd5b8151602062000482620003e08362000395565b82815260059290921b84018101918181019089841115620004a257600080fd5b948201945b83861015620004d95785516001600160a01b0381168114620004c95760008081fd5b82529482019490820190620004a7565b91880151919650909350505080821115620004f357600080fd5b506200050285828601620003bb565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200054d576200054d62000522565b5060010190565b600082198211156200056a576200056a62000522565b500190565b610be1806200057f6000396000f3fe60806040526004361061008a5760003560e01c80638b83209b116100595780638b83209b146101845780639852595c146101bc578063ce7c2ac2146101f2578063d79779b214610228578063e33b7de31461025e57600080fd5b806319165587146100d85780633a98ef39146100fa578063406072a91461011e57806348b750441461016457600080fd5b366100d3577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100e457600080fd5b506100f86100f3366004610955565b610273565b005b34801561010657600080fd5b506000545b6040519081526020015b60405180910390f35b34801561012a57600080fd5b5061010b610139366004610972565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561017057600080fd5b506100f861017f366004610972565b6103ad565b34801561019057600080fd5b506101a461019f3660046109ab565b610589565b6040516001600160a01b039091168152602001610115565b3480156101c857600080fd5b5061010b6101d7366004610955565b6001600160a01b031660009081526003602052604090205490565b3480156101fe57600080fd5b5061010b61020d366004610955565b6001600160a01b031660009081526002602052604090205490565b34801561023457600080fd5b5061010b610243366004610955565b6001600160a01b031660009081526005602052604090205490565b34801561026a57600080fd5b5060015461010b565b6001600160a01b0381166000908152600260205260409020546102b15760405162461bcd60e51b81526004016102a8906109c4565b60405180910390fd5b60006102bc60015490565b6102c69047610a20565b905060006102f383836102ee866001600160a01b031660009081526003602052604090205490565b6105b9565b9050806000036103155760405162461bcd60e51b81526004016102a890610a38565b6001600160a01b0383166000908152600360205260408120805483929061033d908490610a20565b9250508190555080600160008282546103569190610a20565b90915550610366905083826105fe565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6001600160a01b0381166000908152600260205260409020546103e25760405162461bcd60e51b81526004016102a8906109c4565b6001600160a01b0382166000908152600560205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa15801561043f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104639190610a83565b61046d9190610a20565b905060006104a683836102ee87876001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b9050806000036104c85760405162461bcd60e51b81526004016102a890610a38565b6001600160a01b038085166000908152600660209081526040808320938716835292905290812080548392906104ff908490610a20565b90915550506001600160a01b0384166000908152600560205260408120805483929061052c908490610a20565b9091555061053d905084848361071c565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b60006004828154811061059e5761059e610a9c565b6000918252602090912001546001600160a01b031692915050565b600080546001600160a01b0385168252600260205260408220548391906105e09086610ab2565b6105ea9190610ad1565b6105f49190610af3565b90505b9392505050565b8047101561064e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102a8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461069b576040519150601f19603f3d011682016040523d82523d6000602084013e6106a0565b606091505b50509050806107175760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102a8565b505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610717928692916000916107ac918516908490610829565b80519091501561071757808060200190518101906107ca9190610b0a565b6107175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102a8565b60606105f48484600085856001600160a01b0385163b61088b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102a8565b600080866001600160a01b031685876040516108a79190610b5c565b60006040518083038185875af1925050503d80600081146108e4576040519150601f19603f3d011682016040523d82523d6000602084013e6108e9565b606091505b50915091506108f9828286610904565b979650505050505050565b606083156109135750816105f7565b8251156109235782518084602001fd5b8160405162461bcd60e51b81526004016102a89190610b78565b6001600160a01b038116811461095257600080fd5b50565b60006020828403121561096757600080fd5b81356105f78161093d565b6000806040838503121561098557600080fd5b82356109908161093d565b915060208301356109a08161093d565b809150509250929050565b6000602082840312156109bd57600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a3357610a33610a0a565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b600060208284031215610a9557600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615610acc57610acc610a0a565b500290565b600082610aee57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b0557610b05610a0a565b500390565b600060208284031215610b1c57600080fd5b815180151581146105f757600080fd5b60005b83811015610b47578181015183820152602001610b2f565b83811115610b56576000848401525b50505050565b60008251610b6e818460208701610b2c565b9190910192915050565b6020815260008251806020840152610b97816040850160208701610b2c565b601f01601f1916919091016040019291505056fea2646970667358221220e10b12854edbd47e95fbd9af8c6637bdc07b2c5d2161bf5dcfe173f77add1a4464736f6c634300080e003300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000094c6f6e656c79506f70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d256794944f03c4581994aca4f67b0d8ac98215400000000000000000000000076fc40c01a086c8a9d4a9183f437ed070f02dd74000000000000000000000000720f75e5899cf1fc2deda47a1c4a2913960b9b9e0000000000000000000000002d58a3e64d6edced24d77d834b7cbbd2500f8724000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000035000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000d

Deployed Bytecode

0x6080604052600436106105235760003560e01c8063791a2519116102a2578063c67e8b6811610165578063dddb91ba116100cc578063efc4bc7c11610085578063efc4bc7c14610fd8578063f15c85b414610fee578063f2fde38b1461100e578063f3b3a9fa1461102e578063f698da2514611044578063fa4d280c1461105a57600080fd5b8063dddb91ba14610ecd578063df20ad8f14610eed578063dfe363ef14610f2e578063e4f2487a14610f43578063e83d508b14610f6f578063e985e9c514610f8f57600080fd5b8063d1fe033d1161011e578063d1fe033d14610e20578063d2c1f20614610e35578063d5abeb0114610e4a578063d5b1ae5e14610e60578063da1b9e0814610e8d578063da324a3014610ead57600080fd5b8063c67e8b6814610d8c578063c87b56dd14610dac578063c91621c214610dcc578063c9a8d9f714610de1578063ccc5d84714610df6578063d0b77ab414610e0b57600080fd5b806395d89b4111610209578063b6eb6d69116101c2578063b6eb6d6914610ce6578063b78ef4cb14610d06578063b88d4fde14610d1c578063ba1f879f14610d3c578063be008ccb14610d57578063c204642c14610d6c57600080fd5b806395d89b4114610c445780639b154a7114610c595780639da0d7d414610c6e578063a22cb46514610c89578063a2fb7b5d14610ca9578063aab4b09e14610cd057600080fd5b8063870843131161025b5780638708431314610b9d5780638da5cb5b14610bbd5780639024fc9614610bdb57806390aa0b0f14610bf0578063933edbb814610c0b57806394985ddd14610c2457600080fd5b8063791a251914610ad8578063792bce7014610af85780637a9e1d0314610b185780637bd07f8b14610b385780637d94792a14610b725780637ee7866114610b8857600080fd5b806333bc1c5c116103ea5780635626e404116103515780636c635d3f1161030a5780636c635d3f14610a395780636e83843a14610a5957806370a0823114610a79578063715018a614610a9957806373b19e8f14610aae578063776451b014610ac357600080fd5b80635626e404146109a55780635e9f9613146109c557806361728f39146109da5780636238e9f4146109f05780636352211e14610a0357806366bb81c714610a2357600080fd5b80634256dbe3116103a35780634256dbe3146108fb57806342842e0e1461091b578063447321801461093b57806349aaa5d9146109505780634f6ccce71461097057806354214f691461099057600080fd5b806333bc1c5c146108565780633584602814610886578063398c0ec11461089c5780633a367a67146108b15780633ccfd60b146108c65780633da65fc1146108db57600080fd5b8063191655871161048e578063276f1c4111610447578063276f1c41146107ab5780632da5ea17146107cb5780632ee723fb146107e05780632f1d5a60146107f65780632f745c591461081657806330878ba91461083657600080fd5b806319165587146106f65780631bae492e146107165780631cbe14c91461073657806320510b55146107565780632316b4da1461077657806323b872dd1461078b57600080fd5b80630f30cde0116104e05780630f30cde01461061d5780631197705e14610630578063127effb214610650578063166ca2bc1461067057806318160ddd146106bf5780631865c57d146106d457600080fd5b806301ffc9a71461052857806302410f471461055d578063031ab9f51461057e57806306fdde03146105a1578063081812fc146105c3578063095ea7b3146105fb575b600080fd5b34801561053457600080fd5b506105486105433660046153e5565b61108e565b60405190151581526020015b60405180910390f35b34801561056957600080fd5b50600e5461054890600160a01b900460ff1681565b34801561058a57600080fd5b5061059361109f565b604051908152602001610554565b3480156105ad57600080fd5b506105b6611125565b604051610554919061545a565b3480156105cf57600080fd5b506105e36105de36600461546d565b6111b7565b6040516001600160a01b039091168152602001610554565b34801561060757600080fd5b5061061b61061636600461549b565b611251565b005b61054861062b366004615509565b611366565b34801561063c57600080fd5b5061061b61064b366004615555565b611972565b34801561065c57600080fd5b50600d546105e3906001600160a01b031681565b34801561067c57600080fd5b50601e54601f54602054602154602254610697949392919085565b604080519586526020860194909452928401919091526060830152608082015260a001610554565b3480156106cb57600080fd5b50600a54610593565b3480156106e057600080fd5b506106e9611a30565b6040516105549190615588565b34801561070257600080fd5b5061061b610711366004615555565b611c94565b34801561072257600080fd5b50602c546105e3906001600160a01b031681565b34801561074257600080fd5b5061061b6107513660046155a2565b611e61565b34801561076257600080fd5b5061061b610771366004615555565b611ed3565b34801561078257600080fd5b5061061b611f47565b34801561079757600080fd5b5061061b6107a63660046155c4565b611fab565b3480156107b757600080fd5b50600e546105e3906001600160a01b031681565b3480156107d757600080fd5b50610548611fdc565b3480156107ec57600080fd5b50610593602b5481565b34801561080257600080fd5b5061061b610811366004615555565b612029565b34801561082257600080fd5b5061059361083136600461549b565b6120e7565b34801561084257600080fd5b506105b6610851366004615605565b61217d565b34801561086257600080fd5b50601854601954610871919082565b60408051928352602083019190915201610554565b34801561089257600080fd5b5061059360295481565b3480156108a857600080fd5b506105936123b2565b3480156108bd57600080fd5b506105b66124b2565b3480156108d257600080fd5b5061061b612540565b3480156108e757600080fd5b506105486108f6366004615637565b6125ca565b34801561090757600080fd5b5061061b61091636600461546d565b612642565b34801561092757600080fd5b5061061b6109363660046155c4565b6126a1565b34801561094757600080fd5b5061061b6126bc565b34801561095c57600080fd5b5061061b61096b36600461546d565b61271b565b34801561097c57600080fd5b5061059361098b36600461546d565b61277a565b34801561099c57600080fd5b5061054861280d565b3480156109b157600080fd5b5061061b6109c036600461546d565b612834565b3480156109d157600080fd5b50610593612893565b3480156109e657600080fd5b50610593600f5481565b6105486109fe366004615637565b6128a5565b348015610a0f57600080fd5b506105e3610a1e36600461546d565b612b55565b348015610a2f57600080fd5b5061059360105481565b348015610a4557600080fd5b5061061b610a5436600461546d565b612bcc565b348015610a6557600080fd5b5061061b610a74366004615718565b612c2b565b348015610a8557600080fd5b50610593610a94366004615555565b612c98565b348015610aa557600080fd5b5061061b612d1f565b348015610aba57600080fd5b50610593612d55565b348015610acf57600080fd5b50610593612e02565b348015610ae457600080fd5b5061061b610af336600461546d565b612e7a565b348015610b0457600080fd5b5061061b610b13366004615761565b612ed9565b348015610b2457600080fd5b50610548610b33366004615637565b612f58565b348015610b4457600080fd5b50601b54601c54601d54610b5792919083565b60408051938452602084019290925290820152606001610554565b348015610b7e57600080fd5b5061059360115481565b348015610b9457600080fd5b506105b6612fbf565b348015610ba957600080fd5b5061061b610bb836600461578d565b6134d6565b348015610bc957600080fd5b506001546001600160a01b03166105e3565b348015610be757600080fd5b50610593613545565b348015610bfc57600080fd5b50602354602454610871919082565b348015610c1757600080fd5b50601f54602b5414610548565b348015610c3057600080fd5b5061061b610c3f3660046155a2565b613557565b348015610c5057600080fd5b506105b66135dd565b348015610c6557600080fd5b506105b66135ec565b348015610c7a57600080fd5b50601454601554610871919082565b348015610c9557600080fd5b5061061b610ca43660046157ea565b6135f9565b348015610cb557600080fd5b50601a54610cc39060ff1681565b6040516105549190615823565b348015610cdc57600080fd5b5061059360275481565b348015610cf257600080fd5b5061061b610d01366004615555565b613604565b348015610d1257600080fd5b5061059360285481565b348015610d2857600080fd5b5061061b610d37366004615837565b613678565b348015610d4857600080fd5b50601654601754610871919082565b348015610d6357600080fd5b5061061b6136b0565b348015610d7857600080fd5b5061061b610d873660046158b7565b613712565b348015610d9857600080fd5b5061061b610da736600461578d565b6138c6565b348015610db857600080fd5b506105b6610dc736600461546d565b613935565b348015610dd857600080fd5b50610593613a5d565b348015610ded57600080fd5b50610593613ab3565b348015610e0257600080fd5b5061061b613b33565b348015610e1757600080fd5b50610548613cef565b348015610e2c57600080fd5b5061061b613d02565b348015610e4157600080fd5b5061061b613d66565b348015610e5657600080fd5b5061059360255481565b348015610e6c57600080fd5b50610e80610e7b366004615555565b613dca565b604051610554919061596f565b348015610e9957600080fd5b5061061b610ea8366004615718565b613e56565b348015610eb957600080fd5b5061061b610ec836600461546d565b613f0b565b348015610ed957600080fd5b5061061b610ee836600461578d565b613f6a565b348015610ef957600080fd5b50610f0d610f0836600461549b565b613fd8565b604080516001600160801b03909316835260ff909116602083015201610554565b348015610f3a57600080fd5b5061061b61401b565b348015610f4f57600080fd5b50601a54610f6290610100900460ff1681565b60405161055491906159ca565b348015610f7b57600080fd5b5061061b610f8a36600461546d565b61407d565b348015610f9b57600080fd5b50610548610faa3660046159de565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610fe457600080fd5b50610593602a5481565b348015610ffa57600080fd5b50602d546105e3906001600160a01b031681565b34801561101a57600080fd5b5061061b611029366004615555565b6140dc565b34801561103a57600080fd5b5061059360265481565b34801561105057600080fd5b50610593602e5481565b34801561106657600080fd5b506105937f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b600061109982614177565b92915050565b60006001601a54610100900460ff1660038111156110bf576110bf615572565b036110cb575060155490565b6002601a54610100900460ff1660038111156110e9576110e9615572565b036110f5575060175490565b6003601a54610100900460ff16600381111561111357611113615572565b0361111f575060195490565b50600090565b60606002805461113490615a0c565b80601f016020809104026020016040519081016040528092919081815260200182805461116090615a0c565b80156111ad5780601f10611182576101008083540402835291602001916111ad565b820191906000526020600020905b81548152906001019060200180831161119057829003601f168201915b5050505050905090565b6000818152600460205260408120546001600160a01b03166112355760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061125c82612b55565b9050806001600160a01b0316836001600160a01b0316036112c95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161122c565b336001600160a01b03821614806112e557506112e58133610faa565b6113575760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161122c565b611361838361419c565b505050565b60006002600c540361138a5760405162461bcd60e51b815260040161122c90615a46565b6002600c556000611399611a30565b90503332146113e55760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b60088160118111156113f9576113f9615572565b14806114165750600d81601181111561141457611414615572565b145b806114325750600381601181111561143057611430615572565b145b6114745760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b61148661147f6123b2565b869061420a565b3410156114cb5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b60038160118111156114df576114df615572565b0361158d576023548511156115365760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b602b54601f54611546908761421d565b111561158d5760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b604482015260640161122c565b600d8160118111156115a1576115a1615572565b03611667576024548511156115f85760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b602554611619611606612893565b61161388611613600a5490565b9061421d565b11156116675760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e0000000000604482015260640161122c565b600881601181111561167b5761167b615572565b036117e35761168a84846125ca565b6116c95760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b604482015260640161122c565b600285111561171a5760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974730000604482015260640161122c565b336000908152602f6020526040902054600290611738908790615a93565b11156117865760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e00604482015260640161122c565b602a5461179586611613613545565b11156117e35760405162461bcd60e51b815260206004820152601c60248201527f5075726368617365206578636565642073616c65206361707065642e00000000604482015260640161122c565b6117ed3386614229565b50600381601181111561180257611802615572565b036118a857601f54611814908661421d565b601f55600061182334876142b4565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b0270ffffffffffffffffffffffffffffffffff199093169116171790556029549091508110156118a65760298190555b505b600d8160118111156118bc576118bc615572565b036118d2576022546118ce908661421d565b6022555b60088160118111156118e6576118e6615572565b0361192757336000908152602f6020526040902054611906908690615a93565b336000908152602f6020526040902055602154611923908661421d565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611960573d6000803e3d6000fd5b5060019150506001600c559392505050565b6001546001600160a01b0316331461199c5760405162461bcd60e51b815260040161122c90615aab565b6001600160a01b0381166119e65760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff166002811115611a4b57611a4b615572565b03611a565750601190565b6001601a5460ff166002811115611a6f57611a6f615572565b03611a7a5750601090565b6000601a54610100900460ff166003811115611a9857611a98615572565b03611aa35750600090565b6003601a54610100900460ff166003811115611ac157611ac1615572565b03611b5a57611ace611fdc565b15611ad95750600f90565b60195415801590611aeb575060195443115b15611af65750600e90565b60185415801590611b0957506018544310155b15611b145750600d90565b60185415801590611b26575060185443105b8015611b33575060175443115b15611b3e5750600c90565b601854158015611b4f575060175443115b15611b5a5750600b90565b6002601a54610100900460ff166003811115611b7857611b78615572565b03611bf857611b85613cef565b15611b905750600a90565b60175415801590611ba2575060175443115b15611bad5750600990565b60165415801590611bc057506016544310155b15611bcb5750600890565b60165415801590611bdd575060165443105b15611be85750600790565b601654600003611bf85750600690565b6001601a54610100900460ff166003811115611c1657611c16615572565b0361111f57601f54602b5403611c2c5750600590565b60155415801590611c3e575060155443115b15611c495750600490565b60145415801590611c5c57506014544310155b15611c675750600390565b60145415801590611c79575060145443105b15611c845750600290565b60145460000361111f5750600190565b60315460405163673e156160e11b81523360048201526000916001600160a01b03169063ce7c2ac290602401602060405180830381865afa158015611cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d019190615ae0565b1180611d1757506001546001600160a01b031633145b611d5b5760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b604482015260640161122c565b336001600160a01b0382161480611d7c57506001546001600160a01b031633145b611dc15760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b604482015260640161122c565b603154604051631916558760e01b81526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015611e0857600080fd5b505af1158015611e1c573d6000803e3d6000fd5b50506040516001600160a01b03841681527f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba205925060200190505b60405180910390a150565b600d546001600160a01b03163314611e8b5760405162461bcd60e51b815260040161122c90615af9565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611efd5760405162461bcd60e51b815260040161122c90615af9565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611f715760405162461bcd60e51b815260040161122c90615af9565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b611fb533826142c0565b611fd15760405162461bcd60e51b815260040161122c90615b29565b6113618383836143b6565b600080602654602554611fef9190615b7a565b602154602054602254601f5493945060009361200b9190615a93565b6120159190615a93565b61201f9190615a93565b9190911492915050565b6001546001600160a01b031633146120535760405162461bcd60e51b815260040161122c90615aab565b6001600160a01b03811661209d5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b60006120f283612c98565b82106121545760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161122c565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b60606121916001546001600160a01b031690565b6001600160a01b0316336001600160a01b0316146121ec57848311156121ec5760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b604482015260640161122c565b6121f461280d565b61221c5750604080518082019091526007815266191959985d5b1d60ca1b60208201526123aa565b6000612229856001615a93565b67ffffffffffffffff81111561224157612241615679565b60405190808252806020026020018201604052801561226a578160200160208202803683370190505b50905060015b8581116122a7578082828151811061228a5761228a615b91565b60209081029190910101526122a0600182615a93565b9050612270565b50825b85811161238357600086601154836040516020016122d2929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6122f59190615bbd565b612300906001615a93565b905082818151811061231457612314615b91565b602002602001015183838151811061232e5761232e615b91565b602002602001015184848151811061234857612348615b91565b6020026020010185848151811061236157612361615b91565b6020908102919091010191909152525061237c600182615a93565b90506122aa565b506123a681858151811061239957612399615b91565b602002602001015161455d565b9150505b949350505050565b6000806123bd611a30565b905060038160118111156123d3576123d3615572565b03612443576014546000906123e89043615b7a565b601d54601b5491925060009161240a91906124049085906142b4565b9061420a565b601c5460285491925061241d919061465e565b811061242e575050601c5492915050565b60285461243b908261465e565b935050505090565b600881601181111561245757612457615572565b036124895760295460009061246d9060026142b4565b9050602754811161247e5780612482565b6027545b9250505090565b600d81601181111561249d5761249d615572565b036124aa57505060295490565b505060285490565b601380546124bf90615a0c565b80601f01602080910402602001604051908101604052809291908181526020018280546124eb90615a0c565b80156125385780601f1061250d57610100808354040283529160200191612538565b820191906000526020600020905b81548152906001019060200180831161251b57829003601f168201915b505050505081565b600d546001600160a01b0316331461256a5760405162461bcd60e51b815260040161122c90615af9565b6040514790339082156108fc029083906000818181858888f19350505050158015612599573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611e56565b602c546000906001600160a01b031661261b5760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602c546001600160a01b0316612631848461466a565b6001600160a01b0316149392505050565b600d546001600160a01b0316331461266c5760405162461bcd60e51b815260040161122c90615af9565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611e56565b61136183838360405180602001604052806000815250613678565b600d546001600160a01b031633146126e65760405162461bcd60e51b815260040161122c90615af9565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b031633146127455760405162461bcd60e51b815260040161122c90615af9565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611e56565b6000612785600a5490565b82106127e85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161122c565b600a82815481106127fb576127fb615b91565b90600052602060002001549050919050565b60008060115411801561282257506000601054115b801561282f575060105443115b905090565b600d546001600160a01b0316331461285e5760405162461bcd60e51b815260040161122c90615af9565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611e56565b601e5460265460009161282f91615b7a565b60006002600c54036128c95760405162461bcd60e51b815260040161122c90615a46565b6002600c553332146129185760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b6008612922611a30565b601181111561293357612933615572565b146129765760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b6129808383612f58565b6129c25760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b604482015260640161122c565b3360009081526030602052604090205415612a155760405162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9021b630b4b6b2b21027a39760691b604482015260640161122c565b602a54612a256001611613613545565b1115612a735760405162461bcd60e51b815260206004820152601960248201527f45786365656420507269766174652053616c65204c696d697400000000000000604482015260640161122c565b612a7b6123b2565b341015612ac05760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b33600090815260306020526040902054612adb906001615a93565b3360009081526030602090815260409091209190915554612afd90600161421d565b602055612b0b336001614229565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015612b45573d6000803e3d6000fd5b50600190506001600c5592915050565b6000818152600460205260408120546001600160a01b0316806110995760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161122c565b600d546001600160a01b03163314612bf65760405162461bcd60e51b815260040161122c90615af9565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611e56565b600d546001600160a01b03163314612c555760405162461bcd60e51b815260040161122c90615af9565b8051612c68906012906020840190615336565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611e56919061545a565b60006001600160a01b038216612d035760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161122c565b506001600160a01b031660009081526005602052604090205490565b6001546001600160a01b03163314612d495760405162461bcd60e51b815260040161122c90615aab565b612d53600061473e565b565b600080612d60611a30565b90506003816011811115612d7657612d76615572565b03612d83575050602b5490565b6008816011811115612d9757612d97615572565b03612da4575050602a5490565b600d816011811115612db857612db8615572565b03612dfa57601f54602654602154602054602554612dd69190615b7a565b612de09190615b7a565b612dea9190615b7a565b612df49190615b7a565b91505090565b600091505090565b600080612e0d611a30565b90506008816011811115612e2357612e23615572565b03612e3857602154602054612df49190615a93565b600d816011811115612e4c57612e4c615572565b03612e5957505060225490565b6003816011811115612e6d57612e6d615572565b03612dfa575050601f5490565b600d546001600160a01b03163314612ea45760405162461bcd60e51b815260040161122c90615af9565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611e56565b600d546001600160a01b03163314612f035760405162461bcd60e51b815260040161122c90615af9565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b0316612fa95760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602d546001600160a01b0316612631848461466a565b60606000612fcb611a30565b90506001816011811115612fe157612fe1615572565b0361301f57505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b600281601181111561303357613033615572565b0361307157505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b600381601181111561308557613085615572565b036130b8575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b60048160118111156130cc576130cc615572565b036130fc57505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b600581601181111561311057613110615572565b03613147575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b600681601181111561315b5761315b615572565b0361319957505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b60078160118111156131ad576131ad615572565b036131eb57505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b60088160118111156131ff576131ff615572565b036132315750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b600981601181111561324557613245615572565b0361327457505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a81601181111561328857613288615572565b036132be575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b8160118111156132d2576132d2615572565b0361331057505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c81601181111561332457613324615572565b0361336257505060408051808201909152601981527f5075626c696353616c654265666f726557697468426c6f636b00000000000000602082015290565b600d81601181111561337657613376615572565b036133a757505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e8160118111156133bb576133bb615572565b036133e957505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f8160118111156133fd576133fd615572565b03613432575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b601081601181111561344657613446615572565b03613470575050604080518082019091526009815268506175736553616c6560b81b602082015290565b601181601181111561348457613484615572565b036134b057505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b031633146135005760405162461bcd60e51b815260040161122c90615af9565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611e56565b60205460215460009161282f91615a93565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146135cf5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161122c565b6135d98282614790565b5050565b60606003805461113490615a0c565b601280546124bf90615a0c565b6135d9338383614814565b600d546001600160a01b0316331461362e5760405162461bcd60e51b815260040161122c90615af9565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b61368233836142c0565b61369e5760405162461bcd60e51b815260040161122c90615b29565b6136aa848484846148e2565b50505050565b600d546001600160a01b031633146136da5760405162461bcd60e51b815260040161122c90615af9565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b6002600c54036137345760405162461bcd60e51b815260040161122c90615a46565b6002600c55600d546001600160a01b031633146137635760405162461bcd60e51b815260040161122c90615af9565b602554825161377e90613776908461420a565b600a54611613565b11156137cc5760405162461bcd60e51b815260206004820152601860248201527f457863656564206d617820737570706c79206c696d69742e0000000000000000604482015260640161122c565b60265482516137e8906137df908461420a565b601e549061421d565b111561382e5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b604482015260640161122c565b815161383e906137df908361420a565b601e5560005b82518110156138835761387083828151811061386257613862615b91565b602002602001015183614229565b508061387b81615bd1565b915050613844565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc82826040516138b5929190615bea565b60405180910390a150506001600c55565b600d546001600160a01b031633146138f05760405162461bcd60e51b815260040161122c90615af9565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611e56565b6060613940600a5490565b8211156139825760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b604482015260640161122c565b61398a61280d565b613a1e576013805461399b90615a0c565b80601f01602080910402602001604051908101604052809291908181526020018280546139c790615a0c565b8015613a145780601f106139e957610100808354040283529160200191613a14565b820191906000526020600020905b8154815290600101906020018083116139f757829003601f168201915b5050505050611099565b6012613a37613a2c600a5490565b60255485600161217d565b604051602001613a48929190615c57565b60405160208183030381529060405292915050565b60006003613a69611a30565b6011811115613a7a57613a7a615572565b03613a86575060235490565b600d613a90611a30565b6011811115613aa157613aa1615572565b03613aad575060245490565b50600290565b60006001601a54610100900460ff166003811115613ad357613ad3615572565b03613adf575060145490565b6002601a54610100900460ff166003811115613afd57613afd615572565b03613b09575060165490565b6003601a54610100900460ff166003811115613b2757613b27615572565b0361111f575060185490565b600d546001600160a01b03163314613b5d5760405162461bcd60e51b815260040161122c90615af9565b600e54600160a01b900460ff1615613bb75760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c72656164792072657175657374656400604482015260640161122c565b6040516370a0823160e01b8152306004820152671bc16d674ec80000907f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a0823190602401602060405180830381865afa158015613c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c499190615ae0565b1015613c8b5760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b604482015260640161122c565b613c9f600f54671bc16d674ec80000614915565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f90613ce59042815260200190565b60405180910390a1565b6000602a54613cfc613545565b14905090565b600d546001600160a01b03163314613d2c5760405162461bcd60e51b815260040161122c90615af9565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b03163314613d905760405162461bcd60e51b815260040161122c90615af9565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613e4b57600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff1681830152825260019092019101613e02565b505050509050919050565b600d546001600160a01b03163314613e805760405162461bcd60e51b815260040161122c90615af9565b613e8861280d565b15613ec85760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b604482015260640161122c565b8051613edb906013906020840190615336565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611e56919061545a565b600d546001600160a01b03163314613f355760405162461bcd60e51b815260040161122c90615af9565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611e56565b600d546001600160a01b03163314613f945760405162461bcd60e51b815260040161122c90615af9565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611e56565b60326020528160005260406000208181548110613ff457600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b031633146140455760405162461bcd60e51b815260040161122c90615af9565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b031633146140a75760405162461bcd60e51b815260040161122c90615af9565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611e56565b6001546001600160a01b031633146141065760405162461bcd60e51b815260040161122c90615aab565b6001600160a01b03811661416b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161122c565b6141748161473e565b50565b60006001600160e01b0319821663780e9d6360e01b1480611099575061109982614a8c565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906141d182612b55565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006142168284615d11565b9392505050565b60006142168284615a93565b6000805b828110156142aa576000614240600a5490565b9050602554811015614297576142608561425b836001615a93565b614adc565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b50806142a281615bd1565b91505061422d565b5060019392505050565b60006142168284615d30565b6000818152600460205260408120546001600160a01b03166143395760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161122c565b600061434483612b55565b9050806001600160a01b0316846001600160a01b0316148061438b57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806123aa5750836001600160a01b03166143a4846111b7565b6001600160a01b031614949350505050565b826001600160a01b03166143c982612b55565b6001600160a01b03161461442d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161122c565b6001600160a01b03821661448f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161122c565b61449a838383614af6565b6144a560008261419c565b6001600160a01b03831660009081526005602052604081208054600192906144ce908490615b7a565b90915550506001600160a01b03821660009081526005602052604081208054600192906144fc908490615a93565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060816000036145845750506040805180820190915260018152600360fc1b602082015290565b8160005b81156145ae578061459881615bd1565b91506145a79050600a83615d30565b9150614588565b60008167ffffffffffffffff8111156145c9576145c9615679565b6040519080825280601f01601f1916602001820160405280156145f3576020820181803683370190505b5090505b84156123aa57614608600183615b7a565b9150614615600a86615bbd565b614620906030615a93565b60f81b81838151811061463557614635615b91565b60200101906001600160f81b031916908160001a905350614657600a86615d30565b94506145f7565b60006142168284615b7a565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000918291606001604051602081830303815290604052805190602001206040516020016146e492919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506123aa84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050614b019050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156147d957601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611ec7565b600160115560408051428152602081018490527fd9b030358bf0114e16959cea6c935e1cb862740b4d1056049f91711662fb3f959101611ec7565b816001600160a01b0316836001600160a01b0316036148755760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161122c565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6148ed8484846143b6565b6148f984848484614b25565b6136aa5760405162461bcd60e51b815260040161122c90615d44565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001614985929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016149b293929190615d96565b6020604051808303816000875af11580156149d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149f59190615dbd565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152614a4f906001615a93565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206123aa565b60006001600160e01b031982166380ac58cd60e01b1480614abd57506001600160e01b03198216635b5e139f60e01b145b8061109957506301ffc9a760e01b6001600160e01b0319831614611099565b6135d9828260405180602001604052806000815250614c23565b611361838383614c56565b6000806000614b108585614d0e565b91509150614b1d81614d7c565b509392505050565b60006001600160a01b0384163b15614c1b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614b69903390899088908890600401615dda565b6020604051808303816000875af1925050508015614ba4575060408051601f3d908101601f19168201909252614ba191810190615e17565b60015b614c01573d808015614bd2576040519150601f19603f3d011682016040523d82523d6000602084013e614bd7565b606091505b508051600003614bf95760405162461bcd60e51b815260040161122c90615d44565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123aa565b5060016123aa565b614c2d8383614f32565b614c3a6000848484614b25565b6113615760405162461bcd60e51b815260040161122c90615d44565b6001600160a01b038316614cb157614cac81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614cd4565b816001600160a01b0316836001600160a01b031614614cd457614cd48382615080565b6001600160a01b038216614ceb576113618161511d565b826001600160a01b0316826001600160a01b0316146113615761136182826151cc565b6000808251604103614d445760208301516040840151606085015160001a614d3887828585615210565b94509450505050614d75565b8251604003614d6d5760208301516040840151614d628683836152fd565b935093505050614d75565b506000905060025b9250929050565b6000816004811115614d9057614d90615572565b03614d985750565b6001816004811115614dac57614dac615572565b03614df95760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161122c565b6002816004811115614e0d57614e0d615572565b03614e5a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161122c565b6003816004811115614e6e57614e6e615572565b03614ec65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161122c565b6004816004811115614eda57614eda615572565b036141745760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161122c565b6001600160a01b038216614f885760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161122c565b6000818152600460205260409020546001600160a01b031615614fed5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161122c565b614ff960008383614af6565b6001600160a01b0382166000908152600560205260408120805460019290615022908490615a93565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161508d84612c98565b6150979190615b7a565b6000838152600960205260409020549091508082146150ea576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a5460009061512f90600190615b7a565b6000838152600b6020526040812054600a805493945090928490811061515757615157615b91565b9060005260206000200154905080600a838154811061517857615178615b91565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a8054806151b0576151b0615e34565b6001900381819060005260206000200160009055905550505050565b60006151d783612c98565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561524757506000905060036152f4565b8460ff16601b1415801561525f57508460ff16601c14155b1561527057506000905060046152f4565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156152c4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166152ed576000600192509250506152f4565b9150600090505b94509492505050565b6000806001600160ff1b0383168161531a60ff86901c601b615a93565b905061532887828885615210565b935093505050935093915050565b82805461534290615a0c565b90600052602060002090601f01602090048101928261536457600085556153aa565b82601f1061537d57805160ff19168380011785556153aa565b828001600101855582156153aa579182015b828111156153aa57825182559160200191906001019061538f565b506153b69291506153ba565b5090565b5b808211156153b657600081556001016153bb565b6001600160e01b03198116811461417457600080fd5b6000602082840312156153f757600080fd5b8135614216816153cf565b60005b8381101561541d578181015183820152602001615405565b838111156136aa5750506000910152565b60008151808452615446816020860160208601615402565b601f01601f19169290920160200192915050565b602081526000614216602083018461542e565b60006020828403121561547f57600080fd5b5035919050565b6001600160a01b038116811461417457600080fd5b600080604083850312156154ae57600080fd5b82356154b981615486565b946020939093013593505050565b60008083601f8401126154d957600080fd5b50813567ffffffffffffffff8111156154f157600080fd5b602083019150836020828501011115614d7557600080fd5b60008060006040848603121561551e57600080fd5b83359250602084013567ffffffffffffffff81111561553c57600080fd5b615548868287016154c7565b9497909650939450505050565b60006020828403121561556757600080fd5b813561421681615486565b634e487b7160e01b600052602160045260246000fd5b602081016012831061559c5761559c615572565b91905290565b600080604083850312156155b557600080fd5b50508035926020909101359150565b6000806000606084860312156155d957600080fd5b83356155e481615486565b925060208401356155f481615486565b929592945050506040919091013590565b6000806000806080858703121561561b57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806020838503121561564a57600080fd5b823567ffffffffffffffff81111561566157600080fd5b61566d858286016154c7565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156156b8576156b8615679565b604052919050565b600067ffffffffffffffff8311156156da576156da615679565b6156ed601f8401601f191660200161568f565b905082815283838301111561570157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561572a57600080fd5b813567ffffffffffffffff81111561574157600080fd5b8201601f8101841361575257600080fd5b6123aa848235602084016156c0565b60008060006060848603121561577657600080fd5b505081359360208301359350604090920135919050565b60006040828403121561579f57600080fd5b6040516040810181811067ffffffffffffffff821117156157c2576157c2615679565b604052823581526020928301359281019290925250919050565b801515811461417457600080fd5b600080604083850312156157fd57600080fd5b823561580881615486565b91506020830135615818816157dc565b809150509250929050565b602081016003831061559c5761559c615572565b6000806000806080858703121561584d57600080fd5b843561585881615486565b9350602085013561586881615486565b925060408501359150606085013567ffffffffffffffff81111561588b57600080fd5b8501601f8101871361589c57600080fd5b6158ab878235602084016156c0565b91505092959194509250565b600080604083850312156158ca57600080fd5b823567ffffffffffffffff808211156158e257600080fd5b818501915085601f8301126158f657600080fd5b813560208282111561590a5761590a615679565b8160051b925061591b81840161568f565b828152928401810192818101908985111561593557600080fd5b948201945b8486101561595f578535935061594f84615486565b838252948201949082019061593a565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b828110156159bd57815180516001600160801b0316855286015160ff1686850152928401929085019060010161598c565b5091979650505050505050565b602081016004831061559c5761559c615572565b600080604083850312156159f157600080fd5b82356159fc81615486565b9150602083013561581881615486565b600181811c90821680615a2057607f821691505b602082108103615a4057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115615aa657615aa6615a7d565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215615af257600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082821015615b8c57615b8c615a7d565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615bcc57615bcc615ba7565b500690565b600060018201615be357615be3615a7d565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615c2c5781516001600160a01b031684529284019290840190600101615c07565b50505092019290925292915050565b60008151615c4d818560208601615402565b9290920192915050565b600080845481600182811c915080831680615c7357607f831692505b60208084108203615c9257634e487b7160e01b86526022600452602486fd5b818015615ca65760018114615cb757615ce4565b60ff19861689528489019650615ce4565b60008b81526020902060005b86811015615cdc5781548b820152908501908301615cc3565b505084890196505b505050505050615d08615cf78286615c3b565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615615d2b57615d2b615a7d565b500290565b600082615d3f57615d3f615ba7565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615d08606083018461542e565b600060208284031215615dcf57600080fd5b8151614216816157dc565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615e0d9083018461542e565b9695505050505050565b600060208284031215615e2957600080fd5b8151614216816153cf565b634e487b7160e01b600052603160045260246000fdfea264697066735822122021443ba77f32cab4c3fae4d2e222c46b53f4f50bc5ba4457a8bc381fe287c9a064736f6c634300080e0033

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

00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000094c6f6e656c79506f70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d256794944f03c4581994aca4f67b0d8ac98215400000000000000000000000076fc40c01a086c8a9d4a9183f437ed070f02dd74000000000000000000000000720f75e5899cf1fc2deda47a1c4a2913960b9b9e0000000000000000000000002d58a3e64d6edced24d77d834b7cbbd2500f8724000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000035000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000d

-----Decoded View---------------
Arg [0] : _tokenName (string): LonelyPop
Arg [1] : _symbol (string): LP
Arg [2] : _maxSupply (uint256): 10000
Arg [3] : _startPrice (uint256): 1500000000000000000
Arg [4] : _defaultURI (string):
Arg [5] : chainLinkParams (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [6] : revenueShare (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
26 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [3] : 00000000000000000000000000000000000000000000000014d1120d7b160000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [5] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [6] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [7] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [8] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [10] : 4c6f6e656c79506f700000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [12] : 4c50000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [15] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [17] : 000000000000000000000000d256794944f03c4581994aca4f67b0d8ac982154
Arg [18] : 00000000000000000000000076fc40c01a086c8a9d4a9183f437ed070f02dd74
Arg [19] : 000000000000000000000000720f75e5899cf1fc2deda47a1c4a2913960b9b9e
Arg [20] : 0000000000000000000000002d58a3e64d6edced24d77d834b7cbbd2500f8724
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [24] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [25] : 000000000000000000000000000000000000000000000000000000000000000d


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.