ETH Price: $3,424.85 (-0.45%)
Gas: 2 Gwei

Token

Geneticats (GTCA)
 

Overview

Max Total Supply

975 GTCA

Holders

264

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
3 GTCA
0x93e45360F7e5B0B85d8e65DAE9FA1a6f2aF56819
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

GenomesDAO is a biotech DAO focused on the safe, private, and auditable monetization of genomic data. We’re merging the bleeding edge of encryption technology (AMD-SEV Vaults) with the blockchain to create a decentralized data brokering platform.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Geneticats

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 18 : Geneticats.sol
//SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./access/controllerPanel.sol";
import "./access/vrfConnector.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

//// @author: The platform for decentralized communities. - https://galaxis.xyz/

contract Geneticats is ERC721Enumerable, controllerPanel {
    address public ec_contract_address;
    IRNG public _iRnd;

    uint256 public normalPrice = 0.165 ether;
    uint256 public whiteListPrice = 0.15 ether;

    using Strings for uint256;
    address public presigner;

    // Time conditions
    uint256 public discount_start;
    uint256 public discount_end;
    uint256 public sale_start;
    uint256 public sale_end;
    uint256 public reveal_start;

    uint128 public currentIndex = 0;
    uint128 public whiteListSold = 0;
    uint128 public EcSold = 0;

    uint128 public discontMintLimit = 3;

    uint128 public maxSold = 0;
    uint128 public maxSupply = 10000;

    bool public setupTime;

    bytes32 internal vrfRequestId;
    uint256 public offset;
    bool public revealLocked = false;

    string public _tokenRevealedBaseURI;
    bytes32 public _reqID;
    bool public _randomReceived;
    string public _tokenPreRevealURI =
        "https://ether-cards.mypinata.cloud/ipfs/QmZjyP2eKhNsuaK363bpjgtBU7U5XRYL6wpgWDsHAkXWRg";

    uint256[] public shares;
    address payable[] wallets;

    mapping(address => uint256) public whitelist_claimed;

    event WhiteListSale(uint256 tokenCount, address receiver);
    event ECSale(uint256 tokenCount, address receiver, uint256 ecID);
    event buyWithoutDiscount(address _buyer, uint8 __amount);
    event RandomProcessed(uint256 _offset);

    constructor(
        address _ec_contract_address,
        IRNG _rng,
        address _presigner
    ) ERC721("Geneticats", "GTCA") {
        ec_contract_address = _ec_contract_address;
        _iRnd = _rng;
        presigner = _presigner;
    }

    modifier discountActive() {
        require(setupTime, "notInitialised");
        require(
            block.timestamp >= discount_start &&
                block.timestamp <= discount_end,
            "!D"
        );
        _;
    }

    modifier saleActive() {
        require(setupTime, "notInitialised");
        require(
            block.timestamp > sale_start && block.timestamp < sale_end,
            "!S"
        );
        _;
    }

    modifier revealActive() {
        require(setupTime, "notInitialised");
        require(block.timestamp > reveal_start, "!S");
        _;
    }

    function setTime(
        uint256 _discount_start,
        uint256 _sale_start,
        address payable[] memory _wallets,
        uint256[] memory _shares
    ) external onlyAllowed {
        discount_start = _discount_start;
        discount_end = _discount_start + 1 days;
        sale_start = _sale_start;
        sale_end = _sale_start + 7 days;
        reveal_start = sale_end + 1 days;
        require(_wallets.length == _shares.length, "!length");
        wallets = _wallets;
        shares = _shares;
        setupTime = true;
    }

    function changePresigner(address _presigner) external onlyAllowed {
        presigner = _presigner;
    }

    function setWallets(
        address payable[] memory _wallets,
        uint256[] memory _shares
    ) external onlyAllowed {
        require(_wallets.length == _shares.length, "!length");
        wallets = _wallets;
        shares = _shares;
    }

    receive() external payable {
        splitFee(msg.value);
    }

    function extendTime(
        uint256 _discount_end,
        uint256 _sale_end,
        uint256 _reveal_start
    ) external onlyAllowed {
        discount_end = _discount_end;
        sale_end = _sale_end;
        reveal_start = _reveal_start;
    }

    function indexArray(address _user)
        external
        view
        returns (uint256[] memory)
    {
        uint256 sum = this.balanceOf(_user);
        uint256[] memory indexes = new uint256[](sum);

        for (uint256 i = 0; i < sum; i++) {
            indexes[i] = this.tokenOfOwnerByIndex(_user, i);
        }
        return indexes;
    }

    function assignCard(address _receiver) internal {
        currentIndex++;
        _mint(_receiver, currentIndex);
    }

    function adminMint(address _receiver, uint8 loop) public onlyAllowed {
        require((currentIndex + loop) <= maxSupply, "Overmint");
        for (uint8 i = 0; i < loop; i++) {
            assignCard(_receiver);
        }
    }

    function buyCardInternal(uint8 _amount, bool _withDiscount) internal {
        uint256 balance;
        if (_withDiscount) {
            balance = _amount * (whiteListPrice);
        } else {
            balance = _amount * (normalPrice);
        }
        require(msg.value == balance, "Price not met");
        require(availableSales() >= _amount, "sold out");

        for (uint8 i = 0; i < _amount; i++) {
            assignCard(msg.sender);
            maxSold++;
        }
        splitFee(msg.value);
    }

    // ENTRY POINT 1/2 TO SALE CONTRACT
    function buyCard(uint8 _amount) external payable saleActive {
        buyCardInternal(_amount, false);
        emit buyWithoutDiscount(msg.sender, _amount);
    }

    function whiteListBuySignature(
        uint8 _tokenCount,
        bytes memory signature,
        uint256 _ec_token_id // if 0 then use whitelist. if not 0 then use normal
    ) public payable discountActive {
        if (_ec_token_id == 0) {// WHITELIST
            require(verify(msg.sender, signature), "Unauthorised");
            uint256 this_taken = whitelist_claimed[msg.sender] + _tokenCount;
            whitelist_claimed[msg.sender] = this_taken;
            require(
                whitelist_claimed[msg.sender] <= discontMintLimit,
                "whitelist Limit"
            );
            buyCardInternal(_tokenCount, true);

            emit WhiteListSale(_tokenCount, msg.sender);
        } else { // EC
            require(
                IERC721(ec_contract_address).ownerOf(_ec_token_id) ==
                    msg.sender,
                "!EC"
            );
            uint256 this_taken = whitelist_claimed[msg.sender] + _tokenCount;
            whitelist_claimed[msg.sender] = this_taken;
            require(
                whitelist_claimed[msg.sender] <= discontMintLimit,
                "whitelist Limit"
            );
            EcSold += _tokenCount;
            buyCardInternal(_tokenCount, true);
            emit ECSale(_tokenCount, msg.sender, _ec_token_id);
        }
    }

    function splitFee(uint256 amount) internal {
        // duplicated to save an extra call
        bool sent;
        uint256 _total;
        for (uint256 j = 0; j < wallets.length; j++) {
            uint256 _amount = (amount * shares[j]) / 1000;
            if (j == wallets.length - 1) {
                _amount = amount - _total;
            } else {
                _total += _amount;
            }
            (sent, ) = wallets[j].call{value: _amount}(""); // don't use send or xfer (gas)
            require(sent, "Failed to send Ether");
        }
    }

    function availableSales() public view returns (uint128) {
        return (maxSupply - maxSold);
    }

    function setDataFolder(
        string memory __tokenPreRevealURI,
        string memory __tokenRevealedBaseURI,
        bool _resetReveal
    ) external onlyAllowed {
        _tokenPreRevealURI = __tokenPreRevealURI;
        _tokenRevealedBaseURI = __tokenRevealedBaseURI;
        if (_resetReveal) {
            offset = 0;
            _randomReceived = false;
            revealLocked = false;
        }
    }

    function uri(uint256 n) public view returns (uint256) {
        return ((n + offset) % maxSupply);
    }

    function reveal() external revealActive onlyAllowed {
        require(!revealLocked, "locked");
        revealLocked = true;
     //    _tokenRevealedBaseURI = "https://geneticats-metadata-staging.herokuapp.com/api/metadata/";
        _tokenRevealedBaseURI = "https://geneticats-metadata-server.ether.cards/api/metadata/";
        if (!_randomReceived) _reqID = _iRnd.requestRandomNumberWithCallback();
    }

    function process(uint256 random, bytes32 reqID) external {
        require(msg.sender == address(_iRnd), "Unauthorised RNG");
        if (_reqID == reqID) {
            require(!(_randomReceived), "Random No. already received");
            offset = random % (maxSupply + 1);
            emit RandomProcessed(offset);
            _randomReceived = true;
        } else revert("Incorrect request ID sent");
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721)
        returns (string memory)
    {
        require(_exists(tokenId), "Token does not exist");
        string memory revealedBaseURI = _tokenRevealedBaseURI;

        if (!_randomReceived) return _tokenPreRevealURI;

        uint256 newTokenId = uri(tokenId);

        string memory folder = (newTokenId % 100).toString();
        string memory file = newTokenId.toString();
        string memory slash = "/";
        return string(abi.encodePacked(revealedBaseURI, folder, slash, file));
        //
    }

    function verify(address _user, bytes memory _signature)
        public
        view
        returns (bool)
    {
        require(_user != address(0), "NativeMetaTransaction: INVALID__user");
        bytes32 _hash =
            ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(_user)));
        require(_signature.length == 65, "Invalid signature length");
        address recovered = ECDSA.recover(_hash, _signature);
        return (presigner == recovered);
    }

    function how_long_more(uint8 _phase)
        public
        view
        returns (
            uint256 Days,
            uint256 Hours,
            uint256 Minutes,
            uint256 Seconds
        )
    {
        uint256 phase;
        if (_phase == 1) {
            phase = discount_start;
        } else if (_phase == 2) {
            phase = sale_start;
        } else if (_phase == 3) {
            phase = reveal_start;
        }else {
            return (0, 0, 0, 0);
        }
        require(block.timestamp < phase, "Started");
        uint256 gap = phase - block.timestamp;
        Days = gap / (24 * 60 * 60);
        gap = gap % (24 * 60 * 60);
        Hours = gap / (60 * 60);
        gap = gap % (60 * 60);
        Minutes = gap / 60;
        Seconds = gap % 60;
        return (Days, Hours, Minutes, Seconds);
    }

    struct theKitchenSink {
        uint256 discount_start;
        uint256 discount_end;
        uint256 sale_start;
        uint256 sale_end;
        uint256 reveal_start;
        uint256 __availableSales;
    }

    function tellEverything() external view returns (theKitchenSink memory) {
        return
            theKitchenSink(
                discount_start,
                discount_end,
                sale_start,
                sale_end,
                reveal_start,
                availableSales()
            );
    }
}

