ETH Price: $2,421.83 (-1.20%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

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:

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
MysteryBowl

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {CountersUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import {MerkleProofUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import {Base64Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/Base64Upgradeable.sol";

interface IAnomura {
    function mintAnomura(address _address) external returns (uint256 anomuraId);
    function mintMultiple(address _address, uint256[] calldata _tokenArray) external;
}

contract MysteryBowl is
    Initializable,
    ERC721Upgradeable,
    ERC721EnumerableUpgradeable,
    ReentrancyGuardUpgradeable,
    OwnableUpgradeable
{
    IAnomura public anomuraContract;
    struct XP {
        uint256 savedXP;
        uint256 lastSaveBlock;
    }

    using CountersUpgradeable for CountersUpgradeable.Counter;
    CountersUpgradeable.Counter private _tokenIds;

    string public bowlFull;
    string public bowlEmpty;

    /**
     * @dev
     * White List (1800 phase 1, 2000 phase 2)
     * Public List - no limited
     */

    uint256 public constant SALE_PRICE = 0.075 ether;
    uint256 public constant MAX_PER_WALLET = 5;
    uint256 public maxTotalSupply;
    uint256 public maxMultiplier;
    
    /**
     * @dev Used to validate merke root
     */
    bytes32 public whiteListMerkleRoot;

    bool public isPaused;
    bool public isPublicSale;
    bool public canSetBowlStatus;
    /**
     * @dev Keep track of starfish from tokenId
     */
    mapping(uint256 => XP) public starfishMap;

    /**
     * @dev Keep track of bowl status, false by default
     */
    mapping(uint256 => bool) public bowls;

    /**
    * @dev Keep track of bowl minted per wallet
    */
    mapping(address => uint256) public bowlsMintedPerWallet;

    /// @dev Emit an event when the contract is deployed
    event ContractDeployed(
        address owner, 
        bool isPublicSale,
        bool isPaused,
        uint256 maxMultiplier
        );

    /// @dev Emit an event when the merkle root for team is updated
    event UpdatedMerkleRootOfTeamMint(bytes32 newHash, address updatedBy);

    /// @dev Emit an event when the merkle root for early list is updated
    event UpdatedMerkleRootOfEarlyListMint(bytes32 newHash, address updatedBy);

    /// @dev Emit an event when the merkle root for whitelist is updated
    event UpdatedMerkleRootOfWhiteListMint(bytes32 newHash, address updatedBy);

    /// @dev Emit an event when status of bowl is changed
    event UpdatedBowlStatus(uint256 bowlId, bool bowlStatus, address updatedBy);

    /// @dev Emit an event when public sale is changed
    event UpdatedIsPublicSale(bool isPublicSale, address updatedBy);

    /// @dev Emit an event when public sale is changed
    event UpdatedPauseContract(bool isPaused, address updatedBy);

    /// @dev Emit an event when starfish max multiplier is changed
    event UpdatedStarfishMaxMultiplier(uint256 multiplier, address updatedBy);

    /// @dev Emit an event when max whitelist supply is changed
    event UpdatedMaxWhiteListMint(uint256 maxWhiteList, address updatedBy);

    /// @dev Emit an event when anomura contract address is set
    event UpdatedAnomuraContractAddress(address anomuraAddress, address updatedBy);

    /// @dev Emit an event when bowl IPFS is changed
    event UpdatedBowlIPFS(string bowlImage, address updatedBy);

    /// @dev Emit an event when bowl empty IPFS is changed
    event UpdatedBowlEmptyIPFS(string bowlImage, address updatedBy);

    event UpdatedMaxTotalSupply(uint256 maxTotalSuppy, address updatedBy);

    function initialize() external initializer {
        __ERC721_init("Mystery Bowl", "Bowl");
        __ERC721Enumerable_init();
        __ReentrancyGuard_init();
        __Ownable_init();

        isPublicSale = false;
        isPaused = false;
        canSetBowlStatus = false;
        maxMultiplier = 24;
        bowlFull = "https://www.anomuragame.com/img/Bowl_With_Anomura.gif";
        bowlEmpty = "https://www.anomuragame.com/img/Bowl_Empty.gif";

        maxTotalSupply = 2000;

        // to have anomuraId starts at 1, instead of 0
        _tokenIds.increment();

        // emit event contract is deployed
        emit ContractDeployed(msg.sender, isPublicSale, isPaused, maxMultiplier);
    }

    // ============ ACCESS CONTROL/SANITY MODIFIERS ============

    /**
     * @dev To check if the origin is same as the address of the caller who calls this function
     */
    modifier isOrigin() {
        uint256 size = 0;
        address acc = msg.sender;
        assembly { size := extcodesize(acc)}

        require(msg.sender == tx.origin && size == 0, "Is not origin");
        _;
       
    }

    /**
     * @dev Throw when the submitted proof not valid under its root
     */
    modifier isValidMerkleProof(
        bytes32[] calldata _merkleProof,
        bytes32 _root
    ) {
        require(_root != "", "root is empty");
        require(
            MerkleProofUpgradeable.verify(
                _merkleProof,
                _root,
                keccak256(abi.encodePacked(msg.sender))
            ),
            "Address does not exist in list"
        );
        _;
    }

    /**
     * @dev Throws if called when contract is paused.
     */
    modifier isNotPaused() {
        require(isPaused == false, "Contract Paused");
        _;
    }

    /**
     * @dev Throws if token not existed on contract.
     */
    modifier isTokenExist(uint256 _tokenId) {
        require(_exists(_tokenId), "Nonexistent token");
        _;
    }

    /**
     * @dev Throws if called by account with ether less than sale price, or when reach max total supply.
     */
    modifier canBulkMint(uint256 _quantity) {
        require(
            msg.value >= SALE_PRICE * _quantity,
            "Not enough ether to mint"
        );
        require(_quantity > 0, "Missing purchase quantity");
        require(totalSupply() + _quantity <= maxTotalSupply, "Reached Total Supply Limit");
        _;
    }

    // ============ PUBLIC FUNCTIONS FOR MINTING =============

    /**
     * @notice mints 1 token per whitelist member address, charge a fee
     * @return mintId tokenId minted
     */
    function mintWhiteList(bytes32[] calldata _merkleProof, uint256 _quantity)
        external
        payable
        canBulkMint(_quantity)
        isValidMerkleProof(_merkleProof, whiteListMerkleRoot)
        isNotPaused
        nonReentrant
        returns (uint256 mintId)
    {
        require(bowlsMintedPerWallet[msg.sender] + _quantity <= MAX_PER_WALLET, "Mints per wallet exceeded");
        
        for (uint256 mintCounter = 0; mintCounter < _quantity; mintCounter++) {
            mintId = _tokenIds.current();
            _tokenIds.increment();
            bowlsMintedPerWallet[msg.sender]++;
            mint(mintId);
        }
    }

    /**
     * @dev Public mint token, charge a fee
     */
    function mintPublic(uint256 _quantity)
        external
        payable
        canBulkMint(_quantity)
        isNotPaused
        nonReentrant
        returns (uint256 mintId)
    {
        require(isPublicSale != false, "Sale is not public");

        for (uint256 mintCounter = 0; mintCounter < _quantity; mintCounter++) {
            mintId = _tokenIds.current();
            _tokenIds.increment();
            mint(mintId);
        }
    }

    /**
     * @dev Only Owner mint token. Do not check Max ToTAL SUPPLY.
     */
    function mintToWallet(uint256 _quantity, address _walletAddress)
        external
        isNotPaused
        nonReentrant
        onlyOwner
        returns (uint256 mintId)
    {
        for (uint256 mintCounter = 0; mintCounter < _quantity; mintCounter++) {
            mintId = _tokenIds.current();
            _tokenIds.increment();

            _safeMint(_walletAddress, mintId);
            starfishMap[mintId] = XP({savedXP: 0, lastSaveBlock: block.number});
            bowls[mintId] = true;
        }
    }

    /**
     * @notice Internal mint a bowl, called by other external mint functions
     * It sets the bowl to be not empty
     * It maps the bowl id to be owned by msg.sender
     * Start calculating starfish at current block number
     * @param _tokenId Id of the token
     */
    function mint(uint256 _tokenId) internal {
        _safeMint(msg.sender, _tokenId);
        starfishMap[_tokenId] = XP({savedXP: 0, lastSaveBlock: block.number});
        bowls[_tokenId] = true;
    }

    /**
     * @notice Summon an anomura from existing bowl
     * @param _tokenId Id of the Bowl
     */
    function hatchAnomura(uint256 _tokenId)
        external
        isTokenExist(_tokenId)
        isOrigin
        returns (uint256 anomuraId)
    {
        require(
            ownerOf(_tokenId) == msg.sender,
            "Caller does not own this bowl."
        );
        require(bowls[_tokenId] == true, "Bowl is empty");
        require(
            address(anomuraContract) != address(0x0),
            "Anomura contract address is 0"
        );

        bowls[_tokenId] = false;

        anomuraId = anomuraContract.mintAnomura(msg.sender);

        // emit bowl status change to false
        emit UpdatedBowlStatus(_tokenId, false, msg.sender);
    }

    function starfish(uint256 _tokenId) public view returns (uint256 total) {
        uint256 lastBlock = starfishMap[_tokenId].lastSaveBlock;

        if (lastBlock == 0) {
            return 0;
        }
        uint256 delta = block.number - lastBlock; 
        uint256 multiplier = delta / 6000;
        if (multiplier > maxMultiplier) {
            multiplier = maxMultiplier;
        }

        total =
            starfishMap[_tokenId].savedXP +
            ((delta * (multiplier + 1)) / 10000);

        if (total < 1) total = 1;
    }

    function save(uint256 _tokenId) private {
        starfishMap[_tokenId].savedXP = starfish(_tokenId);
        starfishMap[_tokenId].lastSaveBlock = block.number;
    }

    /**
    @notice Takes a tokenId and returns base64 string to represent the Bowl metadata
    @param _tokenId Id of the token
    @return string base64
    */
    function tokenURI(uint256 _tokenId)
        public
        view
        virtual
        override
        isTokenExist(_tokenId)
        returns (string memory)
    {
        string memory bowlImage = bowls[_tokenId] == true ? bowlFull : bowlEmpty;
        string memory bowlDescription = bowls[_tokenId] == true ? "Full Mystery Bowl" : "Empty Mystery Bowl";

        string memory json = Base64Upgradeable.encode(
            bytes(
                string(abi.encodePacked("{\"name\": \"Mystery Bowl #", StringsUpgradeable.toString(_tokenId), "\", \"description\":\"", bowlDescription, "\", \"image\":\"", bowlImage, "\", \"attributes\": [{\"trait_type\":  \"Summoning Power\",\"value\":\"", bowls[_tokenId] == true ? "Yes" : "No","\"}, {\"trait_type\":  \"Starfish\",\"value\":\"", StringsUpgradeable.toString(starfish(_tokenId)),"\"}]""}"))
                )
        );
        return string(abi.encodePacked("data:application/json;base64,", json));
    }

    /**
    @notice Transfer the toker to a new address, and reset the starfish map of this token
    @param _from The token to be transferred from
    @param _to The token to be transferred to
    @param _tokenId tokenId to be transferred
    */
    function _beforeTokenTransfer(
        address _from,
        address _to,
        uint256 _tokenId
    ) 
    internal 
    override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
    {
        super._beforeTokenTransfer(_from, _to, _tokenId);
        save(_tokenId);
    }

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

    /**
    @notice Takes an eth address and returns the tokenIds that this user owns
    @param _ownerAddr Owner of the tokens
    @return tokenIds The list of owned tokens
    */
    function getTokensByOwner(address _ownerAddr)
        external
        view
        returns (uint256[] memory tokenIds)
    {
        require(_ownerAddr != address(0), "Cannot query address 0");

        uint256 numTokens = balanceOf(_ownerAddr);
        tokenIds = new uint256[](numTokens);
        for (uint256 i = 0; i < numTokens; i++) {
            tokenIds[i] = tokenOfOwnerByIndex(_ownerAddr, i);
        }
    }

    // ============ OWNER-ONLY ADMIN FUNCTIONS ============
    /**
    @notice Change status of the bowl, can only be set by contract owner.
    @param _tokenId Id of the token
    @param _bowlStatus new bowl status
     onlyOwner
    */
    function setBowlStatus(uint256 _tokenId, bool _bowlStatus)
        external
        isTokenExist(_tokenId)
        onlyOwner
    {
        require(canSetBowlStatus == true, "Set Bowl is false");
        bowls[_tokenId] = _bowlStatus;
        emit UpdatedBowlStatus(_tokenId, _bowlStatus, msg.sender);
    }

    /**
    @notice Change the image of the bowl when it is full
    @param _bowlFull link to new image
    */
    function setBowlImage(string calldata _bowlFull) external onlyOwner {
        bowlFull = _bowlFull;
        emit UpdatedBowlIPFS(_bowlFull, msg.sender);
    }

    /**
    @notice Change the image of the bowl when it is empty
    @param _bowlEmpty link to new empty bowl image
    */
    function setBowlEmptyImage(string calldata _bowlEmpty) external onlyOwner {
        bowlEmpty = _bowlEmpty;
        emit UpdatedBowlEmptyIPFS(_bowlEmpty, msg.sender);
    }

    /**
    @notice Change status of public sale, to allow public minting
    @param _isPublicSale new status of isPublicSale
    */
    function setPublicSale(bool _isPublicSale) external onlyOwner {
        isPublicSale = _isPublicSale;
        emit UpdatedIsPublicSale(_isPublicSale, msg.sender);
    }

    /**
    @notice Change status of isPaused, to pause all minting functions
    @param _isPaused boolean to pause
    */
    function setContractPaused(bool _isPaused) external onlyOwner {
        isPaused = _isPaused;
        emit UpdatedPauseContract(_isPaused, msg.sender);
    }

    /**
    @notice Set new multiplier to calculate starfish
    @param _multiplier new multiplier
    */
    function setMaxMultiplier(uint256 _multiplier) external onlyOwner {
        maxMultiplier = _multiplier;
        emit UpdatedStarfishMaxMultiplier(_multiplier, msg.sender);
    }

    /**
    @notice Manual set a new max total supply
    Allow the owner to set a new total supply
    */
    function setMaxTotalSupply(uint256 _maxTotalSupply) external onlyOwner {
        require(_maxTotalSupply > maxTotalSupply, "New max less than old max");
        maxTotalSupply = _maxTotalSupply;
        emit UpdatedMaxTotalSupply(_maxTotalSupply, msg.sender);
    }

    /**
    @notice Disable renounceOwnership since this contract has multiple onlyOwner functions
    */
    function renounceOwnership() public view override onlyOwner {
        revert("renounceOwnership is not allowed");
    }

    /**
    @notice Manual set a new merkle root for whiteListMerkleRoot
    @param _merkleRoot new merkle root
    */
    function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        whiteListMerkleRoot = _merkleRoot;
        emit UpdatedMerkleRootOfWhiteListMint(_merkleRoot, msg.sender);
    }

    /**
    @notice withdraw current balance to msg.sender address
    */
    function withdrawAvailableBalance() external onlyOwner {
        uint256 balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    /**
    @notice Manual set the address of the Anomura contract deployed
    This should be set to a deployed anomura address. Once we set, we should not call it again as the anomura address is a proxy address.
    @param _anomura Anomura's address deployed
    */
    function setAnomuraContractAddress(address _anomura) external onlyOwner {
        // require(address(anomuraContract) == address(0x0), "The anomura address has been set before.");
        // accidentally we may put a wrong address and we cannot revert
        anomuraContract = IAnomura(_anomura);
        emit UpdatedAnomuraContractAddress(_anomura, msg.sender);
    }

     /**
     * @dev Throw when the submitted proof not valid under its root
     */
    function checkMerkleProof(
        bytes32[] calldata _merkleProof,
        bytes32 _root,
        address sender
    ) external pure returns (bool isValid) {
        require(_root != "", "root is empty");
        
        isValid = MerkleProofUpgradeable.verify(
                _merkleProof,
                _root,
                keccak256(abi.encodePacked(sender)));
    }
}

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

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

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

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

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 {
        __Ownable_init_unchained();
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 {
        __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: address zero is not a valid owner");
        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: invalid token ID");
        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) {
        _requireMinted(tokenId);

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

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

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

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        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: caller is not token 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: caller is not token 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) {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @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 {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[44] private __gap;
}

// 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;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64Upgradeable {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 8 of 18 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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 proxied contracts do not make use of 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.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * 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 prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProofUpgradeable {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    function __ERC721Enumerable_init() internal onlyInitializing {
    }

    function __ERC721Enumerable_init_unchained() internal onlyInitializing {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[46] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev 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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// 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 {
    }

    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;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface 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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// 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 {
    }

    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;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

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

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

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bool","name":"isPublicSale","type":"bool"},{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"},{"indexed":false,"internalType":"uint256","name":"maxMultiplier","type":"uint256"}],"name":"ContractDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"anomuraAddress","type":"address"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedAnomuraContractAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"bowlImage","type":"string"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedBowlEmptyIPFS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"bowlImage","type":"string"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedBowlIPFS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bowlId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"bowlStatus","type":"bool"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedBowlStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPublicSale","type":"bool"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedIsPublicSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxTotalSuppy","type":"uint256"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedMaxTotalSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxWhiteList","type":"uint256"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedMaxWhiteListMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"newHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedMerkleRootOfEarlyListMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"newHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedMerkleRootOfTeamMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"newHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedMerkleRootOfWhiteListMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedPauseContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedStarfishMaxMultiplier","type":"event"},{"inputs":[],"name":"MAX_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anomuraContract","outputs":[{"internalType":"contract IAnomura","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bowlEmpty","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bowlFull","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bowls","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bowlsMintedPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetBowlStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"address","name":"sender","type":"address"}],"name":"checkMerkleProof","outputs":[{"internalType":"bool","name":"isValid","type":"bool"}],"stateMutability":"pure","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":"_ownerAddr","type":"address"}],"name":"getTokensByOwner","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"hatchAnomura","outputs":[{"internalType":"uint256","name":"anomuraId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintPublic","outputs":[{"internalType":"uint256","name":"mintId","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_walletAddress","type":"address"}],"name":"mintToWallet","outputs":[{"internalType":"uint256","name":"mintId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintWhiteList","outputs":[{"internalType":"uint256","name":"mintId","type":"uint256"}],"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":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_anomura","type":"address"}],"name":"setAnomuraContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_bowlEmpty","type":"string"}],"name":"setBowlEmptyImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_bowlFull","type":"string"}],"name":"setBowlImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"_bowlStatus","type":"bool"}],"name":"setBowlStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"setContractPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_multiplier","type":"uint256"}],"name":"setMaxMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTotalSupply","type":"uint256"}],"name":"setMaxTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPublicSale","type":"bool"}],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"starfish","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"starfishMap","outputs":[{"internalType":"uint256","name":"savedXP","type":"uint256"},{"internalType":"uint256","name":"lastSaveBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"whiteListMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAvailableBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50613cfe806100206000396000f3fe6080604052600436106102e45760003560e01c8063564841c711610190578063a8d5de2a116100dc578063d2b8c4c711610095578063efd0cbf91161006f578063efd0cbf9146108fe578063f2fde38b14610911578063fb90148c14610931578063fba0105c1461095157600080fd5b8063d2b8c4c71461088d578063e0a6bf8f146108a2578063e985e9c5146108b557600080fd5b8063a8d5de2a146107cf578063b1111359146107fd578063b187bd2614610812578063b88d4fde1461082d578063bd32fb661461084d578063c87b56dd1461086d57600080fd5b80637f205a74116101495780638da5cb5b116101235780638da5cb5b1461075c57806395d89b411461077a578063a22cb4651461078f578063a5a865dc146107af57600080fd5b80637f205a741461070b5780638129fc1c14610727578063882796f11461073c57600080fd5b8063564841c7146106565780635aca1bb6146106765780636352211e1461069657806370a08231146106b6578063715018a6146106d657806371f9703f146106eb57600080fd5b806323b872dd1161024f5780633f42fea81161020857806342b55a5c116101e257806342b55a5c146105d05780634f6ccce7146106015780635430f2031461062157806354c0b35d1461063657600080fd5b80633f42fea81461056257806340398d671461058357806342842e0e146105b057600080fd5b806323b872dd146104b4578063265b2f7a146104d45780632ab4d052146104f45780632f745c591461050b57806334b6ab1a1461052b5780633f3e4c111461054257600080fd5b8063095ea7b3116102a1578063095ea7b3146103df5780630f2cdd6c146103ff5780631326db3d1461041457806313a81ac51461043557806318160ddd1461047f5780632078dfe31461049457600080fd5b806301526a43146102e95780630187aea01461030b57806301ffc9a714610335578063069093e91461036557806306fdde0314610385578063081812fc146103a7575b600080fd5b3480156102f557600080fd5b5061030961030436600461325a565b610971565b005b34801561031757600080fd5b506103226101325481565b6040519081526020015b60405180910390f35b34801561034157600080fd5b50610355610350366004613289565b6109bb565b604051901515815260200161032c565b34801561037157600080fd5b5061035561038036600461330e565b6109cc565b34801561039157600080fd5b5061039a610a8d565b60405161032c91906133c3565b3480156103b357600080fd5b506103c76103c236600461325a565b610b1f565b6040516001600160a01b03909116815260200161032c565b3480156103eb57600080fd5b506103096103fa3660046133d6565b610b46565b34801561040b57600080fd5b50610322600581565b34801561042057600080fd5b5061012d546103c7906001600160a01b031681565b34801561044157600080fd5b5061046a61045036600461325a565b610135602052600090815260409020805460019091015482565b6040805192835260208301919091520161032c565b34801561048b57600080fd5b50609954610322565b3480156104a057600080fd5b506103096104af366004613400565b610c5c565b3480156104c057600080fd5b506103096104cf366004613472565b610cb0565b3480156104e057600080fd5b506103226104ef3660046134ae565b610ce1565b34801561050057600080fd5b506103226101315481565b34801561051757600080fd5b506103226105263660046133d6565b610dc2565b34801561053757600080fd5b506103226101335481565b34801561054e57600080fd5b5061030961055d36600461325a565b610e58565b34801561056e57600080fd5b50610134546103559062010000900460ff1681565b34801561058f57600080fd5b506105a361059e3660046134da565b610eed565b60405161032c91906134f5565b3480156105bc57600080fd5b506103096105cb366004613472565b610fdb565b3480156105dc57600080fd5b506103556105eb36600461325a565b6101366020526000908152604090205460ff1681565b34801561060d57600080fd5b5061032261061c36600461325a565b610ff6565b34801561062d57600080fd5b5061039a611089565b34801561064257600080fd5b5061032261065136600461325a565b611118565b34801561066257600080fd5b50610309610671366004613549565b61137a565b34801561068257600080fd5b5061030961069136600461356c565b61146c565b3480156106a257600080fd5b506103c76106b136600461325a565b6114c3565b3480156106c257600080fd5b506103226106d13660046134da565b611523565b3480156106e257600080fd5b506103096115a9565b3480156106f757600080fd5b506103096107063660046134da565b6115f9565b34801561071757600080fd5b5061032267010a741a4627800081565b34801561073357600080fd5b50610309611655565b34801561074857600080fd5b5061030961075736600461356c565b61189c565b34801561076857600080fd5b5060fb546001600160a01b03166103c7565b34801561078657600080fd5b5061039a6118eb565b34801561079b57600080fd5b506103096107aa366004613587565b6118fa565b3480156107bb57600080fd5b506101345461035590610100900460ff1681565b3480156107db57600080fd5b506103226107ea3660046134da565b6101376020526000908152604090205481565b34801561080957600080fd5b50610309611909565b34801561081e57600080fd5b50610134546103559060ff1681565b34801561083957600080fd5b506103096108483660046135c7565b611940565b34801561085957600080fd5b5061030961086836600461325a565b611978565b34801561087957600080fd5b5061039a61088836600461325a565b6119bb565b34801561089957600080fd5b5061039a611bfd565b6103226108b03660046136a3565b611c0b565b3480156108c157600080fd5b506103556108d03660046136ef565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61032261090c36600461325a565b611f32565b34801561091d57600080fd5b5061030961092c3660046134da565b612123565b34801561093d57600080fd5b5061030961094c366004613400565b612199565b34801561095d57600080fd5b5061032261096c36600461325a565b6121e2565b610979612286565b610132819055604080518281523360208201527f50edfbcf2e1b89d1287eaede872dc268e6765f15041369465a94f85d8cce210b91015b60405180910390a150565b60006109c6826122e2565b92915050565b600082610a105760405162461bcd60e51b815260206004820152600d60248201526c726f6f7420697320656d70747960981b60448201526064015b60405180910390fd5b610a84858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff19606088901b16602082015287925060340190505b60405160208183030381529060405280519060200120612307565b95945050505050565b606060658054610a9c90613719565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac890613719565b8015610b155780601f10610aea57610100808354040283529160200191610b15565b820191906000526020600020905b815481529060010190602001808311610af857829003601f168201915b5050505050905090565b6000610b2a8261231d565b506000908152606960205260409020546001600160a01b031690565b6000610b51826114c3565b9050806001600160a01b0316836001600160a01b03161415610bbf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a07565b336001600160a01b0382161480610bdb5750610bdb81336108d0565b610c4d5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610a07565b610c57838361237c565b505050565b610c64612286565b610c71610130838361314d565b507e64b3fa77d42018908ae2fc2048174fc01b2239317e4c3a22d1f5b666028874828233604051610ca49392919061374e565b60405180910390a15050565b610cba33826123ea565b610cd65760405162461bcd60e51b8152600401610a079061378f565b610c57838383612469565b6101345460009060ff1615610d085760405162461bcd60e51b8152600401610a07906137dd565b600260c9541415610d2b5760405162461bcd60e51b8152600401610a0790613806565b600260c955610d38612286565b60005b83811015610db65761012e549150610d5861012e80546001019055565b610d628383612610565b60408051808201825260008082524360208084019182528683526101358152848320935184559051600193840155610136905291909120805460ff1916909117905580610dae81613853565b915050610d3b565b50600160c95592915050565b6000610dcd83611523565b8210610e2f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a07565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b610e60612286565b610131548111610eb25760405162461bcd60e51b815260206004820152601960248201527f4e6577206d6178206c657373207468616e206f6c64206d6178000000000000006044820152606401610a07565b610131819055604080518281523360208201527ffddd3d0f09c8f3ea6d1e14a35e681f73f9225745579589d46e23aff6e33ba17f91016109b0565b60606001600160a01b038216610f3e5760405162461bcd60e51b8152602060048201526016602482015275043616e6e6f74207175657279206164647265737320360541b6044820152606401610a07565b6000610f4983611523565b90508067ffffffffffffffff811115610f6457610f646135b1565b604051908082528060200260200182016040528015610f8d578160200160208202803683370190505b50915060005b81811015610fd457610fa58482610dc2565b838281518110610fb757610fb761386e565b602090810291909101015280610fcc81613853565b915050610f93565b5050919050565b610c5783838360405180602001604052806000815250611940565b600061100160995490565b82106110645760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a07565b609982815481106110775761107761386e565b90600052602060002001549050919050565b61012f805461109790613719565b80601f01602080910402602001604051908101604052809291908181526020018280546110c390613719565b80156111105780601f106110e557610100808354040283529160200191611110565b820191906000526020600020905b8154815290600101906020018083116110f357829003601f168201915b505050505081565b60008181526067602052604081205482906001600160a01b031661114e5760405162461bcd60e51b8152600401610a0790613884565b33803b90328114801561115f575081155b61119b5760405162461bcd60e51b815260206004820152600d60248201526c24b9903737ba1037b934b3b4b760991b6044820152606401610a07565b336111a5866114c3565b6001600160a01b0316146111fb5760405162461bcd60e51b815260206004820152601e60248201527f43616c6c657220646f6573206e6f74206f776e207468697320626f776c2e00006044820152606401610a07565b6000858152610136602052604090205460ff16151560011461124f5760405162461bcd60e51b815260206004820152600d60248201526c426f776c20697320656d70747960981b6044820152606401610a07565b61012d546001600160a01b03166112a85760405162461bcd60e51b815260206004820152601d60248201527f416e6f6d75726120636f6e7472616374206164647265737320697320300000006044820152606401610a07565b6000858152610136602052604090819020805460ff1916905561012d5490516357dd845b60e01b81523360048201526001600160a01b03909116906357dd845b906024016020604051808303816000875af115801561130b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132f91906138af565b6040805187815260006020820152338183015290519195507f15bad1e35c005ca74c9c19fde2173d2b5bc1f86809a70e70a5662dee5880837f919081900360600190a1505050919050565b60008281526067602052604090205482906001600160a01b03166113b05760405162461bcd60e51b8152600401610a0790613884565b6113b8612286565b6101345462010000900460ff16151560011461140a5760405162461bcd60e51b815260206004820152601160248201527053657420426f776c2069732066616c736560781b6044820152606401610a07565b60008381526101366020908152604091829020805485151560ff199091168117909155825186815291820152338183015290517f15bad1e35c005ca74c9c19fde2173d2b5bc1f86809a70e70a5662dee5880837f9181900360600190a1505050565b611474612286565b610134805461ff00191661010083151590810291909117909155604080519182523360208301527f2117c07cc0fa92a77f76e660e2bf8328dcefd8efe7fabbeb4dd872e94d9eb0cf91016109b0565b6000818152606760205260408120546001600160a01b0316806109c65760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610a07565b60006001600160a01b03821661158d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610a07565b506001600160a01b031660009081526068602052604090205490565b6115b1612286565b60405162461bcd60e51b815260206004820181905260248201527f72656e6f756e63654f776e657273686970206973206e6f7420616c6c6f7765646044820152606401610a07565b611601612286565b61012d80546001600160a01b0319166001600160a01b038316908117909155604080519182523360208301527feb272e8d45e2dbe4b14badb52c354e635f8d224e0995d4f31f7fdc1ae95cfcf091016109b0565b600054610100900460ff16158080156116755750600054600160ff909116105b8061168f5750303b15801561168f575060005460ff166001145b6116f25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a07565b6000805460ff191660011790558015611715576000805461ff0019166101001790555b61175f6040518060400160405280600c81526020016b135e5cdd195c9e48109bdddb60a21b81525060405180604001604052806004815260200163109bdddb60e21b81525061262a565b61176761265b565b61176f612682565b6117776126b1565b610134805462ffffff1916905560186101325560408051606081019091526035808252613c94602083013980516117b79161012f916020909101906131d1565b506040518060600160405280602e8152602001613c26602e913980516117e691610130916020909101906131d1565b506107d0610131556117fd61012e80546001019055565b61013454610132546040805133815260ff610100850481161515602083015290931615159083015260608201527f5640d1bbd8af1ff30315fd7dfcaea0a9b5ee4decde64ca5ac73a610fe756afa69060800160405180910390a18015611899576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016109b0565b50565b6118a4612286565b610134805460ff1916821515908117909155604080519182523360208301527fa06b5a80dcb0a794bdf9b8683ec488cb83588c4e69e0945b2f87afa8a8448ce091016109b0565b606060668054610a9c90613719565b6119053383836126e0565b5050565b611911612286565b6040514790339082156108fc029083906000818181858888f19350505050158015611905573d6000803e3d6000fd5b61194a33836123ea565b6119665760405162461bcd60e51b8152600401610a079061378f565b611972848484846127af565b50505050565b611980612286565b610133819055604080518281523360208201527f14e32f01d79790a1ab3b913299e5935c2d687bed102f5ac99d0d6ca34982c5be91016109b0565b6060816119df816000908152606760205260409020546001600160a01b0316151590565b6119fb5760405162461bcd60e51b8152600401610a0790613884565b6000838152610136602052604081205460ff161515600114611a1f57610130611a23565b61012f5b8054611a2e90613719565b80601f0160208091040260200160405190810160405280929190818152602001828054611a5a90613719565b8015611aa75780601f10611a7c57610100808354040283529160200191611aa7565b820191906000526020600020905b815481529060010190602001808311611a8a57829003601f168201915b505050600087815261013660205260408120549394509260ff1615156001149150611afe90505760405180604001604052806012815260200171115b5c1d1e48135e5cdd195c9e48109bdddb60721b815250611b29565b60405180604001604052806011815260200170119d5b1b08135e5cdd195c9e48109bdddb607a1b8152505b90506000611bcf611b39876127e2565b600088815261013660205260409020548490869060ff161515600114611b7957604051806040016040528060028152602001614e6f60f01b815250611b96565b6040518060400160405280600381526020016259657360e81b8152505b611ba7611ba28c6121e2565b6127e2565b604051602001611bbb9594939291906138e4565b6040516020818303038152906040526128e0565b905080604051602001611be29190613a47565b60405160208183030381529060405294505050505b50919050565b610130805461109790613719565b600081611c208167010a741a46278000613a8c565b341015611c6a5760405162461bcd60e51b8152602060048201526018602482015277139bdd08195b9bdd59da08195d1a195c881d1bc81b5a5b9d60421b6044820152606401610a07565b60008111611cb65760405162461bcd60e51b81526020600482015260196024820152784d697373696e67207075726368617365207175616e7469747960381b6044820152606401610a07565b6101315481611cc460995490565b611cce9190613aab565b1115611d1c5760405162461bcd60e51b815260206004820152601a60248201527f5265616368656420546f74616c20537570706c79204c696d69740000000000006044820152606401610a07565b8484610133548060001415611d635760405162461bcd60e51b815260206004820152600d60248201526c726f6f7420697320656d70747960981b6044820152606401610a07565b611dbf838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b1660208201528592506034019050610a69565b611e0b5760405162461bcd60e51b815260206004820152601e60248201527f4164647265737320646f6573206e6f7420657869737420696e206c69737400006044820152606401610a07565b6101345460ff1615611e2f5760405162461bcd60e51b8152600401610a07906137dd565b600260c9541415611e525760405162461bcd60e51b8152600401610a0790613806565b600260c9553360009081526101376020526040902054600590611e76908890613aab565b1115611ec45760405162461bcd60e51b815260206004820152601960248201527f4d696e7473207065722077616c6c6574206578636565646564000000000000006044820152606401610a07565b60005b86811015611f205761012e549550611ee461012e80546001019055565b33600090815261013760205260408120805491611f0083613853565b9190505550611f0e86612a34565b80611f1881613853565b915050611ec7565b5050600160c955509195945050505050565b600081611f478167010a741a46278000613a8c565b341015611f915760405162461bcd60e51b8152602060048201526018602482015277139bdd08195b9bdd59da08195d1a195c881d1bc81b5a5b9d60421b6044820152606401610a07565b60008111611fdd5760405162461bcd60e51b81526020600482015260196024820152784d697373696e67207075726368617365207175616e7469747960381b6044820152606401610a07565b6101315481611feb60995490565b611ff59190613aab565b11156120435760405162461bcd60e51b815260206004820152601a60248201527f5265616368656420546f74616c20537570706c79204c696d69740000000000006044820152606401610a07565b6101345460ff16156120675760405162461bcd60e51b8152600401610a07906137dd565b600260c954141561208a5760405162461bcd60e51b8152600401610a0790613806565b600260c95561013454610100900460ff166120dc5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f74207075626c696360701b6044820152606401610a07565b60005b838110156121175761012e5492506120fc61012e80546001019055565b61210583612a34565b8061210f81613853565b9150506120df565b5050600160c955919050565b61212b612286565b6001600160a01b0381166121905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a07565b61189981612a80565b6121a1612286565b6121ae61012f838361314d565b507f36d0e1edadf1536b9931e203754986f8fd93a8791e5e74d202688a7d5a63f331828233604051610ca49392919061374e565b60008181526101356020526040812060010154806122035750600092915050565b600061220f8243613ac3565b9050600061221f61177083613af0565b9050610132548111156122325750610132545b612710612240826001613aab565b61224a9084613a8c565b6122549190613af0565b6000868152610135602052604090205461226e9190613aab565b9350600184101561227e57600193505b505050919050565b60fb546001600160a01b031633146122e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a07565b565b60006001600160e01b0319821663780e9d6360e01b14806109c657506109c682612ad2565b6000826123148584612b22565b14949350505050565b6000818152606760205260409020546001600160a01b03166118995760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610a07565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123b1826114c3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806123f6836114c3565b9050806001600160a01b0316846001600160a01b0316148061243d57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806124615750836001600160a01b031661245684610b1f565b6001600160a01b0316145b949350505050565b826001600160a01b031661247c826114c3565b6001600160a01b0316146124e05760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a07565b6001600160a01b0382166125425760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a07565b61254d838383612b6f565b61255860008261237c565b6001600160a01b0383166000908152606860205260408120805460019290612581908490613ac3565b90915550506001600160a01b03821660009081526068602052604081208054600192906125af908490613aab565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611905828260405180602001604052806000815250612b83565b600054610100900460ff166126515760405162461bcd60e51b8152600401610a0790613b04565b6119058282612bb6565b600054610100900460ff166122e05760405162461bcd60e51b8152600401610a0790613b04565b600054610100900460ff166126a95760405162461bcd60e51b8152600401610a0790613b04565b6122e0612c04565b600054610100900460ff166126d85760405162461bcd60e51b8152600401610a0790613b04565b6122e0612c32565b816001600160a01b0316836001600160a01b031614156127425760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a07565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127ba848484612469565b6127c684848484612c62565b6119725760405162461bcd60e51b8152600401610a0790613b4f565b6060816128065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612830578061281a81613853565b91506128299050600a83613af0565b915061280a565b60008167ffffffffffffffff81111561284b5761284b6135b1565b6040519080825280601f01601f191660200182016040528015612875576020820181803683370190505b5090505b84156124615761288a600183613ac3565b9150612897600a86613ba1565b6128a2906030613aab565b60f81b8183815181106128b7576128b761386e565b60200101906001600160f81b031916908160001a9053506128d9600a86613af0565b9450612879565b606081516000141561290057505060408051602081019091526000815290565b6000604051806060016040528060408152602001613c54604091399050600060038451600261292f9190613aab565b6129399190613af0565b612944906004613a8c565b67ffffffffffffffff81111561295c5761295c6135b1565b6040519080825280601f01601f191660200182016040528015612986576020820181803683370190505b509050600182016020820185865187015b808210156129f2576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612997565b5050600386510660018114612a0e5760028114612a2157612a29565b603d6001830353603d6002830353612a29565b603d60018303535b509195945050505050565b612a3e3382612610565b6040805180820182526000808252436020808401918252948252610135855283822092518355516001928301556101369093529120805460ff19169091179055565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160e01b031982166380ac58cd60e01b1480612b0357506001600160e01b03198216635b5e139f60e01b145b806109c657506301ffc9a760e01b6001600160e01b03198316146109c6565b600081815b8451811015612b6757612b5382868381518110612b4657612b4661386e565b6020026020010151612d60565b915080612b5f81613853565b915050612b27565b509392505050565b612b7a838383612d92565b610c5781612e4a565b612b8d8383612e6f565b612b9a6000848484612c62565b610c575760405162461bcd60e51b8152600401610a0790613b4f565b600054610100900460ff16612bdd5760405162461bcd60e51b8152600401610a0790613b04565b8151612bf09060659060208501906131d1565b508051610c579060669060208401906131d1565b600054610100900460ff16612c2b5760405162461bcd60e51b8152600401610a0790613b04565b600160c955565b600054610100900460ff16612c595760405162461bcd60e51b8152600401610a0790613b04565b6122e033612a80565b60006001600160a01b0384163b15612d5557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ca6903390899088908890600401613bb5565b6020604051808303816000875af1925050508015612ce1575060408051601f3d908101601f19168201909252612cde91810190613bf2565b60015b612d3b573d808015612d0f576040519150601f19603f3d011682016040523d82523d6000602084013e612d14565b606091505b508051612d335760405162461bcd60e51b8152600401610a0790613b4f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612461565b506001949350505050565b6000818310612d7c576000828152602084905260409020612d8b565b60008381526020839052604090205b9392505050565b6001600160a01b038316612ded57612de881609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612e10565b816001600160a01b0316836001600160a01b031614612e1057612e108382612fbd565b6001600160a01b038216612e2757610c578161305a565b826001600160a01b0316826001600160a01b031614610c5757610c578282613109565b612e53816121e2565b6000918252610135602052604090912090815543600190910155565b6001600160a01b038216612ec55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a07565b6000818152606760205260409020546001600160a01b031615612f2a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a07565b612f3660008383612b6f565b6001600160a01b0382166000908152606860205260408120805460019290612f5f908490613aab565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612fca84611523565b612fd49190613ac3565b600083815260986020526040902054909150808214613027576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b60995460009061306c90600190613ac3565b6000838152609a6020526040812054609980549394509092849081106130945761309461386e565b9060005260206000200154905080609983815481106130b5576130b561386e565b6000918252602080832090910192909255828152609a909152604080822084905585825281205560998054806130ed576130ed613c0f565b6001900381819060005260206000200160009055905550505050565b600061311483611523565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b82805461315990613719565b90600052602060002090601f01602090048101928261317b57600085556131c1565b82601f106131945782800160ff198235161785556131c1565b828001600101855582156131c1579182015b828111156131c15782358255916020019190600101906131a6565b506131cd929150613245565b5090565b8280546131dd90613719565b90600052602060002090601f0160209004810192826131ff57600085556131c1565b82601f1061321857805160ff19168380011785556131c1565b828001600101855582156131c1579182015b828111156131c157825182559160200191906001019061322a565b5b808211156131cd5760008155600101613246565b60006020828403121561326c57600080fd5b5035919050565b6001600160e01b03198116811461189957600080fd5b60006020828403121561329b57600080fd5b8135612d8b81613273565b60008083601f8401126132b857600080fd5b50813567ffffffffffffffff8111156132d057600080fd5b6020830191508360208260051b85010111156132eb57600080fd5b9250929050565b80356001600160a01b038116811461330957600080fd5b919050565b6000806000806060858703121561332457600080fd5b843567ffffffffffffffff81111561333b57600080fd5b613347878288016132a6565b90955093505060208501359150613360604086016132f2565b905092959194509250565b60005b8381101561338657818101518382015260200161336e565b838111156119725750506000910152565b600081518084526133af81602086016020860161336b565b601f01601f19169290920160200192915050565b602081526000612d8b6020830184613397565b600080604083850312156133e957600080fd5b6133f2836132f2565b946020939093013593505050565b6000806020838503121561341357600080fd5b823567ffffffffffffffff8082111561342b57600080fd5b818501915085601f83011261343f57600080fd5b81358181111561344e57600080fd5b86602082850101111561346057600080fd5b60209290920196919550909350505050565b60008060006060848603121561348757600080fd5b613490846132f2565b925061349e602085016132f2565b9150604084013590509250925092565b600080604083850312156134c157600080fd5b823591506134d1602084016132f2565b90509250929050565b6000602082840312156134ec57600080fd5b612d8b826132f2565b6020808252825182820181905260009190848201906040850190845b8181101561352d57835183529284019291840191600101613511565b50909695505050505050565b8035801515811461330957600080fd5b6000806040838503121561355c57600080fd5b823591506134d160208401613539565b60006020828403121561357e57600080fd5b612d8b82613539565b6000806040838503121561359a57600080fd5b6135a3836132f2565b91506134d160208401613539565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156135dd57600080fd5b6135e6856132f2565b93506135f4602086016132f2565b925060408501359150606085013567ffffffffffffffff8082111561361857600080fd5b818701915087601f83011261362c57600080fd5b81358181111561363e5761363e6135b1565b604051601f8201601f19908116603f01168101908382118183101715613666576136666135b1565b816040528281528a602084870101111561367f57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806000604084860312156136b857600080fd5b833567ffffffffffffffff8111156136cf57600080fd5b6136db868287016132a6565b909790965060209590950135949350505050565b6000806040838503121561370257600080fd5b61370b836132f2565b91506134d1602084016132f2565b600181811c9082168061372d57607f821691505b60208210811415611bf757634e487b7160e01b600052602260045260246000fd5b6040815282604082015282846060830137600060608483018101919091526001600160a01b03929092166020820152601f909201601f191690910101919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6020808252600f908201526e10dbdb9d1c9858dd0814185d5cd959608a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156138675761386761383d565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6020808252601190820152702737b732bc34b9ba32b73a103a37b5b2b760791b604082015260600190565b6000602082840312156138c157600080fd5b5051919050565b600081516138da81856020860161336b565b9290920192915050565b7f7b226e616d65223a20224d79737465727920426f776c2023000000000000000081526000865161391c816018850160208b0161336b565b71111610113232b9b1b934b83a34b7b7111d1160711b601891840191820152865161394e81602a840160208b0161336b565b6b1116101134b6b0b3b2911d1160a11b602a9290910191820152855161397b816036840160208a0161336b565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a603692909101918201527f20202253756d6d6f6e696e6720506f776572222c2276616c7565223a22000000605682015284516139df81607384016020890161336b565b7f227d2c207b2274726169745f74797065223a2020225374617266697368222c2260739290910191820152673b30b63ab2911d1160c11b6093820152613a3b613a2b609b8301866138c8565b63227d5d7d60e01b815260040190565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613a7f81601d85016020870161336b565b91909101601d0192915050565b6000816000190483118215151615613aa657613aa661383d565b500290565b60008219821115613abe57613abe61383d565b500190565b600082821015613ad557613ad561383d565b500390565b634e487b7160e01b600052601260045260246000fd5b600082613aff57613aff613ada565b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613bb057613bb0613ada565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613be890830184613397565b9695505050505050565b600060208284031215613c0457600080fd5b8151612d8b81613273565b634e487b7160e01b600052603160045260246000fdfe68747470733a2f2f7777772e616e6f6d75726167616d652e636f6d2f696d672f426f776c5f456d7074792e6769664142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f68747470733a2f2f7777772e616e6f6d75726167616d652e636f6d2f696d672f426f776c5f576974685f416e6f6d7572612e676966a26469706673582212207988b0d39e355d484d5ae9778ce3f6ba1688f8baee47474f6df64b9335df849d64736f6c634300080b0033

Deployed Bytecode

0x6080604052600436106102e45760003560e01c8063564841c711610190578063a8d5de2a116100dc578063d2b8c4c711610095578063efd0cbf91161006f578063efd0cbf9146108fe578063f2fde38b14610911578063fb90148c14610931578063fba0105c1461095157600080fd5b8063d2b8c4c71461088d578063e0a6bf8f146108a2578063e985e9c5146108b557600080fd5b8063a8d5de2a146107cf578063b1111359146107fd578063b187bd2614610812578063b88d4fde1461082d578063bd32fb661461084d578063c87b56dd1461086d57600080fd5b80637f205a74116101495780638da5cb5b116101235780638da5cb5b1461075c57806395d89b411461077a578063a22cb4651461078f578063a5a865dc146107af57600080fd5b80637f205a741461070b5780638129fc1c14610727578063882796f11461073c57600080fd5b8063564841c7146106565780635aca1bb6146106765780636352211e1461069657806370a08231146106b6578063715018a6146106d657806371f9703f146106eb57600080fd5b806323b872dd1161024f5780633f42fea81161020857806342b55a5c116101e257806342b55a5c146105d05780634f6ccce7146106015780635430f2031461062157806354c0b35d1461063657600080fd5b80633f42fea81461056257806340398d671461058357806342842e0e146105b057600080fd5b806323b872dd146104b4578063265b2f7a146104d45780632ab4d052146104f45780632f745c591461050b57806334b6ab1a1461052b5780633f3e4c111461054257600080fd5b8063095ea7b3116102a1578063095ea7b3146103df5780630f2cdd6c146103ff5780631326db3d1461041457806313a81ac51461043557806318160ddd1461047f5780632078dfe31461049457600080fd5b806301526a43146102e95780630187aea01461030b57806301ffc9a714610335578063069093e91461036557806306fdde0314610385578063081812fc146103a7575b600080fd5b3480156102f557600080fd5b5061030961030436600461325a565b610971565b005b34801561031757600080fd5b506103226101325481565b6040519081526020015b60405180910390f35b34801561034157600080fd5b50610355610350366004613289565b6109bb565b604051901515815260200161032c565b34801561037157600080fd5b5061035561038036600461330e565b6109cc565b34801561039157600080fd5b5061039a610a8d565b60405161032c91906133c3565b3480156103b357600080fd5b506103c76103c236600461325a565b610b1f565b6040516001600160a01b03909116815260200161032c565b3480156103eb57600080fd5b506103096103fa3660046133d6565b610b46565b34801561040b57600080fd5b50610322600581565b34801561042057600080fd5b5061012d546103c7906001600160a01b031681565b34801561044157600080fd5b5061046a61045036600461325a565b610135602052600090815260409020805460019091015482565b6040805192835260208301919091520161032c565b34801561048b57600080fd5b50609954610322565b3480156104a057600080fd5b506103096104af366004613400565b610c5c565b3480156104c057600080fd5b506103096104cf366004613472565b610cb0565b3480156104e057600080fd5b506103226104ef3660046134ae565b610ce1565b34801561050057600080fd5b506103226101315481565b34801561051757600080fd5b506103226105263660046133d6565b610dc2565b34801561053757600080fd5b506103226101335481565b34801561054e57600080fd5b5061030961055d36600461325a565b610e58565b34801561056e57600080fd5b50610134546103559062010000900460ff1681565b34801561058f57600080fd5b506105a361059e3660046134da565b610eed565b60405161032c91906134f5565b3480156105bc57600080fd5b506103096105cb366004613472565b610fdb565b3480156105dc57600080fd5b506103556105eb36600461325a565b6101366020526000908152604090205460ff1681565b34801561060d57600080fd5b5061032261061c36600461325a565b610ff6565b34801561062d57600080fd5b5061039a611089565b34801561064257600080fd5b5061032261065136600461325a565b611118565b34801561066257600080fd5b50610309610671366004613549565b61137a565b34801561068257600080fd5b5061030961069136600461356c565b61146c565b3480156106a257600080fd5b506103c76106b136600461325a565b6114c3565b3480156106c257600080fd5b506103226106d13660046134da565b611523565b3480156106e257600080fd5b506103096115a9565b3480156106f757600080fd5b506103096107063660046134da565b6115f9565b34801561071757600080fd5b5061032267010a741a4627800081565b34801561073357600080fd5b50610309611655565b34801561074857600080fd5b5061030961075736600461356c565b61189c565b34801561076857600080fd5b5060fb546001600160a01b03166103c7565b34801561078657600080fd5b5061039a6118eb565b34801561079b57600080fd5b506103096107aa366004613587565b6118fa565b3480156107bb57600080fd5b506101345461035590610100900460ff1681565b3480156107db57600080fd5b506103226107ea3660046134da565b6101376020526000908152604090205481565b34801561080957600080fd5b50610309611909565b34801561081e57600080fd5b50610134546103559060ff1681565b34801561083957600080fd5b506103096108483660046135c7565b611940565b34801561085957600080fd5b5061030961086836600461325a565b611978565b34801561087957600080fd5b5061039a61088836600461325a565b6119bb565b34801561089957600080fd5b5061039a611bfd565b6103226108b03660046136a3565b611c0b565b3480156108c157600080fd5b506103556108d03660046136ef565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61032261090c36600461325a565b611f32565b34801561091d57600080fd5b5061030961092c3660046134da565b612123565b34801561093d57600080fd5b5061030961094c366004613400565b612199565b34801561095d57600080fd5b5061032261096c36600461325a565b6121e2565b610979612286565b610132819055604080518281523360208201527f50edfbcf2e1b89d1287eaede872dc268e6765f15041369465a94f85d8cce210b91015b60405180910390a150565b60006109c6826122e2565b92915050565b600082610a105760405162461bcd60e51b815260206004820152600d60248201526c726f6f7420697320656d70747960981b60448201526064015b60405180910390fd5b610a84858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff19606088901b16602082015287925060340190505b60405160208183030381529060405280519060200120612307565b95945050505050565b606060658054610a9c90613719565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac890613719565b8015610b155780601f10610aea57610100808354040283529160200191610b15565b820191906000526020600020905b815481529060010190602001808311610af857829003601f168201915b5050505050905090565b6000610b2a8261231d565b506000908152606960205260409020546001600160a01b031690565b6000610b51826114c3565b9050806001600160a01b0316836001600160a01b03161415610bbf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a07565b336001600160a01b0382161480610bdb5750610bdb81336108d0565b610c4d5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610a07565b610c57838361237c565b505050565b610c64612286565b610c71610130838361314d565b507e64b3fa77d42018908ae2fc2048174fc01b2239317e4c3a22d1f5b666028874828233604051610ca49392919061374e565b60405180910390a15050565b610cba33826123ea565b610cd65760405162461bcd60e51b8152600401610a079061378f565b610c57838383612469565b6101345460009060ff1615610d085760405162461bcd60e51b8152600401610a07906137dd565b600260c9541415610d2b5760405162461bcd60e51b8152600401610a0790613806565b600260c955610d38612286565b60005b83811015610db65761012e549150610d5861012e80546001019055565b610d628383612610565b60408051808201825260008082524360208084019182528683526101358152848320935184559051600193840155610136905291909120805460ff1916909117905580610dae81613853565b915050610d3b565b50600160c95592915050565b6000610dcd83611523565b8210610e2f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a07565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b610e60612286565b610131548111610eb25760405162461bcd60e51b815260206004820152601960248201527f4e6577206d6178206c657373207468616e206f6c64206d6178000000000000006044820152606401610a07565b610131819055604080518281523360208201527ffddd3d0f09c8f3ea6d1e14a35e681f73f9225745579589d46e23aff6e33ba17f91016109b0565b60606001600160a01b038216610f3e5760405162461bcd60e51b8152602060048201526016602482015275043616e6e6f74207175657279206164647265737320360541b6044820152606401610a07565b6000610f4983611523565b90508067ffffffffffffffff811115610f6457610f646135b1565b604051908082528060200260200182016040528015610f8d578160200160208202803683370190505b50915060005b81811015610fd457610fa58482610dc2565b838281518110610fb757610fb761386e565b602090810291909101015280610fcc81613853565b915050610f93565b5050919050565b610c5783838360405180602001604052806000815250611940565b600061100160995490565b82106110645760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a07565b609982815481106110775761107761386e565b90600052602060002001549050919050565b61012f805461109790613719565b80601f01602080910402602001604051908101604052809291908181526020018280546110c390613719565b80156111105780601f106110e557610100808354040283529160200191611110565b820191906000526020600020905b8154815290600101906020018083116110f357829003601f168201915b505050505081565b60008181526067602052604081205482906001600160a01b031661114e5760405162461bcd60e51b8152600401610a0790613884565b33803b90328114801561115f575081155b61119b5760405162461bcd60e51b815260206004820152600d60248201526c24b9903737ba1037b934b3b4b760991b6044820152606401610a07565b336111a5866114c3565b6001600160a01b0316146111fb5760405162461bcd60e51b815260206004820152601e60248201527f43616c6c657220646f6573206e6f74206f776e207468697320626f776c2e00006044820152606401610a07565b6000858152610136602052604090205460ff16151560011461124f5760405162461bcd60e51b815260206004820152600d60248201526c426f776c20697320656d70747960981b6044820152606401610a07565b61012d546001600160a01b03166112a85760405162461bcd60e51b815260206004820152601d60248201527f416e6f6d75726120636f6e7472616374206164647265737320697320300000006044820152606401610a07565b6000858152610136602052604090819020805460ff1916905561012d5490516357dd845b60e01b81523360048201526001600160a01b03909116906357dd845b906024016020604051808303816000875af115801561130b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132f91906138af565b6040805187815260006020820152338183015290519195507f15bad1e35c005ca74c9c19fde2173d2b5bc1f86809a70e70a5662dee5880837f919081900360600190a1505050919050565b60008281526067602052604090205482906001600160a01b03166113b05760405162461bcd60e51b8152600401610a0790613884565b6113b8612286565b6101345462010000900460ff16151560011461140a5760405162461bcd60e51b815260206004820152601160248201527053657420426f776c2069732066616c736560781b6044820152606401610a07565b60008381526101366020908152604091829020805485151560ff199091168117909155825186815291820152338183015290517f15bad1e35c005ca74c9c19fde2173d2b5bc1f86809a70e70a5662dee5880837f9181900360600190a1505050565b611474612286565b610134805461ff00191661010083151590810291909117909155604080519182523360208301527f2117c07cc0fa92a77f76e660e2bf8328dcefd8efe7fabbeb4dd872e94d9eb0cf91016109b0565b6000818152606760205260408120546001600160a01b0316806109c65760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610a07565b60006001600160a01b03821661158d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610a07565b506001600160a01b031660009081526068602052604090205490565b6115b1612286565b60405162461bcd60e51b815260206004820181905260248201527f72656e6f756e63654f776e657273686970206973206e6f7420616c6c6f7765646044820152606401610a07565b611601612286565b61012d80546001600160a01b0319166001600160a01b038316908117909155604080519182523360208301527feb272e8d45e2dbe4b14badb52c354e635f8d224e0995d4f31f7fdc1ae95cfcf091016109b0565b600054610100900460ff16158080156116755750600054600160ff909116105b8061168f5750303b15801561168f575060005460ff166001145b6116f25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a07565b6000805460ff191660011790558015611715576000805461ff0019166101001790555b61175f6040518060400160405280600c81526020016b135e5cdd195c9e48109bdddb60a21b81525060405180604001604052806004815260200163109bdddb60e21b81525061262a565b61176761265b565b61176f612682565b6117776126b1565b610134805462ffffff1916905560186101325560408051606081019091526035808252613c94602083013980516117b79161012f916020909101906131d1565b506040518060600160405280602e8152602001613c26602e913980516117e691610130916020909101906131d1565b506107d0610131556117fd61012e80546001019055565b61013454610132546040805133815260ff610100850481161515602083015290931615159083015260608201527f5640d1bbd8af1ff30315fd7dfcaea0a9b5ee4decde64ca5ac73a610fe756afa69060800160405180910390a18015611899576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016109b0565b50565b6118a4612286565b610134805460ff1916821515908117909155604080519182523360208301527fa06b5a80dcb0a794bdf9b8683ec488cb83588c4e69e0945b2f87afa8a8448ce091016109b0565b606060668054610a9c90613719565b6119053383836126e0565b5050565b611911612286565b6040514790339082156108fc029083906000818181858888f19350505050158015611905573d6000803e3d6000fd5b61194a33836123ea565b6119665760405162461bcd60e51b8152600401610a079061378f565b611972848484846127af565b50505050565b611980612286565b610133819055604080518281523360208201527f14e32f01d79790a1ab3b913299e5935c2d687bed102f5ac99d0d6ca34982c5be91016109b0565b6060816119df816000908152606760205260409020546001600160a01b0316151590565b6119fb5760405162461bcd60e51b8152600401610a0790613884565b6000838152610136602052604081205460ff161515600114611a1f57610130611a23565b61012f5b8054611a2e90613719565b80601f0160208091040260200160405190810160405280929190818152602001828054611a5a90613719565b8015611aa75780601f10611a7c57610100808354040283529160200191611aa7565b820191906000526020600020905b815481529060010190602001808311611a8a57829003601f168201915b505050600087815261013660205260408120549394509260ff1615156001149150611afe90505760405180604001604052806012815260200171115b5c1d1e48135e5cdd195c9e48109bdddb60721b815250611b29565b60405180604001604052806011815260200170119d5b1b08135e5cdd195c9e48109bdddb607a1b8152505b90506000611bcf611b39876127e2565b600088815261013660205260409020548490869060ff161515600114611b7957604051806040016040528060028152602001614e6f60f01b815250611b96565b6040518060400160405280600381526020016259657360e81b8152505b611ba7611ba28c6121e2565b6127e2565b604051602001611bbb9594939291906138e4565b6040516020818303038152906040526128e0565b905080604051602001611be29190613a47565b60405160208183030381529060405294505050505b50919050565b610130805461109790613719565b600081611c208167010a741a46278000613a8c565b341015611c6a5760405162461bcd60e51b8152602060048201526018602482015277139bdd08195b9bdd59da08195d1a195c881d1bc81b5a5b9d60421b6044820152606401610a07565b60008111611cb65760405162461bcd60e51b81526020600482015260196024820152784d697373696e67207075726368617365207175616e7469747960381b6044820152606401610a07565b6101315481611cc460995490565b611cce9190613aab565b1115611d1c5760405162461bcd60e51b815260206004820152601a60248201527f5265616368656420546f74616c20537570706c79204c696d69740000000000006044820152606401610a07565b8484610133548060001415611d635760405162461bcd60e51b815260206004820152600d60248201526c726f6f7420697320656d70747960981b6044820152606401610a07565b611dbf838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b1660208201528592506034019050610a69565b611e0b5760405162461bcd60e51b815260206004820152601e60248201527f4164647265737320646f6573206e6f7420657869737420696e206c69737400006044820152606401610a07565b6101345460ff1615611e2f5760405162461bcd60e51b8152600401610a07906137dd565b600260c9541415611e525760405162461bcd60e51b8152600401610a0790613806565b600260c9553360009081526101376020526040902054600590611e76908890613aab565b1115611ec45760405162461bcd60e51b815260206004820152601960248201527f4d696e7473207065722077616c6c6574206578636565646564000000000000006044820152606401610a07565b60005b86811015611f205761012e549550611ee461012e80546001019055565b33600090815261013760205260408120805491611f0083613853565b9190505550611f0e86612a34565b80611f1881613853565b915050611ec7565b5050600160c955509195945050505050565b600081611f478167010a741a46278000613a8c565b341015611f915760405162461bcd60e51b8152602060048201526018602482015277139bdd08195b9bdd59da08195d1a195c881d1bc81b5a5b9d60421b6044820152606401610a07565b60008111611fdd5760405162461bcd60e51b81526020600482015260196024820152784d697373696e67207075726368617365207175616e7469747960381b6044820152606401610a07565b6101315481611feb60995490565b611ff59190613aab565b11156120435760405162461bcd60e51b815260206004820152601a60248201527f5265616368656420546f74616c20537570706c79204c696d69740000000000006044820152606401610a07565b6101345460ff16156120675760405162461bcd60e51b8152600401610a07906137dd565b600260c954141561208a5760405162461bcd60e51b8152600401610a0790613806565b600260c95561013454610100900460ff166120dc5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f74207075626c696360701b6044820152606401610a07565b60005b838110156121175761012e5492506120fc61012e80546001019055565b61210583612a34565b8061210f81613853565b9150506120df565b5050600160c955919050565b61212b612286565b6001600160a01b0381166121905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a07565b61189981612a80565b6121a1612286565b6121ae61012f838361314d565b507f36d0e1edadf1536b9931e203754986f8fd93a8791e5e74d202688a7d5a63f331828233604051610ca49392919061374e565b60008181526101356020526040812060010154806122035750600092915050565b600061220f8243613ac3565b9050600061221f61177083613af0565b9050610132548111156122325750610132545b612710612240826001613aab565b61224a9084613a8c565b6122549190613af0565b6000868152610135602052604090205461226e9190613aab565b9350600184101561227e57600193505b505050919050565b60fb546001600160a01b031633146122e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a07565b565b60006001600160e01b0319821663780e9d6360e01b14806109c657506109c682612ad2565b6000826123148584612b22565b14949350505050565b6000818152606760205260409020546001600160a01b03166118995760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610a07565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123b1826114c3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806123f6836114c3565b9050806001600160a01b0316846001600160a01b0316148061243d57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806124615750836001600160a01b031661245684610b1f565b6001600160a01b0316145b949350505050565b826001600160a01b031661247c826114c3565b6001600160a01b0316146124e05760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a07565b6001600160a01b0382166125425760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a07565b61254d838383612b6f565b61255860008261237c565b6001600160a01b0383166000908152606860205260408120805460019290612581908490613ac3565b90915550506001600160a01b03821660009081526068602052604081208054600192906125af908490613aab565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611905828260405180602001604052806000815250612b83565b600054610100900460ff166126515760405162461bcd60e51b8152600401610a0790613b04565b6119058282612bb6565b600054610100900460ff166122e05760405162461bcd60e51b8152600401610a0790613b04565b600054610100900460ff166126a95760405162461bcd60e51b8152600401610a0790613b04565b6122e0612c04565b600054610100900460ff166126d85760405162461bcd60e51b8152600401610a0790613b04565b6122e0612c32565b816001600160a01b0316836001600160a01b031614156127425760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a07565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127ba848484612469565b6127c684848484612c62565b6119725760405162461bcd60e51b8152600401610a0790613b4f565b6060816128065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612830578061281a81613853565b91506128299050600a83613af0565b915061280a565b60008167ffffffffffffffff81111561284b5761284b6135b1565b6040519080825280601f01601f191660200182016040528015612875576020820181803683370190505b5090505b84156124615761288a600183613ac3565b9150612897600a86613ba1565b6128a2906030613aab565b60f81b8183815181106128b7576128b761386e565b60200101906001600160f81b031916908160001a9053506128d9600a86613af0565b9450612879565b606081516000141561290057505060408051602081019091526000815290565b6000604051806060016040528060408152602001613c54604091399050600060038451600261292f9190613aab565b6129399190613af0565b612944906004613a8c565b67ffffffffffffffff81111561295c5761295c6135b1565b6040519080825280601f01601f191660200182016040528015612986576020820181803683370190505b509050600182016020820185865187015b808210156129f2576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612997565b5050600386510660018114612a0e5760028114612a2157612a29565b603d6001830353603d6002830353612a29565b603d60018303535b509195945050505050565b612a3e3382612610565b6040805180820182526000808252436020808401918252948252610135855283822092518355516001928301556101369093529120805460ff19169091179055565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160e01b031982166380ac58cd60e01b1480612b0357506001600160e01b03198216635b5e139f60e01b145b806109c657506301ffc9a760e01b6001600160e01b03198316146109c6565b600081815b8451811015612b6757612b5382868381518110612b4657612b4661386e565b6020026020010151612d60565b915080612b5f81613853565b915050612b27565b509392505050565b612b7a838383612d92565b610c5781612e4a565b612b8d8383612e6f565b612b9a6000848484612c62565b610c575760405162461bcd60e51b8152600401610a0790613b4f565b600054610100900460ff16612bdd5760405162461bcd60e51b8152600401610a0790613b04565b8151612bf09060659060208501906131d1565b508051610c579060669060208401906131d1565b600054610100900460ff16612c2b5760405162461bcd60e51b8152600401610a0790613b04565b600160c955565b600054610100900460ff16612c595760405162461bcd60e51b8152600401610a0790613b04565b6122e033612a80565b60006001600160a01b0384163b15612d5557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ca6903390899088908890600401613bb5565b6020604051808303816000875af1925050508015612ce1575060408051601f3d908101601f19168201909252612cde91810190613bf2565b60015b612d3b573d808015612d0f576040519150601f19603f3d011682016040523d82523d6000602084013e612d14565b606091505b508051612d335760405162461bcd60e51b8152600401610a0790613b4f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612461565b506001949350505050565b6000818310612d7c576000828152602084905260409020612d8b565b60008381526020839052604090205b9392505050565b6001600160a01b038316612ded57612de881609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612e10565b816001600160a01b0316836001600160a01b031614612e1057612e108382612fbd565b6001600160a01b038216612e2757610c578161305a565b826001600160a01b0316826001600160a01b031614610c5757610c578282613109565b612e53816121e2565b6000918252610135602052604090912090815543600190910155565b6001600160a01b038216612ec55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a07565b6000818152606760205260409020546001600160a01b031615612f2a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a07565b612f3660008383612b6f565b6001600160a01b0382166000908152606860205260408120805460019290612f5f908490613aab565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612fca84611523565b612fd49190613ac3565b600083815260986020526040902054909150808214613027576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b60995460009061306c90600190613ac3565b6000838152609a6020526040812054609980549394509092849081106130945761309461386e565b9060005260206000200154905080609983815481106130b5576130b561386e565b6000918252602080832090910192909255828152609a909152604080822084905585825281205560998054806130ed576130ed613c0f565b6001900381819060005260206000200160009055905550505050565b600061311483611523565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b82805461315990613719565b90600052602060002090601f01602090048101928261317b57600085556131c1565b82601f106131945782800160ff198235161785556131c1565b828001600101855582156131c1579182015b828111156131c15782358255916020019190600101906131a6565b506131cd929150613245565b5090565b8280546131dd90613719565b90600052602060002090601f0160209004810192826131ff57600085556131c1565b82601f1061321857805160ff19168380011785556131c1565b828001600101855582156131c1579182015b828111156131c157825182559160200191906001019061322a565b5b808211156131cd5760008155600101613246565b60006020828403121561326c57600080fd5b5035919050565b6001600160e01b03198116811461189957600080fd5b60006020828403121561329b57600080fd5b8135612d8b81613273565b60008083601f8401126132b857600080fd5b50813567ffffffffffffffff8111156132d057600080fd5b6020830191508360208260051b85010111156132eb57600080fd5b9250929050565b80356001600160a01b038116811461330957600080fd5b919050565b6000806000806060858703121561332457600080fd5b843567ffffffffffffffff81111561333b57600080fd5b613347878288016132a6565b90955093505060208501359150613360604086016132f2565b905092959194509250565b60005b8381101561338657818101518382015260200161336e565b838111156119725750506000910152565b600081518084526133af81602086016020860161336b565b601f01601f19169290920160200192915050565b602081526000612d8b6020830184613397565b600080604083850312156133e957600080fd5b6133f2836132f2565b946020939093013593505050565b6000806020838503121561341357600080fd5b823567ffffffffffffffff8082111561342b57600080fd5b818501915085601f83011261343f57600080fd5b81358181111561344e57600080fd5b86602082850101111561346057600080fd5b60209290920196919550909350505050565b60008060006060848603121561348757600080fd5b613490846132f2565b925061349e602085016132f2565b9150604084013590509250925092565b600080604083850312156134c157600080fd5b823591506134d1602084016132f2565b90509250929050565b6000602082840312156134ec57600080fd5b612d8b826132f2565b6020808252825182820181905260009190848201906040850190845b8181101561352d57835183529284019291840191600101613511565b50909695505050505050565b8035801515811461330957600080fd5b6000806040838503121561355c57600080fd5b823591506134d160208401613539565b60006020828403121561357e57600080fd5b612d8b82613539565b6000806040838503121561359a57600080fd5b6135a3836132f2565b91506134d160208401613539565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156135dd57600080fd5b6135e6856132f2565b93506135f4602086016132f2565b925060408501359150606085013567ffffffffffffffff8082111561361857600080fd5b818701915087601f83011261362c57600080fd5b81358181111561363e5761363e6135b1565b604051601f8201601f19908116603f01168101908382118183101715613666576136666135b1565b816040528281528a602084870101111561367f57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806000604084860312156136b857600080fd5b833567ffffffffffffffff8111156136cf57600080fd5b6136db868287016132a6565b909790965060209590950135949350505050565b6000806040838503121561370257600080fd5b61370b836132f2565b91506134d1602084016132f2565b600181811c9082168061372d57607f821691505b60208210811415611bf757634e487b7160e01b600052602260045260246000fd5b6040815282604082015282846060830137600060608483018101919091526001600160a01b03929092166020820152601f909201601f191690910101919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6020808252600f908201526e10dbdb9d1c9858dd0814185d5cd959608a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156138675761386761383d565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6020808252601190820152702737b732bc34b9ba32b73a103a37b5b2b760791b604082015260600190565b6000602082840312156138c157600080fd5b5051919050565b600081516138da81856020860161336b565b9290920192915050565b7f7b226e616d65223a20224d79737465727920426f776c2023000000000000000081526000865161391c816018850160208b0161336b565b71111610113232b9b1b934b83a34b7b7111d1160711b601891840191820152865161394e81602a840160208b0161336b565b6b1116101134b6b0b3b2911d1160a11b602a9290910191820152855161397b816036840160208a0161336b565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a603692909101918201527f20202253756d6d6f6e696e6720506f776572222c2276616c7565223a22000000605682015284516139df81607384016020890161336b565b7f227d2c207b2274726169745f74797065223a2020225374617266697368222c2260739290910191820152673b30b63ab2911d1160c11b6093820152613a3b613a2b609b8301866138c8565b63227d5d7d60e01b815260040190565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613a7f81601d85016020870161336b565b91909101601d0192915050565b6000816000190483118215151615613aa657613aa661383d565b500290565b60008219821115613abe57613abe61383d565b500190565b600082821015613ad557613ad561383d565b500390565b634e487b7160e01b600052601260045260246000fd5b600082613aff57613aff613ada565b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613bb057613bb0613ada565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613be890830184613397565b9695505050505050565b600060208284031215613c0457600080fd5b8151612d8b81613273565b634e487b7160e01b600052603160045260246000fdfe68747470733a2f2f7777772e616e6f6d75726167616d652e636f6d2f696d672f426f776c5f456d7074792e6769664142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f68747470733a2f2f7777772e616e6f6d75726167616d652e636f6d2f696d672f426f776c5f576974685f416e6f6d7572612e676966a26469706673582212207988b0d39e355d484d5ae9778ce3f6ba1688f8baee47474f6df64b9335df849d64736f6c634300080b0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.

OSZAR »