ETH Price: $2,517.73 (-5.17%)

Token

Good Guys (GG)
 

Overview

Max Total Supply

5,721 GG

Holders

1,440

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
6 GG
0xDD59193D880F14cE076D017Bdc48A67c3C358f88
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

GOOD GUYS its a NFT token. This is the story of the 10,000 GOOD GUYS living in Los Ratos.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GoodGuys

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : GoodGuys.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;

    /**

       ____                 _    ____                 
      / ___| ___   ___   __| |  / ___|_   _ _   _ ___ 
     | |  _ / _ \ / _ \ / _` | | |  _| | | | | | / __|
     | |_| | (_) | (_) | (_| | | |_| | |_| | |_| \__ \
      \____|\___/ \___/ \__,_|  \____|\__,_|\__, |___/
                                            |___/    
    
                                        goodguysnft.com
    */

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

contract GoodGuys is ERC721Enumerable, Ownable {
    using Strings for uint256;

    /// @dev Emitted when {startSale} is executed and the sale isn't on.
    event SaleStarted();
    /// @dev Emitted when {pauseSale} is executed and the sale is on.
    event SalePaused();
    /// @dev Emitted when {startSale} is executed for the first time.
    event ClaimsReserveUpdated(uint256 indexed reserve);
    /// @dev Emitted when a GG token is claimed based on a Rat held
    event GoodGuyClaimed(uint256 indexed ratId, uint256 indexed goodGuyId);
    /// @dev Emitted when {reveal} is executed (once-only).
    event Reveal(uint256 indexed startingIndex);
    /// @dev Emitted when {setTokenURI} is executed.
    event TokenURISet(string indexed tokenUri);
    /// @dev Emitted when {lockTokenURI} is executed (once-only).
    event TokenURILocked(string indexed tokenUri);

    string public constant GG_PROVENANCE = "79d0a3bd67ca56a46d31ab9ec9cf73be4ea11f259caf82fe301c2aa847a1cb87";
    uint256 public constant MAX_RAT_SUPPLY = 3311;
    uint256 public constant MAX_GG_SUPPLY = 10000;
    uint256 public constant GG_PACK_LIMIT = 10;
    uint256 public constant GG_PRICE = 6 ether / 100;
    uint256 private constant CLAIM_PERIOD_DURATION = 1 weeks;
    uint256 private constant RECLAIM_RESERVE = 150;
    string private constant PLACEHOLDER_SUFFIX = "placeholder.json";
    string private constant METADATA_INFIX = "/metadata/";
    IMillionDollarRat private MDR =
        IMillionDollarRat(0x99B9791D1580BF504a1709d310923A46237c8f2C);

    uint256 public startingIndexBlock;
    uint256 public startingIndex;
    uint256 public ratClaimsReserve;
    uint256 public ratClaimsCounter;
    mapping(uint256 => bool) public ratClaims;
    bool public saleStarted;
    uint256 public saleStartedAt;
    bool public tokenURILocked;

    // current metadata base prefix
    string private _baseTokenUri;

    // prevent callers from sending ETH directly
    receive() external payable {
        revert();
    }

    // prevent callers from sending ETH directly
    fallback() external payable {
        revert();
    }

    constructor() ERC721("Good Guys", "GG") {
    }

    // ----- PUBLIC -----
    // ------------------
    /*
     * @dev Start or restart distribution. Only callable by the owner.
     * On the first call,
     * - set claim reserve value (once-only)
     * - set sale start timestamp and emit {ClaimsReserveUpdated} (once-only)
     * - emit {SaleStarted}
     *
     * On subsequent calls,
     * - restart sale and emit {SaleStarted} if paused;
     *   otherwise, do nothing
     */
    function startSale() public onlyOwner {
        // will also restart when on pause
        if (!saleStarted) {
            saleStarted = true;
            emit SaleStarted();
        }
        // once-only: set timestamp and update reserve
        if (saleStartedAt == 0) {
            _setRatClaimsReserve();
            saleStartedAt = block.timestamp;
        }
    }

    /*
     * @dev If sale is on, pause it and emit {SalePaused}; otherwise, do nothing.
     *   Only callable by the owner.
     */
    function pauseSale() public onlyOwner {
        if (saleStarted) {
            saleStarted = false;
            emit SalePaused();
        }
    }

    /**
     * @dev Claim GGs based on Rats owned. Implements 6 ways to claim; which one is used
     * depends on the values of the arguments `claimedRatIds`, `from`, and `count`.
     *
     * I. Claim All. Claims as many GGs as there are unclaimed Rats held by the caller.
     * Set `claimedRatIds` to [] (empty array), `from` to 0, and `count` to 0 as well.
     *
     * II. Claim Based On A Specific Rat. Claims a single GG.
     * Set `claimedRatIds` to [`ratId`] (where `ratId` is the identity of a Rat you hold,
     * which hasn't been used to claim a GG), `from` to 0, and `count` to 0 as well.
     *
     * III. Claim Multiple GGs Based On Specific Rats. Same as II, for multiple GGs.
     * Set `claimedRatIds` to [`ratId1`, `ratId2`, ...] (only using identities of the Rats
     * you hold, which haven't been used to claim GGs), `from` to 0, and `count` to 0 as well.
     *
     * IV. Claim Based On The Next Unclaimed. Claims a single GG using the first available
     * Rat held by the caller, which hasn't been used in a claim before.
     * Set `claimedRatIds` to [0] (a single element, 0), `from` to 0, and `count` to 0 as well.
     *
     * V. Claim N. Same as IV, but will claim multiple GGs. Set `claimedRatIds` to [] (empty array),
     * `from` to 0, and `count` to the number of GGs to claim. Make sure you have enough unused Rats.
     *
     * VI. Claim Sequentially. Starting with a specific Rat identity, claim multiple GGs based on
     * the assumption that the Rats are allocated sequentially in the specified range and are all
     * held by the caller. I.e. `claim([], 362, 5)` will attemp to claim GGs based on held Rats
     * #362, #363, #364, #365, #366.
     */
    function claim(
        uint256[] memory claimedRatIds,
        uint256 from,
        uint256 count
    ) public {
        _enforceSaleStarted();
        _enforceClaimPeriod(true);
        if (claimedRatIds.length == 0) {
            if (from == 0 && count == 0) {
                // I. Claim All
                uint256[] memory unclaimed = _listUnclaimed();
                _enforceClaimConditions(unclaimed.length);
                for (uint256 i = 0; i < unclaimed.length; i++) {
                    _straightMintGG(msg.sender, unclaimed[i]);
                }
            } else {
                if (from == 0) {
                    // claim count GGs
                    _enforceClaimConditions(count);
                    for (uint256 i = 0; i < count; i++) {
                        _straightMintGG(msg.sender, _nextUnclaimedRatId());
                    }
                } else {
                    // claim count GGs starting with from
                    _enforceClaimConditions(count);
                    uint256[] memory tokenIds = _enforceSequentialAvailability(
                        from,
                        count
                    );
                    for (uint256 i = 0; i < tokenIds.length; i++) {
                        _straightMintGG(msg.sender, tokenIds[i]);
                    }
                }
            }
        } else {
            if (claimedRatIds.length == 1) {
                if (claimedRatIds[0] == 0) {
                    // claim single GG based on the next unclaimed Rat
                    _enforceClaimConditions(1);
                    _straightMintGG(msg.sender, _nextUnclaimedRatId());
                } else {
                    // claim single GG based on a specific unclaimed Rat
                    _enforceClaimConditions(1);
                    _straightMintGG(msg.sender, claimedRatIds[0]);
                }
            } else {
                // claim multiple GGs based on specific unclaimed Rats
                _enforceClaimConditions(claimedRatIds.length);
                for (uint256 i = 0; i < claimedRatIds.length; i++) {
                    _straightMintGG(msg.sender, claimedRatIds[i]);
                }
            }
        }
        _contemplateStartingIndex();
    }

    /**
     * @dev After the claim period has elapsed, mint unclaimed GGs to the owner.
     */
    function reclaim(uint256 count) public onlyOwner {
        _enforceClaimPeriod(false);
        _enforceClaimConditions(count);
        for (uint256 i = 0; i < count; i++) {
            _straightMintGG(msg.sender, MAX_RAT_SUPPLY);
        }
        _contemplateStartingIndex();
    }

    /**
     * @dev Count Rats owned by the caller, for which GoodGuys NFTs
     * have not yet been claimed.
     */
    function countUnclaimed() public view returns (uint256 result) {
        return _countUnclaimed();
    }

    /**
     * @dev List identities of the Rats owned by the caller, for which
     * GoodGuys NFTs have not yet been claimed.
     */
    function listUnclaimed() public view returns (uint256[] memory result) {
        return _listUnclaimed();
    }

    /**
     * @dev Mint `numberOfGGs` GoodGuys.
     * - Will only mint up to (`MAX_GG_SUPPLY` - `ratClaimsReserve`) GoodGuys.
     * - Will mint up to `GG_PACK_LIMIT` items at once.
     * - Will only mint after the sale is started.
     * - ETH sent must equal (`numberOfGGs` * `GG_PRICE`)
     *
     * @param numberOfGGs The number of GoodGuys NFTs to mint.
     */
    function mintGGs(uint256 numberOfGGs) public payable {
        _enforceSaleStarted();
        require(totalSupply() < MAX_GG_SUPPLY, "SoldOut");
        require(numberOfGGs > 0, "ZeroNFTsRequested");
        require(numberOfGGs <= GG_PACK_LIMIT, "BuyLimitExceeded");
        require(GG_PRICE * numberOfGGs == msg.value, "InvalidETHAmount");
        require((MAX_GG_SUPPLY - ratClaimsReserve) -
                (totalSupply() - ratClaimsCounter) >= numberOfGGs, "MintableSupplyExceeded");

        for (uint256 i = 0; i < numberOfGGs; i++) {
            // TODO: test
            _safeMint(msg.sender, totalSupply() + 1);
        }
        _contemplateStartingIndex();
    }

    /**
     * @dev Set `startingIndex` and allow {tokenURI} to return actual
     * token URIs instead of the placeholder. Emit {Reveal} with
     * `startingIndex` as the argument. Only callable by the owner, and
     * only once.
     */
    function reveal() public onlyOwner {
        require(startingIndex == 0, "StartingIndexAlreadySet");

        // account for pre-sellout reveal
        if (startingIndexBlock == 0) {
            startingIndexBlock = block.number;
        }

        uint256 _start = uint256(blockhash(startingIndexBlock)) % MAX_GG_SUPPLY;

        if (
            (_start > block.number)
                ? ((_start - block.number) > 255)
                : ((block.number - _start) > 255)
        ) {
            _start = uint256(blockhash(block.number - 1)) % MAX_GG_SUPPLY;
        }

        if (_start == 0) {
            _start = _start + 1;
        }

        startingIndex = _start;

        emit Reveal(startingIndex);
    }

    /**
     * @dev Set base token URI. Only callable by the owner and only
     * if token URI hasn't been locked through {lockTokenURI}. Emit
     * TokenURISet with the new value on every successful execution.
     *
     * @param newUri The new base URI to use from this point on.
     */
    function setTokenURI(string memory newUri)
        public
        onlyOwner
        whenUriNotLocked
    {
        _baseTokenUri = newUri;
        emit TokenURISet(_baseTokenUri);
    }

    /**
     * @dev Prevent further modification of the currently set base token URI.
     *  Do nothing if already locked. Emit {TokenURILocked} with the current
     *  base token URI on initial execution. Only callable by the owner.
     */
    function lockTokenURI() public onlyOwner {
        if (!tokenURILocked) {
            tokenURILocked = true;
            emit TokenURILocked(_baseTokenUri);
        }
    }

    /**
     * @dev Withdraw `amount` WEI out of the current balance. Only callable
     * by the owner.
     *
     * @param amount The amount to withdraw, in WEI. Must be greater than 0 and
     * must not exceed the contract balance.
     */
    function withdraw(uint256 amount) public onlyOwner {
        require(amount > 0, "ZeroWEIRequested");
        require(amount <= address(this).balance, "AmountExceedsBalance");
        
        (bool success, ) = payable(msg.sender).call{value: amount}("");

        require(success, "ETHTransferFailed");
    }

    /**
     * @dev Prior to execution of {reveal}, return the placeholder URI for
     * any token minted or claimed; after the execution of {reveal}, return
     * adjusted URIs based on `startingIndex` cyclic shift.
     *
     * @param tokenId Identity of an existing (minted) GG NFT.
     */
    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(_exists(tokenId), "UnknownTokenId");

        string memory result;

        if (startingIndex > 0) {
            result = indexedTokenURI((tokenId + startingIndex) % MAX_GG_SUPPLY);
        } else {
            result = placeholderURI();
        }

        return result;
    }

    // ---- INTERNAL ----
    // ------------------
    function _setRatClaimsReserve() internal {
        ratClaimsReserve = 3310 + RECLAIM_RESERVE;
        emit ClaimsReserveUpdated(ratClaimsReserve);
    }

    function claimPeriodInProgress() internal view returns (bool) {
        return (block.timestamp <= (saleStartedAt + CLAIM_PERIOD_DURATION));
    }

    function _enforceSaleStarted() internal view {
        require(saleStarted, "SaleNotOn");
    }

    function _enforceClaimPeriod(bool on) internal view {
        if (on) {
            require(claimPeriodInProgress(), "ClaimPeriodHasEnded");
        } else {
            require(!claimPeriodInProgress(), "ClaimPeriodHasntEnded");
        }
    }

    function _straightMintGG(address to, uint256 claimedRatId) internal {
        // TODO: test
        _safeMint(to, totalSupply() + 1);
        if (claimedRatId < MAX_RAT_SUPPLY) {
            // enforce rat not claimed
            require(!ratClaims[claimedRatId], "DuplicateClaim");
            // enforce ownership
            require(to == MDR.ownerOf(claimedRatId), "RatNotOwned");

            ratClaims[claimedRatId] = true;
        } // else is being reclaimed by the owner
        ratClaimsCounter++;

        uint256 emitRatId = (claimedRatId < MAX_RAT_SUPPLY) ? 0 : claimedRatId;
        uint256 emitGGId = totalSupply();

        emit GoodGuyClaimed(emitRatId, emitGGId);
    }

    function _contemplateStartingIndex() internal {
        /*
         * If not all GGs have been minted and no one is minting past that point, the
         * code below is not executed, and thus startingIndexBlock is not set. We fix
         * that in {reveal}.
         */
        if (startingIndexBlock == 0 && (totalSupply() == MAX_GG_SUPPLY)) {
            startingIndexBlock = block.number;
        }
    }

    function _countUnclaimed() internal view returns (uint256 result) {
        uint256 count = MDR.balanceOf(msg.sender);

        for (uint256 t = 0; t < count; t++) {
            if (!ratClaims[MDR.tokenOfOwnerByIndex(msg.sender, t)]) {
                result++;
            }
        }
    }

    function _listUnclaimed() internal view returns (uint256[] memory) {
        uint256 tokens = MDR.balanceOf(msg.sender);
        uint256 count = _countUnclaimed();
        uint256[] memory tokensToClaim = new uint256[](count);
        uint256 unclaimedIndex;

        for (uint256 t = 0; t < tokens; t++) {
            uint256 ratId = MDR.tokenOfOwnerByIndex(msg.sender, t);
            if (!ratClaims[ratId]) {
                tokensToClaim[unclaimedIndex] = ratId;
                unclaimedIndex++;
            }
        }

        return tokensToClaim;
    }

    function _nextUnclaimedRatId() internal view returns (uint256 result) {
        uint256 count = MDR.balanceOf(msg.sender);

        for (uint256 t = 0; t < count; t++) {
            uint256 tokenId = MDR.tokenOfOwnerByIndex(msg.sender, t);
            if (!ratClaims[tokenId]) {
                result = tokenId;
                break;
            }
        }

        require(result > 0, "OutOfClaims");
    }

    function _enforceClaimConditions(uint256 count) internal view {
        require(count > 0, "ZeroClaimCount");
        require(ratClaimsReserve >= (ratClaimsCounter + count), "ClaimReserveExceeded");
    }

    function _enforceSequentialAvailability(uint256 from, uint256 count)
        internal
        view
        returns (uint256[] memory)
    {
        uint256 tokens = MDR.balanceOf(msg.sender);
        uint256[] memory tokensToClaim = new uint256[](count);

        for (uint256 t = 0; t < tokens; t++) {
            if (MDR.tokenOfOwnerByIndex(msg.sender, t) == from) {
                for (uint256 f = t; f < (t + count); f++) {
                    uint256 tokenId = MDR.tokenOfOwnerByIndex(msg.sender, f);
                    require(!ratClaims[tokenId], "ImpossibleClaim");
                    tokensToClaim[f - t] = tokenId;
                }
            }
        }

        return tokensToClaim;
    }

    modifier whenUriNotLocked() {
        require(!tokenURILocked, "TokenURILockedErr");
        _;
    }

    function placeholderURI() internal view returns (string memory) {
        return
            string(
                abi.encodePacked(
                    _baseTokenUri,
                    METADATA_INFIX,
                    PLACEHOLDER_SUFFIX
                )
            );
    }

    function indexedTokenURI(uint256 tokenId)
        internal
        view
        returns (string memory)
    {
        return
            string(
                abi.encodePacked(
                    _baseTokenUri,
                    METADATA_INFIX,
                    tokenId.toString(),
                    ".json"
                )
            );
    }
}

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

