ETH Price: $3,615.45 (+0.79%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UninterestedUnicornsV2

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 24 : UninterestedUnicornsV2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";

import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

import "./interfaces/ICandyToken.sol";

contract UninterestedUnicornsV2 is
    AccessControlEnumerableUpgradeable,
    PausableUpgradeable,
    OwnableUpgradeable,
    ERC721Upgradeable
{
    using CountersUpgradeable for CountersUpgradeable.Counter;
    using StringsUpgradeable for uint256;
    using ECDSAUpgradeable for bytes32;

    struct Parents {
        uint16 parent_1;
        uint16 parent_2;
    }

    // Stores quantity of UUs left in a season
    uint256 public QUANTITY_LEFT;

    // Breeding Information
    uint256 public BREEDING_COST; // UCD Breeding Cost
    uint256 public BREEDING_COST_ETH; // ETH Breeding cost
    uint256[] public BREEDING_DISCOUNT_THRESHOLD; // UCD to hold for discount
    uint256[] public BREEDING_DISCOUNT_PERC; // UCD to hold for discount

    // Signers
    address private BREED_SIGNER;
    address private WHITELIST_SIGNER;

    // External Contracts
    ICandyToken public CANDY_TOKEN;

    // GNOSIS SAFE
    address public TREASURY;

    // Passive Rewards
    uint256 public REWARDS_PER_DAY;
    mapping(uint256 => uint256) public lastClaim;

    // Private Variables
    CountersUpgradeable.Counter private _tokenIds;
    string private baseTokenURI;

    // UU Status
    mapping(uint256 => bool) private isBred; // Mapping that determines if the UUv1 is Bred

    // Toggles
    bool private breedingOpen;
    bool private presaleOpen;
    bool private publicOpen;

    // Mint Caps
    mapping(address => uint8) public privateSaleMintedAmount;
    mapping(address => uint8) public publicSaleMintedAmount;

    // Nonce
    mapping(bytes => bool) private _nonceUsed;

    // Parent Mapping
    mapping(uint256 => Parents) private _parents;

    // Reserve Storage (important: New variables should be declared below)
    uint256 private maxPerTransactionPrivate;
    uint256 private maxPerTransactionPublic;
    uint256 private maxPerWalletPrivate;
    uint256 private maxPerWalletPublic;

    // Reserved Variable
    uint256 public reserved;
    uint256[45] private ______gap;

    // Free claim mapping
    mapping(address => uint8) public claimMintedAmount;

    // More Toggles
    bool private claimOpen;
    bool private rewardsOpen;

    // ------------------------ EVENTS ----------------------------
    event Minted(address indexed minter, uint256 indexed tokenId);

    event Breed(
        address indexed minter,
        uint256 tokenId,
        uint256 parent_1_tokenId,
        uint256 parent_2_tokenId
    );

    event RewardsClaimed(
        address indexed user,
        uint256 tokenId,
        uint256 amount,
        uint256 timestamp
    );

    // ---------------------- MODIFIERS ---------------------------

    /// @dev Only EOA modifier
    modifier onlyEOA() {
        require(msg.sender == tx.origin, "UUv2: Only EOA");
        _;
    }

    function __UUv2_init(
        address owner,
        address _treasury,
        address _breedSigner,
        address _whitelistSigner
    ) public initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained("UninterestedUnicornsV2", "UUv2");
        __Ownable_init_unchained();
        __AccessControl_init_unchained();
        __AccessControlEnumerable_init_unchained();
        __Pausable_init_unchained();

        transferOwnership(owner);
        TREASURY = _treasury;
        REWARDS_PER_DAY = 2 ether;
        BREEDING_COST = 1000 ether;
        BREEDING_COST_ETH = 0.1 ether;
        BREEDING_DISCOUNT_THRESHOLD = [10000 ether, 5000 ether];
        BREEDING_DISCOUNT_PERC = [75, 90]; // Percentage Discount
        BREED_SIGNER = _breedSigner;
        WHITELIST_SIGNER = _whitelistSigner;
        QUANTITY_LEFT = 5000;
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); // To revoke access after deployment
        grantRole(DEFAULT_ADMIN_ROLE, TREASURY);
        _setBaseURI(
            "https://lit-island-00614.herokuapp.com/api/v1/uuv2/chromosomes/"
        );
    }

    // ------------------------- USER FUNCTION ---------------------------

    /**
     * @notice Takes the input of 2 genesis UU ids and breed them together to get a Gen 2 Baby
     * @param parent_1_tokenId Token ID of genesis token 1
     * @param parent_2_tokenId Token ID of genesis token 1
     * @param nonce Nonce of Transaction
     * @param signature Signature generated by off-chain signer
     * @dev Ownership verication is done off-chain and signed by BREED_SIGNER
     * @dev Each Genesis token can only be used to breed once
     * @dev UCD is burnt during when bred
     */
    function breed(
        uint16 parent_1_tokenId,
        uint16 parent_2_tokenId,
        bytes memory nonce,
        bytes memory signature
    ) public {
        require(
            breedSigned(
                msg.sender,
                nonce,
                signature,
                parent_1_tokenId,
                parent_2_tokenId
            ),
            "UUv2: Invalid Signature"
        );
        require(isBreedingOpen(), "UUv2: Breeding is not open");
        require(
            CANDY_TOKEN.balanceOf(msg.sender) >= BREEDING_COST,
            "UUv2: Insufficient UCD for breeding"
        );
        require(QUANTITY_LEFT != 0, "UUv2: No more UUs available");
        require(
            !isBred[parent_1_tokenId] && !isBred[parent_2_tokenId],
            "UUv2: UUs have been bred before!"
        );

        // Reduce Quantity Left
        QUANTITY_LEFT -= 1;
        // Increase Token ID
        _tokenIds.increment();
        isBred[parent_1_tokenId] = true;
        isBred[parent_2_tokenId] = true;
        // Burn UCD Token
        CANDY_TOKEN.burn(msg.sender, BREEDING_COST);

        // Store Parent Id
        _parents[_tokenIds.current()] = Parents(
            parent_1_tokenId,
            parent_2_tokenId
        );

        // Set Last Claim
        lastClaim[_tokenIds.current()] = block.timestamp;

        // Mint
        _mint(msg.sender, _tokenIds.current());

        emit Breed(
            _msgSender(),
            _tokenIds.current(),
            parent_1_tokenId,
            parent_2_tokenId
        );
    }

    /**
     * @notice Mint a random UUv2. Whitelisted addresses only
     * @param _amount Token ID of genesis token 1
     * @param _tier Token ID of genesis token 1
     * @param nonce Nonce of Transaction
     * @param signature Signature generated by off-chain signer
     * @dev Whitelist is done off-chain and signed by WHITELIST_SIGNER
     * @dev Number of whitelist mints a user has is capped by their tier
     * @dev Cost of mint in ETH is discounted by the amount of UCD held by the user
     */
    function whitelistMint(
        uint8 _amount,
        uint8 _tier,
        bytes memory nonce,
        bytes memory signature
    ) public payable onlyEOA {
        require(isPresaleOpen(), "UUv2: Presale Mint not open!");
        require(!_nonceUsed[nonce], "UUv2: Nonce was used");
        _nonceUsed[nonce] = true;
        require(
            whitelistSigned(msg.sender, _tier, nonce, signature),
            "UUv2: Invalid signature"
        );

        // Max X = _tier Per Presale
        require(
            privateSaleMintedAmount[msg.sender] + _amount <= _tier,
            "UUv2: Presale Limit Exceeded!"
        );

        // Increase private sale amount
        privateSaleMintedAmount[msg.sender] += _amount;

        require(
            msg.value == getETHPrice(msg.sender) * _amount,
            "UUv2: Insufficient ETH!"
        );

        // Check Quantity
        require(
            QUANTITY_LEFT - _amount >= reserved,
            "UUv2: No more UUs available"
        );

        // Reduce Quantity
        QUANTITY_LEFT -= _amount;

        for (uint8 i; i < _amount; i++) {
            _tokenIds.increment();

            // Set Last Claim
            lastClaim[_tokenIds.current()] = block.timestamp;

            _mint(msg.sender, _tokenIds.current());
        }

        (bool success, ) = TREASURY.call{value: msg.value}(""); // forward amount to treasury wallet
        require(success, "UUv2: Unable to forward message to treasury!");
    }

    /**
     * @notice Mint a random UUv2.
     * @param _amount Amount to mint
     * @dev msg.value must be equals to `_amount` times price
     * @dev Maximum of 5 mints per transaction
     * @dev Maximum of 10 mints per wallet
     * @dev Cost of mint in ETH is discounted by the amount of UCD held by the user
     */
    function mint(uint8 _amount) public payable onlyEOA {
        require(isPublicOpen(), "UUv2: Public Mint not open!");
        require(
            _amount <= maxPerTransactionPublic,
            "UUv2: Maximum of 5 mints per transaction!"
        );
        require(
            publicSaleMintedAmount[msg.sender] + _amount <= maxPerWalletPublic,
            "UUv2: Public Limit Exceeded!"
        );

        publicSaleMintedAmount[msg.sender] += _amount;

        require(
            msg.value == getETHPrice(msg.sender) * _amount,
            "UUv2: Insufficient ETH!"
        );

        // Check Quantity
        require(
            QUANTITY_LEFT - _amount >= reserved,
            "UUv2: No more UUs available"
        );

        // Reduce Quantity
        QUANTITY_LEFT -= _amount;

        for (uint8 i; i < _amount; i++) {
            _tokenIds.increment();

            // Set Last Claim
            lastClaim[_tokenIds.current()] = block.timestamp;

            _mint(msg.sender, _tokenIds.current());
        }

        (bool success, ) = TREASURY.call{value: msg.value}(""); // forward amount to treasury wallet
        require(success, "UUv2: Unable to forward message to treasury!");
    }

    /**
     * @notice Mint a random UUv2 using UCD. Whitelist Only
     * @param _amount Token ID of genesis token 1
     * @param _tier Token ID of genesis token 1
     * @param nonce Nonce of Transaction
     * @param signature Signature generated by off-chain signer
     * @dev Whitelist is done off-chain and signed by WHITELIST_SIGNER
     * @dev Number of whitelist mints a user has is capped by their tier
     * @dev Cost of mint in ETH is discounted by the amount of UCD held by the user
     */
    function UCDwhitelistMint(
        uint8 _amount,
        uint8 _tier,
        bytes memory nonce,
        bytes memory signature
    ) public onlyEOA {
        require(isPresaleOpen(), "UUv2: Presale Mint not open!");
        require(!_nonceUsed[nonce], "UUv2: Nonce was used");
        _nonceUsed[nonce] = true;

        require(
            whitelistSigned(msg.sender, _tier, nonce, signature),
            "UUv2: Invalid signature"
        );

        require(
            privateSaleMintedAmount[msg.sender] + _amount <= _tier,
            "UUv2: Presale Limit Exceeded!"
        );

        // Increase private sale minted amount
        privateSaleMintedAmount[msg.sender] += _amount;

        require(
            CANDY_TOKEN.balanceOf(msg.sender) >= BREEDING_COST * _amount,
            "UUv2: Insufficient UCD for minting"
        );

        // Check Quantity
        require(
            QUANTITY_LEFT - _amount >= reserved,
            "UUv2: No more UUs available"
        );

        // Reduce Quantity
        QUANTITY_LEFT -= _amount;

        // Burn UCD Token
        CANDY_TOKEN.burn(msg.sender, BREEDING_COST * _amount);

        for (uint8 i; i < _amount; i++) {
            _tokenIds.increment();

            // Set Last Claim
            lastClaim[_tokenIds.current()] = block.timestamp;

            _mint(msg.sender, _tokenIds.current());
        }
    }

    /**
     * @notice Mint a random UUv2 using UCD.
     * @param _amount Amount to mint
     * @dev User must have approved enough UCD
     * @dev User must have enough UCD (> BREEDING_COST)
     * @dev Maximum of 5 mints per transaction
     * @dev Maximum of 10 mints per wallet
     */
    function UCDmint(uint8 _amount) public payable onlyEOA {
        require(isPublicOpen(), "UUv2: Public Mint not open!");
        require(_amount != 0, "UUv2: Amount must not be 0!");

        require(
            _amount <= maxPerTransactionPublic,
            "UUv2: Maximum of 5 mints per transaction!"
        );
        require(
            publicSaleMintedAmount[msg.sender] + _amount < maxPerWalletPublic,
            "UUv2: Public Limit Exceeded!"
        );

        publicSaleMintedAmount[msg.sender] += _amount;

        require(
            CANDY_TOKEN.balanceOf(msg.sender) >= BREEDING_COST * _amount,
            "UUv2: Insufficient UCD for breeding"
        );

        // Check Quantity
        require(
            QUANTITY_LEFT - _amount >= reserved,
            "UUv2: No more UUs available"
        );

        // Reduce Quantity
        QUANTITY_LEFT -= _amount;

        // Burn UCD Token
        CANDY_TOKEN.burn(msg.sender, BREEDING_COST * _amount);

        for (uint8 i; i < _amount; i++) {
            _tokenIds.increment();

            // Set Last Claim
            lastClaim[_tokenIds.current()] = block.timestamp;

            _mint(msg.sender, _tokenIds.current());
        }
    }

    /**
     * @notice Allow UUv2 Holders to claim UCD Rewards
     * @param tokenId Token Id to claim UCD Rewards
     * @dev User must be owner of the token
     */
    function claimRewards(uint256 tokenId) public {
        require(isRewardsOpen(), "UUv2: UCD Claiming not Open");
        require(
            ownerOf(tokenId) == msg.sender,
            "UUv2: Claimant is not the owner!"
        );
        uint256 amount = calculateRewards(tokenId);

        // Update Last Claim
        lastClaim[tokenId] = block.timestamp;

        CANDY_TOKEN.mint(msg.sender, amount);
        emit RewardsClaimed(msg.sender, tokenId, amount, block.timestamp);
    }

    /**
     * @notice Allow UUv2 Holders to claim UCD Rewards for a array of tokens
     * @param tokenIds Token Ids to claim UCD Rewards
     * @dev User must be owner of the tokens
     */
    function claimRewardsMultiple(uint256[] memory tokenIds) public {
        require(isRewardsOpen(), "UUv2: UCD Claiming not Open");
        uint256 amount = 0; // Store total amount

        // Update Last Claim
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(
                ownerOf(tokenIds[i]) == msg.sender,
                "UUv2: Claimant is not the owner!"
            );
            uint256 claimAmount = calculateRewards(tokenIds[i]);
            amount += claimAmount;
            lastClaim[tokenIds[i]] = block.timestamp;
            emit RewardsClaimed(
                msg.sender,
                tokenIds[i],
                claimAmount,
                block.timestamp
            );
        }

        // Claim all tokens in 1 transaction
        CANDY_TOKEN.mint(msg.sender, amount);
    }

    /**
     * @notice Redeem Free Mint.
     * @param nonce Nonce of Transaction
     * @param signature Signature generated by off-chain signer
     */
    function claim(
        uint8 _amount,
        uint8 _tier,
        bytes memory nonce,
        bytes memory signature
    ) public payable onlyEOA {
        require(isClaimOpen(), "UUv2: Claiming is not open!");
        require(!_nonceUsed[nonce], "UUv2: Nonce was used");
        _nonceUsed[nonce] = true;

        require(
            whitelistSigned(msg.sender, _tier, nonce, signature),
            "UUv2: Invalid signature"
        );

        require(
            claimMintedAmount[msg.sender] + _amount <= _tier,
            "UUv2: Claim Limit Exceeded!"
        );

        // Increase private sale minted amount
        claimMintedAmount[msg.sender] += _amount;

        // Check Quantity
        require(QUANTITY_LEFT - _amount >= 0, "UUv2: No more UUs available");

        // Reduce Quantity
        QUANTITY_LEFT -= _amount;

        for (uint8 i; i < _amount; i++) {
            _tokenIds.increment();

            // Set Last Claim
            lastClaim[_tokenIds.current()] = block.timestamp;

            _mint(msg.sender, _tokenIds.current());
        }
    }

    // --------------------- VIEW FUNCTIONS ---------------------

    /**
     * @dev Returns total supply of tokens
     */
    function totalSupply() public view returns (uint256) {
        return _tokenIds.current();
    }

    /**
     * @dev Determines if UU has already been used for breeding
     */
    function canBreed(uint256 tokenId) public view returns (bool) {
        return !isBred[tokenId];
    }

    /**
     * @dev Get last claim timestamp of a specified tokenId
     */
    function getLastClaim(uint256 tokenId) public view returns (uint256) {
        return lastClaim[tokenId];
    }

    /**
     * @dev Get Token URI Concatenated with Base URI
     */
    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(
            _exists(tokenId),
            "ERC721URIStorage: URI query for nonexistent token"
        );

        string memory currentBaseURI = _baseURI();

        return
            bytes(currentBaseURI).length > 0
                ? string(abi.encodePacked(currentBaseURI, tokenId.toString()))
                : "";
    }

    /**
     *  @dev Get ETH Mint Price. Discounts are calculated here.
     */
    function getETHPrice(address _user) public view returns (uint256) {
        uint256 discount;
        if (CANDY_TOKEN.balanceOf(_user) >= BREEDING_DISCOUNT_THRESHOLD[0]) {
            discount = BREEDING_DISCOUNT_PERC[0];
        } else if (
            CANDY_TOKEN.balanceOf(_user) >= BREEDING_DISCOUNT_THRESHOLD[1]
        ) {
            discount = BREEDING_DISCOUNT_PERC[1];
        } else {
            discount = 100;
        }
        // Take original breeding cost multiply by 90, divide by 100
        return (BREEDING_COST_ETH * discount) / 100;
    }

    /**
     *  @dev Get UCD cost for breeding & minting
     */
    function getUCDPrice() public view returns (uint256) {
        return BREEDING_COST;
    }

    /**
     *  @dev Check if breeding is open
     */
    function isBreedingOpen() public view returns (bool) {
        return breedingOpen;
    }

    /**
     *  @dev Check if pre-sale is open
     */
    function isPresaleOpen() public view returns (bool) {
        return presaleOpen;
    }

    /**
     *  @dev Check if public sale is open
     */
    function isPublicOpen() public view returns (bool) {
        return publicOpen;
    }

    /**
     *  @dev Check if Claiming is open
     */
    function isClaimOpen() public view returns (bool) {
        return claimOpen;
    }

    /**
     *  @dev Check if UCD Rewards is open
     */
    function isRewardsOpen() public view returns (bool) {
        return rewardsOpen;
    }

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

    /**
     *  @notice Get parent tokenIds of child
     *  @param tokenId Token ID of Gen2 UU
     */
    function getParents(uint256 tokenId) public view returns (Parents memory) {
        return _parents[tokenId];
    }

    // ----------------------- CALCULATION FUNCTIONS ----------------------

    /**
     *  @dev Check if breeding signature is valid
     *  @param sender User address
     *  @param nonce Random Nonce
     *  @param signature Signature generated by BREED_SIGNER
     *  @param parent_1_id Token ID of Parent 1 from Gen 1 Collection
     *  @param parent_2_id Token ID of Parent 2 from Gen 1 Collection
     */
    function breedSigned(
        address sender,
        bytes memory nonce,
        bytes memory signature,
        uint256 parent_1_id,
        uint256 parent_2_id
    ) private view returns (bool) {
        bytes32 hash = keccak256(
            abi.encodePacked(sender, nonce, parent_1_id, parent_2_id)
        );
        return BREED_SIGNER == hash.recover(signature);
    }

    /**
     *  @dev Check if whitelist signature is valid
     *  @param sender User address
     *  @param _tier Tier which determines max number of whitelist mints
     *  @param nonce Random Nonce
     *  @param signature Signature generated by BREED_SIGNER
     */
    function whitelistSigned(
        address sender,
        uint8 _tier,
        bytes memory nonce,
        bytes memory signature
    ) private view returns (bool) {
        bytes32 hash = keccak256(abi.encodePacked(sender, _tier, nonce));
        return WHITELIST_SIGNER == hash.recover(signature);
    }

    /**
     *  @notice Calculates the amount of UCD that can be claimed
     *  @param tokenId Token ID to claim reward for
     *  @return rewardAmount Amount UCD to be rewarded
     */
    function calculateRewards(uint256 tokenId)
        public
        view
        returns (uint256 rewardAmount)
    {
        rewardAmount =
            ((REWARDS_PER_DAY) * (block.timestamp - getLastClaim(tokenId))) /
            (1 days);
    }

    /**
     *  @notice Calculates the amount of UCD that can be claimed for multiple tokens
     *  @dev Since ERC721Enumerable is not used, we must get the tokenIds owned by the user off-chain using Moralis.
     *  @param tokenIds Token IDs to claim reward for
     *  @return rewardAmount Amount UCD to be rewarded
     */
    function calculateRewardsMulti(uint256[] memory tokenIds)
        public
        view
        returns (uint256 rewardAmount)
    {
        for (uint256 i; i < tokenIds.length; i++) {
            rewardAmount += calculateRewards(tokenIds[i]);
        }
    }

    // ---------------------- ADMIN FUNCTIONS -----------------------

    /**
     *  @notice Airdrop UUv2 to addresses
     *  @param addresses Addresses to airdrop Gen2 UU
     */
    function airdrop(address[] memory addresses)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(
            QUANTITY_LEFT >= addresses.length,
            "UUv2: No more UUs available"
        );

        QUANTITY_LEFT -= addresses.length;

        for (uint256 i; i < addresses.length; i++) {
            _tokenIds.increment();

            // Set Last Claim
            lastClaim[_tokenIds.current()] = block.timestamp;

            _mint(addresses[i], _tokenIds.current());
        }
    }

    /// @dev Set UCD Contract
    function setCandyToken(address _addr) public onlyRole(DEFAULT_ADMIN_ROLE) {
        CANDY_TOKEN = ICandyToken(_addr);
    }

    /// @dev Set Quantity of mints/breeds left
    function setQuantity(uint256 _amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
        QUANTITY_LEFT = _amount;
    }

    /// @dev Set Rewards per day for holding UU
    function setRewardsPerDay(uint256 _amount)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        REWARDS_PER_DAY = _amount;
    }

    /// @dev Set Breeding Cost
    function setBreedingCost(uint256 _amount)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        BREEDING_COST = _amount;
    }

    /// @dev Set Mint Cost
    function setMintCost(uint256 _amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
        BREEDING_COST_ETH = _amount;
    }

    /// @dev Set maxPerTransactionPrivate
    function setMaxPerTransactionPrivate(uint256 _amount)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        maxPerTransactionPrivate = _amount;
    }

    /// @dev Set maxPerTransactionPublic
    function setMaxPerTransactionPublic(uint256 _amount)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        maxPerTransactionPublic = _amount;
    }

    /// @dev Set maxPerWalletPrivate
    function setMaxPerWalletPrivate(uint256 _amount)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        maxPerWalletPrivate = _amount;
    }

    /// @dev Set maxPerWalletPublic
    function setMaxPerWalletPublic(uint256 _amount)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        maxPerWalletPublic = _amount;
    }

    /// @dev Update token metadata baseURI
    function updateBaseURI(string memory newURI)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _setBaseURI(newURI);
    }

    /// @dev Toggle Breeding Open
    function toggleBreeding() public onlyRole(DEFAULT_ADMIN_ROLE) {
        breedingOpen = !breedingOpen;
    }

    /// @dev Toggle Presale Open
    function togglePresale() public onlyRole(DEFAULT_ADMIN_ROLE) {
        presaleOpen = !presaleOpen;
    }

    /// @dev Toggle Public Open
    function togglePublicSale() public onlyRole(DEFAULT_ADMIN_ROLE) {
        publicOpen = !publicOpen;
    }

    /// @dev Toggle Free Claim Open
    function toggleClaim() public onlyRole(DEFAULT_ADMIN_ROLE) {
        claimOpen = !claimOpen;
    }

    /// @dev Toggle UCD Rewards Open
    function toggleRewards() public onlyRole(DEFAULT_ADMIN_ROLE) {
        rewardsOpen = !rewardsOpen;
    }

    ///  @dev Pauses all token transfers.
    function pause() public virtual onlyRole(DEFAULT_ADMIN_ROLE) {
        _pause();
    }

    /// @dev Unpauses all token transfers.
    function unpause() public virtual onlyRole(DEFAULT_ADMIN_ROLE) {
        _unpause();
    }

    /// @dev Reserves Tokens
    function setReserved(uint256 _amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
        reserved = _amount;
    }

    // --------------------- INTERNAL FUNCTIONS ---------------------

    /// @dev Set Base URI internal function
    function _setBaseURI(string memory _baseTokenURI) internal virtual {
        baseTokenURI = _baseTokenURI;
    }

    /// @dev Gets baseToken URI
    function _baseURI() internal view override returns (string memory) {
        return baseTokenURI;
    }

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