File 2 of 18 : 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 3 of 18 : 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 4 of 18 : controllerPanel.sol
//SPDX-License-Identifier: Unlicensed

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

abstract contract controllerPanel is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;

    EnumerableSet.AddressSet private _controllers;

    event ApprovedController(address indexed account, address indexed sender);
    event RevokedController(address indexed account, address indexed sender);

    modifier onlyAllowed() {
        require(
            (_controllers.contains(msg.sender) || owner() == msg.sender),
            "Not Authorised"
        );
        _;
    }

    function getControllers()
        external
        view
        returns (address[] memory _allowed)
    {
        _allowed = new address[](_controllers.length());
        for (uint256 i = 0; i < _controllers.length(); i++) {
            _allowed[i] = _controllers.at(i);
        }
        return _allowed;
    }

    function approveController(address _controller) external onlyOwner {
        require(
            !_controllers.contains(_controller),
            "Controller already added."
        );
        _controllers.add(_controller);
        emit ApprovedController(_controller, msg.sender);
    }

    function revokeController(address _controller) external onlyOwner {
        require(
            _controllers.contains(_controller),
            "Controller do not hold admin rights."
        );
        _controllers.remove(_controller);
        emit RevokedController(_controller, msg.sender);
    }

    function isController(address _controller) public view returns (bool) {
        return (owner() == _controller || _controllers.contains(_controller));
    }

    function retrieveERC20(IERC20 _token) external onlyOwner {
        if (address(_token) == 0x0000000000000000000000000000000000000000) {
            payable(owner()).transfer(address(this).balance);
        } else {
            _token.transfer(owner(), _token.balanceOf(address(this)));
        }
    }

    function retrieve721(address _tracker, uint256 _id) external onlyOwner {
        IERC721(_tracker).transferFrom(address(this), msg.sender, _id);
    }
}

File 5 of 18 : vrfConnector.sol
//SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;

interface IRNG {
    function requestRandomNumber() external returns (bytes32);

    function requestRandomNumberWithCallback() external returns (bytes32);

    function isRequestComplete(bytes32 requestId)
        external
        view
        returns (bool isCompleted);

    function randomNumber(bytes32 requestId)
        external
        view
        returns (uint256 randomNum);
}

File 6 of 18 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 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));
    }
}

File 7 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