pragma solidity 0.8.7;

interface IMillionDollarRat {
    function ownerOf(uint256 tokenId) external view returns (address);
    function balanceOf(address owner) external view returns (uint256);
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.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 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 11 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 13 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"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":"uint256","name":"reserve","type":"uint256"}],"name":"ClaimsReserveUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"ratId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"goodGuyId","type":"uint256"}],"name":"GoodGuyClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startingIndex","type":"uint256"}],"name":"Reveal","type":"event"},{"anonymous":false,"inputs":[],"name":"SalePaused","type":"event"},{"anonymous":false,"inputs":[],"name":"SaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"tokenUri","type":"string"}],"name":"TokenURILocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"tokenUri","type":"string"}],"name":"TokenURISet","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"GG_PACK_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GG_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GG_PROVENANCE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_GG_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RAT_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"claimedRatIds","type":"uint256[]"},{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"countUnclaimed","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listUnclaimed","outputs":[{"internalType":"uint256[]","name":"result","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfGGs","type":"uint256"}],"name":"mintGGs","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ratClaims","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratClaimsCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratClaimsReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"reclaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","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":"saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStartedAt","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":"newUri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndexBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURILocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600b80546001600160a01b0319167399b9791d1580bf504a1709d310923a46237c8f2c1790553480156200003757600080fd5b506040805180820182526009815268476f6f64204775797360b81b602080830191825283518085019094526002845261474760f01b908401528151919291620000839160009162000112565b5080516200009990600190602084019062000112565b505050620000b6620000b0620000bc60201b60201c565b620000c0565b620001f5565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200012090620001b8565b90600052602060002090601f0160209004810192826200014457600085556200018f565b82601f106200015f57805160ff19168380011785556200018f565b828001600101855582156200018f579182015b828111156200018f57825182559160200191906001019062000172565b506200019d929150620001a1565b5090565b5b808211156200019d5760008155600101620001a2565b600181811c90821680620001cd57607f821691505b60208210811415620001ef57634e487b7160e01b600052602260045260246000fd5b50919050565b61361580620002056000396000f3fe6080604052600436106102605760003560e01c8063715018a611610144578063b66a0e5d116100b6578063e0df5b6f1161007a578063e0df5b6f146106a8578063e36d6498146106c8578063e985e9c5146106de578063eb94e5a714610727578063f2fde38b14610742578063ff9036da1461076257600080fd5b8063b66a0e5d14610627578063b88d4fde1461063c578063c87b56dd1461065c578063cb774d471461067c578063d81cd65d1461069257600080fd5b80638da5cb5b116101085780638da5cb5b146105905780638f6f100e146105ae57806395d89b41146105c3578063a22cb465146105d8578063a475b5dd146105f8578063ac998f451461060d57600080fd5b8063715018a61461050a57806374e09db01461051f57806377d0a77f146105355780637e7d707c1461056557806380a0085c1461057b57600080fd5b80632dabbeed116101dd57806355367ba9116101a157806355367ba9146104665780635c474f9e1461047b5780635e5a9e30146104955780636352211e146104aa5780636f7646b6146104ca57806370a08231146104ea57600080fd5b80632dabbeed146103c65780632e1a7d4d146103e65780632f745c591461040657806342842e0e146104265780634f6ccce71461044657600080fd5b80630bda6f09116102245780630bda6f091461034257806318160ddd1461036657806323b872dd1461037b578063267f26b11461039b5780632b23cbcf146103b057600080fd5b806301ffc9a71461026f57806306e31616146102a457806306fdde03146102c6578063081812fc146102e8578063095ea7b31461032057600080fd5b3661026a57600080fd5b600080fd5b34801561027b57600080fd5b5061028f61028a366004613068565b610775565b60405190151581526020015b60405180910390f35b3480156102b057600080fd5b506102b96107a0565b60405161029b91906132ae565b3480156102d257600080fd5b506102db6107af565b60405161029b91906132f2565b3480156102f457600080fd5b506103086103033660046130eb565b610841565b6040516001600160a01b03909116815260200161029b565b34801561032c57600080fd5b5061034061033b366004612f7f565b6108db565b005b34801561034e57600080fd5b50610358600f5481565b60405190815260200161029b565b34801561037257600080fd5b50600854610358565b34801561038757600080fd5b50610340610396366004612e8b565b6109f1565b3480156103a757600080fd5b50610358610a22565b3480156103bc57600080fd5b50610358600e5481565b3480156103d257600080fd5b506103406103e13660046130eb565b610a2c565b3480156103f257600080fd5b506103406104013660046130eb565b610a9e565b34801561041257600080fd5b50610358610421366004612f7f565b610be2565b34801561043257600080fd5b50610340610441366004612e8b565b610c78565b34801561045257600080fd5b506103586104613660046130eb565b610c93565b34801561047257600080fd5b50610340610d26565b34801561048757600080fd5b5060115461028f9060ff1681565b3480156104a157600080fd5b50610340610d91565b3480156104b657600080fd5b506103086104c53660046130eb565b610e13565b3480156104d657600080fd5b506103406104e5366004612fab565b610e8a565b3480156104f657600080fd5b50610358610505366004612e18565b61104f565b34801561051657600080fd5b506103406110d6565b34801561052b57600080fd5b50610358610cef81565b34801561054157600080fd5b5061028f6105503660046130eb565b60106020526000908152604090205460ff1681565b34801561057157600080fd5b5061035860125481565b34801561058757600080fd5b50610358600a81565b34801561059c57600080fd5b50600a546001600160a01b0316610308565b3480156105ba57600080fd5b506102db61110a565b3480156105cf57600080fd5b506102db611126565b3480156105e457600080fd5b506103406105f3366004612f4c565b611135565b34801561060457600080fd5b506103406111fa565b34801561061957600080fd5b5060135461028f9060ff1681565b34801561063357600080fd5b50610340611324565b34801561064857600080fd5b50610340610657366004612ecc565b6113a4565b34801561066857600080fd5b506102db6106773660046130eb565b6113dc565b34801561068857600080fd5b50610358600d5481565b34801561069e57600080fd5b5061035861271081565b3480156106b457600080fd5b506103406106c33660046130a2565b611478565b3480156106d457600080fd5b50610358600c5481565b3480156106ea57600080fd5b5061028f6106f9366004612e52565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561073357600080fd5b5061035866d529ae9e86000081565b34801561074e57600080fd5b5061034061075d366004612e18565b61153f565b6103406107703660046130eb565b6115d7565b60006001600160e01b0319821663780e9d6360e01b148061079a575061079a826117ad565b92915050565b60606107aa6117fd565b905090565b6060600080546107be9061349c565b80601f01602080910402602001604051908101604052809291908181526020018280546107ea9061349c565b80156108375780601f1061080c57610100808354040283529160200191610837565b820191906000526020600020905b81548152906001019060200180831161081a57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108bf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108e682610e13565b9050806001600160a01b0316836001600160a01b031614156109545760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108b6565b336001600160a01b0382161480610970575061097081336106f9565b6109e25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108b6565b6109ec83836119c4565b505050565b6109fb3382611a32565b610a175760405162461bcd60e51b81526004016108b69061338c565b6109ec838383611b29565b60006107aa611cd4565b600a546001600160a01b03163314610a565760405162461bcd60e51b81526004016108b690613357565b610a606000611e26565b610a6981611ec3565b60005b81811015610a9257610a8033610cef611f5a565b80610a8a816134d7565b915050610a6c565b50610a9b612111565b50565b600a546001600160a01b03163314610ac85760405162461bcd60e51b81526004016108b690613357565b60008111610b0b5760405162461bcd60e51b815260206004820152601060248201526f16995c9bd5d15254995c5d595cdd195960821b60448201526064016108b6565b47811115610b525760405162461bcd60e51b8152602060048201526014602482015273416d6f756e744578636565647342616c616e636560601b60448201526064016108b6565b604051600090339083908381818185875af1925050503d8060008114610b94576040519150601f19603f3d011682016040523d82523d6000602084013e610b99565b606091505b5050905080610bde5760405162461bcd60e51b8152602060048201526011602482015270115512151c985b9cd9995c91985a5b1959607a1b60448201526064016108b6565b5050565b6000610bed8361104f565b8210610c4f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108b6565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109ec838383604051806020016040528060008152506113a4565b6000610c9e60085490565b8210610d015760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108b6565b60088281548110610d1457610d14613548565b90600052602060002001549050919050565b600a546001600160a01b03163314610d505760405162461bcd60e51b81526004016108b690613357565b60115460ff1615610d8f576011805460ff191690556040517f8a98cbd0cab14e33b8a5e5710b9b59bceec8af9a5b4b3bb32fb275cf04ea048d90600090a15b565b600a546001600160a01b03163314610dbb5760405162461bcd60e51b81526004016108b690613357565b60135460ff16610d8f576013805460ff19166001179055604051610de1906014906131e3565b604051908190038120907f294bf3adcdbb3a8fc69e8a091f06fdbe7c3d016a658b80f5ec578c6ffc179ad390600090a2565b6000818152600260205260408120546001600160a01b03168061079a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108b6565b610e92612135565b610e9c6001611e26565b8251610fa35781158015610eae575080155b15610f11576000610ebd6117fd565b9050610ec98151611ec3565b60005b8151811015610f0a57610ef833838381518110610eeb57610eeb613548565b6020026020010151611f5a565b80610f02816134d7565b915050610ecc565b5050611047565b81610f5357610f1f81611ec3565b60005b81811015610f4d57610f3b33610f36612173565b611f5a565b80610f45816134d7565b915050610f22565b50611047565b610f5c81611ec3565b6000610f6883836122f9565b905060005b8151811015610f0a57610f8c33838381518110610eeb57610eeb613548565b80610f96816134d7565b915050610f6d565b611047565b8251600114156110075782600081518110610fc057610fc0613548565b602002602001015160001415610fe657610fda6001611ec3565b610f9e33610f36612173565b610ff06001611ec3565b610f9e3384600081518110610eeb57610eeb613548565b6110118351611ec3565b60005b83518110156110455761103333858381518110610eeb57610eeb613548565b8061103d816134d7565b915050611014565b505b6109ec612111565b60006001600160a01b0382166110ba5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108b6565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146111005760405162461bcd60e51b81526004016108b690613357565b610d8f6000612597565b6040518060600160405280604081526020016135a06040913981565b6060600180546107be9061349c565b6001600160a01b03821633141561118e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108b6565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b031633146112245760405162461bcd60e51b81526004016108b690613357565b600d54156112745760405162461bcd60e51b815260206004820152601760248201527f5374617274696e67496e646578416c726561647953657400000000000000000060448201526064016108b6565b600c546112805743600c555b600c546000906112949061271090406134f2565b90504381116112af5760ff6112a98243613459565b116112bd565b60ff6112bb4383613459565b115b156112de576127106112d0600143613459565b6112db9190406134f2565b90505b806112f1576112ee81600161340e565b90505b600d81905560405181907f1747b48b6ade85d7dc97c0f523e0e780795930a468c01b18a51546791fdd3ac090600090a250565b600a546001600160a01b0316331461134e5760405162461bcd60e51b81526004016108b690613357565b60115460ff1661138f576011805460ff191660011790556040517f912ee23dde46ec889d6748212cce445d667f7041597691dc89e8549ad8bc0acb90600090a15b601254610d8f5761139e6125e9565b42601255565b6113ae3383611a32565b6113ca5760405162461bcd60e51b81526004016108b69061338c565b6113d684848484612626565b50505050565b6000818152600260205260409020546060906001600160a01b03166114345760405162461bcd60e51b815260206004820152600e60248201526d155b9adb9bdddb951bdad95b925960921b60448201526064016108b6565b600d546060901561146957611462612710600d5485611453919061340e565b61145d91906134f2565b612659565b905061079a565b6114716126b1565b9392505050565b600a546001600160a01b031633146114a25760405162461bcd60e51b81526004016108b690613357565b60135460ff16156114e95760405162461bcd60e51b81526020600482015260116024820152702a37b5b2b72aa924a637b1b5b2b222b93960791b60448201526064016108b6565b80516114fc906014906020840190612d30565b50601460405161150c91906131e3565b604051908190038120907f5bb111c9b2ad41c6cc1754cdbee2cc303b7becb89d29d2d5f91165fcc0b0a49d90600090a250565b600a546001600160a01b031633146115695760405162461bcd60e51b81526004016108b690613357565b6001600160a01b0381166115ce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b6565b610a9b81612597565b6115df612135565b6127106115eb60085490565b106116225760405162461bcd60e51b815260206004820152600760248201526614dbdb1913dd5d60ca1b60448201526064016108b6565b600081116116665760405162461bcd60e51b815260206004820152601160248201527016995c9bd391951cd4995c5d595cdd1959607a1b60448201526064016108b6565b600a8111156116aa5760405162461bcd60e51b815260206004820152601060248201526f109d5e531a5b5a5d115e18d95959195960821b60448201526064016108b6565b346116bc8266d529ae9e86000061343a565b146116fc5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59115512105b5bdd5b9d60821b60448201526064016108b6565b80600f5461170960085490565b6117139190613459565b600e5461172290612710613459565b61172c9190613459565b10156117735760405162461bcd60e51b8152602060048201526016602482015275135a5b9d18589b1954dd5c1c1b1e515e18d95959195960521b60448201526064016108b6565b60005b81811015610a925761179b3361178b60085490565b61179690600161340e565b612727565b806117a5816134d7565b915050611776565b60006001600160e01b031982166380ac58cd60e01b14806117de57506001600160e01b03198216635b5e139f60e01b145b8061079a57506301ffc9a760e01b6001600160e01b031983161461079a565b600b546040516370a0823160e01b81523360048201526060916000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561184657600080fd5b505afa15801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e9190613104565b9050600061188a611cd4565b905060008167ffffffffffffffff8111156118a7576118a761355e565b6040519080825280602002602001820160405280156118d0578160200160208202803683370190505b5090506000805b848110156119ba57600b54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b15801561192a57600080fd5b505afa15801561193e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119629190613104565b60008181526010602052604090205490915060ff166119a7578084848151811061198e5761198e613548565b6020908102919091010152826119a3816134d7565b9350505b50806119b2816134d7565b9150506118d7565b5090949350505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906119f982610e13565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611aab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108b6565b6000611ab683610e13565b9050806001600160a01b0316846001600160a01b03161480611af15750836001600160a01b0316611ae684610841565b6001600160a01b0316145b80611b2157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611b3c82610e13565b6001600160a01b031614611ba45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108b6565b6001600160a01b038216611c065760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108b6565b611c11838383612741565b611c1c6000826119c4565b6001600160a01b0383166000908152600360205260408120805460019290611c45908490613459565b90915550506001600160a01b0382166000908152600360205260408120805460019290611c7390849061340e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b546040516370a0823160e01b815233600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015611d1c57600080fd5b505afa158015611d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d549190613104565b905060005b81811015611e2157600b54604051632f745c5960e01b8152336004820152602481018390526010916000916001600160a01b0390911690632f745c599060440160206040518083038186803b158015611db157600080fd5b505afa158015611dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de99190613104565b815260208101919091526040016000205460ff16611e0f5782611e0b816134d7565b9350505b80611e19816134d7565b915050611d59565b505090565b8015611e7657611e346127f9565b610a9b5760405162461bcd60e51b815260206004820152601360248201527210db185a5b54195c9a5bd912185cd15b991959606a1b60448201526064016108b6565b611e7e6127f9565b15610a9b5760405162461bcd60e51b815260206004820152601560248201527410db185a5b54195c9a5bd912185cdb9d115b991959605a1b60448201526064016108b6565b60008111611f045760405162461bcd60e51b815260206004820152600e60248201526d16995c9bd0db185a5b50dbdd5b9d60921b60448201526064016108b6565b80600f54611f12919061340e565b600e541015610a9b5760405162461bcd60e51b815260206004820152601460248201527310db185a5b54995cd95c9d99515e18d95959195960621b60448201526064016108b6565b611f678261178b60085490565b610cef8110156120a55760008181526010602052604090205460ff1615611fc15760405162461bcd60e51b815260206004820152600e60248201526d4475706c6963617465436c61696d60901b60448201526064016108b6565b600b546040516331a9108f60e11b8152600481018390526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561200557600080fd5b505afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d9190612e35565b6001600160a01b0316826001600160a01b03161461208b5760405162461bcd60e51b815260206004820152600b60248201526a14985d139bdd13dddb995960aa1b60448201526064016108b6565b6000818152601060205260409020805460ff191660011790555b600f80549060006120b5836134d7565b91905055506000610cef82106120cb57816120ce565b60005b905060006120db60085490565b905080827f3bad147985229b99059f3ba6d04d0c797d44042ad4f5f8b171a94dabe22c0c0360405160405180910390a350505050565b600c5415801561212a575061271061212860085490565b145b15610d8f5743600c55565b60115460ff16610d8f5760405162461bcd60e51b815260206004820152600960248201526829b0b632a737ba27b760b91b60448201526064016108b6565b600b546040516370a0823160e01b815233600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b1580156121bb57600080fd5b505afa1580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190613104565b905060005b818110156122b657600b54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b15801561224b57600080fd5b505afa15801561225f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122839190613104565b60008181526010602052604090205490915060ff166122a35792506122b6565b50806122ae816134d7565b9150506121f8565b50600082116122f55760405162461bcd60e51b815260206004820152600b60248201526a4f75744f66436c61696d7360a81b60448201526064016108b6565b5090565b600b546040516370a0823160e01b81523360048201526060916000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561234257600080fd5b505afa158015612356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237a9190613104565b905060008367ffffffffffffffff8111156123975761239761355e565b6040519080825280602002602001820160405280156123c0578160200160208202803683370190505b50905060005b8281101561258e57600b54604051632f745c5960e01b81523360048201526024810183905287916001600160a01b031690632f745c599060440160206040518083038186803b15801561241857600080fd5b505afa15801561242c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124509190613104565b141561257c57805b612462868361340e565b81101561257a57600b54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b1580156124b457600080fd5b505afa1580156124c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ec9190613104565b60008181526010602052604090205490915060ff16156125405760405162461bcd60e51b815260206004820152600f60248201526e496d706f737369626c65436c61696d60881b60448201526064016108b6565b808461254c8585613459565b8151811061255c5761255c613548565b60209081029190910101525080612572816134d7565b915050612458565b505b80612586816134d7565b9150506123c6565b50949350505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6125f66096610cee61340e565b600e8190556040517f5aaf8c85e7ccc3bf03ce7c3d5c7281fe64939f6e6b3d23abc87eb6a676d1d7d890600090a2565b612631848484611b29565b61263d84848484612814565b6113d65760405162461bcd60e51b81526004016108b690613305565b606060146040518060400160405280600a8152602001692f6d657461646174612f60b01b81525061268984612921565b60405160200161269b93929190613228565b6040516020818303038152906040529050919050565b606060146040518060400160405280600a8152602001692f6d657461646174612f60b01b8152506040518060400160405280601081526020016f383630b1b2b437b63232b9173539b7b760811b815250604051602001612713939291906131ef565b604051602081830303815290604052905090565b610bde828260405180602001604052806000815250612a1f565b6001600160a01b03831661279c5761279781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6127bf565b816001600160a01b0316836001600160a01b0316146127bf576127bf8382612a52565b6001600160a01b0382166127d6576109ec81612aef565b826001600160a01b0316826001600160a01b0316146109ec576109ec8282612b9e565b600062093a8060125461280c919061340e565b421115905090565b60006001600160a01b0384163b1561291657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612858903390899088908890600401613271565b602060405180830381600087803b15801561287257600080fd5b505af19250505080156128a2575060408051601f3d908101601f1916820190925261289f91810190613085565b60015b6128fc573d8080156128d0576040519150601f19603f3d011682016040523d82523d6000602084013e6128d5565b606091505b5080516128f45760405162461bcd60e51b81526004016108b690613305565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b21565b506001949350505050565b6060816129455750506040805180820190915260018152600360fc1b602082015290565b8160005b811561296f5780612959816134d7565b91506129689050600a83613426565b9150612949565b60008167ffffffffffffffff81111561298a5761298a61355e565b6040519080825280601f01601f1916602001820160405280156129b4576020820181803683370190505b5090505b8415611b21576129c9600183613459565b91506129d6600a866134f2565b6129e190603061340e565b60f81b8183815181106129f6576129f6613548565b60200101906001600160f81b031916908160001a905350612a18600a86613426565b94506129b8565b612a298383612be2565b612a366000848484612814565b6109ec5760405162461bcd60e51b81526004016108b690613305565b60006001612a5f8461104f565b612a699190613459565b600083815260076020526040902054909150808214612abc576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612b0190600190613459565b60008381526009602052604081205460088054939450909284908110612b2957612b29613548565b906000526020600020015490508060088381548110612b4a57612b4a613548565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612b8257612b82613532565b6001900381819060005260206000200160009055905550505050565b6000612ba98361104f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612c385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108b6565b6000818152600260205260409020546001600160a01b031615612c9d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108b6565b612ca960008383612741565b6001600160a01b0382166000908152600360205260408120805460019290612cd290849061340e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612d3c9061349c565b90600052602060002090601f016020900481019282612d5e5760008555612da4565b82601f10612d7757805160ff1916838001178555612da4565b82800160010185558215612da4579182015b82811115612da4578251825591602001919060010190612d89565b506122f59291505b808211156122f55760008155600101612dac565b600067ffffffffffffffff831115612dda57612dda61355e565b612ded601f8401601f19166020016133dd565b9050828152838383011115612e0157600080fd5b828260208301376000602084830101529392505050565b600060208284031215612e2a57600080fd5b813561147181613574565b600060208284031215612e4757600080fd5b815161147181613574565b60008060408385031215612e6557600080fd5b8235612e7081613574565b91506020830135612e8081613574565b809150509250929050565b600080600060608486031215612ea057600080fd5b8335612eab81613574565b92506020840135612ebb81613574565b929592945050506040919091013590565b60008060008060808587031215612ee257600080fd5b8435612eed81613574565b93506020850135612efd81613574565b925060408501359150606085013567ffffffffffffffff811115612f2057600080fd5b8501601f81018713612f3157600080fd5b612f4087823560208401612dc0565b91505092959194509250565b60008060408385031215612f5f57600080fd5b8235612f6a81613574565b915060208301358015158114612e8057600080fd5b60008060408385031215612f9257600080fd5b8235612f9d81613574565b946020939093013593505050565b600080600060608486031215612fc057600080fd5b833567ffffffffffffffff80821115612fd857600080fd5b818601915086601f830112612fec57600080fd5b81356020828211156130005761300061355e565b8160051b92506130118184016133dd565b8281528181019085830185870184018c101561302c57600080fd5b600096505b8487101561304f578035835260019690960195918301918301613031565b509a918901359950506040909701359695505050505050565b60006020828403121561307a57600080fd5b813561147181613589565b60006020828403121561309757600080fd5b815161147181613589565b6000602082840312156130b457600080fd5b813567ffffffffffffffff8111156130cb57600080fd5b8201601f810184136130dc57600080fd5b611b2184823560208401612dc0565b6000602082840312156130fd57600080fd5b5035919050565b60006020828403121561311657600080fd5b5051919050565b60008151808452613135816020860160208601613470565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061316357607f831692505b602080841082141561318557634e487b7160e01b600052602260045260246000fd5b81801561319957600181146131aa576131d7565b60ff198616895284890196506131d7565b60008881526020902060005b868110156131cf5781548b8201529085019083016131b6565b505084890196505b50505050505092915050565b60006114718284613149565b60006131fb8286613149565b845161320b818360208901613470565b845191019061321e818360208801613470565b0195945050505050565b60006132348286613149565b8451613244818360208901613470565b8451910190613257818360208801613470565b64173539b7b760d91b910190815260050195945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906132a49083018461311d565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156132e6578351835292840192918401916001016132ca565b50909695505050505050565b602081526000611471602083018461311d565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156134065761340661355e565b604052919050565b6000821982111561342157613421613506565b500190565b6000826134355761343561351c565b500490565b600081600019048311821515161561345457613454613506565b500290565b60008282101561346b5761346b613506565b500390565b60005b8381101561348b578181015183820152602001613473565b838111156113d65750506000910152565b600181811c908216806134b057607f821691505b602082108114156134d157634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156134eb576134eb613506565b5060010190565b6000826135015761350161351c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a9b57600080fd5b6001600160e01b031981168114610a9b57600080fdfe37396430613362643637636135366134366433316162396563396366373362653465613131663235396361663832666533303163326161383437613163623837a2646970667358221220f4572f856e999789ace33a4cf9c450e433d6b285aeede7eb00979ae8f6a6609464736f6c63430008070033

Deployed Bytecode

0x6080604052600436106102605760003560e01c8063715018a611610144578063b66a0e5d116100b6578063e0df5b6f1161007a578063e0df5b6f146106a8578063e36d6498146106c8578063e985e9c5146106de578063eb94e5a714610727578063f2fde38b14610742578063ff9036da1461076257600080fd5b8063b66a0e5d14610627578063b88d4fde1461063c578063c87b56dd1461065c578063cb774d471461067c578063d81cd65d1461069257600080fd5b80638da5cb5b116101085780638da5cb5b146105905780638f6f100e146105ae57806395d89b41146105c3578063a22cb465146105d8578063a475b5dd146105f8578063ac998f451461060d57600080fd5b8063715018a61461050a57806374e09db01461051f57806377d0a77f146105355780637e7d707c1461056557806380a0085c1461057b57600080fd5b80632dabbeed116101dd57806355367ba9116101a157806355367ba9146104665780635c474f9e1461047b5780635e5a9e30146104955780636352211e146104aa5780636f7646b6146104ca57806370a08231146104ea57600080fd5b80632dabbeed146103c65780632e1a7d4d146103e65780632f745c591461040657806342842e0e146104265780634f6ccce71461044657600080fd5b80630bda6f09116102245780630bda6f091461034257806318160ddd1461036657806323b872dd1461037b578063267f26b11461039b5780632b23cbcf146103b057600080fd5b806301ffc9a71461026f57806306e31616146102a457806306fdde03146102c6578063081812fc146102e8578063095ea7b31461032057600080fd5b3661026a57600080fd5b600080fd5b34801561027b57600080fd5b5061028f61028a366004613068565b610775565b60405190151581526020015b60405180910390f35b3480156102b057600080fd5b506102b96107a0565b60405161029b91906132ae565b3480156102d257600080fd5b506102db6107af565b60405161029b91906132f2565b3480156102f457600080fd5b506103086103033660046130eb565b610841565b6040516001600160a01b03909116815260200161029b565b34801561032c57600080fd5b5061034061033b366004612f7f565b6108db565b005b34801561034e57600080fd5b50610358600f5481565b60405190815260200161029b565b34801561037257600080fd5b50600854610358565b34801561038757600080fd5b50610340610396366004612e8b565b6109f1565b3480156103a757600080fd5b50610358610a22565b3480156103bc57600080fd5b50610358600e5481565b3480156103d257600080fd5b506103406103e13660046130eb565b610a2c565b3480156103f257600080fd5b506103406104013660046130eb565b610a9e565b34801561041257600080fd5b50610358610421366004612f7f565b610be2565b34801561043257600080fd5b50610340610441366004612e8b565b610c78565b34801561045257600080fd5b506103586104613660046130eb565b610c93565b34801561047257600080fd5b50610340610d26565b34801561048757600080fd5b5060115461028f9060ff1681565b3480156104a157600080fd5b50610340610d91565b3480156104b657600080fd5b506103086104c53660046130eb565b610e13565b3480156104d657600080fd5b506103406104e5366004612fab565b610e8a565b3480156104f657600080fd5b50610358610505366004612e18565b61104f565b34801561051657600080fd5b506103406110d6565b34801561052b57600080fd5b50610358610cef81565b34801561054157600080fd5b5061028f6105503660046130eb565b60106020526000908152604090205460ff1681565b34801561057157600080fd5b5061035860125481565b34801561058757600080fd5b50610358600a81565b34801561059c57600080fd5b50600a546001600160a01b0316610308565b3480156105ba57600080fd5b506102db61110a565b3480156105cf57600080fd5b506102db611126565b3480156105e457600080fd5b506103406105f3366004612f4c565b611135565b34801561060457600080fd5b506103406111fa565b34801561061957600080fd5b5060135461028f9060ff1681565b34801561063357600080fd5b50610340611324565b34801561064857600080fd5b50610340610657366004612ecc565b6113a4565b34801561066857600080fd5b506102db6106773660046130eb565b6113dc565b34801561068857600080fd5b50610358600d5481565b34801561069e57600080fd5b5061035861271081565b3480156106b457600080fd5b506103406106c33660046130a2565b611478565b3480156106d457600080fd5b50610358600c5481565b3480156106ea57600080fd5b5061028f6106f9366004612e52565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561073357600080fd5b5061035866d529ae9e86000081565b34801561074e57600080fd5b5061034061075d366004612e18565b61153f565b6103406107703660046130eb565b6115d7565b60006001600160e01b0319821663780e9d6360e01b148061079a575061079a826117ad565b92915050565b60606107aa6117fd565b905090565b6060600080546107be9061349c565b80601f01602080910402602001604051908101604052809291908181526020018280546107ea9061349c565b80156108375780601f1061080c57610100808354040283529160200191610837565b820191906000526020600020905b81548152906001019060200180831161081a57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108bf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108e682610e13565b9050806001600160a01b0316836001600160a01b031614156109545760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108b6565b336001600160a01b0382161480610970575061097081336106f9565b6109e25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108b6565b6109ec83836119c4565b505050565b6109fb3382611a32565b610a175760405162461bcd60e51b81526004016108b69061338c565b6109ec838383611b29565b60006107aa611cd4565b600a546001600160a01b03163314610a565760405162461bcd60e51b81526004016108b690613357565b610a606000611e26565b610a6981611ec3565b60005b81811015610a9257610a8033610cef611f5a565b80610a8a816134d7565b915050610a6c565b50610a9b612111565b50565b600a546001600160a01b03163314610ac85760405162461bcd60e51b81526004016108b690613357565b60008111610b0b5760405162461bcd60e51b815260206004820152601060248201526f16995c9bd5d15254995c5d595cdd195960821b60448201526064016108b6565b47811115610b525760405162461bcd60e51b8152602060048201526014602482015273416d6f756e744578636565647342616c616e636560601b60448201526064016108b6565b604051600090339083908381818185875af1925050503d8060008114610b94576040519150601f19603f3d011682016040523d82523d6000602084013e610b99565b606091505b5050905080610bde5760405162461bcd60e51b8152602060048201526011602482015270115512151c985b9cd9995c91985a5b1959607a1b60448201526064016108b6565b5050565b6000610bed8361104f565b8210610c4f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108b6565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109ec838383604051806020016040528060008152506113a4565b6000610c9e60085490565b8210610d015760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108b6565b60088281548110610d1457610d14613548565b90600052602060002001549050919050565b600a546001600160a01b03163314610d505760405162461bcd60e51b81526004016108b690613357565b60115460ff1615610d8f576011805460ff191690556040517f8a98cbd0cab14e33b8a5e5710b9b59bceec8af9a5b4b3bb32fb275cf04ea048d90600090a15b565b600a546001600160a01b03163314610dbb5760405162461bcd60e51b81526004016108b690613357565b60135460ff16610d8f576013805460ff19166001179055604051610de1906014906131e3565b604051908190038120907f294bf3adcdbb3a8fc69e8a091f06fdbe7c3d016a658b80f5ec578c6ffc179ad390600090a2565b6000818152600260205260408120546001600160a01b03168061079a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108b6565b610e92612135565b610e9c6001611e26565b8251610fa35781158015610eae575080155b15610f11576000610ebd6117fd565b9050610ec98151611ec3565b60005b8151811015610f0a57610ef833838381518110610eeb57610eeb613548565b6020026020010151611f5a565b80610f02816134d7565b915050610ecc565b5050611047565b81610f5357610f1f81611ec3565b60005b81811015610f4d57610f3b33610f36612173565b611f5a565b80610f45816134d7565b915050610f22565b50611047565b610f5c81611ec3565b6000610f6883836122f9565b905060005b8151811015610f0a57610f8c33838381518110610eeb57610eeb613548565b80610f96816134d7565b915050610f6d565b611047565b8251600114156110075782600081518110610fc057610fc0613548565b602002602001015160001415610fe657610fda6001611ec3565b610f9e33610f36612173565b610ff06001611ec3565b610f9e3384600081518110610eeb57610eeb613548565b6110118351611ec3565b60005b83518110156110455761103333858381518110610eeb57610eeb613548565b8061103d816134d7565b915050611014565b505b6109ec612111565b60006001600160a01b0382166110ba5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108b6565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146111005760405162461bcd60e51b81526004016108b690613357565b610d8f6000612597565b6040518060600160405280604081526020016135a06040913981565b6060600180546107be9061349c565b6001600160a01b03821633141561118e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108b6565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b031633146112245760405162461bcd60e51b81526004016108b690613357565b600d54156112745760405162461bcd60e51b815260206004820152601760248201527f5374617274696e67496e646578416c726561647953657400000000000000000060448201526064016108b6565b600c546112805743600c555b600c546000906112949061271090406134f2565b90504381116112af5760ff6112a98243613459565b116112bd565b60ff6112bb4383613459565b115b156112de576127106112d0600143613459565b6112db9190406134f2565b90505b806112f1576112ee81600161340e565b90505b600d81905560405181907f1747b48b6ade85d7dc97c0f523e0e780795930a468c01b18a51546791fdd3ac090600090a250565b600a546001600160a01b0316331461134e5760405162461bcd60e51b81526004016108b690613357565b60115460ff1661138f576011805460ff191660011790556040517f912ee23dde46ec889d6748212cce445d667f7041597691dc89e8549ad8bc0acb90600090a15b601254610d8f5761139e6125e9565b42601255565b6113ae3383611a32565b6113ca5760405162461bcd60e51b81526004016108b69061338c565b6113d684848484612626565b50505050565b6000818152600260205260409020546060906001600160a01b03166114345760405162461bcd60e51b815260206004820152600e60248201526d155b9adb9bdddb951bdad95b925960921b60448201526064016108b6565b600d546060901561146957611462612710600d5485611453919061340e565b61145d91906134f2565b612659565b905061079a565b6114716126b1565b9392505050565b600a546001600160a01b031633146114a25760405162461bcd60e51b81526004016108b690613357565b60135460ff16156114e95760405162461bcd60e51b81526020600482015260116024820152702a37b5b2b72aa924a637b1b5b2b222b93960791b60448201526064016108b6565b80516114fc906014906020840190612d30565b50601460405161150c91906131e3565b604051908190038120907f5bb111c9b2ad41c6cc1754cdbee2cc303b7becb89d29d2d5f91165fcc0b0a49d90600090a250565b600a546001600160a01b031633146115695760405162461bcd60e51b81526004016108b690613357565b6001600160a01b0381166115ce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b6565b610a9b81612597565b6115df612135565b6127106115eb60085490565b106116225760405162461bcd60e51b815260206004820152600760248201526614dbdb1913dd5d60ca1b60448201526064016108b6565b600081116116665760405162461bcd60e51b815260206004820152601160248201527016995c9bd391951cd4995c5d595cdd1959607a1b60448201526064016108b6565b600a8111156116aa5760405162461bcd60e51b815260206004820152601060248201526f109d5e531a5b5a5d115e18d95959195960821b60448201526064016108b6565b346116bc8266d529ae9e86000061343a565b146116fc5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59115512105b5bdd5b9d60821b60448201526064016108b6565b80600f5461170960085490565b6117139190613459565b600e5461172290612710613459565b61172c9190613459565b10156117735760405162461bcd60e51b8152602060048201526016602482015275135a5b9d18589b1954dd5c1c1b1e515e18d95959195960521b60448201526064016108b6565b60005b81811015610a925761179b3361178b60085490565b61179690600161340e565b612727565b806117a5816134d7565b915050611776565b60006001600160e01b031982166380ac58cd60e01b14806117de57506001600160e01b03198216635b5e139f60e01b145b8061079a57506301ffc9a760e01b6001600160e01b031983161461079a565b600b546040516370a0823160e01b81523360048201526060916000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561184657600080fd5b505afa15801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e9190613104565b9050600061188a611cd4565b905060008167ffffffffffffffff8111156118a7576118a761355e565b6040519080825280602002602001820160405280156118d0578160200160208202803683370190505b5090506000805b848110156119ba57600b54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b15801561192a57600080fd5b505afa15801561193e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119629190613104565b60008181526010602052604090205490915060ff166119a7578084848151811061198e5761198e613548565b6020908102919091010152826119a3816134d7565b9350505b50806119b2816134d7565b9150506118d7565b5090949350505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906119f982610e13565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611aab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108b6565b6000611ab683610e13565b9050806001600160a01b0316846001600160a01b03161480611af15750836001600160a01b0316611ae684610841565b6001600160a01b0316145b80611b2157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611b3c82610e13565b6001600160a01b031614611ba45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108b6565b6001600160a01b038216611c065760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108b6565b611c11838383612741565b611c1c6000826119c4565b6001600160a01b0383166000908152600360205260408120805460019290611c45908490613459565b90915550506001600160a01b0382166000908152600360205260408120805460019290611c7390849061340e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b546040516370a0823160e01b815233600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015611d1c57600080fd5b505afa158015611d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d549190613104565b905060005b81811015611e2157600b54604051632f745c5960e01b8152336004820152602481018390526010916000916001600160a01b0390911690632f745c599060440160206040518083038186803b158015611db157600080fd5b505afa158015611dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de99190613104565b815260208101919091526040016000205460ff16611e0f5782611e0b816134d7565b9350505b80611e19816134d7565b915050611d59565b505090565b8015611e7657611e346127f9565b610a9b5760405162461bcd60e51b815260206004820152601360248201527210db185a5b54195c9a5bd912185cd15b991959606a1b60448201526064016108b6565b611e7e6127f9565b15610a9b5760405162461bcd60e51b815260206004820152601560248201527410db185a5b54195c9a5bd912185cdb9d115b991959605a1b60448201526064016108b6565b60008111611f045760405162461bcd60e51b815260206004820152600e60248201526d16995c9bd0db185a5b50dbdd5b9d60921b60448201526064016108b6565b80600f54611f12919061340e565b600e541015610a9b5760405162461bcd60e51b815260206004820152601460248201527310db185a5b54995cd95c9d99515e18d95959195960621b60448201526064016108b6565b611f678261178b60085490565b610cef8110156120a55760008181526010602052604090205460ff1615611fc15760405162461bcd60e51b815260206004820152600e60248201526d4475706c6963617465436c61696d60901b60448201526064016108b6565b600b546040516331a9108f60e11b8152600481018390526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561200557600080fd5b505afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d9190612e35565b6001600160a01b0316826001600160a01b03161461208b5760405162461bcd60e51b815260206004820152600b60248201526a14985d139bdd13dddb995960aa1b60448201526064016108b6565b6000818152601060205260409020805460ff191660011790555b600f80549060006120b5836134d7565b91905055506000610cef82106120cb57816120ce565b60005b905060006120db60085490565b905080827f3bad147985229b99059f3ba6d04d0c797d44042ad4f5f8b171a94dabe22c0c0360405160405180910390a350505050565b600c5415801561212a575061271061212860085490565b145b15610d8f5743600c55565b60115460ff16610d8f5760405162461bcd60e51b815260206004820152600960248201526829b0b632a737ba27b760b91b60448201526064016108b6565b600b546040516370a0823160e01b815233600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b1580156121bb57600080fd5b505afa1580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190613104565b905060005b818110156122b657600b54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b15801561224b57600080fd5b505afa15801561225f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122839190613104565b60008181526010602052604090205490915060ff166122a35792506122b6565b50806122ae816134d7565b9150506121f8565b50600082116122f55760405162461bcd60e51b815260206004820152600b60248201526a4f75744f66436c61696d7360a81b60448201526064016108b6565b5090565b600b546040516370a0823160e01b81523360048201526060916000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561234257600080fd5b505afa158015612356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237a9190613104565b905060008367ffffffffffffffff8111156123975761239761355e565b6040519080825280602002602001820160405280156123c0578160200160208202803683370190505b50905060005b8281101561258e57600b54604051632f745c5960e01b81523360048201526024810183905287916001600160a01b031690632f745c599060440160206040518083038186803b15801561241857600080fd5b505afa15801561242c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124509190613104565b141561257c57805b612462868361340e565b81101561257a57600b54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b1580156124b457600080fd5b505afa1580156124c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ec9190613104565b60008181526010602052604090205490915060ff16156125405760405162461bcd60e51b815260206004820152600f60248201526e496d706f737369626c65436c61696d60881b60448201526064016108b6565b808461254c8585613459565b8151811061255c5761255c613548565b60209081029190910101525080612572816134d7565b915050612458565b505b80612586816134d7565b9150506123c6565b50949350505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6125f66096610cee61340e565b600e8190556040517f5aaf8c85e7ccc3bf03ce7c3d5c7281fe64939f6e6b3d23abc87eb6a676d1d7d890600090a2565b612631848484611b29565b61263d84848484612814565b6113d65760405162461bcd60e51b81526004016108b690613305565b606060146040518060400160405280600a8152602001692f6d657461646174612f60b01b81525061268984612921565b60405160200161269b93929190613228565b6040516020818303038152906040529050919050565b606060146040518060400160405280600a8152602001692f6d657461646174612f60b01b8152506040518060400160405280601081526020016f383630b1b2b437b63232b9173539b7b760811b815250604051602001612713939291906131ef565b604051602081830303815290604052905090565b610bde828260405180602001604052806000815250612a1f565b6001600160a01b03831661279c5761279781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6127bf565b816001600160a01b0316836001600160a01b0316146127bf576127bf8382612a52565b6001600160a01b0382166127d6576109ec81612aef565b826001600160a01b0316826001600160a01b0316146109ec576109ec8282612b9e565b600062093a8060125461280c919061340e565b421115905090565b60006001600160a01b0384163b1561291657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612858903390899088908890600401613271565b602060405180830381600087803b15801561287257600080fd5b505af19250505080156128a2575060408051601f3d908101601f1916820190925261289f91810190613085565b60015b6128fc573d8080156128d0576040519150601f19603f3d011682016040523d82523d6000602084013e6128d5565b606091505b5080516128f45760405162461bcd60e51b81526004016108b690613305565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b21565b506001949350505050565b6060816129455750506040805180820190915260018152600360fc1b602082015290565b8160005b811561296f5780612959816134d7565b91506129689050600a83613426565b9150612949565b60008167ffffffffffffffff81111561298a5761298a61355e565b6040519080825280601f01601f1916602001820160405280156129b4576020820181803683370190505b5090505b8415611b21576129c9600183613459565b91506129d6600a866134f2565b6129e190603061340e565b60f81b8183815181106129f6576129f6613548565b60200101906001600160f81b031916908160001a905350612a18600a86613426565b94506129b8565b612a298383612be2565b612a366000848484612814565b6109ec5760405162461bcd60e51b81526004016108b690613305565b60006001612a5f8461104f565b612a699190613459565b600083815260076020526040902054909150808214612abc576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612b0190600190613459565b60008381526009602052604081205460088054939450909284908110612b2957612b29613548565b906000526020600020015490508060088381548110612b4a57612b4a613548565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612b8257612b82613532565b6001900381819060005260206000200160009055905550505050565b6000612ba98361104f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612c385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108b6565b6000818152600260205260409020546001600160a01b031615612c9d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108b6565b612ca960008383612741565b6001600160a01b0382166000908152600360205260408120805460019290612cd290849061340e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612d3c9061349c565b90600052602060002090601f016020900481019282612d5e5760008555612da4565b82601f10612d7757805160ff1916838001178555612da4565b82800160010185558215612da4579182015b82811115612da4578251825591602001919060010190612d89565b506122f59291505b808211156122f55760008155600101612dac565b600067ffffffffffffffff831115612dda57612dda61355e565b612ded601f8401601f19166020016133dd565b9050828152838383011115612e0157600080fd5b828260208301376000602084830101529392505050565b600060208284031215612e2a57600080fd5b813561147181613574565b600060208284031215612e4757600080fd5b815161147181613574565b60008060408385031215612e6557600080fd5b8235612e7081613574565b91506020830135612e8081613574565b809150509250929050565b600080600060608486031215612ea057600080fd5b8335612eab81613574565b92506020840135612ebb81613574565b929592945050506040919091013590565b60008060008060808587031215612ee257600080fd5b8435612eed81613574565b93506020850135612efd81613574565b925060408501359150606085013567ffffffffffffffff811115612f2057600080fd5b8501601f81018713612f3157600080fd5b612f4087823560208401612dc0565b91505092959194509250565b60008060408385031215612f5f57600080fd5b8235612f6a81613574565b915060208301358015158114612e8057600080fd5b60008060408385031215612f9257600080fd5b8235612f9d81613574565b946020939093013593505050565b600080600060608486031215612fc057600080fd5b833567ffffffffffffffff80821115612fd857600080fd5b818601915086601f830112612fec57600080fd5b81356020828211156130005761300061355e565b8160051b92506130118184016133dd565b8281528181019085830185870184018c101561302c57600080fd5b600096505b8487101561304f578035835260019690960195918301918301613031565b509a918901359950506040909701359695505050505050565b60006020828403121561307a57600080fd5b813561147181613589565b60006020828403121561309757600080fd5b815161147181613589565b6000602082840312156130b457600080fd5b813567ffffffffffffffff8111156130cb57600080fd5b8201601f810184136130dc57600080fd5b611b2184823560208401612dc0565b6000602082840312156130fd57600080fd5b5035919050565b60006020828403121561311657600080fd5b5051919050565b60008151808452613135816020860160208601613470565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061316357607f831692505b602080841082141561318557634e487b7160e01b600052602260045260246000fd5b81801561319957600181146131aa576131d7565b60ff198616895284890196506131d7565b60008881526020902060005b868110156131cf5781548b8201529085019083016131b6565b505084890196505b50505050505092915050565b60006114718284613149565b60006131fb8286613149565b845161320b818360208901613470565b845191019061321e818360208801613470565b0195945050505050565b60006132348286613149565b8451613244818360208901613470565b8451910190613257818360208801613470565b64173539b7b760d91b910190815260050195945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906132a49083018461311d565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156132e6578351835292840192918401916001016132ca565b50909695505050505050565b602081526000611471602083018461311d565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156134065761340661355e565b604052919050565b6000821982111561342157613421613506565b500190565b6000826134355761343561351c565b500490565b600081600019048311821515161561345457613454613506565b500290565b60008282101561346b5761346b613506565b500390565b60005b8381101561348b578181015183820152602001613473565b838111156113d65750506000910152565b600181811c908216806134b057607f821691505b602082108114156134d157634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156134eb576134eb613506565b5060010190565b6000826135015761350161351c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a9b57600080fd5b6001600160e01b031981168114610a9b57600080fdfe37396430613362643637636135366134366433316162396563396366373362653465613131663235396361663832666533303163326161383437613163623837a2646970667358221220f4572f856e999789ace33a4cf9c450e433d6b285aeede7eb00979ae8f6a6609464736f6c63430008070033

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.