File 2 of 24 : AccessControlEnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerableUpgradeable.sol";
import "./AccessControlUpgradeable.sol";
import "../utils/structs/EnumerableSetUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {
    function __AccessControlEnumerable_init() internal onlyInitializing {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __AccessControl_init_unchained();
        __AccessControlEnumerable_init_unchained();
    }

    function __AccessControlEnumerable_init_unchained() internal onlyInitializing {
    }
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
    uint256[49] private __gap;
}

File 3 of 24 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 4 of 24 : IAccessControlEnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

File 7 of 24 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 8 of 24 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable 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.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
        return
            interfaceId == type(IERC721Upgradeable).interfaceId ||
            interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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 12 of 24 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @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 24 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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 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 14 of 24 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 15 of 24 : CountersUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library CountersUpgradeable {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 16 of 24 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    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 17 of 24 : ECDSAUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../StringsUpgradeable.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

File 20 of 24 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

File 21 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ICandyToken is IERC20 {
    function updateRewardOnMint(address _user, uint256 _amount) external;

    function updateReward(address _from, address _to) external;

    function getReward(address _to) external;

    function burn(address _from, uint256 _amount) external;

    function mint(address to, uint256 amount) external;

    function getTotalClaimable(address _user) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"parent_1_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"parent_2_tokenId","type":"uint256"}],"name":"Breed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BREEDING_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BREEDING_COST_ETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"BREEDING_DISCOUNT_PERC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"BREEDING_DISCOUNT_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CANDY_TOKEN","outputs":[{"internalType":"contract ICandyToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QUANTITY_LEFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDS_PER_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"}],"name":"UCDmint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"UCDwhitelistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_breedSigner","type":"address"},{"internalType":"address","name":"_whitelistSigner","type":"address"}],"name":"__UUv2_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"parent_1_tokenId","type":"uint16"},{"internalType":"uint16","name":"parent_2_tokenId","type":"uint16"},{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"breed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"calculateRewardsMulti","outputs":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"canBreed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimMintedAmount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimRewardsMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getETHPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getParents","outputs":[{"components":[{"internalType":"uint16","name":"parent_1","type":"uint16"},{"internalType":"uint16","name":"parent_2","type":"uint16"}],"internalType":"struct UninterestedUnicornsV2.Parents","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUCDPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBreedingOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isClaimOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRewardsOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"}],"name":"mint","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"privateSaleMintedAmount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicSaleMintedAmount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setBreedingCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setCandyToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxPerTransactionPrivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxPerTransactionPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxPerWalletPrivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxPerWalletPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setQuantity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setReserved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setRewardsPerDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBreeding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b506156b980620000216000396000f3fe6080604052600436106104685760003560e01c8063824ea9371161024a578063a7f3bede11610139578063d547741f116100b6578063eb4f847b1161007a578063eb4f847b14610e15578063f2fde38b14610e33578063f3169b8614610e53578063fa406d6514610e68578063fe60d12c14610e8857600080fd5b8063d547741f14610d56578063d901866a14610d76578063dc86d27a14610d96578063e222c7f914610db6578063e985e9c514610dcb57600080fd5b8063c87b56dd116100fd578063c87b56dd14610cce578063ca15c87314610cee578063cb9a1de814610d0e578063d112974514610d21578063d3ea435014610d3657600080fd5b8063a7f3bede14610c2c578063b88d4fde14610c4c578063b968281814610c6c578063bafd898414610c7f578063c6e49f5014610c9d57600080fd5b8063931688cb116101c7578063a217fddf1161018b578063a217fddf14610b98578063a22cb46514610bad578063a3db6dc114610bcd578063a58c12ae14610be4578063a7c0ec9b14610c1557600080fd5b8063931688cb14610b155780639526840814610b3557806395d89b4114610b4a57806397cecb2514610b5f57806398ba156514610b7f57600080fd5b80638da5cb5b1161020e5780638da5cb5b14610a765780639010d07c14610a9457806391716d0514610ab457806391d1485414610ae257806392f9c99114610b0257600080fd5b8063824ea937146109d95780638456cb59146109ef5780638545f4ea14610a045780638626a8ac14610a245780638b533ea414610a5657600080fd5b806336568abe116103665780636352211e116102e3578063715018a6116102a7578063715018a614610944578063729ad39e146109595780637827ba001461097957806378416911146109995780637d7c4cfb146109b957600080fd5b80636352211e146108b1578063679ffd0a146108d15780636cac5ab4146108f15780636ecd23061461091157806370a082311461092457600080fd5b806342842e0e1161032a57806342842e0e146108215780634324450b146108415780634da065ff1461085857806357d82291146108785780635c975abb1461089957600080fd5b806336568abe1461077e5780633cc2757b1461079e5780633d3728b5146107be5780633f4ba83a146107ec5780634034b39e1461080157600080fd5b806323b872dd116103f45780632d2c5565116103b85780632d2c5565146106e85780632d6e71b6146107095780632f2ff15d14610729578063303c7c1314610749578063343937431461076957600080fd5b806323b872dd146105b7578063242a0087146105d7578063248a9ca31461065c57806324fd26521461068c5780632c783cfd146106a557600080fd5b80630962ef791161043b5780630962ef791461051e5780630bf153261461053e57806311c67efc1461055e57806318160ddd1461057d578063193faafc146105a057600080fd5b806301ffc9a71461046d57806306fdde03146104a2578063081812fc146104c4578063095ea7b3146104fc575b600080fd5b34801561047957600080fd5b5061048d610488366004614ea5565b610e9f565b60405190151581526020015b60405180910390f35b3480156104ae57600080fd5b506104b7610eb0565b60405161049991906151ac565b3480156104d057600080fd5b506104e46104df366004614e4a565b610f43565b6040516001600160a01b039091168152602001610499565b34801561050857600080fd5b5061051c610517366004614cfb565b610fdf565b005b34801561052a57600080fd5b5061051c610539366004614e4a565b6110f5565b34801561054a57600080fd5b5061051c610559366004614e4a565b611277565b34801561056a57600080fd5b5061016d5462010000900460ff1661048d565b34801561058957600080fd5b5061059261128a565b604051908152602001610499565b3480156105ac57600080fd5b506105926101685481565b3480156105c357600080fd5b5061051c6105d2366004614c20565b61129b565b3480156105e357600080fd5b5061063a6105f2366004614e4a565b6040805180820190915260008082526020820152506000908152610171602090815260409182902082518084019093525461ffff808216845262010000909104169082015290565b60408051825161ffff9081168252602093840151169281019290925201610499565b34801561066857600080fd5b50610592610677366004614e4a565b60009081526065602052604090206001015490565b34801561069857600080fd5b506101a55460ff1661048d565b3480156106b157600080fd5b506106d66106c0366004614b81565b61016e6020526000908152604090205460ff1681565b60405160ff9091168152602001610499565b3480156106f457600080fd5b50610167546104e4906001600160a01b031681565b34801561071557600080fd5b5061051c610724366004614e4a565b6112cc565b34801561073557600080fd5b5061051c610744366004614e62565b6112df565b34801561075557600080fd5b50610592610764366004614e4a565b611305565b34801561077557600080fd5b5061051c611327565b34801561078a57600080fd5b5061051c610799366004614e62565b611352565b3480156107aa57600080fd5b5061051c6107b9366004614e4a565b6113d0565b3480156107ca57600080fd5b506105926107d9366004614e4a565b6101696020526000908152604090205481565b3480156107f857600080fd5b5061051c6113e3565b34801561080d57600080fd5b5061051c61081c366004614e4a565b6113fa565b34801561082d57600080fd5b5061051c61083c366004614c20565b61140d565b34801561084d57600080fd5b506105926101605481565b34801561086457600080fd5b5061051c610873366004614dc3565b611428565b34801561088457600080fd5b50610166546104e4906001600160a01b031681565b3480156108a557600080fd5b5060c95460ff1661048d565b3480156108bd57600080fd5b506104e46108cc366004614e4a565b611697565b3480156108dd57600080fd5b506105926108ec366004614dc3565b61170f565b3480156108fd57600080fd5b5061051c61090c366004614bcd565b611763565b61051c61091f366004614fb1565b6119d1565b34801561093057600080fd5b5061059261093f366004614b81565b611ca8565b34801561095057600080fd5b5061051c611d30565b34801561096557600080fd5b5061051c610974366004614d24565b611d96565b34801561098557600080fd5b5061051c610994366004614e4a565b611e64565b3480156109a557600080fd5b5061051c6109b4366004614b81565b611e77565b3480156109c557600080fd5b5061051c6109d4366004614e4a565b611ea7565b3480156109e557600080fd5b5061016054610592565b3480156109fb57600080fd5b5061051c611eba565b348015610a1057600080fd5b5061051c610a1f366004614e4a565b611ece565b348015610a3057600080fd5b5061048d610a3f366004614e4a565b600090815261016c602052604090205460ff161590565b348015610a6257600080fd5b5061051c610a71366004614e4a565b611ee1565b348015610a8257600080fd5b5060fb546001600160a01b03166104e4565b348015610aa057600080fd5b506104e4610aaf366004614e84565b611ef4565b348015610ac057600080fd5b50610592610acf366004614e4a565b6000908152610169602052604090205490565b348015610aee57600080fd5b5061048d610afd366004614e62565b611f13565b61051c610b10366004614fcb565b611f3e565b348015610b2157600080fd5b5061051c610b30366004614edd565b612285565b348015610b4157600080fd5b5061051c61229a565b348015610b5657600080fd5b506104b76122c5565b348015610b6b57600080fd5b50610592610b7a366004614b81565b6122d5565b348015610b8b57600080fd5b5061016d5460ff1661048d565b348015610ba457600080fd5b50610592600081565b348015610bb957600080fd5b5061051c610bc8366004614cc1565b6124b3565b348015610bd957600080fd5b506105926101615481565b348015610bf057600080fd5b506106d6610bff366004614b81565b61016f6020526000908152604090205460ff1681565b348015610c2157600080fd5b5061059261015f5481565b348015610c3857600080fd5b5061051c610c47366004614fcb565b6124be565b348015610c5857600080fd5b5061051c610c67366004614c5b565b61289f565b61051c610c7a366004614fcb565b6128d7565b348015610c8b57600080fd5b506101a554610100900460ff1661048d565b348015610ca957600080fd5b506106d6610cb8366004614b81565b6101a46020526000908152604090205460ff1681565b348015610cda57600080fd5b506104b7610ce9366004614e4a565b612b43565b348015610cfa57600080fd5b50610592610d09366004614e4a565b612c20565b61051c610d1c366004614fb1565b612c37565b348015610d2d57600080fd5b5061051c612fb7565b348015610d4257600080fd5b50610592610d51366004614e4a565b612fd9565b348015610d6257600080fd5b5061051c610d71366004614e62565b613010565b348015610d8257600080fd5b5061051c610d91366004614e4a565b613036565b348015610da257600080fd5b5061051c610db1366004614f23565b613049565b348015610dc257600080fd5b5061051c6133ec565b348015610dd757600080fd5b5061048d610de6366004614b9b565b6001600160a01b0391821660009081526101326020908152604080832093909416825291909152205460ff1690565b348015610e2157600080fd5b5061016d54610100900460ff1661048d565b348015610e3f57600080fd5b5061051c610e4e366004614b81565b613419565b348015610e5f57600080fd5b5061051c6134e1565b348015610e7457600080fd5b50610592610e83366004614e4a565b613503565b348015610e9457600080fd5b506105926101765481565b6000610eaa82613514565b92915050565b606061012d8054610ec090615568565b80601f0160208091040260200160405190810160405280929190818152602001828054610eec90615568565b8015610f395780601f10610f0e57610100808354040283529160200191610f39565b820191906000526020600020905b815481529060010190602001808311610f1c57829003601f168201915b5050505050905090565b600081815261012f60205260408120546001600160a01b0316610fc25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815261013160205260409020546001600160a01b031690565b6000610fea82611697565b9050806001600160a01b0316836001600160a01b031614156110585760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610fb9565b336001600160a01b038216148061107457506110748133610de6565b6110e65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610fb9565b6110f08383613554565b505050565b6101a554610100900460ff1661114d5760405162461bcd60e51b815260206004820152601b60248201527f555576323a2055434420436c61696d696e67206e6f74204f70656e00000000006044820152606401610fb9565b3361115782611697565b6001600160a01b0316146111ad5760405162461bcd60e51b815260206004820181905260248201527f555576323a20436c61696d616e74206973206e6f7420746865206f776e6572216044820152606401610fb9565b60006111b882612fd9565b60008381526101696020526040908190204290556101665490516340c10f1960e01b8152336004820152602481018390529192506001600160a01b0316906340c10f1990604401600060405180830381600087803b15801561121957600080fd5b505af115801561122d573d6000803e3d6000fd5b50506040805185815260208101859052428183015290513393507f56253d287efacdb2c4cd76dd03624a4821c1ce721d1152e8f5f5718f6087c9bf92509081900360600190a25050565b600061128381336135c3565b5061015f55565b600061129661016a5490565b905090565b6112a53382613627565b6112c15760405162461bcd60e51b8152600401610fb990615385565b6110f0838383613720565b60006112d881336135c3565b5061017655565b6000828152606560205260409020600101546112fb81336135c3565b6110f083836138ce565b610162818154811061131657600080fd5b600091825260209091200154905081565b600061133381336135c3565b5061016d805461ff001981166101009182900460ff1615909102179055565b6001600160a01b03811633146113c25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610fb9565b6113cc82826138f0565b5050565b60006113dc81336135c3565b5061016855565b60006113ef81336135c3565b6113f7613912565b50565b600061140681336135c3565b5061017455565b6110f08383836040518060200160405280600081525061289f565b6101a554610100900460ff166114805760405162461bcd60e51b815260206004820152601b60248201527f555576323a2055434420436c61696d696e67206e6f74204f70656e00000000006044820152606401610fb9565b6000805b825181101561162d57336001600160a01b03166114c78483815181106114ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151611697565b6001600160a01b03161461151d5760405162461bcd60e51b815260206004820181905260248201527f555576323a20436c61696d616e74206973206e6f7420746865206f776e6572216044820152606401610fb9565b600061154f84838151811061154257634e487b7160e01b600052603260045260246000fd5b6020026020010151612fd9565b905061155b818461549e565b925042610169600086858151811061158357634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002081905550336001600160a01b03167f56253d287efacdb2c4cd76dd03624a4821c1ce721d1152e8f5f5718f6087c9bf8584815181106115e857634e487b7160e01b600052603260045260246000fd5b60200260200101518342604051611612939291909283526020830191909152604082015260600190565b60405180910390a250806116258161559d565b915050611484565b50610166546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561167b57600080fd5b505af115801561168f573d6000803e3d6000fd5b505050505050565b600081815261012f60205260408120546001600160a01b031680610eaa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610fb9565b6000805b825181101561175d5761173f83828151811061154257634e487b7160e01b600052603260045260246000fd5b611749908361549e565b9150806117558161559d565b915050611713565b50919050565b600054610100900460ff1661177e5760005460ff1615611782565b303b155b6117e55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610fb9565b600054610100900460ff16158015611807576000805461ffff19166101011790555b61180f6139a5565b6118176139a5565b61186b604051806040016040528060168152602001752ab734b73a32b932b9ba32b22ab734b1b7b93739ab1960511b815250604051806040016040528060048152602001632aaabb1960e11b8152506139cc565b611873613a1c565b61187b6139a5565b6118836139a5565b61188b613a4c565b61189485613419565b61016780546001600160a01b0319166001600160a01b038616179055671bc16d674ec8000061016855683635c9adc5dea000006101605567016345785d8a0000610161556040805180820190915269021e19e0c9bab2400000815269010f0cf064dd59200000602082015261190e906101629060026149a9565b5060408051808201909152604b8152605a602082015261193390610163906002614a02565b5061016480546001600160a01b038086166001600160a01b03199283161790925561016580549285169290911691909117905561138861015f5561197e60006119793390565b613a7f565b61016754611997906000906001600160a01b03166112df565b6119b86040518060600160405280603f8152602001615645603f9139613a89565b80156119ca576000805461ff00191690555b5050505050565b3332146119f05760405162461bcd60e51b8152600401610fb990615421565b61016d5462010000900460ff16611a495760405162461bcd60e51b815260206004820152601b60248201527f555576323a205075626c6963204d696e74206e6f74206f70656e2100000000006044820152606401610fb9565b610173548160ff161115611a6f5760405162461bcd60e51b8152600401610fb99061533c565b6101755433600090815261016f6020526040902054611a9290839060ff166154b6565b60ff161115611ae35760405162461bcd60e51b815260206004820152601c60248201527f555576323a205075626c6963204c696d697420457863656564656421000000006044820152606401610fb9565b33600090815261016f602052604081208054839290611b0690849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508060ff16611b2b336122d5565b611b3591906154ef565b3414611b7d5760405162461bcd60e51b8152602060048201526017602482015276555576323a20496e73756666696369656e74204554482160481b6044820152606401610fb9565b610176548160ff1661015f54611b93919061550e565b1015611bb15760405162461bcd60e51b8152600401610fb990615305565b8060ff1661015f6000828254611bc7919061550e565b90915550600090505b8160ff168160ff161015611c3357611bed61016a80546001019055565b426101696000611bfd61016a5490565b8152602081019190915260400160002055611c2133611c1c61016a5490565b613a9d565b80611c2b816155b8565b915050611bd0565b50610167546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611c82576040519150601f19603f3d011682016040523d82523d6000602084013e611c87565b606091505b50509050806113cc5760405162461bcd60e51b8152600401610fb99061523f565b60006001600160a01b038216611d135760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610fb9565b506001600160a01b03166000908152610130602052604090205490565b60fb546001600160a01b03163314611d8a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fb9565b611d946000613bee565b565b6000611da281336135c3565b815161015f541015611dc65760405162461bcd60e51b8152600401610fb990615305565b815161015f6000828254611dda919061550e565b90915550600090505b82518110156110f057611dfb61016a80546001019055565b426101696000611e0b61016a5490565b815260200190815260200160002081905550611e52838281518110611e4057634e487b7160e01b600052603260045260246000fd5b6020026020010151611c1c61016a5490565b80611e5c8161559d565b915050611de3565b6000611e7081336135c3565b5061017355565b6000611e8381336135c3565b5061016680546001600160a01b0319166001600160a01b0392909216919091179055565b6000611eb381336135c3565b5061016055565b6000611ec681336135c3565b6113f7613c40565b6000611eda81336135c3565b5061016155565b6000611eed81336135c3565b5061017555565b6000828152609760205260408120611f0c9083613cbb565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b333214611f5d5760405162461bcd60e51b8152600401610fb990615421565b61016d54610100900460ff16611fb55760405162461bcd60e51b815260206004820152601c60248201527f555576323a2050726573616c65204d696e74206e6f74206f70656e21000000006044820152606401610fb9565b61017082604051611fc691906150af565b9081526040519081900360200190205460ff1615611ff65760405162461bcd60e51b8152600401610fb9906151bf565b60016101708360405161200991906150af565b908152604051908190036020019020805491151560ff1990921691909117905561203533848484613cc7565b6120515760405162461bcd60e51b8152600401610fb9906152ce565b33600090815261016e602052604090205460ff80851691612074918791166154b6565b60ff1611156120c55760405162461bcd60e51b815260206004820152601d60248201527f555576323a2050726573616c65204c696d6974204578636565646564210000006044820152606401610fb9565b33600090815261016e6020526040812080548692906120e890849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508360ff1661210d336122d5565b61211791906154ef565b341461215f5760405162461bcd60e51b8152602060048201526017602482015276555576323a20496e73756666696369656e74204554482160481b6044820152606401610fb9565b610176548460ff1661015f54612175919061550e565b10156121935760405162461bcd60e51b8152600401610fb990615305565b8360ff1661015f60008282546121a9919061550e565b90915550600090505b8460ff168160ff161015612210576121cf61016a80546001019055565b4261016960006121df61016a5490565b81526020810191909152604001600020556121fe33611c1c61016a5490565b80612208816155b8565b9150506121b2565b50610167546040516000916001600160a01b03169034908381818185875af1925050503d806000811461225f576040519150601f19603f3d011682016040523d82523d6000602084013e612264565b606091505b50509050806119ca5760405162461bcd60e51b8152600401610fb99061523f565b600061229181336135c3565b6113cc82613a89565b60006122a681336135c3565b506101a5805461ff001981166101009182900460ff1615909102179055565b606061012e8054610ec090615568565b6000806101626000815481106122fb57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154610166546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a082319060240160206040518083038186803b15801561234d57600080fd5b505afa158015612361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123859190614f99565b106123bf576101636000815481106123ad57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050612498565b6101626001815481106123e257634e487b7160e01b600052603260045260246000fd5b600091825260209091200154610166546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a082319060240160206040518083038186803b15801561243457600080fd5b505afa158015612448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246c9190614f99565b10612494576101636001815481106123ad57634e487b7160e01b600052603260045260246000fd5b5060645b606481610161546124a991906154ef565b611f0c91906154db565b6113cc338383613d1f565b3332146124dd5760405162461bcd60e51b8152600401610fb990615421565b61016d54610100900460ff166125355760405162461bcd60e51b815260206004820152601c60248201527f555576323a2050726573616c65204d696e74206e6f74206f70656e21000000006044820152606401610fb9565b6101708260405161254691906150af565b9081526040519081900360200190205460ff16156125765760405162461bcd60e51b8152600401610fb9906151bf565b60016101708360405161258991906150af565b908152604051908190036020019020805491151560ff199092169190911790556125b533848484613cc7565b6125d15760405162461bcd60e51b8152600401610fb9906152ce565b33600090815261016e602052604090205460ff808516916125f4918791166154b6565b60ff1611156126455760405162461bcd60e51b815260206004820152601d60248201527f555576323a2050726573616c65204c696d6974204578636565646564210000006044820152606401610fb9565b33600090815261016e60205260408120805486929061266890849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508360ff166101605461269291906154ef565b610166546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156126d657600080fd5b505afa1580156126ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270e9190614f99565b10156127675760405162461bcd60e51b815260206004820152602260248201527f555576323a20496e73756666696369656e742055434420666f72206d696e74696044820152616e6760f01b6064820152608401610fb9565b610176548460ff1661015f5461277d919061550e565b101561279b5760405162461bcd60e51b8152600401610fb990615305565b8360ff1661015f60008282546127b1919061550e565b909155505061016654610160546001600160a01b0390911690639dc29fac9033906127e09060ff8916906154ef565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561282657600080fd5b505af115801561283a573d6000803e3d6000fd5b5050505060005b8460ff168160ff1610156119ca5761285e61016a80546001019055565b42610169600061286e61016a5490565b815260208101919091526040016000205561288d33611c1c61016a5490565b80612897816155b8565b915050612841565b6128a93383613627565b6128c55760405162461bcd60e51b8152600401610fb990615385565b6128d184848484613def565b50505050565b3332146128f65760405162461bcd60e51b8152600401610fb990615421565b6101a55460ff166129495760405162461bcd60e51b815260206004820152601b60248201527f555576323a20436c61696d696e67206973206e6f74206f70656e2100000000006044820152606401610fb9565b6101708260405161295a91906150af565b9081526040519081900360200190205460ff161561298a5760405162461bcd60e51b8152600401610fb9906151bf565b60016101708360405161299d91906150af565b908152604051908190036020019020805491151560ff199092169190911790556129c933848484613cc7565b6129e55760405162461bcd60e51b8152600401610fb9906152ce565b3360009081526101a4602052604090205460ff80851691612a08918791166154b6565b60ff161115612a595760405162461bcd60e51b815260206004820152601b60248201527f555576323a20436c61696d204c696d69742045786365656465642100000000006044820152606401610fb9565b3360009081526101a4602052604081208054869290612a7c90849060ff166154b6565b92506101000a81548160ff021916908360ff16021790555060008460ff1661015f54612aa8919061550e565b1015612ac65760405162461bcd60e51b8152600401610fb990615305565b8360ff1661015f6000828254612adc919061550e565b90915550600090505b8460ff168160ff1610156119ca57612b0261016a80546001019055565b426101696000612b1261016a5490565b8152602081019190915260400160002055612b3133611c1c61016a5490565b80612b3b816155b8565b915050612ae5565b600081815261012f60205260409020546060906001600160a01b0316612bc55760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610fb9565b6000612bcf613e22565b90506000815111612bef5760405180602001604052806000815250611f0c565b80612bf984613e32565b604051602001612c0a9291906150cb565b6040516020818303038152906040529392505050565b6000818152609760205260408120610eaa90613f4c565b333214612c565760405162461bcd60e51b8152600401610fb990615421565b61016d5462010000900460ff16612caf5760405162461bcd60e51b815260206004820152601b60248201527f555576323a205075626c6963204d696e74206e6f74206f70656e2100000000006044820152606401610fb9565b60ff8116612cff5760405162461bcd60e51b815260206004820152601b60248201527f555576323a20416d6f756e74206d757374206e6f7420626520302100000000006044820152606401610fb9565b610173548160ff161115612d255760405162461bcd60e51b8152600401610fb99061533c565b6101755433600090815261016f6020526040902054612d4890839060ff166154b6565b60ff1610612d985760405162461bcd60e51b815260206004820152601c60248201527f555576323a205075626c6963204c696d697420457863656564656421000000006044820152606401610fb9565b33600090815261016f602052604081208054839290612dbb90849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508060ff1661016054612de591906154ef565b610166546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015612e2957600080fd5b505afa158015612e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e619190614f99565b1015612e7f5760405162461bcd60e51b8152600401610fb99061528b565b610176548160ff1661015f54612e95919061550e565b1015612eb35760405162461bcd60e51b8152600401610fb990615305565b8060ff1661015f6000828254612ec9919061550e565b909155505061016654610160546001600160a01b0390911690639dc29fac903390612ef89060ff8616906154ef565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612f3e57600080fd5b505af1158015612f52573d6000803e3d6000fd5b5050505060005b8160ff168160ff1610156113cc57612f7661016a80546001019055565b426101696000612f8661016a5490565b8152602081019190915260400160002055612fa533611c1c61016a5490565b80612faf816155b8565b915050612f59565b6000612fc381336135c3565b506101a5805460ff19811660ff90911615179055565b600081815261016960205260408120546201518090612ff8904261550e565b6101685461300691906154ef565b610eaa91906154db565b60008281526065602052604090206001015461302c81336135c3565b6110f083836138f0565b600061304281336135c3565b5061017255565b61305e3383838761ffff168761ffff16613f56565b6130aa5760405162461bcd60e51b815260206004820152601760248201527f555576323a20496e76616c6964205369676e61747572650000000000000000006044820152606401610fb9565b61016d5460ff166130fd5760405162461bcd60e51b815260206004820152601a60248201527f555576323a204272656564696e67206973206e6f74206f70656e0000000000006044820152606401610fb9565b61016054610166546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317d9190614f99565b101561319b5760405162461bcd60e51b8152600401610fb99061528b565b61015f546131bb5760405162461bcd60e51b8152600401610fb990615305565b61ffff8416600090815261016c602052604090205460ff161580156131f5575061ffff8316600090815261016c602052604090205460ff16155b6132415760405162461bcd60e51b815260206004820181905260248201527f555576323a205555732068617665206265656e2062726564206265666f7265216044820152606401610fb9565b600161015f6000828254613255919061550e565b909155505061016a8054600101905561ffff848116600090815261016c60205260408082208054600160ff199182168117909255938716835291819020805490931690911790915561016654610160549151632770a7eb60e21b815233600482015260248101929092526001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156132ec57600080fd5b505af1158015613300573d6000803e3d6000fd5b5050505060405180604001604052808561ffff1681526020018461ffff16815250610171600061333061016a5490565b8152602080820192909252604001600090812083518154949093015161ffff908116620100000263ffffffff1990951693169290921792909217905542906101699061337c61016a5490565b815260208101919091526040016000205561339b33611c1c61016a5490565b61016a5433907fddf1e8fec06a50aa72b8a39a06787808c53eca73b2bd1cc995681cf7b8014650906040805191825261ffff808916602084015287169082015260600160405180910390a250505050565b60006133f881336135c3565b5061016d805462ff0000198116620100009182900460ff1615909102179055565b60fb546001600160a01b031633146134735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fb9565b6001600160a01b0381166134d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fb9565b6113f781613bee565b60006134ed81336135c3565b5061016d805460ff19811660ff90911615179055565b610163818154811061131657600080fd5b60006001600160e01b031982166380ac58cd60e01b148061354557506001600160e01b03198216635b5e139f60e01b145b80610eaa5750610eaa82613fb1565b60008181526101316020526040902080546001600160a01b0319166001600160a01b038416908117909155819061358a82611697565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6135cd8282611f13565b6113cc576135e5816001600160a01b03166014613fd6565b6135f0836020613fd6565b6040516020016136019291906150fa565b60408051601f198184030181529082905262461bcd60e51b8252610fb9916004016151ac565b600081815261012f60205260408120546001600160a01b03166136a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610fb9565b60006136ac83611697565b9050806001600160a01b0316846001600160a01b031614806136e75750836001600160a01b03166136dc84610f43565b6001600160a01b0316145b8061371857506001600160a01b038082166000908152610132602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661373382611697565b6001600160a01b03161461379b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610fb9565b6001600160a01b0382166137fd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610fb9565b6138088383836141b8565b613813600082613554565b6001600160a01b03831660009081526101306020526040812080546001929061383d90849061550e565b90915550506001600160a01b03821660009081526101306020526040812080546001929061386c90849061549e565b9091555050600081815261012f602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6138d882826141fe565b60008281526097602052604090206110f09082614284565b6138fa8282614299565b60008281526097602052604090206110f09082614300565b60c95460ff1661395b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610fb9565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff16611d945760405162461bcd60e51b8152600401610fb9906153d6565b600054610100900460ff166139f35760405162461bcd60e51b8152600401610fb9906153d6565b8151613a079061012d906020850190614a42565b5080516110f09061012e906020840190614a42565b600054610100900460ff16613a435760405162461bcd60e51b8152600401610fb9906153d6565b611d9433613bee565b600054610100900460ff16613a735760405162461bcd60e51b8152600401610fb9906153d6565b60c9805460ff19169055565b6113cc82826138ce565b80516113cc9061016b906020840190614a42565b6001600160a01b038216613af35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610fb9565b600081815261012f60205260409020546001600160a01b031615613b595760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610fb9565b613b65600083836141b8565b6001600160a01b038216600090815261013060205260408120805460019290613b8f90849061549e565b9091555050600081815261012f602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c95460ff1615613c865760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fb9565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139883390565b6000611f0c8383614315565b600080858585604051602001613cdf93929190615067565b60408051601f1981840301815291905280516020909101209050613d03818461434d565b610165546001600160a01b039182169116149695505050505050565b816001600160a01b0316836001600160a01b03161415613d815760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610fb9565b6001600160a01b0383811660008181526101326020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613dfa848484613720565b613e0684848484614371565b6128d15760405162461bcd60e51b8152600401610fb9906151ed565b606061016b8054610ec090615568565b606081613e565750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613e805780613e6a8161559d565b9150613e799050600a836154db565b9150613e5a565b60008167ffffffffffffffff811115613ea957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ed3576020820181803683370190505b5090505b841561371857613ee860018361550e565b9150613ef5600a866155d8565b613f0090603061549e565b60f81b818381518110613f2357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613f45600a866154db565b9450613ed7565b6000610eaa825490565b60008086868585604051602001613f709493929190615023565b60408051601f1981840301815291905280516020909101209050613f94818661434d565b610164546001600160a01b03918216911614979650505050505050565b60006001600160e01b03198216635a05180f60e01b1480610eaa5750610eaa8261447b565b60606000613fe58360026154ef565b613ff090600261549e565b67ffffffffffffffff81111561401657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614040576020820181803683370190505b509050600360fc1b8160008151811061406957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106140a657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006140ca8460026154ef565b6140d590600161549e565b90505b6001811115614169576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061411757634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061413b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361416281615551565b90506140d8565b508315611f0c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610fb9565b60c95460ff16156110f05760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fb9565b6142088282611f13565b6113cc5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556142403390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611f0c836001600160a01b0384166144b0565b6142a38282611f13565b156113cc5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611f0c836001600160a01b0384166144ff565b600082600001828154811061433a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600080600061435c858561461c565b915091506143698161468c565b509392505050565b60006001600160a01b0384163b1561447357604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906143b590339089908890889060040161516f565b602060405180830381600087803b1580156143cf57600080fd5b505af19250505080156143ff575060408051601f3d908101601f191682019092526143fc91810190614ec1565b60015b614459573d80801561442d576040519150601f19603f3d011682016040523d82523d6000602084013e614432565b606091505b5080516144515760405162461bcd60e51b8152600401610fb9906151ed565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613718565b506001613718565b60006001600160e01b03198216637965db0b60e01b1480610eaa57506301ffc9a760e01b6001600160e01b0319831614610eaa565b60008181526001830160205260408120546144f757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610eaa565b506000610eaa565b6000818152600183016020526040812054801561461257600061452360018361550e565b85549091506000906145379060019061550e565b90508181146145b857600086600001828154811061456557634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061459657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806145d757634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610eaa565b6000915050610eaa565b6000808251604114156146535760208301516040840151606085015160001a6146478782858561488d565b94509450505050614685565b82516040141561467d576020830151604084015161467286838361497a565b935093505050614685565b506000905060025b9250929050565b60008160048111156146ae57634e487b7160e01b600052602160045260246000fd5b14156146b75750565b60018160048111156146d957634e487b7160e01b600052602160045260246000fd5b14156147275760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610fb9565b600281600481111561474957634e487b7160e01b600052602160045260246000fd5b14156147975760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610fb9565b60038160048111156147b957634e487b7160e01b600052602160045260246000fd5b14156148125760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610fb9565b600481600481111561483457634e487b7160e01b600052602160045260246000fd5b14156113f75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610fb9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148c45750600090506003614971565b8460ff16601b141580156148dc57508460ff16601c14155b156148ed5750600090506004614971565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614941573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661496a57600060019250925050614971565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161499b8782888561488d565b935093505050935093915050565b8280548282559060005260206000209081019282156149f2579160200282015b828111156149f2578251829069ffffffffffffffffffff169055916020019190600101906149c9565b506149fe929150614ab6565b5090565b8280548282559060005260206000209081019282156149f2579160200282015b828111156149f2578251829060ff16905591602001919060010190614a22565b828054614a4e90615568565b90600052602060002090601f016020900481019282614a7057600085556149f2565b82601f10614a8957805160ff19168380011785556149f2565b828001600101855582156149f2579182015b828111156149f2578251825591602001919060010190614a9b565b5b808211156149fe5760008155600101614ab7565b600067ffffffffffffffff831115614ae557614ae5615618565b614af8601f8401601f1916602001615449565b9050828152838383011115614b0c57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114614b3a57600080fd5b919050565b600082601f830112614b4f578081fd5b611f0c83833560208501614acb565b803561ffff81168114614b3a57600080fd5b803560ff81168114614b3a57600080fd5b600060208284031215614b92578081fd5b611f0c82614b23565b60008060408385031215614bad578081fd5b614bb683614b23565b9150614bc460208401614b23565b90509250929050565b60008060008060808587031215614be2578182fd5b614beb85614b23565b9350614bf960208601614b23565b9250614c0760408601614b23565b9150614c1560608601614b23565b905092959194509250565b600080600060608486031215614c34578283fd5b614c3d84614b23565b9250614c4b60208501614b23565b9150604084013590509250925092565b60008060008060808587031215614c70578384fd5b614c7985614b23565b9350614c8760208601614b23565b925060408501359150606085013567ffffffffffffffff811115614ca9578182fd5b614cb587828801614b3f565b91505092959194509250565b60008060408385031215614cd3578182fd5b614cdc83614b23565b915060208301358015158114614cf0578182fd5b809150509250929050565b60008060408385031215614d0d578182fd5b614d1683614b23565b946020939093013593505050565b60006020808385031215614d36578182fd5b823567ffffffffffffffff811115614d4c578283fd5b8301601f81018513614d5c578283fd5b8035614d6f614d6a8261547a565b615449565b80828252848201915084840188868560051b8701011115614d8e578687fd5b8694505b83851015614db757614da381614b23565b835260019490940193918501918501614d92565b50979650505050505050565b60006020808385031215614dd5578182fd5b823567ffffffffffffffff811115614deb578283fd5b8301601f81018513614dfb578283fd5b8035614e09614d6a8261547a565b80828252848201915084840188868560051b8701011115614e28578687fd5b8694505b83851015614db7578035835260019490940193918501918501614e2c565b600060208284031215614e5b578081fd5b5035919050565b60008060408385031215614e74578182fd5b82359150614bc460208401614b23565b60008060408385031215614e96578182fd5b50508035926020909101359150565b600060208284031215614eb6578081fd5b8135611f0c8161562e565b600060208284031215614ed2578081fd5b8151611f0c8161562e565b600060208284031215614eee578081fd5b813567ffffffffffffffff811115614f04578182fd5b8201601f81018413614f14578182fd5b61371884823560208401614acb565b60008060008060808587031215614f38578182fd5b614f4185614b5e565b9350614f4f60208601614b5e565b9250604085013567ffffffffffffffff80821115614f6b578384fd5b614f7788838901614b3f565b93506060870135915080821115614f8c578283fd5b50614cb587828801614b3f565b600060208284031215614faa578081fd5b5051919050565b600060208284031215614fc2578081fd5b611f0c82614b70565b60008060008060808587031215614fe0578182fd5b614fe985614b70565b9350614f4f60208601614b70565b6000815180845261500f816020860160208601615525565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff198560601b1681526000845161504d816014850160208901615525565b909101601481019390935250603482015260540192915050565b6bffffffffffffffffffffffff198460601b16815260ff60f81b8360f81b166014820152600082516150a0816015850160208701615525565b91909101601501949350505050565b600082516150c1818460208701615525565b9190910192915050565b600083516150dd818460208801615525565b8351908301906150f1818360208801615525565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615132816017850160208801615525565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615163816028840160208801615525565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151a290830184614ff7565b9695505050505050565b602081526000611f0c6020830184614ff7565b60208082526014908201527315555d8c8e88139bdb98d9481dd85cc81d5cd95960621b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602c908201527f555576323a20556e61626c6520746f20666f7277617264206d6573736167652060408201526b746f2074726561737572792160a01b606082015260800190565b60208082526023908201527f555576323a20496e73756666696369656e742055434420666f72206272656564604082015262696e6760e81b606082015260800190565b60208082526017908201527f555576323a20496e76616c6964207369676e6174757265000000000000000000604082015260600190565b6020808252601b908201527f555576323a204e6f206d6f72652055557320617661696c61626c650000000000604082015260600190565b60208082526029908201527f555576323a204d6178696d756d206f662035206d696e747320706572207472616040820152686e73616374696f6e2160b81b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252600e908201526d555576323a204f6e6c7920454f4160901b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561547257615472615618565b604052919050565b600067ffffffffffffffff82111561549457615494615618565b5060051b60200190565b600082198211156154b1576154b16155ec565b500190565b600060ff821660ff84168060ff038211156154d3576154d36155ec565b019392505050565b6000826154ea576154ea615602565b500490565b6000816000190483118215151615615509576155096155ec565b500290565b600082821015615520576155206155ec565b500390565b60005b83811015615540578181015183820152602001615528565b838111156128d15750506000910152565b600081615560576155606155ec565b506000190190565b600181811c9082168061557c57607f821691505b6020821081141561175d57634e487b7160e01b600052602260045260246000fd5b60006000198214156155b1576155b16155ec565b5060010190565b600060ff821660ff8114156155cf576155cf6155ec565b60010192915050565b6000826155e7576155e7615602565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146113f757600080fdfe68747470733a2f2f6c69742d69736c616e642d30303631342e6865726f6b756170702e636f6d2f6170692f76312f757576322f6368726f6d6f736f6d65732fa26469706673582212202d85e958dc7f490ac76979ecddb1c32426b1b38c952448e924297c76f4d129ff64736f6c63430008040033