File 8 of 18 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 tokenId);

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 11 of 18 : 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 12 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @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 18 : 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 18 : 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 15 of 18 : 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 16 of 18 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 17 of 18 : 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 18 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_ec_contract_address","type":"address"},{"internalType":"contract IRNG","name":"_rng","type":"address"},{"internalType":"address","name":"_presigner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ApprovedController","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"ecID","type":"uint256"}],"name":"ECSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_offset","type":"uint256"}],"name":"RandomProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RevokedController","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":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"WhiteListSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint8","name":"__amount","type":"uint8"}],"name":"buyWithoutDiscount","type":"event"},{"inputs":[],"name":"EcSold","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_iRnd","outputs":[{"internalType":"contract IRNG","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_randomReceived","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_reqID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenPreRevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenRevealedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint8","name":"loop","type":"uint8"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"approveController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableSales","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"}],"name":"buyCard","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_presigner","type":"address"}],"name":"changePresigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentIndex","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discontMintLimit","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discount_end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discount_start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ec_contract_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discount_end","type":"uint256"},{"internalType":"uint256","name":"_sale_end","type":"uint256"},{"internalType":"uint256","name":"_reveal_start","type":"uint256"}],"name":"extendTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getControllers","outputs":[{"internalType":"address[]","name":"_allowed","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_phase","type":"uint8"}],"name":"how_long_more","outputs":[{"internalType":"uint256","name":"Days","type":"uint256"},{"internalType":"uint256","name":"Hours","type":"uint256"},{"internalType":"uint256","name":"Minutes","type":"uint256"},{"internalType":"uint256","name":"Seconds","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"indexArray","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSold","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"normalPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"presigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"random","type":"uint256"},{"internalType":"bytes32","name":"reqID","type":"bytes32"}],"name":"process","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"retrieve721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"retrieveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reveal_start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"revokeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sale_end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sale_start","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":[{"internalType":"string","name":"__tokenPreRevealURI","type":"string"},{"internalType":"string","name":"__tokenRevealedBaseURI","type":"string"},{"internalType":"bool","name":"_resetReveal","type":"bool"}],"name":"setDataFolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discount_start","type":"uint256"},{"internalType":"uint256","name":"_sale_start","type":"uint256"},{"internalType":"address payable[]","name":"_wallets","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"name":"setTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"_wallets","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"name":"setWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setupTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tellEverything","outputs":[{"components":[{"internalType":"uint256","name":"discount_start","type":"uint256"},{"internalType":"uint256","name":"discount_end","type":"uint256"},{"internalType":"uint256","name":"sale_start","type":"uint256"},{"internalType":"uint256","name":"sale_end","type":"uint256"},{"internalType":"uint256","name":"reveal_start","type":"uint256"},{"internalType":"uint256","name":"__availableSales","type":"uint256"}],"internalType":"struct Geneticats.theKitchenSink","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"uri","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tokenCount","type":"uint8"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"_ec_token_id","type":"uint256"}],"name":"whiteListBuySignature","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"whiteListPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whiteListSold","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist_claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

67024a32a033f08000600f55670214e8348c4f00006010556000601755600360801b60185561027160841b601955601d805460ff1916905561010060405260566080818152906200525c60a03980516200006291602191602090910190620001ad565b503480156200007057600080fd5b50604051620052b2380380620052b2833981016040819052620000939162000253565b604080518082018252600a81526947656e6574696361747360b01b6020808301918252835180850190945260048452634754434160e01b908401528151919291620000e191600091620001ad565b508051620000f7906001906020840190620001ad565b505050620001146200010e6200015760201b60201c565b6200015b565b600d80546001600160a01b039485166001600160a01b031991821617909155600e80549385169382169390931790925560118054919093169116179055620002fc565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001bb90620002a6565b90600052602060002090601f016020900481019282620001df57600085556200022a565b82601f10620001fa57805160ff19168380011785556200022a565b828001600101855582156200022a579182015b828111156200022a5782518255916020019190600101906200020d565b50620002389291506200023c565b5090565b5b808211156200023857600081556001016200023d565b60008060006060848603121562000268578283fd5b83516200027581620002e3565b60208501519093506200028881620002e3565b60408501519092506200029b81620002e3565b809150509250925092565b600281046001821680620002bb57607f821691505b60208210811415620002dd57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0381168114620002f957600080fd5b50565b614f50806200030c6000396000f3fe6080604052600436106103fd5760003560e01c80638b3e76fd1161020d578063b4e8a6c411610128578063d1be750b116100bb578063db86e4001161008a578063ece8ea4e1161006f578063ece8ea4e14610b0f578063f2fde38b14610b24578063f8f82c3414610b445761040d565b8063db86e40014610ada578063e985e9c514610aef5761040d565b8063d1be750b14610a63578063d555654414610a90578063d5abeb0114610aa5578063d7c48e7a14610aba5761040d565b8063be2b089f116100f7578063be2b089f146109f9578063c2ef7f5414610a0e578063c87b56dd14610a23578063cd627ef514610a435761040d565b8063b4e8a6c41461098f578063b53d706f146109b1578063b88d4fde146109c4578063b9b994d7146109e45761040d565b80639fd72b94116101a0578063ab5dea541161016f578063ab5dea541461091a578063b103dd291461093a578063b429afeb1461095a578063b46bc2691461097a5761040d565b80639fd72b94146108a5578063a22cb465146108c5578063a475b5dd146108e5578063a5b3abfb146108fa5761040d565b806393647ecb116101dc57806393647ecb14610846578063942723b114610866578063945ec9dd1461087b57806395d89b41146108905761040d565b80638b3e76fd146107e75780638da5cb5b146108075780638e74955b1461081c57806392ccacda146108315761040d565b806337dfcaac116103185780635fcc5adf116102ab5780636d26620e1161027a578063715018a61161025f578063715018a6146107a85780637d212732146107bd578063848628bf146107d25761040d565b80636d26620e1461077357806370a08231146107885761040d565b80635fcc5adf146107095780636352211e1461071e578063662326751461073e578063685756851461075e5761040d565b80634a41d1ac116102e75780634a41d1ac146106895780634f6ccce7146106a957806356e541bd146106c957806357a858fc146106e95761040d565b806337dfcaac146106045780633d64ac9b1461061957806342842e0e14610639578063457a8991146106595761040d565b806326987b60116103905780632f3ef7ac1161035f5780632f3ef7ac1461059a5780632f745c59146105af5780632feb9524146105cf57806335ce5395146105e45761040d565b806326987b601461052c5780632e5c0fe71461054e5780632eb0b99b146105635780632f151b76146105785761040d565b80630ad2db6d116103cc5780630ad2db6d146104b75780630e89341c146104ca57806318160ddd146104f757806323b872dd1461050c5761040d565b806301ffc9a71461041257806306fdde0314610448578063081812fc1461046a578063095ea7b3146104975761040d565b3661040d5761040b34610b59565b005b600080fd5b34801561041e57600080fd5b5061043261042d366004613c3a565b610cb4565b60405161043f9190614024565b60405180910390f35b34801561045457600080fd5b5061045d610cfa565b60405161043f9190614056565b34801561047657600080fd5b5061048a610485366004613ce7565b610d8c565b60405161043f9190613ef6565b3480156104a357600080fd5b5061040b6104b2366004613b50565b610dcf565b61040b6104c5366004613db3565b610e67565b3480156104d657600080fd5b506104ea6104e5366004613ce7565b610efe565b60405161043f919061402f565b34801561050357600080fd5b506104ea610f2c565b34801561051857600080fd5b5061040b610527366004613a2b565b610f32565b34801561053857600080fd5b50610541610f6a565b60405161043f9190614c14565b34801561055a57600080fd5b506104ea610f79565b34801561056f57600080fd5b50610541610f7f565b34801561058457600080fd5b5061058d610f95565b60405161043f9190614bd0565b3480156105a657600080fd5b506104ea610fe8565b3480156105bb57600080fd5b506104ea6105ca366004613b50565b610fee565b3480156105db57600080fd5b5061045d611043565b3480156105f057600080fd5b506104ea6105ff3660046139bb565b6110d1565b34801561061057600080fd5b506104326110e3565b34801561062557600080fd5b5061040b610634366004613cff565b6110ec565b34801561064557600080fd5b5061040b610654366004613a2b565b6111dd565b34801561066557600080fd5b50610679610674366004613db3565b6111f8565b60405161043f9493929190614c28565b34801561069557600080fd5b506104326106a4366004613b02565b6112de565b3480156106b557600080fd5b506104ea6106c4366004613ce7565b611380565b3480156106d557600080fd5b5061040b6106e43660046139bb565b6113db565b3480156106f557600080fd5b506104ea610704366004613ce7565b61143e565b34801561071557600080fd5b5061043261145f565b34801561072a57600080fd5b5061048a610739366004613ce7565b611468565b34801561074a57600080fd5b5061040b6107593660046139bb565b61149d565b34801561076a57600080fd5b506104ea611549565b34801561077f57600080fd5b5061045d61154f565b34801561079457600080fd5b506104ea6107a33660046139bb565b61155c565b3480156107b457600080fd5b5061040b6115a0565b3480156107c957600080fd5b506104ea6115eb565b3480156107de57600080fd5b506105416115f1565b3480156107f357600080fd5b5061040b6108023660046139bb565b611600565b34801561081357600080fd5b5061048a6116ab565b34801561082857600080fd5b5061048a6116ba565b34801561083d57600080fd5b506104ea6116c9565b34801561085257600080fd5b5061040b610861366004613b7b565b6116cf565b34801561087257600080fd5b5061054161178b565b34801561088757600080fd5b506104ea6117a1565b34801561089c57600080fd5b5061045d6117a7565b3480156108b157600080fd5b5061040b6108c0366004613d20565b6117b6565b3480156108d157600080fd5b5061040b6108e0366004613ad5565b61188f565b3480156108f157600080fd5b5061040b6118a1565b34801561090657600080fd5b5061040b610915366004613b50565b611a19565b34801561092657600080fd5b5061040b610935366004613c72565b611ad7565b34801561094657600080fd5b5061040b6109553660046139bb565b611b66565b34801561096657600080fd5b506104326109753660046139bb565b611cfe565b34801561098657600080fd5b50610541611d2d565b34801561099b57600080fd5b506109a4611d55565b60405161043f9190613f9f565b61040b6109bf366004613dcd565b611e20565b3480156109d057600080fd5b5061040b6109df366004613a6b565b612101565b3480156109f057600080fd5b506104ea61213a565b348015610a0557600080fd5b5061048a612140565b348015610a1a57600080fd5b5061043261214f565b348015610a2f57600080fd5b5061045d610a3e366004613ce7565b612158565b348015610a4f57600080fd5b5061040b610a5e366004613d88565b61234d565b348015610a6f57600080fd5b50610a83610a7e3660046139bb565b61239c565b60405161043f9190613fec565b348015610a9c57600080fd5b506104ea61254a565b348015610ab157600080fd5b50610541612550565b348015610ac657600080fd5b5061040b610ad5366004613baf565b612566565b348015610ae657600080fd5b506105416125ef565b348015610afb57600080fd5b50610432610b0a3660046139f3565b6125fe565b348015610b1b57600080fd5b506104ea61262c565b348015610b3057600080fd5b5061040b610b3f3660046139bb565b612632565b348015610b5057600080fd5b5061048a6126a0565b60008060005b602354811015610cae5760006103e860228381548110610b8f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015486610ba59190614d28565b610baf9190614d14565b602354909150610bc190600190614d6f565b821415610bd957610bd28386614d6f565b9050610be6565b610be38184614cfc565b92505b60238281548110610c0757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516001600160a01b03909116908290610c2d90613ef3565b60006040518083038185875af1925050503d8060008114610c6a576040519150601f19603f3d011682016040523d82523d6000602084013e610c6f565b606091505b50508094505083610c9b5760405162461bcd60e51b8152600401610c9290614327565b60405180910390fd5b5080610ca681614e14565b915050610b5f565b50505050565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610cf25750610cf2826126af565b90505b919050565b606060008054610d0990614db2565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3590614db2565b8015610d825780601f10610d5757610100808354040283529160200191610d82565b820191906000526020600020905b815481529060010190602001808311610d6557829003601f168201915b5050505050905090565b6000610d9782612721565b610db35760405162461bcd60e51b8152600401610c9290614758565b506000908152600460205260409020546001600160a01b031690565b6000610dda82611468565b9050806001600160a01b0316836001600160a01b03161415610e0e5760405162461bcd60e51b8152600401610c9290614938565b806001600160a01b0316610e2061273e565b6001600160a01b03161480610e3c5750610e3c81610b0a61273e565b610e585760405162461bcd60e51b8152600401610c92906145ca565b610e628383612742565b505050565b601a5460ff16610e895760405162461bcd60e51b8152600401610c9290614429565b60145442118015610e9b575060155442105b610eb75760405162461bcd60e51b8152600401610c9290614a97565b610ec28160006127b0565b7ffa7834a1093287aa2ad7d58c362e5c73de010ba8c4ff5a2e56443e9cd6d67e1e3382604051610ef3929190613f83565b60405180910390a150565b601954601c54600091600160801b90046001600160801b031690610f229084614cfc565b610cf29190614e4f565b60085490565b610f43610f3d61273e565b826128a9565b610f5f5760405162461bcd60e51b8152600401610c9290614995565b610e6283838361292e565b6017546001600160801b031681565b60145481565b601754600160801b90046001600160801b031681565b610f9d613716565b6040518060c0016040528060125481526020016013548152602001601454815260200160155481526020016016548152602001610fd8611d2d565b6001600160801b03169052905090565b60165481565b6000610ff98361155c565b82106110175760405162461bcd60e51b8152600401610c929061410e565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b6021805461105090614db2565b80601f016020809104026020016040519081016040528092919081815260200182805461107c90614db2565b80156110c95780601f1061109e576101008083540402835291602001916110c9565b820191906000526020600020905b8154815290600101906020018083116110ac57829003601f168201915b505050505081565b60246020526000908152604090205481565b601d5460ff1681565b600e546001600160a01b031633146111165760405162461bcd60e51b8152600401610c9290614a29565b80601f5414156111c15760205460ff16156111435760405162461bcd60e51b8152600401610c92906143bb565b60195461116190600160801b90046001600160801b03166001614cd1565b611174906001600160801b031683614e4f565b601c8190556040517fff74eb8ed2a85f7032abbd6ce624acfda4ace664c3cc8ad760c0fd30c9d7eed9916111a79161402f565b60405180910390a16020805460ff191660011790556111d9565b60405162461bcd60e51b8152600401610c9290614293565b5050565b610e6283838360405180602001604052806000815250612101565b60008060008060008560ff16600114156112155750601254611253565b8560ff166002141561122a5750601454611253565b8560ff166003141561123f5750601654611253565b6000806000809450945094509450506112d7565b8042106112725760405162461bcd60e51b8152600401610c9290614b99565b600061127e4283614d6f565b905061128d6201518082614d14565b955061129c6201518082614e4f565b90506112aa610e1082614d14565b94506112b8610e1082614e4f565b90506112c5603c82614d14565b93506112d2603c82614e4f565b925050505b9193509193565b60006001600160a01b0383166113065760405162461bcd60e51b8152600401610c92906142ca565b60006113378460405160200161131c9190613e4e565b60405160208183030381529060405280519060200120612a5b565b9050825160411461135a5760405162461bcd60e51b8152600401610c9290614a60565b60006113668285612a8b565b6011546001600160a01b0391821691161495945050505050565b600061138a610f2c565b82106113a85760405162461bcd60e51b8152600401610c9290614ace565b600882815481106113c957634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6113e6600b33612aa7565b806114005750336113f56116ab565b6001600160a01b0316145b61141c5760405162461bcd60e51b8152600401610c92906140d7565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6022818154811061144e57600080fd5b600091825260209091200154905081565b601a5460ff1681565b6000818152600260205260408120546001600160a01b031680610cf25760405162461bcd60e51b8152600401610c9290614684565b6114a561273e565b6001600160a01b03166114b66116ab565b6001600160a01b0316146114dc5760405162461bcd60e51b8152600401610c92906147a4565b6114e7600b82612aa7565b156115045760405162461bcd60e51b8152600401610c929061486d565b61150f600b82612ac3565b5060405133906001600160a01b038316907fde4bbadbdbd1ed4cfc0454fa40ae242b7ef106adbe8466849ebf5cff831bc10590600090a350565b60105481565b601e805461105090614db2565b60006001600160a01b0382166115845760405162461bcd60e51b8152600401610c9290614627565b506001600160a01b031660009081526003602052604090205490565b6115a861273e565b6001600160a01b03166115b96116ab565b6001600160a01b0316146115df5760405162461bcd60e51b8152600401610c92906147a4565b6115e96000612ad8565b565b60125481565b6019546001600160801b031681565b61160861273e565b6001600160a01b03166116196116ab565b6001600160a01b03161461163f5760405162461bcd60e51b8152600401610c92906147a4565b61164a600b82612aa7565b6116665760405162461bcd60e51b8152600401610c92906148db565b611671600b82612b2a565b5060405133906001600160a01b038316907f799caeba7dd7e8649fefe03dd79338a265cf8f9738da0cd834338f2cab9abd1c90600090a350565b600a546001600160a01b031690565b600e546001600160a01b031681565b60135481565b6116da600b33612aa7565b806116f45750336116e96116ab565b6001600160a01b0316145b6117105760405162461bcd60e51b8152600401610c92906140d7565b6019546017546001600160801b03600160801b9092048216916117389160ff85169116614cd1565b6001600160801b0316111561175f5760405162461bcd60e51b8152600401610c92906149f2565b60005b8160ff168160ff161015610e625761177983612b3f565b8061178381614e2f565b915050611762565b601854600160801b90046001600160801b031681565b600f5481565b606060018054610d0990614db2565b6117c1600b33612aa7565b806117db5750336117d06116ab565b6001600160a01b0316145b6117f75760405162461bcd60e51b8152600401610c92906140d7565b60128490556118098462015180614cfc565b601355601483905561181e8362093a80614cfc565b60158190556118309062015180614cfc565b60165580518251146118545760405162461bcd60e51b8152600401610c9290614b62565b815161186790602390602085019061374c565b50805161187b9060229060208401906137ad565b5050601a805460ff19166001179055505050565b6111d961189a61273e565b8383612b88565b601a5460ff166118c35760405162461bcd60e51b8152600401610c9290614429565b60165442116118e45760405162461bcd60e51b8152600401610c9290614a97565b6118ef600b33612aa7565b806119095750336118fe6116ab565b6001600160a01b0316145b6119255760405162461bcd60e51b8152600401610c92906140d7565b601d5460ff16156119485760405162461bcd60e51b8152600401610c92906148a4565b601d805460ff191660011790556040805160608101909152603c808252614edf6020830139805161198191601e916020909101906137e8565b5060205460ff166115e957600e60009054906101000a90046001600160a01b03166001600160a01b031663c532bbac6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156119dc57600080fd5b505af11580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190613c22565b601f55565b611a2161273e565b6001600160a01b0316611a326116ab565b6001600160a01b031614611a585760405162461bcd60e51b8152600401610c92906147a4565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b038316906323b872dd90611aa190309033908690600401613f0a565b600060405180830381600087803b158015611abb57600080fd5b505af1158015611acf573d6000803e3d6000fd5b505050505050565b611ae2600b33612aa7565b80611afc575033611af16116ab565b6001600160a01b0316145b611b185760405162461bcd60e51b8152600401610c92906140d7565b8251611b2b9060219060208601906137e8565b508151611b3f90601e9060208501906137e8565b508015610e62576000601c556020805460ff19908116909155601d80549091169055505050565b611b6e61273e565b6001600160a01b0316611b7f6116ab565b6001600160a01b031614611ba55760405162461bcd60e51b8152600401610c92906147a4565b6001600160a01b038116611bf957611bbb6116ab565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015611bf3573d6000803e3d6000fd5b50611cfb565b806001600160a01b031663a9059cbb611c106116ab565b6040516370a0823160e01b81526001600160a01b038516906370a0823190611c3c903090600401613ef6565b60206040518083038186803b158015611c5457600080fd5b505afa158015611c68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8c9190613c22565b6040518363ffffffff1660e01b8152600401611ca9929190613f6a565b602060405180830381600087803b158015611cc357600080fd5b505af1158015611cd7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d99190613c06565b50565b6000816001600160a01b0316611d126116ab565b6001600160a01b03161480610cf25750610cf2600b83612aa7565b601954600090611d50906001600160801b0380821691600160801b900416614d47565b905090565b6060611d61600b612c2b565b67ffffffffffffffff811115611d8757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611db0578160200160208202803683370190505b50905060005b611dc0600b612c2b565b811015611e1c57611dd2600b82612c36565b828281518110611df257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611e1481614e14565b915050611db6565b5090565b601a5460ff16611e425760405162461bcd60e51b8152600401610c9290614429565b6012544210158015611e5657506013544211155b611e725760405162461bcd60e51b8152600401610c92906144a2565b80611f4c57611e8133836112de565b611e9d5760405162461bcd60e51b8152600401610c9290614593565b33600090815260246020526040812054611ebb9060ff861690614cfc565b336000908152602460205260409020819055601854909150600160801b90046001600160801b0316811115611f025760405162461bcd60e51b8152600401610c9290614225565b611f0d8460016127b0565b7f20259357ce779a72449719a600d07b9d13aa576c3dc85d22501bdcb539f750f58433604051611f3e929190614c43565b60405180910390a150610e62565b600d546040517f6352211e00000000000000000000000000000000000000000000000000000000815233916001600160a01b031690636352211e90611f9590859060040161402f565b60206040518083038186803b158015611fad57600080fd5b505afa158015611fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe591906139d7565b6001600160a01b03161461200b5760405162461bcd60e51b8152600401610c9290614b2b565b336000908152602460205260408120546120299060ff861690614cfc565b336000908152602460205260409020819055601854909150600160801b90046001600160801b03168111156120705760405162461bcd60e51b8152600401610c9290614225565b6018805460ff861691906000906120919084906001600160801b0316614cd1565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506120c08460016127b0565b7f667d45dd3c4af7a44db20873026946cdd4c30116423f0a37085981b2fc2d1f498433846040516120f393929190614c5f565b60405180910390a150505050565b61211261210c61273e565b836128a9565b61212e5760405162461bcd60e51b8152600401610c9290614995565b610cae84848484612c42565b60155481565b600d546001600160a01b031681565b60205460ff1681565b606061216382612721565b61217f5760405162461bcd60e51b8152600401610c92906144d9565b6000601e805461218e90614db2565b80601f01602080910402602001604051908101604052809291908181526020018280546121ba90614db2565b80156122075780601f106121dc57610100808354040283529160200191612207565b820191906000526020600020905b8154815290600101906020018083116121ea57829003601f168201915b50506020549394505060ff90921691506122b09050576021805461222a90614db2565b80601f016020809104026020016040519081016040528092919081815260200182805461225690614db2565b80156122a35780601f10612278576101008083540402835291602001916122a3565b820191906000526020600020905b81548152906001019060200180831161228657829003601f168201915b5050505050915050610cf5565b60006122bb84610efe565b905060006122d26122cd606484614e4f565b612c75565b905060006122df83612c75565b905060006040518060400160405280600181526020017f2f000000000000000000000000000000000000000000000000000000000000008152509050848382846040516020016123329493929190613e6b565b60405160208183030381529060405295505050505050919050565b612358600b33612aa7565b806123725750336123676116ab565b6001600160a01b0316145b61238e5760405162461bcd60e51b8152600401610c92906140d7565b601392909255601555601655565b6040516370a0823160e01b815260609060009030906370a08231906123c5908690600401613ef6565b60206040518083038186803b1580156123dd57600080fd5b505afa1580156123f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124159190613c22565b905060008167ffffffffffffffff81111561244057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612469578160200160208202803683370190505b50905060005b82811015612542576040517f2f745c590000000000000000000000000000000000000000000000000000000081523090632f745c59906124b59088908590600401613f6a565b60206040518083038186803b1580156124cd57600080fd5b505afa1580156124e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125059190613c22565b82828151811061252557634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061253a81614e14565b91505061246f565b509392505050565b601c5481565b601954600160801b90046001600160801b031681565b612571600b33612aa7565b8061258b5750336125806116ab565b6001600160a01b0316145b6125a75760405162461bcd60e51b8152600401610c92906140d7565b80518251146125c85760405162461bcd60e51b8152600401610c9290614b62565b81516125db90602390602085019061374c565b508051610e629060229060208401906137ad565b6018546001600160801b031681565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b601f5481565b61263a61273e565b6001600160a01b031661264b6116ab565b6001600160a01b0316146126715760405162461bcd60e51b8152600401610c92906147a4565b6001600160a01b0381166126975760405162461bcd60e51b8152600401610c92906141c8565b611cfb81612ad8565b6011546001600160a01b031681565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061271257506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610cf25750610cf282612dc4565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061277782611468565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081156127cf576010546127c89060ff8516614d28565b90506127e2565b600f546127df9060ff8516614d28565b90505b8034146128015760405162461bcd60e51b8152600401610c92906147d9565b8260ff1661280d611d2d565b6001600160801b031610156128345760405162461bcd60e51b8152600401610c929061455c565b60005b8360ff168160ff16101561289f5761284e33612b3f565b601980546001600160801b031690600061286783614ded565b91906101000a8154816001600160801b0302191690836001600160801b0316021790555050808061289790614e2f565b915050612837565b50610e6234610b59565b60006128b482612721565b6128d05760405162461bcd60e51b8152600401610c9290614510565b60006128db83611468565b9050806001600160a01b0316846001600160a01b031614806129165750836001600160a01b031661290b84610d8c565b6001600160a01b0316145b80612926575061292681856125fe565b949350505050565b826001600160a01b031661294182611468565b6001600160a01b0316146129675760405162461bcd60e51b8152600401610c9290614810565b6001600160a01b03821661298d5760405162461bcd60e51b8152600401610c929061435e565b612998838383612df6565b6129a3600082612742565b6001600160a01b03831660009081526003602052604081208054600192906129cc908490614d6f565b90915550506001600160a01b03821660009081526003602052604081208054600192906129fa908490614cfc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081604051602001612a6e9190613ec2565b604051602081830303815290604052805190602001209050919050565b6000806000612a9a8585612e7f565b9150915061254281612eef565b6000612abc836001600160a01b03841661301c565b9392505050565b6000612abc836001600160a01b038416613034565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612abc836001600160a01b03841661307e565b601780546001600160801b0316906000612b5883614ded565b82546101009290920a6001600160801b03818102199093169183160217909155601754611cfb925083911661319b565b816001600160a01b0316836001600160a01b03161415612bba5760405162461bcd60e51b8152600401610c92906143f2565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190612c1e908590614024565b60405180910390a3505050565b6000610cf28261327a565b6000612abc838361327e565b612c4d84848461292e565b612c59848484846132b6565b610cae5760405162461bcd60e51b8152600401610c929061416b565b606081612cb6575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610cf5565b8160005b8115612ce05780612cca81614e14565b9150612cd99050600a83614d14565b9150612cba565b60008167ffffffffffffffff811115612d0957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d33576020820181803683370190505b5090505b841561292657612d48600183614d6f565b9150612d55600a86614e4f565b612d60906030614cfc565b60f81b818381518110612d8357634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612dbd600a86614d14565b9450612d37565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b612e01838383610e62565b6001600160a01b038316612e1d57612e18816133ea565b612e40565b816001600160a01b0316836001600160a01b031614612e4057612e40838261342e565b6001600160a01b038216612e5c57612e57816134cb565b610e62565b826001600160a01b0316826001600160a01b031614610e6257610e6282826135a4565b600080825160411415612eb65760208301516040840151606085015160001a612eaa878285856135e8565b94509450505050612ee8565b825160401415612ee05760208301516040840151612ed58683836136c8565b935093505050612ee8565b506000905060025b9250929050565b6000816004811115612f1157634e487b7160e01b600052602160045260246000fd5b1415612f1c57611cfb565b6001816004811115612f3e57634e487b7160e01b600052602160045260246000fd5b1415612f5c5760405162461bcd60e51b8152600401610c9290614069565b6002816004811115612f7e57634e487b7160e01b600052602160045260246000fd5b1415612f9c5760405162461bcd60e51b8152600401610c92906140a0565b6003816004811115612fbe57634e487b7160e01b600052602160045260246000fd5b1415612fdc5760405162461bcd60e51b8152600401610c9290614460565b6004816004811115612ffe57634e487b7160e01b600052602160045260246000fd5b1415611cfb5760405162461bcd60e51b8152600401610c92906146e1565b60009081526001919091016020526040902054151590565b6000613040838361301c565b6130765750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561103d565b50600061103d565b600081815260018301602052604081205480156131915760006130a2600183614d6f565b85549091506000906130b690600190614d6f565b90508181146131375760008660000182815481106130e457634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061311557634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061315657634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061103d565b600091505061103d565b6001600160a01b0382166131c15760405162461bcd60e51b8152600401610c9290614723565b6131ca81612721565b156131e75760405162461bcd60e51b8152600401610c929061425c565b6131f360008383612df6565b6001600160a01b038216600090815260036020526040812080546001929061321c908490614cfc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b5490565b60008260000182815481106132a357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006132ca846001600160a01b0316613710565b156133df57836001600160a01b031663150b7a026132e661273e565b8786866040518563ffffffff1660e01b81526004016133089493929190613f2e565b602060405180830381600087803b15801561332257600080fd5b505af1925050508015613352575060408051601f3d908101601f1916820190925261334f91810190613c56565b60015b6133ac573d808015613380576040519150601f19603f3d011682016040523d82523d6000602084013e613385565b606091505b5080516133a45760405162461bcd60e51b8152600401610c929061416b565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050612926565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161343b8461155c565b6134459190614d6f565b600083815260076020526040902054909150808214613498576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906134dd90600190614d6f565b6000838152600960205260408120546008805493945090928490811061351357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061354257634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061358857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006135af8361155c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136bf565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136bf565b60006001878787876040516000815260200160405260405161366d9493929190614038565b6020604051602081039080840390855afa15801561368f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136b8576000600192509250506136bf565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613702878288856135e8565b935093505050935093915050565b3b151590565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8280548282559060005260206000209081019282156137a1579160200282015b828111156137a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061376c565b50611e1c92915061385b565b8280548282559060005260206000209081019282156137a1579160200282015b828111156137a15782518255916020019190600101906137cd565b8280546137f490614db2565b90600052602060002090601f01602090048101928261381657600085556137a1565b82601f1061382f57805160ff19168380011785556137a1565b828001600101855582156137a157918201828111156137a15782518255916020019190600101906137cd565b5b80821115611e1c576000815560010161385c565b600082601f830112613880578081fd5b8135602061389561389083614cad565b614c83565b82815281810190858301838502870184018810156138b1578586fd5b855b858110156138d85781356138c681614ea5565b845292840192908401906001016138b3565b5090979650505050505050565b600082601f8301126138f5578081fd5b8135602061390561389083614cad565b8281528181019085830183850287018401881015613921578586fd5b855b858110156138d857813584529284019290840190600101613923565b600082601f83011261394f578081fd5b813567ffffffffffffffff81111561396957613969614e8f565b61397c601f8201601f1916602001614c83565b818152846020838601011115613990578283fd5b816020850160208301379081016020019190915292915050565b803560ff81168114610cf557600080fd5b6000602082840312156139cc578081fd5b8135612abc81614ea5565b6000602082840312156139e8578081fd5b8151612abc81614ea5565b60008060408385031215613a05578081fd5b8235613a1081614ea5565b91506020830135613a2081614ea5565b809150509250929050565b600080600060608486031215613a3f578081fd5b8335613a4a81614ea5565b92506020840135613a5a81614ea5565b929592945050506040919091013590565b60008060008060808587031215613a80578081fd5b8435613a8b81614ea5565b93506020850135613a9b81614ea5565b925060408501359150606085013567ffffffffffffffff811115613abd578182fd5b613ac98782880161393f565b91505092959194509250565b60008060408385031215613ae7578182fd5b8235613af281614ea5565b91506020830135613a2081614eba565b60008060408385031215613b14578182fd5b8235613b1f81614ea5565b9150602083013567ffffffffffffffff811115613b3a578182fd5b613b468582860161393f565b9150509250929050565b60008060408385031215613b62578182fd5b8235613b6d81614ea5565b946020939093013593505050565b60008060408385031215613b8d578182fd5b8235613b9881614ea5565b9150613ba6602084016139aa565b90509250929050565b60008060408385031215613bc1578182fd5b823567ffffffffffffffff80821115613bd8578384fd5b613be486838701613870565b93506020850135915080821115613bf9578283fd5b50613b46858286016138e5565b600060208284031215613c17578081fd5b8151612abc81614eba565b600060208284031215613c33578081fd5b5051919050565b600060208284031215613c4b578081fd5b8135612abc81614ec8565b600060208284031215613c67578081fd5b8151612abc81614ec8565b600080600060608486031215613c86578081fd5b833567ffffffffffffffff80821115613c9d578283fd5b613ca98783880161393f565b94506020860135915080821115613cbe578283fd5b50613ccb8682870161393f565b9250506040840135613cdc81614eba565b809150509250925092565b600060208284031215613cf8578081fd5b5035919050565b60008060408385031215613d11578182fd5b50508035926020909101359150565b60008060008060808587031215613d35578182fd5b8435935060208501359250604085013567ffffffffffffffff80821115613d5a578384fd5b613d6688838901613870565b93506060870135915080821115613d7b578283fd5b50613ac9878288016138e5565b600080600060608486031215613d9c578081fd5b505081359360208301359350604090920135919050565b600060208284031215613dc4578081fd5b612abc826139aa565b600080600060608486031215613de1578081fd5b613dea846139aa565b9250602084013567ffffffffffffffff811115613e05578182fd5b613e118682870161393f565b925050604084013590509250925092565b60008151808452613e3a816020860160208601614d86565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b60008551613e7d818460208a01614d86565b855190830190613e91818360208a01614d86565b8551910190613ea4818360208901614d86565b8451910190613eb7818360208801614d86565b019695505050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b90565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f606080830184613e22565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392909216825260ff16602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015613fe05783516001600160a01b031683529284019291840191600101613fbb565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613fe057835183529284019291840191600101614008565b901515815260200190565b90815260200190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252612abc6020830184613e22565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252600e908201527f4e6f7420417574686f7269736564000000000000000000000000000000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201527f74206f6620626f756e6473000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f77686974656c697374204c696d69740000000000000000000000000000000000604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526019908201527f496e636f727265637420726571756573742049442073656e7400000000000000604082015260600190565b60208082526024908201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5f60408201527f7573657200000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f4661696c656420746f2073656e64204574686572000000000000000000000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f52616e646f6d204e6f2e20616c72656164792072656365697665640000000000604082015260600190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600e908201527f6e6f74496e697469616c69736564000000000000000000000000000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526002908201527f2144000000000000000000000000000000000000000000000000000000000000604082015260600190565b60208082526014908201527f546f6b656e20646f6573206e6f74206578697374000000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526008908201527f736f6c64206f7574000000000000000000000000000000000000000000000000604082015260600190565b6020808252600c908201527f556e617574686f72697365640000000000000000000000000000000000000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201527f5072696365206e6f74206d657400000000000000000000000000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f436f6e74726f6c6c657220616c72656164792061646465642e00000000000000604082015260600190565b60208082526006908201527f6c6f636b65640000000000000000000000000000000000000000000000000000604082015260600190565b60208082526024908201527f436f6e74726f6c6c657220646f206e6f7420686f6c642061646d696e2072696760408201527f6874732e00000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526008908201527f4f7665726d696e74000000000000000000000000000000000000000000000000604082015260600190565b60208082526010908201527f556e617574686f726973656420524e4700000000000000000000000000000000604082015260600190565b60208082526018908201527f496e76616c6964207369676e6174757265206c656e6774680000000000000000604082015260600190565b60208082526002908201527f2153000000000000000000000000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201527f7574206f6620626f756e64730000000000000000000000000000000000000000606082015260800190565b60208082526003908201527f2145430000000000000000000000000000000000000000000000000000000000604082015260600190565b60208082526007908201527f216c656e67746800000000000000000000000000000000000000000000000000604082015260600190565b60208082526007908201527f5374617274656400000000000000000000000000000000000000000000000000604082015260600190565b600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b6001600160801b0391909116815260200190565b93845260208401929092526040830152606082015260800190565b60ff9290921682526001600160a01b0316602082015260400190565b60ff9390931683526001600160a01b03919091166020830152604082015260600190565b60405181810167ffffffffffffffff81118282101715614ca557614ca5614e8f565b604052919050565b600067ffffffffffffffff821115614cc757614cc7614e8f565b5060209081020190565b60006001600160801b03808316818516808303821115614cf357614cf3614e63565b01949350505050565b60008219821115614d0f57614d0f614e63565b500190565b600082614d2357614d23614e79565b500490565b6000816000190483118215151615614d4257614d42614e63565b500290565b60006001600160801b0383811690831681811015614d6757614d67614e63565b039392505050565b600082821015614d8157614d81614e63565b500390565b60005b83811015614da1578181015183820152602001614d89565b83811115610cae5750506000910152565b600281046001821680614dc657607f821691505b60208210811415614de757634e487b7160e01b600052602260045260246000fd5b50919050565b60006001600160801b0380831681811415614e0a57614e0a614e63565b6001019392505050565b6000600019821415614e2857614e28614e63565b5060010190565b600060ff821660ff811415614e4657614e46614e63565b60010192915050565b600082614e5e57614e5e614e79565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611cfb57600080fd5b8015158114611cfb57600080fd5b6001600160e01b031981168114611cfb57600080fdfe68747470733a2f2f67656e657469636174732d6d657461646174612d7365727665722e65746865722e63617264732f6170692f6d657461646174612fa26469706673582212206e5de8746b1c95ed00c257129242de8ddebaf02dc1881d9dacc1a68c053a782b64736f6c6343000800003368747470733a2f2f65746865722d63617264732e6d7970696e6174612e636c6f75642f697066732f516d5a6a795032654b684e7375614b33363362706a677442553755355852594c3677706757447348416b5857526700000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab800000000000000000000000072170f577f3b221b3478e09ccd5323445a8460d7000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7

Deployed Bytecode

0x6080604052600436106103fd5760003560e01c80638b3e76fd1161020d578063b4e8a6c411610128578063d1be750b116100bb578063db86e4001161008a578063ece8ea4e1161006f578063ece8ea4e14610b0f578063f2fde38b14610b24578063f8f82c3414610b445761040d565b8063db86e40014610ada578063e985e9c514610aef5761040d565b8063d1be750b14610a63578063d555654414610a90578063d5abeb0114610aa5578063d7c48e7a14610aba5761040d565b8063be2b089f116100f7578063be2b089f146109f9578063c2ef7f5414610a0e578063c87b56dd14610a23578063cd627ef514610a435761040d565b8063b4e8a6c41461098f578063b53d706f146109b1578063b88d4fde146109c4578063b9b994d7146109e45761040d565b80639fd72b94116101a0578063ab5dea541161016f578063ab5dea541461091a578063b103dd291461093a578063b429afeb1461095a578063b46bc2691461097a5761040d565b80639fd72b94146108a5578063a22cb465146108c5578063a475b5dd146108e5578063a5b3abfb146108fa5761040d565b806393647ecb116101dc57806393647ecb14610846578063942723b114610866578063945ec9dd1461087b57806395d89b41146108905761040d565b80638b3e76fd146107e75780638da5cb5b146108075780638e74955b1461081c57806392ccacda146108315761040d565b806337dfcaac116103185780635fcc5adf116102ab5780636d26620e1161027a578063715018a61161025f578063715018a6146107a85780637d212732146107bd578063848628bf146107d25761040d565b80636d26620e1461077357806370a08231146107885761040d565b80635fcc5adf146107095780636352211e1461071e578063662326751461073e578063685756851461075e5761040d565b80634a41d1ac116102e75780634a41d1ac146106895780634f6ccce7146106a957806356e541bd146106c957806357a858fc146106e95761040d565b806337dfcaac146106045780633d64ac9b1461061957806342842e0e14610639578063457a8991146106595761040d565b806326987b60116103905780632f3ef7ac1161035f5780632f3ef7ac1461059a5780632f745c59146105af5780632feb9524146105cf57806335ce5395146105e45761040d565b806326987b601461052c5780632e5c0fe71461054e5780632eb0b99b146105635780632f151b76146105785761040d565b80630ad2db6d116103cc5780630ad2db6d146104b75780630e89341c146104ca57806318160ddd146104f757806323b872dd1461050c5761040d565b806301ffc9a71461041257806306fdde0314610448578063081812fc1461046a578063095ea7b3146104975761040d565b3661040d5761040b34610b59565b005b600080fd5b34801561041e57600080fd5b5061043261042d366004613c3a565b610cb4565b60405161043f9190614024565b60405180910390f35b34801561045457600080fd5b5061045d610cfa565b60405161043f9190614056565b34801561047657600080fd5b5061048a610485366004613ce7565b610d8c565b60405161043f9190613ef6565b3480156104a357600080fd5b5061040b6104b2366004613b50565b610dcf565b61040b6104c5366004613db3565b610e67565b3480156104d657600080fd5b506104ea6104e5366004613ce7565b610efe565b60405161043f919061402f565b34801561050357600080fd5b506104ea610f2c565b34801561051857600080fd5b5061040b610527366004613a2b565b610f32565b34801561053857600080fd5b50610541610f6a565b60405161043f9190614c14565b34801561055a57600080fd5b506104ea610f79565b34801561056f57600080fd5b50610541610f7f565b34801561058457600080fd5b5061058d610f95565b60405161043f9190614bd0565b3480156105a657600080fd5b506104ea610fe8565b3480156105bb57600080fd5b506104ea6105ca366004613b50565b610fee565b3480156105db57600080fd5b5061045d611043565b3480156105f057600080fd5b506104ea6105ff3660046139bb565b6110d1565b34801561061057600080fd5b506104326110e3565b34801561062557600080fd5b5061040b610634366004613cff565b6110ec565b34801561064557600080fd5b5061040b610654366004613a2b565b6111dd565b34801561066557600080fd5b50610679610674366004613db3565b6111f8565b60405161043f9493929190614c28565b34801561069557600080fd5b506104326106a4366004613b02565b6112de565b3480156106b557600080fd5b506104ea6106c4366004613ce7565b611380565b3480156106d557600080fd5b5061040b6106e43660046139bb565b6113db565b3480156106f557600080fd5b506104ea610704366004613ce7565b61143e565b34801561071557600080fd5b5061043261145f565b34801561072a57600080fd5b5061048a610739366004613ce7565b611468565b34801561074a57600080fd5b5061040b6107593660046139bb565b61149d565b34801561076a57600080fd5b506104ea611549565b34801561077f57600080fd5b5061045d61154f565b34801561079457600080fd5b506104ea6107a33660046139bb565b61155c565b3480156107b457600080fd5b5061040b6115a0565b3480156107c957600080fd5b506104ea6115eb565b3480156107de57600080fd5b506105416115f1565b3480156107f357600080fd5b5061040b6108023660046139bb565b611600565b34801561081357600080fd5b5061048a6116ab565b34801561082857600080fd5b5061048a6116ba565b34801561083d57600080fd5b506104ea6116c9565b34801561085257600080fd5b5061040b610861366004613b7b565b6116cf565b34801561087257600080fd5b5061054161178b565b34801561088757600080fd5b506104ea6117a1565b34801561089c57600080fd5b5061045d6117a7565b3480156108b157600080fd5b5061040b6108c0366004613d20565b6117b6565b3480156108d157600080fd5b5061040b6108e0366004613ad5565b61188f565b3480156108f157600080fd5b5061040b6118a1565b34801561090657600080fd5b5061040b610915366004613b50565b611a19565b34801561092657600080fd5b5061040b610935366004613c72565b611ad7565b34801561094657600080fd5b5061040b6109553660046139bb565b611b66565b34801561096657600080fd5b506104326109753660046139bb565b611cfe565b34801561098657600080fd5b50610541611d2d565b34801561099b57600080fd5b506109a4611d55565b60405161043f9190613f9f565b61040b6109bf366004613dcd565b611e20565b3480156109d057600080fd5b5061040b6109df366004613a6b565b612101565b3480156109f057600080fd5b506104ea61213a565b348015610a0557600080fd5b5061048a612140565b348015610a1a57600080fd5b5061043261214f565b348015610a2f57600080fd5b5061045d610a3e366004613ce7565b612158565b348015610a4f57600080fd5b5061040b610a5e366004613d88565b61234d565b348015610a6f57600080fd5b50610a83610a7e3660046139bb565b61239c565b60405161043f9190613fec565b348015610a9c57600080fd5b506104ea61254a565b348015610ab157600080fd5b50610541612550565b348015610ac657600080fd5b5061040b610ad5366004613baf565b612566565b348015610ae657600080fd5b506105416125ef565b348015610afb57600080fd5b50610432610b0a3660046139f3565b6125fe565b348015610b1b57600080fd5b506104ea61262c565b348015610b3057600080fd5b5061040b610b3f3660046139bb565b612632565b348015610b5057600080fd5b5061048a6126a0565b60008060005b602354811015610cae5760006103e860228381548110610b8f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015486610ba59190614d28565b610baf9190614d14565b602354909150610bc190600190614d6f565b821415610bd957610bd28386614d6f565b9050610be6565b610be38184614cfc565b92505b60238281548110610c0757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516001600160a01b03909116908290610c2d90613ef3565b60006040518083038185875af1925050503d8060008114610c6a576040519150601f19603f3d011682016040523d82523d6000602084013e610c6f565b606091505b50508094505083610c9b5760405162461bcd60e51b8152600401610c9290614327565b60405180910390fd5b5080610ca681614e14565b915050610b5f565b50505050565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610cf25750610cf2826126af565b90505b919050565b606060008054610d0990614db2565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3590614db2565b8015610d825780601f10610d5757610100808354040283529160200191610d82565b820191906000526020600020905b815481529060010190602001808311610d6557829003601f168201915b5050505050905090565b6000610d9782612721565b610db35760405162461bcd60e51b8152600401610c9290614758565b506000908152600460205260409020546001600160a01b031690565b6000610dda82611468565b9050806001600160a01b0316836001600160a01b03161415610e0e5760405162461bcd60e51b8152600401610c9290614938565b806001600160a01b0316610e2061273e565b6001600160a01b03161480610e3c5750610e3c81610b0a61273e565b610e585760405162461bcd60e51b8152600401610c92906145ca565b610e628383612742565b505050565b601a5460ff16610e895760405162461bcd60e51b8152600401610c9290614429565b60145442118015610e9b575060155442105b610eb75760405162461bcd60e51b8152600401610c9290614a97565b610ec28160006127b0565b7ffa7834a1093287aa2ad7d58c362e5c73de010ba8c4ff5a2e56443e9cd6d67e1e3382604051610ef3929190613f83565b60405180910390a150565b601954601c54600091600160801b90046001600160801b031690610f229084614cfc565b610cf29190614e4f565b60085490565b610f43610f3d61273e565b826128a9565b610f5f5760405162461bcd60e51b8152600401610c9290614995565b610e6283838361292e565b6017546001600160801b031681565b60145481565b601754600160801b90046001600160801b031681565b610f9d613716565b6040518060c0016040528060125481526020016013548152602001601454815260200160155481526020016016548152602001610fd8611d2d565b6001600160801b03169052905090565b60165481565b6000610ff98361155c565b82106110175760405162461bcd60e51b8152600401610c929061410e565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b6021805461105090614db2565b80601f016020809104026020016040519081016040528092919081815260200182805461107c90614db2565b80156110c95780601f1061109e576101008083540402835291602001916110c9565b820191906000526020600020905b8154815290600101906020018083116110ac57829003601f168201915b505050505081565b60246020526000908152604090205481565b601d5460ff1681565b600e546001600160a01b031633146111165760405162461bcd60e51b8152600401610c9290614a29565b80601f5414156111c15760205460ff16156111435760405162461bcd60e51b8152600401610c92906143bb565b60195461116190600160801b90046001600160801b03166001614cd1565b611174906001600160801b031683614e4f565b601c8190556040517fff74eb8ed2a85f7032abbd6ce624acfda4ace664c3cc8ad760c0fd30c9d7eed9916111a79161402f565b60405180910390a16020805460ff191660011790556111d9565b60405162461bcd60e51b8152600401610c9290614293565b5050565b610e6283838360405180602001604052806000815250612101565b60008060008060008560ff16600114156112155750601254611253565b8560ff166002141561122a5750601454611253565b8560ff166003141561123f5750601654611253565b6000806000809450945094509450506112d7565b8042106112725760405162461bcd60e51b8152600401610c9290614b99565b600061127e4283614d6f565b905061128d6201518082614d14565b955061129c6201518082614e4f565b90506112aa610e1082614d14565b94506112b8610e1082614e4f565b90506112c5603c82614d14565b93506112d2603c82614e4f565b925050505b9193509193565b60006001600160a01b0383166113065760405162461bcd60e51b8152600401610c92906142ca565b60006113378460405160200161131c9190613e4e565b60405160208183030381529060405280519060200120612a5b565b9050825160411461135a5760405162461bcd60e51b8152600401610c9290614a60565b60006113668285612a8b565b6011546001600160a01b0391821691161495945050505050565b600061138a610f2c565b82106113a85760405162461bcd60e51b8152600401610c9290614ace565b600882815481106113c957634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6113e6600b33612aa7565b806114005750336113f56116ab565b6001600160a01b0316145b61141c5760405162461bcd60e51b8152600401610c92906140d7565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6022818154811061144e57600080fd5b600091825260209091200154905081565b601a5460ff1681565b6000818152600260205260408120546001600160a01b031680610cf25760405162461bcd60e51b8152600401610c9290614684565b6114a561273e565b6001600160a01b03166114b66116ab565b6001600160a01b0316146114dc5760405162461bcd60e51b8152600401610c92906147a4565b6114e7600b82612aa7565b156115045760405162461bcd60e51b8152600401610c929061486d565b61150f600b82612ac3565b5060405133906001600160a01b038316907fde4bbadbdbd1ed4cfc0454fa40ae242b7ef106adbe8466849ebf5cff831bc10590600090a350565b60105481565b601e805461105090614db2565b60006001600160a01b0382166115845760405162461bcd60e51b8152600401610c9290614627565b506001600160a01b031660009081526003602052604090205490565b6115a861273e565b6001600160a01b03166115b96116ab565b6001600160a01b0316146115df5760405162461bcd60e51b8152600401610c92906147a4565b6115e96000612ad8565b565b60125481565b6019546001600160801b031681565b61160861273e565b6001600160a01b03166116196116ab565b6001600160a01b03161461163f5760405162461bcd60e51b8152600401610c92906147a4565b61164a600b82612aa7565b6116665760405162461bcd60e51b8152600401610c92906148db565b611671600b82612b2a565b5060405133906001600160a01b038316907f799caeba7dd7e8649fefe03dd79338a265cf8f9738da0cd834338f2cab9abd1c90600090a350565b600a546001600160a01b031690565b600e546001600160a01b031681565b60135481565b6116da600b33612aa7565b806116f45750336116e96116ab565b6001600160a01b0316145b6117105760405162461bcd60e51b8152600401610c92906140d7565b6019546017546001600160801b03600160801b9092048216916117389160ff85169116614cd1565b6001600160801b0316111561175f5760405162461bcd60e51b8152600401610c92906149f2565b60005b8160ff168160ff161015610e625761177983612b3f565b8061178381614e2f565b915050611762565b601854600160801b90046001600160801b031681565b600f5481565b606060018054610d0990614db2565b6117c1600b33612aa7565b806117db5750336117d06116ab565b6001600160a01b0316145b6117f75760405162461bcd60e51b8152600401610c92906140d7565b60128490556118098462015180614cfc565b601355601483905561181e8362093a80614cfc565b60158190556118309062015180614cfc565b60165580518251146118545760405162461bcd60e51b8152600401610c9290614b62565b815161186790602390602085019061374c565b50805161187b9060229060208401906137ad565b5050601a805460ff19166001179055505050565b6111d961189a61273e565b8383612b88565b601a5460ff166118c35760405162461bcd60e51b8152600401610c9290614429565b60165442116118e45760405162461bcd60e51b8152600401610c9290614a97565b6118ef600b33612aa7565b806119095750336118fe6116ab565b6001600160a01b0316145b6119255760405162461bcd60e51b8152600401610c92906140d7565b601d5460ff16156119485760405162461bcd60e51b8152600401610c92906148a4565b601d805460ff191660011790556040805160608101909152603c808252614edf6020830139805161198191601e916020909101906137e8565b5060205460ff166115e957600e60009054906101000a90046001600160a01b03166001600160a01b031663c532bbac6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156119dc57600080fd5b505af11580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190613c22565b601f55565b611a2161273e565b6001600160a01b0316611a326116ab565b6001600160a01b031614611a585760405162461bcd60e51b8152600401610c92906147a4565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b038316906323b872dd90611aa190309033908690600401613f0a565b600060405180830381600087803b158015611abb57600080fd5b505af1158015611acf573d6000803e3d6000fd5b505050505050565b611ae2600b33612aa7565b80611afc575033611af16116ab565b6001600160a01b0316145b611b185760405162461bcd60e51b8152600401610c92906140d7565b8251611b2b9060219060208601906137e8565b508151611b3f90601e9060208501906137e8565b508015610e62576000601c556020805460ff19908116909155601d80549091169055505050565b611b6e61273e565b6001600160a01b0316611b7f6116ab565b6001600160a01b031614611ba55760405162461bcd60e51b8152600401610c92906147a4565b6001600160a01b038116611bf957611bbb6116ab565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015611bf3573d6000803e3d6000fd5b50611cfb565b806001600160a01b031663a9059cbb611c106116ab565b6040516370a0823160e01b81526001600160a01b038516906370a0823190611c3c903090600401613ef6565b60206040518083038186803b158015611c5457600080fd5b505afa158015611c68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8c9190613c22565b6040518363ffffffff1660e01b8152600401611ca9929190613f6a565b602060405180830381600087803b158015611cc357600080fd5b505af1158015611cd7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d99190613c06565b50565b6000816001600160a01b0316611d126116ab565b6001600160a01b03161480610cf25750610cf2600b83612aa7565b601954600090611d50906001600160801b0380821691600160801b900416614d47565b905090565b6060611d61600b612c2b565b67ffffffffffffffff811115611d8757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611db0578160200160208202803683370190505b50905060005b611dc0600b612c2b565b811015611e1c57611dd2600b82612c36565b828281518110611df257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611e1481614e14565b915050611db6565b5090565b601a5460ff16611e425760405162461bcd60e51b8152600401610c9290614429565b6012544210158015611e5657506013544211155b611e725760405162461bcd60e51b8152600401610c92906144a2565b80611f4c57611e8133836112de565b611e9d5760405162461bcd60e51b8152600401610c9290614593565b33600090815260246020526040812054611ebb9060ff861690614cfc565b336000908152602460205260409020819055601854909150600160801b90046001600160801b0316811115611f025760405162461bcd60e51b8152600401610c9290614225565b611f0d8460016127b0565b7f20259357ce779a72449719a600d07b9d13aa576c3dc85d22501bdcb539f750f58433604051611f3e929190614c43565b60405180910390a150610e62565b600d546040517f6352211e00000000000000000000000000000000000000000000000000000000815233916001600160a01b031690636352211e90611f9590859060040161402f565b60206040518083038186803b158015611fad57600080fd5b505afa158015611fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe591906139d7565b6001600160a01b03161461200b5760405162461bcd60e51b8152600401610c9290614b2b565b336000908152602460205260408120546120299060ff861690614cfc565b336000908152602460205260409020819055601854909150600160801b90046001600160801b03168111156120705760405162461bcd60e51b8152600401610c9290614225565b6018805460ff861691906000906120919084906001600160801b0316614cd1565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506120c08460016127b0565b7f667d45dd3c4af7a44db20873026946cdd4c30116423f0a37085981b2fc2d1f498433846040516120f393929190614c5f565b60405180910390a150505050565b61211261210c61273e565b836128a9565b61212e5760405162461bcd60e51b8152600401610c9290614995565b610cae84848484612c42565b60155481565b600d546001600160a01b031681565b60205460ff1681565b606061216382612721565b61217f5760405162461bcd60e51b8152600401610c92906144d9565b6000601e805461218e90614db2565b80601f01602080910402602001604051908101604052809291908181526020018280546121ba90614db2565b80156122075780601f106121dc57610100808354040283529160200191612207565b820191906000526020600020905b8154815290600101906020018083116121ea57829003601f168201915b50506020549394505060ff90921691506122b09050576021805461222a90614db2565b80601f016020809104026020016040519081016040528092919081815260200182805461225690614db2565b80156122a35780601f10612278576101008083540402835291602001916122a3565b820191906000526020600020905b81548152906001019060200180831161228657829003601f168201915b5050505050915050610cf5565b60006122bb84610efe565b905060006122d26122cd606484614e4f565b612c75565b905060006122df83612c75565b905060006040518060400160405280600181526020017f2f000000000000000000000000000000000000000000000000000000000000008152509050848382846040516020016123329493929190613e6b565b60405160208183030381529060405295505050505050919050565b612358600b33612aa7565b806123725750336123676116ab565b6001600160a01b0316145b61238e5760405162461bcd60e51b8152600401610c92906140d7565b601392909255601555601655565b6040516370a0823160e01b815260609060009030906370a08231906123c5908690600401613ef6565b60206040518083038186803b1580156123dd57600080fd5b505afa1580156123f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124159190613c22565b905060008167ffffffffffffffff81111561244057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612469578160200160208202803683370190505b50905060005b82811015612542576040517f2f745c590000000000000000000000000000000000000000000000000000000081523090632f745c59906124b59088908590600401613f6a565b60206040518083038186803b1580156124cd57600080fd5b505afa1580156124e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125059190613c22565b82828151811061252557634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061253a81614e14565b91505061246f565b509392505050565b601c5481565b601954600160801b90046001600160801b031681565b612571600b33612aa7565b8061258b5750336125806116ab565b6001600160a01b0316145b6125a75760405162461bcd60e51b8152600401610c92906140d7565b80518251146125c85760405162461bcd60e51b8152600401610c9290614b62565b81516125db90602390602085019061374c565b508051610e629060229060208401906137ad565b6018546001600160801b031681565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b601f5481565b61263a61273e565b6001600160a01b031661264b6116ab565b6001600160a01b0316146126715760405162461bcd60e51b8152600401610c92906147a4565b6001600160a01b0381166126975760405162461bcd60e51b8152600401610c92906141c8565b611cfb81612ad8565b6011546001600160a01b031681565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061271257506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610cf25750610cf282612dc4565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061277782611468565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081156127cf576010546127c89060ff8516614d28565b90506127e2565b600f546127df9060ff8516614d28565b90505b8034146128015760405162461bcd60e51b8152600401610c92906147d9565b8260ff1661280d611d2d565b6001600160801b031610156128345760405162461bcd60e51b8152600401610c929061455c565b60005b8360ff168160ff16101561289f5761284e33612b3f565b601980546001600160801b031690600061286783614ded565b91906101000a8154816001600160801b0302191690836001600160801b0316021790555050808061289790614e2f565b915050612837565b50610e6234610b59565b60006128b482612721565b6128d05760405162461bcd60e51b8152600401610c9290614510565b60006128db83611468565b9050806001600160a01b0316846001600160a01b031614806129165750836001600160a01b031661290b84610d8c565b6001600160a01b0316145b80612926575061292681856125fe565b949350505050565b826001600160a01b031661294182611468565b6001600160a01b0316146129675760405162461bcd60e51b8152600401610c9290614810565b6001600160a01b03821661298d5760405162461bcd60e51b8152600401610c929061435e565b612998838383612df6565b6129a3600082612742565b6001600160a01b03831660009081526003602052604081208054600192906129cc908490614d6f565b90915550506001600160a01b03821660009081526003602052604081208054600192906129fa908490614cfc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081604051602001612a6e9190613ec2565b604051602081830303815290604052805190602001209050919050565b6000806000612a9a8585612e7f565b9150915061254281612eef565b6000612abc836001600160a01b03841661301c565b9392505050565b6000612abc836001600160a01b038416613034565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612abc836001600160a01b03841661307e565b601780546001600160801b0316906000612b5883614ded565b82546101009290920a6001600160801b03818102199093169183160217909155601754611cfb925083911661319b565b816001600160a01b0316836001600160a01b03161415612bba5760405162461bcd60e51b8152600401610c92906143f2565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190612c1e908590614024565b60405180910390a3505050565b6000610cf28261327a565b6000612abc838361327e565b612c4d84848461292e565b612c59848484846132b6565b610cae5760405162461bcd60e51b8152600401610c929061416b565b606081612cb6575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610cf5565b8160005b8115612ce05780612cca81614e14565b9150612cd99050600a83614d14565b9150612cba565b60008167ffffffffffffffff811115612d0957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d33576020820181803683370190505b5090505b841561292657612d48600183614d6f565b9150612d55600a86614e4f565b612d60906030614cfc565b60f81b818381518110612d8357634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612dbd600a86614d14565b9450612d37565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b612e01838383610e62565b6001600160a01b038316612e1d57612e18816133ea565b612e40565b816001600160a01b0316836001600160a01b031614612e4057612e40838261342e565b6001600160a01b038216612e5c57612e57816134cb565b610e62565b826001600160a01b0316826001600160a01b031614610e6257610e6282826135a4565b600080825160411415612eb65760208301516040840151606085015160001a612eaa878285856135e8565b94509450505050612ee8565b825160401415612ee05760208301516040840151612ed58683836136c8565b935093505050612ee8565b506000905060025b9250929050565b6000816004811115612f1157634e487b7160e01b600052602160045260246000fd5b1415612f1c57611cfb565b6001816004811115612f3e57634e487b7160e01b600052602160045260246000fd5b1415612f5c5760405162461bcd60e51b8152600401610c9290614069565b6002816004811115612f7e57634e487b7160e01b600052602160045260246000fd5b1415612f9c5760405162461bcd60e51b8152600401610c92906140a0565b6003816004811115612fbe57634e487b7160e01b600052602160045260246000fd5b1415612fdc5760405162461bcd60e51b8152600401610c9290614460565b6004816004811115612ffe57634e487b7160e01b600052602160045260246000fd5b1415611cfb5760405162461bcd60e51b8152600401610c92906146e1565b60009081526001919091016020526040902054151590565b6000613040838361301c565b6130765750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561103d565b50600061103d565b600081815260018301602052604081205480156131915760006130a2600183614d6f565b85549091506000906130b690600190614d6f565b90508181146131375760008660000182815481106130e457634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061311557634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061315657634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061103d565b600091505061103d565b6001600160a01b0382166131c15760405162461bcd60e51b8152600401610c9290614723565b6131ca81612721565b156131e75760405162461bcd60e51b8152600401610c929061425c565b6131f360008383612df6565b6001600160a01b038216600090815260036020526040812080546001929061321c908490614cfc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b5490565b60008260000182815481106132a357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006132ca846001600160a01b0316613710565b156133df57836001600160a01b031663150b7a026132e661273e565b8786866040518563ffffffff1660e01b81526004016133089493929190613f2e565b602060405180830381600087803b15801561332257600080fd5b505af1925050508015613352575060408051601f3d908101601f1916820190925261334f91810190613c56565b60015b6133ac573d808015613380576040519150601f19603f3d011682016040523d82523d6000602084013e613385565b606091505b5080516133a45760405162461bcd60e51b8152600401610c929061416b565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050612926565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161343b8461155c565b6134459190614d6f565b600083815260076020526040902054909150808214613498576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906134dd90600190614d6f565b6000838152600960205260408120546008805493945090928490811061351357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061354257634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061358857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006135af8361155c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136bf565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136bf565b60006001878787876040516000815260200160405260405161366d9493929190614038565b6020604051602081039080840390855afa15801561368f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136b8576000600192509250506136bf565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613702878288856135e8565b935093505050935093915050565b3b151590565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8280548282559060005260206000209081019282156137a1579160200282015b828111156137a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061376c565b50611e1c92915061385b565b8280548282559060005260206000209081019282156137a1579160200282015b828111156137a15782518255916020019190600101906137cd565b8280546137f490614db2565b90600052602060002090601f01602090048101928261381657600085556137a1565b82601f1061382f57805160ff19168380011785556137a1565b828001600101855582156137a157918201828111156137a15782518255916020019190600101906137cd565b5b80821115611e1c576000815560010161385c565b600082601f830112613880578081fd5b8135602061389561389083614cad565b614c83565b82815281810190858301838502870184018810156138b1578586fd5b855b858110156138d85781356138c681614ea5565b845292840192908401906001016138b3565b5090979650505050505050565b600082601f8301126138f5578081fd5b8135602061390561389083614cad565b8281528181019085830183850287018401881015613921578586fd5b855b858110156138d857813584529284019290840190600101613923565b600082601f83011261394f578081fd5b813567ffffffffffffffff81111561396957613969614e8f565b61397c601f8201601f1916602001614c83565b818152846020838601011115613990578283fd5b816020850160208301379081016020019190915292915050565b803560ff81168114610cf557600080fd5b6000602082840312156139cc578081fd5b8135612abc81614ea5565b6000602082840312156139e8578081fd5b8151612abc81614ea5565b60008060408385031215613a05578081fd5b8235613a1081614ea5565b91506020830135613a2081614ea5565b809150509250929050565b600080600060608486031215613a3f578081fd5b8335613a4a81614ea5565b92506020840135613a5a81614ea5565b929592945050506040919091013590565b60008060008060808587031215613a80578081fd5b8435613a8b81614ea5565b93506020850135613a9b81614ea5565b925060408501359150606085013567ffffffffffffffff811115613abd578182fd5b613ac98782880161393f565b91505092959194509250565b60008060408385031215613ae7578182fd5b8235613af281614ea5565b91506020830135613a2081614eba565b60008060408385031215613b14578182fd5b8235613b1f81614ea5565b9150602083013567ffffffffffffffff811115613b3a578182fd5b613b468582860161393f565b9150509250929050565b60008060408385031215613b62578182fd5b8235613b6d81614ea5565b946020939093013593505050565b60008060408385031215613b8d578182fd5b8235613b9881614ea5565b9150613ba6602084016139aa565b90509250929050565b60008060408385031215613bc1578182fd5b823567ffffffffffffffff80821115613bd8578384fd5b613be486838701613870565b93506020850135915080821115613bf9578283fd5b50613b46858286016138e5565b600060208284031215613c17578081fd5b8151612abc81614eba565b600060208284031215613c33578081fd5b5051919050565b600060208284031215613c4b578081fd5b8135612abc81614ec8565b600060208284031215613c67578081fd5b8151612abc81614ec8565b600080600060608486031215613c86578081fd5b833567ffffffffffffffff80821115613c9d578283fd5b613ca98783880161393f565b94506020860135915080821115613cbe578283fd5b50613ccb8682870161393f565b9250506040840135613cdc81614eba565b809150509250925092565b600060208284031215613cf8578081fd5b5035919050565b60008060408385031215613d11578182fd5b50508035926020909101359150565b60008060008060808587031215613d35578182fd5b8435935060208501359250604085013567ffffffffffffffff80821115613d5a578384fd5b613d6688838901613870565b93506060870135915080821115613d7b578283fd5b50613ac9878288016138e5565b600080600060608486031215613d9c578081fd5b505081359360208301359350604090920135919050565b600060208284031215613dc4578081fd5b612abc826139aa565b600080600060608486031215613de1578081fd5b613dea846139aa565b9250602084013567ffffffffffffffff811115613e05578182fd5b613e118682870161393f565b925050604084013590509250925092565b60008151808452613e3a816020860160208601614d86565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b60008551613e7d818460208a01614d86565b855190830190613e91818360208a01614d86565b8551910190613ea4818360208901614d86565b8451910190613eb7818360208801614d86565b019695505050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b90565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f606080830184613e22565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392909216825260ff16602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015613fe05783516001600160a01b031683529284019291840191600101613fbb565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613fe057835183529284019291840191600101614008565b901515815260200190565b90815260200190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252612abc6020830184613e22565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252600e908201527f4e6f7420417574686f7269736564000000000000000000000000000000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201527f74206f6620626f756e6473000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f77686974656c697374204c696d69740000000000000000000000000000000000604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526019908201527f496e636f727265637420726571756573742049442073656e7400000000000000604082015260600190565b60208082526024908201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5f60408201527f7573657200000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f4661696c656420746f2073656e64204574686572000000000000000000000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f52616e646f6d204e6f2e20616c72656164792072656365697665640000000000604082015260600190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600e908201527f6e6f74496e697469616c69736564000000000000000000000000000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526002908201527f2144000000000000000000000000000000000000000000000000000000000000604082015260600190565b60208082526014908201527f546f6b656e20646f6573206e6f74206578697374000000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526008908201527f736f6c64206f7574000000000000000000000000000000000000000000000000604082015260600190565b6020808252600c908201527f556e617574686f72697365640000000000000000000000000000000000000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201527f5072696365206e6f74206d657400000000000000000000000000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f436f6e74726f6c6c657220616c72656164792061646465642e00000000000000604082015260600190565b60208082526006908201527f6c6f636b65640000000000000000000000000000000000000000000000000000604082015260600190565b60208082526024908201527f436f6e74726f6c6c657220646f206e6f7420686f6c642061646d696e2072696760408201527f6874732e00000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526008908201527f4f7665726d696e74000000000000000000000000000000000000000000000000604082015260600190565b60208082526010908201527f556e617574686f726973656420524e4700000000000000000000000000000000604082015260600190565b60208082526018908201527f496e76616c6964207369676e6174757265206c656e6774680000000000000000604082015260600190565b60208082526002908201527f2153000000000000000000000000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201527f7574206f6620626f756e64730000000000000000000000000000000000000000606082015260800190565b60208082526003908201527f2145430000000000000000000000000000000000000000000000000000000000604082015260600190565b60208082526007908201527f216c656e67746800000000000000000000000000000000000000000000000000604082015260600190565b60208082526007908201527f5374617274656400000000000000000000000000000000000000000000000000604082015260600190565b600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b6001600160801b0391909116815260200190565b93845260208401929092526040830152606082015260800190565b60ff9290921682526001600160a01b0316602082015260400190565b60ff9390931683526001600160a01b03919091166020830152604082015260600190565b60405181810167ffffffffffffffff81118282101715614ca557614ca5614e8f565b604052919050565b600067ffffffffffffffff821115614cc757614cc7614e8f565b5060209081020190565b60006001600160801b03808316818516808303821115614cf357614cf3614e63565b01949350505050565b60008219821115614d0f57614d0f614e63565b500190565b600082614d2357614d23614e79565b500490565b6000816000190483118215151615614d4257614d42614e63565b500290565b60006001600160801b0383811690831681811015614d6757614d67614e63565b039392505050565b600082821015614d8157614d81614e63565b500390565b60005b83811015614da1578181015183820152602001614d89565b83811115610cae5750506000910152565b600281046001821680614dc657607f821691505b60208210811415614de757634e487b7160e01b600052602260045260246000fd5b50919050565b60006001600160801b0380831681811415614e0a57614e0a614e63565b6001019392505050565b6000600019821415614e2857614e28614e63565b5060010190565b600060ff821660ff811415614e4657614e46614e63565b60010192915050565b600082614e5e57614e5e614e79565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611cfb57600080fd5b8015158114611cfb57600080fd5b6001600160e01b031981168114611cfb57600080fdfe68747470733a2f2f67656e657469636174732d6d657461646174612d7365727665722e65746865722e63617264732f6170692f6d657461646174612fa26469706673582212206e5de8746b1c95ed00c257129242de8ddebaf02dc1881d9dacc1a68c053a782b64736f6c63430008000033

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

00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab800000000000000000000000072170f577f3b221b3478e09ccd5323445a8460d7000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7

-----Decoded View---------------
Arg [0] : _ec_contract_address (address): 0x97CA7FE0b0288f5EB85F386FeD876618FB9b8Ab8
Arg [1] : _rng (address): 0x72170F577F3B221b3478E09ccD5323445a8460d7
Arg [2] : _presigner (address): 0x669F499e7BA51836BB76F7dD2bc3C1A37a5342D7

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab8
Arg [1] : 00000000000000000000000072170f577f3b221b3478e09ccd5323445a8460d7
Arg [2] : 000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7


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.