Deployed Bytecode

0x6080604052600436106104685760003560e01c8063824ea9371161024a578063a7f3bede11610139578063d547741f116100b6578063eb4f847b1161007a578063eb4f847b14610e15578063f2fde38b14610e33578063f3169b8614610e53578063fa406d6514610e68578063fe60d12c14610e8857600080fd5b8063d547741f14610d56578063d901866a14610d76578063dc86d27a14610d96578063e222c7f914610db6578063e985e9c514610dcb57600080fd5b8063c87b56dd116100fd578063c87b56dd14610cce578063ca15c87314610cee578063cb9a1de814610d0e578063d112974514610d21578063d3ea435014610d3657600080fd5b8063a7f3bede14610c2c578063b88d4fde14610c4c578063b968281814610c6c578063bafd898414610c7f578063c6e49f5014610c9d57600080fd5b8063931688cb116101c7578063a217fddf1161018b578063a217fddf14610b98578063a22cb46514610bad578063a3db6dc114610bcd578063a58c12ae14610be4578063a7c0ec9b14610c1557600080fd5b8063931688cb14610b155780639526840814610b3557806395d89b4114610b4a57806397cecb2514610b5f57806398ba156514610b7f57600080fd5b80638da5cb5b1161020e5780638da5cb5b14610a765780639010d07c14610a9457806391716d0514610ab457806391d1485414610ae257806392f9c99114610b0257600080fd5b8063824ea937146109d95780638456cb59146109ef5780638545f4ea14610a045780638626a8ac14610a245780638b533ea414610a5657600080fd5b806336568abe116103665780636352211e116102e3578063715018a6116102a7578063715018a614610944578063729ad39e146109595780637827ba001461097957806378416911146109995780637d7c4cfb146109b957600080fd5b80636352211e146108b1578063679ffd0a146108d15780636cac5ab4146108f15780636ecd23061461091157806370a082311461092457600080fd5b806342842e0e1161032a57806342842e0e146108215780634324450b146108415780634da065ff1461085857806357d82291146108785780635c975abb1461089957600080fd5b806336568abe1461077e5780633cc2757b1461079e5780633d3728b5146107be5780633f4ba83a146107ec5780634034b39e1461080157600080fd5b806323b872dd116103f45780632d2c5565116103b85780632d2c5565146106e85780632d6e71b6146107095780632f2ff15d14610729578063303c7c1314610749578063343937431461076957600080fd5b806323b872dd146105b7578063242a0087146105d7578063248a9ca31461065c57806324fd26521461068c5780632c783cfd146106a557600080fd5b80630962ef791161043b5780630962ef791461051e5780630bf153261461053e57806311c67efc1461055e57806318160ddd1461057d578063193faafc146105a057600080fd5b806301ffc9a71461046d57806306fdde03146104a2578063081812fc146104c4578063095ea7b3146104fc575b600080fd5b34801561047957600080fd5b5061048d610488366004614ea5565b610e9f565b60405190151581526020015b60405180910390f35b3480156104ae57600080fd5b506104b7610eb0565b60405161049991906151ac565b3480156104d057600080fd5b506104e46104df366004614e4a565b610f43565b6040516001600160a01b039091168152602001610499565b34801561050857600080fd5b5061051c610517366004614cfb565b610fdf565b005b34801561052a57600080fd5b5061051c610539366004614e4a565b6110f5565b34801561054a57600080fd5b5061051c610559366004614e4a565b611277565b34801561056a57600080fd5b5061016d5462010000900460ff1661048d565b34801561058957600080fd5b5061059261128a565b604051908152602001610499565b3480156105ac57600080fd5b506105926101685481565b3480156105c357600080fd5b5061051c6105d2366004614c20565b61129b565b3480156105e357600080fd5b5061063a6105f2366004614e4a565b6040805180820190915260008082526020820152506000908152610171602090815260409182902082518084019093525461ffff808216845262010000909104169082015290565b60408051825161ffff9081168252602093840151169281019290925201610499565b34801561066857600080fd5b50610592610677366004614e4a565b60009081526065602052604090206001015490565b34801561069857600080fd5b506101a55460ff1661048d565b3480156106b157600080fd5b506106d66106c0366004614b81565b61016e6020526000908152604090205460ff1681565b60405160ff9091168152602001610499565b3480156106f457600080fd5b50610167546104e4906001600160a01b031681565b34801561071557600080fd5b5061051c610724366004614e4a565b6112cc565b34801561073557600080fd5b5061051c610744366004614e62565b6112df565b34801561075557600080fd5b50610592610764366004614e4a565b611305565b34801561077557600080fd5b5061051c611327565b34801561078a57600080fd5b5061051c610799366004614e62565b611352565b3480156107aa57600080fd5b5061051c6107b9366004614e4a565b6113d0565b3480156107ca57600080fd5b506105926107d9366004614e4a565b6101696020526000908152604090205481565b3480156107f857600080fd5b5061051c6113e3565b34801561080d57600080fd5b5061051c61081c366004614e4a565b6113fa565b34801561082d57600080fd5b5061051c61083c366004614c20565b61140d565b34801561084d57600080fd5b506105926101605481565b34801561086457600080fd5b5061051c610873366004614dc3565b611428565b34801561088457600080fd5b50610166546104e4906001600160a01b031681565b3480156108a557600080fd5b5060c95460ff1661048d565b3480156108bd57600080fd5b506104e46108cc366004614e4a565b611697565b3480156108dd57600080fd5b506105926108ec366004614dc3565b61170f565b3480156108fd57600080fd5b5061051c61090c366004614bcd565b611763565b61051c61091f366004614fb1565b6119d1565b34801561093057600080fd5b5061059261093f366004614b81565b611ca8565b34801561095057600080fd5b5061051c611d30565b34801561096557600080fd5b5061051c610974366004614d24565b611d96565b34801561098557600080fd5b5061051c610994366004614e4a565b611e64565b3480156109a557600080fd5b5061051c6109b4366004614b81565b611e77565b3480156109c557600080fd5b5061051c6109d4366004614e4a565b611ea7565b3480156109e557600080fd5b5061016054610592565b3480156109fb57600080fd5b5061051c611eba565b348015610a1057600080fd5b5061051c610a1f366004614e4a565b611ece565b348015610a3057600080fd5b5061048d610a3f366004614e4a565b600090815261016c602052604090205460ff161590565b348015610a6257600080fd5b5061051c610a71366004614e4a565b611ee1565b348015610a8257600080fd5b5060fb546001600160a01b03166104e4565b348015610aa057600080fd5b506104e4610aaf366004614e84565b611ef4565b348015610ac057600080fd5b50610592610acf366004614e4a565b6000908152610169602052604090205490565b348015610aee57600080fd5b5061048d610afd366004614e62565b611f13565b61051c610b10366004614fcb565b611f3e565b348015610b2157600080fd5b5061051c610b30366004614edd565b612285565b348015610b4157600080fd5b5061051c61229a565b348015610b5657600080fd5b506104b76122c5565b348015610b6b57600080fd5b50610592610b7a366004614b81565b6122d5565b348015610b8b57600080fd5b5061016d5460ff1661048d565b348015610ba457600080fd5b50610592600081565b348015610bb957600080fd5b5061051c610bc8366004614cc1565b6124b3565b348015610bd957600080fd5b506105926101615481565b348015610bf057600080fd5b506106d6610bff366004614b81565b61016f6020526000908152604090205460ff1681565b348015610c2157600080fd5b5061059261015f5481565b348015610c3857600080fd5b5061051c610c47366004614fcb565b6124be565b348015610c5857600080fd5b5061051c610c67366004614c5b565b61289f565b61051c610c7a366004614fcb565b6128d7565b348015610c8b57600080fd5b506101a554610100900460ff1661048d565b348015610ca957600080fd5b506106d6610cb8366004614b81565b6101a46020526000908152604090205460ff1681565b348015610cda57600080fd5b506104b7610ce9366004614e4a565b612b43565b348015610cfa57600080fd5b50610592610d09366004614e4a565b612c20565b61051c610d1c366004614fb1565b612c37565b348015610d2d57600080fd5b5061051c612fb7565b348015610d4257600080fd5b50610592610d51366004614e4a565b612fd9565b348015610d6257600080fd5b5061051c610d71366004614e62565b613010565b348015610d8257600080fd5b5061051c610d91366004614e4a565b613036565b348015610da257600080fd5b5061051c610db1366004614f23565b613049565b348015610dc257600080fd5b5061051c6133ec565b348015610dd757600080fd5b5061048d610de6366004614b9b565b6001600160a01b0391821660009081526101326020908152604080832093909416825291909152205460ff1690565b348015610e2157600080fd5b5061016d54610100900460ff1661048d565b348015610e3f57600080fd5b5061051c610e4e366004614b81565b613419565b348015610e5f57600080fd5b5061051c6134e1565b348015610e7457600080fd5b50610592610e83366004614e4a565b613503565b348015610e9457600080fd5b506105926101765481565b6000610eaa82613514565b92915050565b606061012d8054610ec090615568565b80601f0160208091040260200160405190810160405280929190818152602001828054610eec90615568565b8015610f395780601f10610f0e57610100808354040283529160200191610f39565b820191906000526020600020905b815481529060010190602001808311610f1c57829003601f168201915b5050505050905090565b600081815261012f60205260408120546001600160a01b0316610fc25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815261013160205260409020546001600160a01b031690565b6000610fea82611697565b9050806001600160a01b0316836001600160a01b031614156110585760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610fb9565b336001600160a01b038216148061107457506110748133610de6565b6110e65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610fb9565b6110f08383613554565b505050565b6101a554610100900460ff1661114d5760405162461bcd60e51b815260206004820152601b60248201527f555576323a2055434420436c61696d696e67206e6f74204f70656e00000000006044820152606401610fb9565b3361115782611697565b6001600160a01b0316146111ad5760405162461bcd60e51b815260206004820181905260248201527f555576323a20436c61696d616e74206973206e6f7420746865206f776e6572216044820152606401610fb9565b60006111b882612fd9565b60008381526101696020526040908190204290556101665490516340c10f1960e01b8152336004820152602481018390529192506001600160a01b0316906340c10f1990604401600060405180830381600087803b15801561121957600080fd5b505af115801561122d573d6000803e3d6000fd5b50506040805185815260208101859052428183015290513393507f56253d287efacdb2c4cd76dd03624a4821c1ce721d1152e8f5f5718f6087c9bf92509081900360600190a25050565b600061128381336135c3565b5061015f55565b600061129661016a5490565b905090565b6112a53382613627565b6112c15760405162461bcd60e51b8152600401610fb990615385565b6110f0838383613720565b60006112d881336135c3565b5061017655565b6000828152606560205260409020600101546112fb81336135c3565b6110f083836138ce565b610162818154811061131657600080fd5b600091825260209091200154905081565b600061133381336135c3565b5061016d805461ff001981166101009182900460ff1615909102179055565b6001600160a01b03811633146113c25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610fb9565b6113cc82826138f0565b5050565b60006113dc81336135c3565b5061016855565b60006113ef81336135c3565b6113f7613912565b50565b600061140681336135c3565b5061017455565b6110f08383836040518060200160405280600081525061289f565b6101a554610100900460ff166114805760405162461bcd60e51b815260206004820152601b60248201527f555576323a2055434420436c61696d696e67206e6f74204f70656e00000000006044820152606401610fb9565b6000805b825181101561162d57336001600160a01b03166114c78483815181106114ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151611697565b6001600160a01b03161461151d5760405162461bcd60e51b815260206004820181905260248201527f555576323a20436c61696d616e74206973206e6f7420746865206f776e6572216044820152606401610fb9565b600061154f84838151811061154257634e487b7160e01b600052603260045260246000fd5b6020026020010151612fd9565b905061155b818461549e565b925042610169600086858151811061158357634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002081905550336001600160a01b03167f56253d287efacdb2c4cd76dd03624a4821c1ce721d1152e8f5f5718f6087c9bf8584815181106115e857634e487b7160e01b600052603260045260246000fd5b60200260200101518342604051611612939291909283526020830191909152604082015260600190565b60405180910390a250806116258161559d565b915050611484565b50610166546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561167b57600080fd5b505af115801561168f573d6000803e3d6000fd5b505050505050565b600081815261012f60205260408120546001600160a01b031680610eaa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610fb9565b6000805b825181101561175d5761173f83828151811061154257634e487b7160e01b600052603260045260246000fd5b611749908361549e565b9150806117558161559d565b915050611713565b50919050565b600054610100900460ff1661177e5760005460ff1615611782565b303b155b6117e55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610fb9565b600054610100900460ff16158015611807576000805461ffff19166101011790555b61180f6139a5565b6118176139a5565b61186b604051806040016040528060168152602001752ab734b73a32b932b9ba32b22ab734b1b7b93739ab1960511b815250604051806040016040528060048152602001632aaabb1960e11b8152506139cc565b611873613a1c565b61187b6139a5565b6118836139a5565b61188b613a4c565b61189485613419565b61016780546001600160a01b0319166001600160a01b038616179055671bc16d674ec8000061016855683635c9adc5dea000006101605567016345785d8a0000610161556040805180820190915269021e19e0c9bab2400000815269010f0cf064dd59200000602082015261190e906101629060026149a9565b5060408051808201909152604b8152605a602082015261193390610163906002614a02565b5061016480546001600160a01b038086166001600160a01b03199283161790925561016580549285169290911691909117905561138861015f5561197e60006119793390565b613a7f565b61016754611997906000906001600160a01b03166112df565b6119b86040518060600160405280603f8152602001615645603f9139613a89565b80156119ca576000805461ff00191690555b5050505050565b3332146119f05760405162461bcd60e51b8152600401610fb990615421565b61016d5462010000900460ff16611a495760405162461bcd60e51b815260206004820152601b60248201527f555576323a205075626c6963204d696e74206e6f74206f70656e2100000000006044820152606401610fb9565b610173548160ff161115611a6f5760405162461bcd60e51b8152600401610fb99061533c565b6101755433600090815261016f6020526040902054611a9290839060ff166154b6565b60ff161115611ae35760405162461bcd60e51b815260206004820152601c60248201527f555576323a205075626c6963204c696d697420457863656564656421000000006044820152606401610fb9565b33600090815261016f602052604081208054839290611b0690849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508060ff16611b2b336122d5565b611b3591906154ef565b3414611b7d5760405162461bcd60e51b8152602060048201526017602482015276555576323a20496e73756666696369656e74204554482160481b6044820152606401610fb9565b610176548160ff1661015f54611b93919061550e565b1015611bb15760405162461bcd60e51b8152600401610fb990615305565b8060ff1661015f6000828254611bc7919061550e565b90915550600090505b8160ff168160ff161015611c3357611bed61016a80546001019055565b426101696000611bfd61016a5490565b8152602081019190915260400160002055611c2133611c1c61016a5490565b613a9d565b80611c2b816155b8565b915050611bd0565b50610167546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611c82576040519150601f19603f3d011682016040523d82523d6000602084013e611c87565b606091505b50509050806113cc5760405162461bcd60e51b8152600401610fb99061523f565b60006001600160a01b038216611d135760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610fb9565b506001600160a01b03166000908152610130602052604090205490565b60fb546001600160a01b03163314611d8a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fb9565b611d946000613bee565b565b6000611da281336135c3565b815161015f541015611dc65760405162461bcd60e51b8152600401610fb990615305565b815161015f6000828254611dda919061550e565b90915550600090505b82518110156110f057611dfb61016a80546001019055565b426101696000611e0b61016a5490565b815260200190815260200160002081905550611e52838281518110611e4057634e487b7160e01b600052603260045260246000fd5b6020026020010151611c1c61016a5490565b80611e5c8161559d565b915050611de3565b6000611e7081336135c3565b5061017355565b6000611e8381336135c3565b5061016680546001600160a01b0319166001600160a01b0392909216919091179055565b6000611eb381336135c3565b5061016055565b6000611ec681336135c3565b6113f7613c40565b6000611eda81336135c3565b5061016155565b6000611eed81336135c3565b5061017555565b6000828152609760205260408120611f0c9083613cbb565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b333214611f5d5760405162461bcd60e51b8152600401610fb990615421565b61016d54610100900460ff16611fb55760405162461bcd60e51b815260206004820152601c60248201527f555576323a2050726573616c65204d696e74206e6f74206f70656e21000000006044820152606401610fb9565b61017082604051611fc691906150af565b9081526040519081900360200190205460ff1615611ff65760405162461bcd60e51b8152600401610fb9906151bf565b60016101708360405161200991906150af565b908152604051908190036020019020805491151560ff1990921691909117905561203533848484613cc7565b6120515760405162461bcd60e51b8152600401610fb9906152ce565b33600090815261016e602052604090205460ff80851691612074918791166154b6565b60ff1611156120c55760405162461bcd60e51b815260206004820152601d60248201527f555576323a2050726573616c65204c696d6974204578636565646564210000006044820152606401610fb9565b33600090815261016e6020526040812080548692906120e890849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508360ff1661210d336122d5565b61211791906154ef565b341461215f5760405162461bcd60e51b8152602060048201526017602482015276555576323a20496e73756666696369656e74204554482160481b6044820152606401610fb9565b610176548460ff1661015f54612175919061550e565b10156121935760405162461bcd60e51b8152600401610fb990615305565b8360ff1661015f60008282546121a9919061550e565b90915550600090505b8460ff168160ff161015612210576121cf61016a80546001019055565b4261016960006121df61016a5490565b81526020810191909152604001600020556121fe33611c1c61016a5490565b80612208816155b8565b9150506121b2565b50610167546040516000916001600160a01b03169034908381818185875af1925050503d806000811461225f576040519150601f19603f3d011682016040523d82523d6000602084013e612264565b606091505b50509050806119ca5760405162461bcd60e51b8152600401610fb99061523f565b600061229181336135c3565b6113cc82613a89565b60006122a681336135c3565b506101a5805461ff001981166101009182900460ff1615909102179055565b606061012e8054610ec090615568565b6000806101626000815481106122fb57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154610166546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a082319060240160206040518083038186803b15801561234d57600080fd5b505afa158015612361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123859190614f99565b106123bf576101636000815481106123ad57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050612498565b6101626001815481106123e257634e487b7160e01b600052603260045260246000fd5b600091825260209091200154610166546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a082319060240160206040518083038186803b15801561243457600080fd5b505afa158015612448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246c9190614f99565b10612494576101636001815481106123ad57634e487b7160e01b600052603260045260246000fd5b5060645b606481610161546124a991906154ef565b611f0c91906154db565b6113cc338383613d1f565b3332146124dd5760405162461bcd60e51b8152600401610fb990615421565b61016d54610100900460ff166125355760405162461bcd60e51b815260206004820152601c60248201527f555576323a2050726573616c65204d696e74206e6f74206f70656e21000000006044820152606401610fb9565b6101708260405161254691906150af565b9081526040519081900360200190205460ff16156125765760405162461bcd60e51b8152600401610fb9906151bf565b60016101708360405161258991906150af565b908152604051908190036020019020805491151560ff199092169190911790556125b533848484613cc7565b6125d15760405162461bcd60e51b8152600401610fb9906152ce565b33600090815261016e602052604090205460ff808516916125f4918791166154b6565b60ff1611156126455760405162461bcd60e51b815260206004820152601d60248201527f555576323a2050726573616c65204c696d6974204578636565646564210000006044820152606401610fb9565b33600090815261016e60205260408120805486929061266890849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508360ff166101605461269291906154ef565b610166546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156126d657600080fd5b505afa1580156126ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270e9190614f99565b10156127675760405162461bcd60e51b815260206004820152602260248201527f555576323a20496e73756666696369656e742055434420666f72206d696e74696044820152616e6760f01b6064820152608401610fb9565b610176548460ff1661015f5461277d919061550e565b101561279b5760405162461bcd60e51b8152600401610fb990615305565b8360ff1661015f60008282546127b1919061550e565b909155505061016654610160546001600160a01b0390911690639dc29fac9033906127e09060ff8916906154ef565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561282657600080fd5b505af115801561283a573d6000803e3d6000fd5b5050505060005b8460ff168160ff1610156119ca5761285e61016a80546001019055565b42610169600061286e61016a5490565b815260208101919091526040016000205561288d33611c1c61016a5490565b80612897816155b8565b915050612841565b6128a93383613627565b6128c55760405162461bcd60e51b8152600401610fb990615385565b6128d184848484613def565b50505050565b3332146128f65760405162461bcd60e51b8152600401610fb990615421565b6101a55460ff166129495760405162461bcd60e51b815260206004820152601b60248201527f555576323a20436c61696d696e67206973206e6f74206f70656e2100000000006044820152606401610fb9565b6101708260405161295a91906150af565b9081526040519081900360200190205460ff161561298a5760405162461bcd60e51b8152600401610fb9906151bf565b60016101708360405161299d91906150af565b908152604051908190036020019020805491151560ff199092169190911790556129c933848484613cc7565b6129e55760405162461bcd60e51b8152600401610fb9906152ce565b3360009081526101a4602052604090205460ff80851691612a08918791166154b6565b60ff161115612a595760405162461bcd60e51b815260206004820152601b60248201527f555576323a20436c61696d204c696d69742045786365656465642100000000006044820152606401610fb9565b3360009081526101a4602052604081208054869290612a7c90849060ff166154b6565b92506101000a81548160ff021916908360ff16021790555060008460ff1661015f54612aa8919061550e565b1015612ac65760405162461bcd60e51b8152600401610fb990615305565b8360ff1661015f6000828254612adc919061550e565b90915550600090505b8460ff168160ff1610156119ca57612b0261016a80546001019055565b426101696000612b1261016a5490565b8152602081019190915260400160002055612b3133611c1c61016a5490565b80612b3b816155b8565b915050612ae5565b600081815261012f60205260409020546060906001600160a01b0316612bc55760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610fb9565b6000612bcf613e22565b90506000815111612bef5760405180602001604052806000815250611f0c565b80612bf984613e32565b604051602001612c0a9291906150cb565b6040516020818303038152906040529392505050565b6000818152609760205260408120610eaa90613f4c565b333214612c565760405162461bcd60e51b8152600401610fb990615421565b61016d5462010000900460ff16612caf5760405162461bcd60e51b815260206004820152601b60248201527f555576323a205075626c6963204d696e74206e6f74206f70656e2100000000006044820152606401610fb9565b60ff8116612cff5760405162461bcd60e51b815260206004820152601b60248201527f555576323a20416d6f756e74206d757374206e6f7420626520302100000000006044820152606401610fb9565b610173548160ff161115612d255760405162461bcd60e51b8152600401610fb99061533c565b6101755433600090815261016f6020526040902054612d4890839060ff166154b6565b60ff1610612d985760405162461bcd60e51b815260206004820152601c60248201527f555576323a205075626c6963204c696d697420457863656564656421000000006044820152606401610fb9565b33600090815261016f602052604081208054839290612dbb90849060ff166154b6565b92506101000a81548160ff021916908360ff1602179055508060ff1661016054612de591906154ef565b610166546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015612e2957600080fd5b505afa158015612e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e619190614f99565b1015612e7f5760405162461bcd60e51b8152600401610fb99061528b565b610176548160ff1661015f54612e95919061550e565b1015612eb35760405162461bcd60e51b8152600401610fb990615305565b8060ff1661015f6000828254612ec9919061550e565b909155505061016654610160546001600160a01b0390911690639dc29fac903390612ef89060ff8616906154ef565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612f3e57600080fd5b505af1158015612f52573d6000803e3d6000fd5b5050505060005b8160ff168160ff1610156113cc57612f7661016a80546001019055565b426101696000612f8661016a5490565b8152602081019190915260400160002055612fa533611c1c61016a5490565b80612faf816155b8565b915050612f59565b6000612fc381336135c3565b506101a5805460ff19811660ff90911615179055565b600081815261016960205260408120546201518090612ff8904261550e565b6101685461300691906154ef565b610eaa91906154db565b60008281526065602052604090206001015461302c81336135c3565b6110f083836138f0565b600061304281336135c3565b5061017255565b61305e3383838761ffff168761ffff16613f56565b6130aa5760405162461bcd60e51b815260206004820152601760248201527f555576323a20496e76616c6964205369676e61747572650000000000000000006044820152606401610fb9565b61016d5460ff166130fd5760405162461bcd60e51b815260206004820152601a60248201527f555576323a204272656564696e67206973206e6f74206f70656e0000000000006044820152606401610fb9565b61016054610166546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317d9190614f99565b101561319b5760405162461bcd60e51b8152600401610fb99061528b565b61015f546131bb5760405162461bcd60e51b8152600401610fb990615305565b61ffff8416600090815261016c602052604090205460ff161580156131f5575061ffff8316600090815261016c602052604090205460ff16155b6132415760405162461bcd60e51b815260206004820181905260248201527f555576323a205555732068617665206265656e2062726564206265666f7265216044820152606401610fb9565b600161015f6000828254613255919061550e565b909155505061016a8054600101905561ffff848116600090815261016c60205260408082208054600160ff199182168117909255938716835291819020805490931690911790915561016654610160549151632770a7eb60e21b815233600482015260248101929092526001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156132ec57600080fd5b505af1158015613300573d6000803e3d6000fd5b5050505060405180604001604052808561ffff1681526020018461ffff16815250610171600061333061016a5490565b8152602080820192909252604001600090812083518154949093015161ffff908116620100000263ffffffff1990951693169290921792909217905542906101699061337c61016a5490565b815260208101919091526040016000205561339b33611c1c61016a5490565b61016a5433907fddf1e8fec06a50aa72b8a39a06787808c53eca73b2bd1cc995681cf7b8014650906040805191825261ffff808916602084015287169082015260600160405180910390a250505050565b60006133f881336135c3565b5061016d805462ff0000198116620100009182900460ff1615909102179055565b60fb546001600160a01b031633146134735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fb9565b6001600160a01b0381166134d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fb9565b6113f781613bee565b60006134ed81336135c3565b5061016d805460ff19811660ff90911615179055565b610163818154811061131657600080fd5b60006001600160e01b031982166380ac58cd60e01b148061354557506001600160e01b03198216635b5e139f60e01b145b80610eaa5750610eaa82613fb1565b60008181526101316020526040902080546001600160a01b0319166001600160a01b038416908117909155819061358a82611697565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6135cd8282611f13565b6113cc576135e5816001600160a01b03166014613fd6565b6135f0836020613fd6565b6040516020016136019291906150fa565b60408051601f198184030181529082905262461bcd60e51b8252610fb9916004016151ac565b600081815261012f60205260408120546001600160a01b03166136a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610fb9565b60006136ac83611697565b9050806001600160a01b0316846001600160a01b031614806136e75750836001600160a01b03166136dc84610f43565b6001600160a01b0316145b8061371857506001600160a01b038082166000908152610132602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661373382611697565b6001600160a01b03161461379b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610fb9565b6001600160a01b0382166137fd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610fb9565b6138088383836141b8565b613813600082613554565b6001600160a01b03831660009081526101306020526040812080546001929061383d90849061550e565b90915550506001600160a01b03821660009081526101306020526040812080546001929061386c90849061549e565b9091555050600081815261012f602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6138d882826141fe565b60008281526097602052604090206110f09082614284565b6138fa8282614299565b60008281526097602052604090206110f09082614300565b60c95460ff1661395b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610fb9565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff16611d945760405162461bcd60e51b8152600401610fb9906153d6565b600054610100900460ff166139f35760405162461bcd60e51b8152600401610fb9906153d6565b8151613a079061012d906020850190614a42565b5080516110f09061012e906020840190614a42565b600054610100900460ff16613a435760405162461bcd60e51b8152600401610fb9906153d6565b611d9433613bee565b600054610100900460ff16613a735760405162461bcd60e51b8152600401610fb9906153d6565b60c9805460ff19169055565b6113cc82826138ce565b80516113cc9061016b906020840190614a42565b6001600160a01b038216613af35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610fb9565b600081815261012f60205260409020546001600160a01b031615613b595760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610fb9565b613b65600083836141b8565b6001600160a01b038216600090815261013060205260408120805460019290613b8f90849061549e565b9091555050600081815261012f602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c95460ff1615613c865760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fb9565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139883390565b6000611f0c8383614315565b600080858585604051602001613cdf93929190615067565b60408051601f1981840301815291905280516020909101209050613d03818461434d565b610165546001600160a01b039182169116149695505050505050565b816001600160a01b0316836001600160a01b03161415613d815760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610fb9565b6001600160a01b0383811660008181526101326020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613dfa848484613720565b613e0684848484614371565b6128d15760405162461bcd60e51b8152600401610fb9906151ed565b606061016b8054610ec090615568565b606081613e565750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613e805780613e6a8161559d565b9150613e799050600a836154db565b9150613e5a565b60008167ffffffffffffffff811115613ea957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ed3576020820181803683370190505b5090505b841561371857613ee860018361550e565b9150613ef5600a866155d8565b613f0090603061549e565b60f81b818381518110613f2357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613f45600a866154db565b9450613ed7565b6000610eaa825490565b60008086868585604051602001613f709493929190615023565b60408051601f1981840301815291905280516020909101209050613f94818661434d565b610164546001600160a01b03918216911614979650505050505050565b60006001600160e01b03198216635a05180f60e01b1480610eaa5750610eaa8261447b565b60606000613fe58360026154ef565b613ff090600261549e565b67ffffffffffffffff81111561401657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614040576020820181803683370190505b509050600360fc1b8160008151811061406957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106140a657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006140ca8460026154ef565b6140d590600161549e565b90505b6001811115614169576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061411757634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061413b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361416281615551565b90506140d8565b508315611f0c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610fb9565b60c95460ff16156110f05760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fb9565b6142088282611f13565b6113cc5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556142403390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611f0c836001600160a01b0384166144b0565b6142a38282611f13565b156113cc5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611f0c836001600160a01b0384166144ff565b600082600001828154811061433a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600080600061435c858561461c565b915091506143698161468c565b509392505050565b60006001600160a01b0384163b1561447357604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906143b590339089908890889060040161516f565b602060405180830381600087803b1580156143cf57600080fd5b505af19250505080156143ff575060408051601f3d908101601f191682019092526143fc91810190614ec1565b60015b614459573d80801561442d576040519150601f19603f3d011682016040523d82523d6000602084013e614432565b606091505b5080516144515760405162461bcd60e51b8152600401610fb9906151ed565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613718565b506001613718565b60006001600160e01b03198216637965db0b60e01b1480610eaa57506301ffc9a760e01b6001600160e01b0319831614610eaa565b60008181526001830160205260408120546144f757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610eaa565b506000610eaa565b6000818152600183016020526040812054801561461257600061452360018361550e565b85549091506000906145379060019061550e565b90508181146145b857600086600001828154811061456557634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061459657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806145d757634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610eaa565b6000915050610eaa565b6000808251604114156146535760208301516040840151606085015160001a6146478782858561488d565b94509450505050614685565b82516040141561467d576020830151604084015161467286838361497a565b935093505050614685565b506000905060025b9250929050565b60008160048111156146ae57634e487b7160e01b600052602160045260246000fd5b14156146b75750565b60018160048111156146d957634e487b7160e01b600052602160045260246000fd5b14156147275760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610fb9565b600281600481111561474957634e487b7160e01b600052602160045260246000fd5b14156147975760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610fb9565b60038160048111156147b957634e487b7160e01b600052602160045260246000fd5b14156148125760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610fb9565b600481600481111561483457634e487b7160e01b600052602160045260246000fd5b14156113f75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610fb9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148c45750600090506003614971565b8460ff16601b141580156148dc57508460ff16601c14155b156148ed5750600090506004614971565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614941573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661496a57600060019250925050614971565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161499b8782888561488d565b935093505050935093915050565b8280548282559060005260206000209081019282156149f2579160200282015b828111156149f2578251829069ffffffffffffffffffff169055916020019190600101906149c9565b506149fe929150614ab6565b5090565b8280548282559060005260206000209081019282156149f2579160200282015b828111156149f2578251829060ff16905591602001919060010190614a22565b828054614a4e90615568565b90600052602060002090601f016020900481019282614a7057600085556149f2565b82601f10614a8957805160ff19168380011785556149f2565b828001600101855582156149f2579182015b828111156149f2578251825591602001919060010190614a9b565b5b808211156149fe5760008155600101614ab7565b600067ffffffffffffffff831115614ae557614ae5615618565b614af8601f8401601f1916602001615449565b9050828152838383011115614b0c57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114614b3a57600080fd5b919050565b600082601f830112614b4f578081fd5b611f0c83833560208501614acb565b803561ffff81168114614b3a57600080fd5b803560ff81168114614b3a57600080fd5b600060208284031215614b92578081fd5b611f0c82614b23565b60008060408385031215614bad578081fd5b614bb683614b23565b9150614bc460208401614b23565b90509250929050565b60008060008060808587031215614be2578182fd5b614beb85614b23565b9350614bf960208601614b23565b9250614c0760408601614b23565b9150614c1560608601614b23565b905092959194509250565b600080600060608486031215614c34578283fd5b614c3d84614b23565b9250614c4b60208501614b23565b9150604084013590509250925092565b60008060008060808587031215614c70578384fd5b614c7985614b23565b9350614c8760208601614b23565b925060408501359150606085013567ffffffffffffffff811115614ca9578182fd5b614cb587828801614b3f565b91505092959194509250565b60008060408385031215614cd3578182fd5b614cdc83614b23565b915060208301358015158114614cf0578182fd5b809150509250929050565b60008060408385031215614d0d578182fd5b614d1683614b23565b946020939093013593505050565b60006020808385031215614d36578182fd5b823567ffffffffffffffff811115614d4c578283fd5b8301601f81018513614d5c578283fd5b8035614d6f614d6a8261547a565b615449565b80828252848201915084840188868560051b8701011115614d8e578687fd5b8694505b83851015614db757614da381614b23565b835260019490940193918501918501614d92565b50979650505050505050565b60006020808385031215614dd5578182fd5b823567ffffffffffffffff811115614deb578283fd5b8301601f81018513614dfb578283fd5b8035614e09614d6a8261547a565b80828252848201915084840188868560051b8701011115614e28578687fd5b8694505b83851015614db7578035835260019490940193918501918501614e2c565b600060208284031215614e5b578081fd5b5035919050565b60008060408385031215614e74578182fd5b82359150614bc460208401614b23565b60008060408385031215614e96578182fd5b50508035926020909101359150565b600060208284031215614eb6578081fd5b8135611f0c8161562e565b600060208284031215614ed2578081fd5b8151611f0c8161562e565b600060208284031215614eee578081fd5b813567ffffffffffffffff811115614f04578182fd5b8201601f81018413614f14578182fd5b61371884823560208401614acb565b60008060008060808587031215614f38578182fd5b614f4185614b5e565b9350614f4f60208601614b5e565b9250604085013567ffffffffffffffff80821115614f6b578384fd5b614f7788838901614b3f565b93506060870135915080821115614f8c578283fd5b50614cb587828801614b3f565b600060208284031215614faa578081fd5b5051919050565b600060208284031215614fc2578081fd5b611f0c82614b70565b60008060008060808587031215614fe0578182fd5b614fe985614b70565b9350614f4f60208601614b70565b6000815180845261500f816020860160208601615525565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff198560601b1681526000845161504d816014850160208901615525565b909101601481019390935250603482015260540192915050565b6bffffffffffffffffffffffff198460601b16815260ff60f81b8360f81b166014820152600082516150a0816015850160208701615525565b91909101601501949350505050565b600082516150c1818460208701615525565b9190910192915050565b600083516150dd818460208801615525565b8351908301906150f1818360208801615525565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615132816017850160208801615525565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615163816028840160208801615525565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151a290830184614ff7565b9695505050505050565b602081526000611f0c6020830184614ff7565b60208082526014908201527315555d8c8e88139bdb98d9481dd85cc81d5cd95960621b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602c908201527f555576323a20556e61626c6520746f20666f7277617264206d6573736167652060408201526b746f2074726561737572792160a01b606082015260800190565b60208082526023908201527f555576323a20496e73756666696369656e742055434420666f72206272656564604082015262696e6760e81b606082015260800190565b60208082526017908201527f555576323a20496e76616c6964207369676e6174757265000000000000000000604082015260600190565b6020808252601b908201527f555576323a204e6f206d6f72652055557320617661696c61626c650000000000604082015260600190565b60208082526029908201527f555576323a204d6178696d756d206f662035206d696e747320706572207472616040820152686e73616374696f6e2160b81b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252600e908201526d555576323a204f6e6c7920454f4160901b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561547257615472615618565b604052919050565b600067ffffffffffffffff82111561549457615494615618565b5060051b60200190565b600082198211156154b1576154b16155ec565b500190565b600060ff821660ff84168060ff038211156154d3576154d36155ec565b019392505050565b6000826154ea576154ea615602565b500490565b6000816000190483118215151615615509576155096155ec565b500290565b600082821015615520576155206155ec565b500390565b60005b83811015615540578181015183820152602001615528565b838111156128d15750506000910152565b600081615560576155606155ec565b506000190190565b600181811c9082168061557c57607f821691505b6020821081141561175d57634e487b7160e01b600052602260045260246000fd5b60006000198214156155b1576155b16155ec565b5060010190565b600060ff821660ff8114156155cf576155cf6155ec565b60010192915050565b6000826155e7576155e7615602565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146113f757600080fdfe68747470733a2f2f6c69742d69736c616e642d30303631342e6865726f6b756170702e636f6d2f6170692f76312f757576322f6368726f6d6f736f6d65732fa26469706673582212202d85e958dc7f490ac76979ecddb1c32426b1b38c952448e924297c76f4d129ff64736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.