ETH Price: $2,458.96 (-4.59%)

Contract

0x41fc5635Fc878D13934dC576134c139941b854F9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem202653562024-07-09 0:28:2352 days ago1720484903IN
MOOAR : Launchpad
0 ETH0.000184572.07774334
Redeem190614662024-01-22 9:44:23221 days ago1705916663IN
MOOAR : Launchpad
0 ETH0.0016686815.7572961
Direct Mint184504552023-10-28 18:22:59306 days ago1698517379IN
MOOAR : Launchpad
0 ETH0.0033388315.97345528
Direct Mint182241962023-09-27 2:43:35338 days ago1695782615IN
MOOAR : Launchpad
0 ETH0.001468897.65355009
Redeem178863632023-08-10 18:46:11385 days ago1691693171IN
MOOAR : Launchpad
0 ETH0.0022820525.68550899
Redeem178680512023-08-08 5:14:59388 days ago1691471699IN
MOOAR : Launchpad
0 ETH0.0017535716.55335387
Redeem178680472023-08-08 5:14:11388 days ago1691471651IN
MOOAR : Launchpad
0 ETH0.0018478817.44387892
Redeem178680342023-08-08 5:11:35388 days ago1691471495IN
MOOAR : Launchpad
0 ETH0.0017840916.84109034
Redeem178680112023-08-08 5:06:47388 days ago1691471207IN
MOOAR : Launchpad
0 ETH0.0015588917.5456946
Redeem178680062023-08-08 5:05:47388 days ago1691471147IN
MOOAR : Launchpad
0 ETH0.0018208717.18713986
Redeem176836102023-07-13 9:10:59414 days ago1689239459IN
MOOAR : Launchpad
0 ETH0.0016236218.27464
Direct Mint176345212023-07-06 11:30:59421 days ago1688643059IN
MOOAR : Launchpad
0 ETH0.0064123233.41076995
Redeem173459172023-05-26 21:23:35461 days ago1685136215IN
MOOAR : Launchpad
0 ETH0.0029402727.75858
Redeem172991692023-05-20 7:31:11468 days ago1684567871IN
MOOAR : Launchpad
0 ETH0.0028744932.35294822
Redeem172912732023-05-19 4:48:23469 days ago1684471703IN
MOOAR : Launchpad
0 ETH0.0048666254.78274684
Direct Mint171297222023-04-26 10:10:47492 days ago1682503847IN
MOOAR : Launchpad
0 ETH0.0068914233.74445075
Direct Mint170946382023-04-21 12:02:35497 days ago1682078555IN
MOOAR : Launchpad
0 ETH0.0067366935.1030625
Redeem170651132023-04-17 7:45:47501 days ago1681717547IN
MOOAR : Launchpad
0 ETH0.0024591727.68620954
Collect Fund170437152023-04-14 6:39:11504 days ago1681454351IN
MOOAR : Launchpad
0 ETH0.0019722831.21746071
Direct Mint169885482023-04-06 8:53:35512 days ago1680771215IN
MOOAR : Launchpad
0 ETH0.0191300329.33127556
Direct Mint169693512023-04-03 15:21:59515 days ago1680535319IN
MOOAR : Launchpad
0 ETH0.0069492135.69189568
Direct Mint169693462023-04-03 15:20:59515 days ago1680535259IN
MOOAR : Launchpad
0 ETH0.0067392234.60913635
Direct Mint169325612023-03-29 11:09:59520 days ago1680088199IN
MOOAR : Launchpad
0 ETH0.0050158925.76059171
Redeem169314742023-03-29 7:29:47520 days ago1680074987IN
MOOAR : Launchpad
0 ETH0.002054223.11759034
Redeem169283232023-03-28 20:52:35520 days ago1680036755IN
MOOAR : Launchpad
0 ETH0.0028026326.45346752
View all transactions

Latest 12 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
166671202023-02-20 3:35:23557 days ago1676864123
MOOAR : Launchpad
 Contract Creation0 ETH
166531012023-02-18 4:17:59559 days ago1676693879
MOOAR : Launchpad
 Contract Creation0 ETH
166470502023-02-17 7:47:35560 days ago1676620055
MOOAR : Launchpad
 Contract Creation0 ETH
166468722023-02-17 7:11:59560 days ago1676617919
MOOAR : Launchpad
 Contract Creation0 ETH
166468642023-02-17 7:10:23560 days ago1676617823
MOOAR : Launchpad
 Contract Creation0 ETH
166451942023-02-17 1:32:59560 days ago1676597579
MOOAR : Launchpad
 Contract Creation0 ETH
166397472023-02-16 7:17:23561 days ago1676531843
MOOAR : Launchpad
 Contract Creation0 ETH
166353582023-02-15 16:33:11562 days ago1676478791
MOOAR : Launchpad
 Contract Creation0 ETH
166353452023-02-15 16:30:35562 days ago1676478635
MOOAR : Launchpad
 Contract Creation0 ETH
166352372023-02-15 16:08:59562 days ago1676477339
MOOAR : Launchpad
 Contract Creation0 ETH
166350982023-02-15 15:41:11562 days ago1676475671
MOOAR : Launchpad
 Contract Creation0 ETH
166349012023-02-15 15:01:23562 days ago1676473283
MOOAR : Launchpad
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Mooar

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 25 : Mooar.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./MooarNFTHelper.sol";
import "./MooarNFT.sol";
import "./MooarVault.sol";
import "./TransferHelper.sol";


contract Mooar is AccessControl, ReentrancyGuard {
    using ECDSA for bytes32;

    struct MooarSeason {
        bytes32 secret;
        bytes32 revealKey;
        uint32  unfreezeUpdateNftTime;
        address vault;
    }

    struct NFTInfo {
        address creator;
        bytes32 seasonId;
        uint32  maxSupply;
        uint32  directMintTime;
        uint32  currentMintIdx;
        uint32  currentSupply;
        uint256 nftPrice;
        uint256 creatorFund;
    }

    struct NFTLaunchResult {
        address nftAddress;
        uint32  currentMintIdx;
        uint32  currentSupply;
        uint256 creatorFund;
    }

    mapping(bytes32 => MooarSeason) public Seasons;
    mapping(bytes32 => mapping(address => uint256)) public seasonVoterCost;

    mapping(bytes32 => uint256) private SeasonVotingInfo; // seasonId => (vault,voteEndingTime,voteStartingTime) 
    mapping(bytes32 => uint256) public SeasonRedeemInfo; // seasonId => (vault,redeemStartingTime) 
    mapping(bytes32 => bytes32) public SeasonMerkleRoot;

    mapping(bytes32 => bool) public leafRefunded;

    mapping(address => NFTInfo) public NFTs;
    mapping(bytes32 => address) public cidNFTAddresses;

    bytes32 public constant NFT_MANAGER = keccak256("NFT_MANAGER");
    bytes32 public constant MINT_SIGNER = keccak256("MINT_SIGNER");

    event InitSeasonEvent(address indexed vault);
    event InitNFTEvent(address indexed nft);
    event VoteEvent(address indexed voter, bytes32 indexed seasonId, bytes32 votingSecret, uint256 votingFee);
    event RefundEvent(address indexed voter, bytes32 indexed seasonId, uint256 refundAmount);

    address immutable private _voteToken;
    uint256 immutable private _votingBaseUnit;
    uint256 immutable private _votingMaxCostPerAddress;

    constructor(address voteToken, uint256 votingBaseUnit, uint256 votingMaxCostPerAddress) {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(NFT_MANAGER, msg.sender);
        _grantRole(MINT_SIGNER, msg.sender);

        _voteToken = voteToken;
        _votingBaseUnit = votingBaseUnit;
        _votingMaxCostPerAddress = votingMaxCostPerAddress;
    }

    function grantRole(bytes32 role, address account) public override onlyRole(DEFAULT_ADMIN_ROLE) {
        _grantRole(role, account);
    }

    function revokeRole(bytes32 role, address account) public override onlyRole(DEFAULT_ADMIN_ROLE) {
        _revokeRole(role, account);
    }

    function initSeason(
        bytes32 seasonId,
        bytes32 secret,
        uint32 voteStartingTime,
        uint32 voteEndingTime)
    external onlyRole(NFT_MANAGER) {
        require(block.timestamp < voteStartingTime && voteStartingTime < voteEndingTime, "Invalid season duration");
        require(Seasons[seasonId].secret == bytes32(0), "Season already exists");

        address vault = address(new MooarVault());
        Seasons[seasonId] = MooarSeason(
            secret,
            bytes32(0),
            0,
            vault);

        SeasonVotingInfo[seasonId] = uint256(uint160(vault))<<64 | uint256(voteEndingTime)<<32 | uint256(voteStartingTime);
        emit InitNFTEvent(vault);
    }

    function initNFT(
        bytes32 seasonId,
        bytes32 collectionId,
        string memory name,
        string memory symbol,
        string memory baseURI,
        string memory tokenSuffix,
        address nftCreator,
        uint256 nftPrice,
        uint32 nftMaxSupply)
    external {
        {
            uint32 voteStartingTime = uint32(SeasonVotingInfo[seasonId]);
            require(cidNFTAddresses[collectionId] == address(0), "Exist collectionId");
            require(block.timestamp < voteStartingTime, "Invalid season time");
            require(nftPrice >= _votingBaseUnit 
                && nftCreator != address(0)
                && nftMaxSupply > 0, "Invalid input");
        }

        address newNFT = address(new MooarNFT(name, symbol, baseURI, tokenSuffix, nftMaxSupply));
        require(NFTs[newNFT].creator == address(0), "Exist NFT");

        NFTs[newNFT] = NFTInfo(nftCreator, seasonId, nftMaxSupply, 0, 0, 0, nftPrice, 0);
        cidNFTAddresses[collectionId] = newNFT;

        emit InitNFTEvent(newNFT);
    }

    function getNFTCreator(address nft) external view returns(address) {
        return NFTs[nft].creator;
    }

    function getVault(bytes32 seasonId) external view returns(address) {
        return Seasons[seasonId].vault;
    }

    function vote(bytes32 seasonId, bytes32[] calldata votingSecrets, uint256[] calldata votingCosts) external nonReentrant {
        address voter = _msgSender();

        uint256 votingInfo = SeasonVotingInfo[seasonId];
        address vault = address(uint160(votingInfo >> 64));
        uint32 voteEndingTime = uint32(votingInfo >> 32);
        uint32 voteStartingTime = uint32(votingInfo);

        require(votingInfo != 0 && block.timestamp >= voteStartingTime && block.timestamp < voteEndingTime, "Out of vote duration");
        require(votingSecrets.length == votingCosts.length, "Invalid input");

        uint256 totalVotingCost = 0;

        for (uint32 i=0; i<votingSecrets.length; i++) {         
            uint256 votingCost = votingCosts[i];   
            uint256 tmpTotalCost = totalVotingCost + votingCost;
            require(votingCost >= _votingBaseUnit && tmpTotalCost >= totalVotingCost, "Invalid voting cost");
            totalVotingCost = tmpTotalCost;
            emit VoteEvent(voter, seasonId, votingSecrets[i], votingCost);
        }

        TransferHelper.safeTransferFrom(
            _voteToken,
            voter,
            vault,
            totalVotingCost
        );

        seasonVoterCost[seasonId][voter] += totalVotingCost;
        require(seasonVoterCost[seasonId][voter] <= _votingMaxCostPerAddress, "Out of max voting cost");
    }

    function reveal(
        bytes32 seasonId,
        bytes32 revealKey,
        bytes32 redeemMerkleRoot,
        uint32 redeemTime,
        uint32 unfreezeUpdateNftTime,
        NFTLaunchResult[] calldata nftLaunchResults) external onlyRole(NFT_MANAGER) {
        {
            uint32 voteEndingTime = uint32(SeasonVotingInfo[seasonId] >> 32);
            require(block.timestamp >= voteEndingTime, "Vote duration not end");

            MooarSeason memory season = Seasons[seasonId];
            require(keccak256(abi.encodePacked(revealKey)) == season.secret, "Invalid reveal key");
            Seasons[seasonId].revealKey = revealKey;
            Seasons[seasonId].unfreezeUpdateNftTime = unfreezeUpdateNftTime;
            SeasonRedeemInfo[seasonId] = uint256(uint160(season.vault))<<32 | uint256(redeemTime);
            SeasonMerkleRoot[seasonId] = redeemMerkleRoot;
        }

        for (uint32 i=0; i<nftLaunchResults.length; i++) {
            address nftAddress = nftLaunchResults[i].nftAddress;
            NFTInfo memory nftInfo = NFTs[nftAddress];
            require(nftInfo.seasonId == seasonId, "Invalid season");

            if (nftLaunchResults[i].creatorFund != 0) {
                NFTs[nftAddress].creatorFund = nftLaunchResults[i].creatorFund;
            }
            NFTs[nftAddress].currentMintIdx = nftLaunchResults[i].currentMintIdx;
            NFTs[nftAddress].directMintTime = redeemTime;
            NFTs[nftAddress].currentSupply = nftLaunchResults[i].currentSupply;
            MooarNFT(nftAddress).transferOwnership(nftInfo.creator);
        }
    }

    function collectFund(bytes32 seasonId, address nft) external nonReentrant {
        MooarSeason memory season = Seasons[seasonId];
        NFTInfo memory nftInfo = NFTs[nft];
        require(seasonId != bytes32(0) && seasonId == nftInfo.seasonId && nftInfo.creatorFund > 0, "Invalid refund");

        NFTs[nft].creatorFund = 0;
        MooarVault(season.vault).withdraw(nftInfo.creator, _voteToken, nftInfo.creatorFund);
    }

    function verifyLeaf(
        bytes32 seasonId,
        address voter,
        bytes32 leafId,
        uint256 refundFee,
        address[] calldata nfts,
        uint32[] calldata tokenNums,
        uint32[] calldata tokenIds, 
        bytes32[] calldata proofs) internal view {
        require(MerkleProof.verify(
            proofs, 
            SeasonMerkleRoot[seasonId], 
            keccak256(abi.encodePacked(leafId, voter, refundFee, nfts, tokenNums, tokenIds))) == true, 
            "Invalid merkle verify");
    }

    function redeem(
        bytes32 seasonId,
        bytes32 leafId,
        uint256 refundFee,
        address[] calldata nfts,
        uint32[] calldata tokenNums,
        uint32[] calldata tokenIds, 
        bytes32[] calldata proofs)
    external nonReentrant {
        address voter = _msgSender();

        uint256 redeemInfo = SeasonRedeemInfo[seasonId];
        {
            uint32 redeemTime = uint32(redeemInfo);
            require(redeemInfo > 0 && block.timestamp >= redeemTime, "Invalid redeem time");
            require(nfts.length == tokenNums.length, "Invalid input");
        }
        verifyLeaf(seasonId, voter, leafId, refundFee, nfts, tokenNums, tokenIds, proofs);
        if (refundFee > 0) {
            require(leafRefunded[leafId] != true, "Fee refunded");
            address vault = address(uint160(redeemInfo >> 32));

            MooarVault(vault).withdraw(voter, _voteToken, refundFee);
            leafRefunded[leafId] = true;
            emit RefundEvent(voter, seasonId, refundFee);
        }

        uint32 tokenIdx = 0;
        for (uint32 i=0; i<nfts.length; i++) {
            address nft = nfts[i];
            uint32 tokenNum = tokenNums[i];
            for (uint32 j=0; j<tokenNum; j++) {
                MooarNFT(nft).mooarMint(voter, tokenIds[tokenIdx]);
                tokenIdx++;
            }
        }
    }

    function directMint(
        address nftAddress,
        uint32 mintNum,
        uint256 validBefore,
        bytes memory signature
    ) external nonReentrant {
        require(mintNum > 0 && mintNum <= 10, "Invalid token number");

        address to = _msgSender();
        bytes32 messageHash = keccak256(abi.encodePacked(to, validBefore));
        address signManager = messageHash.toEthSignedMessageHash().recover(signature);
        require(hasRole(MINT_SIGNER, signManager), "Invalid signature");

        require(NFTs[nftAddress].directMintTime > 0 && block.timestamp >= NFTs[nftAddress].directMintTime, "Invalid direct mint time");
        require(NFTs[nftAddress].currentMintIdx + mintNum <= NFTs[nftAddress].currentSupply, "Out of supply");

        uint256 mintCost = NFTs[nftAddress].nftPrice * mintNum;

        // transfer gmt: optimize vault
        TransferHelper.safeTransferFrom(
            _voteToken,
            msg.sender,
            MooarNFT(nftAddress).owner(),
            mintCost
        );

        for (uint32 i=0; i<mintNum; i++) {
            MooarNFT(nftAddress).mooarMint(to, NFTs[nftAddress].currentMintIdx + i);
        }
        NFTs[nftAddress].currentMintIdx = NFTs[nftAddress].currentMintIdx + mintNum;
    }

    function updateNftInfo(address nftAddress, uint32 currentSupply, uint256 votingCost) external {
        NFTInfo memory nftInfo = NFTs[nftAddress];
        require(nftInfo.seasonId != bytes32(0), "Invalid nft");
        MooarSeason memory season = Seasons[nftInfo.seasonId];
        require(season.unfreezeUpdateNftTime > 0 && block.timestamp >= season.unfreezeUpdateNftTime, "Invalid update nft info time");
        require(MooarNFT(nftAddress).owner() == _msgSender(), "Only nft owner can update");
        
        if (currentSupply != 0) {
            require(currentSupply >= nftInfo.currentSupply && currentSupply <= nftInfo.maxSupply, "Invalid current supply");
            NFTs[nftAddress].currentSupply = currentSupply;
        }
        if (votingCost != 0) {
            NFTs[nftAddress].nftPrice = votingCost;
        }
    }
}

File 2 of 25 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 3 of 25 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 25 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 5 of 25 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 25 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: 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 = _ownerOf(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 = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or 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 or 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 or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(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 = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

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

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

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

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

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

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

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits 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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @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. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 8 of 25 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 11 of 25 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 12 of 25 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 13 of 25 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 16 of 25 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * 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.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @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 simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _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}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _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 sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _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}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _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)
        }
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 19 of 25 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 20 of 25 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _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) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

File 21 of 25 : IERC173.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

/// @title ERC-173 Contract Ownership Standard
///  Note: the ERC-165 identifier for this interface is 0x7f5828d0
interface IERC173 /* is ERC165 */ {
    /// @dev This emits when ownership of a contract changes.    
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @notice Get the address of the owner    
    /// @return The address of the owner.
    function owner() view external returns(address);
	
    /// @notice Set the address of the new owner of the contract
    /// @dev Set _newOwner to address(0) to renounce any ownership.
    /// @param _newOwner The address of the new owner of the contract    
    function transferOwnership(address _newOwner) external;	
}

File 22 of 25 : MooarNFT.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IERC173.sol";

contract MooarNFT is ERC721Enumerable, Ownable {
    string private _baseTokenURI;
    address private _mooar;
    string private _tokenSuffix;

    uint256 public maxSupply;
    
    mapping(address => bool) private _priorityMinterRecords;

    constructor(
        string memory name,
        string memory symbol,
        string memory baseURI,
        string memory tokenSuffix,
        uint256 maxSupply_)
        ERC721(name, symbol)
    {
        _baseTokenURI = baseURI;
        _mooar = _msgSender();
        _tokenSuffix = tokenSuffix;
        maxSupply = maxSupply_;
    }

    modifier onlyMooar() {
        require(_msgSender() == _mooar, "Only for mooar contract");
        _;
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC173).interfaceId || super.supportsInterface(interfaceId);
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        string memory uri = super.tokenURI(tokenId);
        return bytes(_tokenSuffix).length > 0 ? string(abi.encodePacked(uri, _tokenSuffix)) : uri;
    }

    function _baseURI() internal view virtual override returns(string memory) {
        return _baseTokenURI;
    }

    function mooarMint(address to, uint256 tokenId) onlyMooar external {
        _safeMint(to, tokenId);
    }

    function burn(uint256 tokenId) external virtual {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "Burn caller is not owner nor approved"
        );
        _burn(tokenId);
    }

}

File 23 of 25 : MooarNFTHelper.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

struct MooarNFTLaunchStatus {
    bool isMooarLaunched;
    bool isMooarUnlaunched;

    bytes32 tokenMerkleRoot;
    uint256 redeemMintStartTime;
    uint256 unfreezeMintStartTime;

    bytes32 priorityMerkleRoot;
    uint256 priorityMintStartTime;
    uint256 directMintStartTime;
}

library MooarNFTHelper {
    
    function onlyRedeemMinting(MooarNFTLaunchStatus storage self) public view {
        require(self.isMooarLaunched, "Only for mooar launched NFT");
        require(self.redeemMintStartTime > 0 && block.timestamp >= self.redeemMintStartTime, "Not redeem minting");
    }

    function onlyUnfreezeMinting(MooarNFTLaunchStatus storage self) public view {
        require(self.isMooarLaunched, "Only for mooar launched NFT");
        require(self.unfreezeMintStartTime > 0 && block.timestamp >= self.unfreezeMintStartTime, "Not unfreeze minting");
    }

    function onlyPriorityMinting(MooarNFTLaunchStatus storage self) private view {
        require(self.isMooarUnlaunched, "Only for mooar unlaunched NFT");
        require(self.priorityMintStartTime > 0 && block.timestamp >= self.priorityMintStartTime && block.timestamp < self.directMintStartTime, "Not priority minting");
    }
    
    function onlyDirectMinting(MooarNFTLaunchStatus storage self) private view {
        require(self.isMooarUnlaunched, "Only for mooar unlaunched NFT");
        require(self.directMintStartTime > 0 && block.timestamp >= self.directMintStartTime, "Not direct minting");
    }

    function onlyMintByETH(uint256 ethMintCost) private view {
        require(ethMintCost > 0, "Can't mint by ETH");
        require(msg.value == ethMintCost, "Invalid ETH value");
    }

    function onlyMintByToken(address tokenMintBaseToken, uint256 tokenMintCost) private pure {
        require(tokenMintBaseToken != address(0), "Can't mint by token");
        require(tokenMintCost > 0, "Can't mint by token");
    }
    
    function verifyTokenMerkleProof(address account, bytes32 tokenMerkleRoot, uint256 tokenId, bytes32[] calldata merkleProof) internal pure {
        require(tokenMerkleRoot != bytes32(0), "No merkle root");
        bytes32 node = keccak256(abi.encodePacked(tokenId, account));
        require(MerkleProof.verify(merkleProof, tokenMerkleRoot, node) == true, "Fail to verify proof");
    }

    function verifyAccountMerkleProof(address account, bytes32 accountMerkleRoot, bytes32[] calldata merkleProof) internal pure {
        require(accountMerkleRoot != bytes32(0), "No priority merkle root");
        bytes32 node = keccak256(abi.encodePacked(account));
        require(MerkleProof.verify(merkleProof, accountMerkleRoot, node) == true, "Fail to verify proof");
    }

    function verifyRedeemMint(address account, MooarNFTLaunchStatus storage status, uint256 tokenId, bytes32[] calldata merkleProof) public view {
        onlyRedeemMinting(status);
        verifyTokenMerkleProof(account, status.tokenMerkleRoot, tokenId, merkleProof);
    }

    function verifyUnfreezeMintByETH(uint256 ethMintCost, MooarNFTLaunchStatus storage status, uint256 tokenId, bytes32[] calldata merkleProof) public view {
        onlyUnfreezeMinting(status);
        onlyMintByETH(ethMintCost);
        verifyTokenMerkleProof(address(0), status.tokenMerkleRoot, tokenId, merkleProof);
    }

    function verifyUnfreezeMintByToken(address tokenMintBaseToken, uint256 tokenMintCost, MooarNFTLaunchStatus storage status, uint256 tokenId, bytes32[] calldata merkleProof) public view {
        onlyUnfreezeMinting(status);
        onlyMintByToken(tokenMintBaseToken, tokenMintCost);
        verifyTokenMerkleProof(address(0), status.tokenMerkleRoot, tokenId, merkleProof);
    }

    function verifyPriorityMintByETH(address account, uint256 ethMintCost, MooarNFTLaunchStatus storage status, bytes32[] calldata merkleProof) public view {
        onlyPriorityMinting(status);
        onlyMintByETH(ethMintCost);
        verifyAccountMerkleProof(account, status.priorityMerkleRoot, merkleProof);
    }

    function verifyPriorityMintByToken(address account, address tokenMintBaseToken, uint256 tokenMintCost, MooarNFTLaunchStatus storage status, bytes32[] calldata merkleProof) public view {
        onlyPriorityMinting(status);
        onlyMintByToken(tokenMintBaseToken, tokenMintCost);
        verifyAccountMerkleProof(account, status.priorityMerkleRoot, merkleProof);
    }

    function verifyDirectMintByETH(uint256 ethMintCost, MooarNFTLaunchStatus storage status) public view {
        onlyDirectMinting(status);
        onlyMintByETH(ethMintCost);
    }

    function verifyDirectMintByToken(address tokenMintBaseToken, uint256 tokenMintCost, MooarNFTLaunchStatus storage status) public view {
        onlyDirectMinting(status);
        onlyMintByToken(tokenMintBaseToken, tokenMintCost);
    }
}

File 24 of 25 : MooarVault.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./TransferHelper.sol";

contract MooarVault is Ownable {
    function withdraw(address receiver, address token, uint256 amount) external onlyOwner {
        TransferHelper.safeTransfer(token, receiver, amount);
    }
}

File 25 of 25 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.9;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"voteToken","type":"address"},{"internalType":"uint256","name":"votingBaseUnit","type":"uint256"},{"internalType":"uint256","name":"votingMaxCostPerAddress","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"}],"name":"InitNFTEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"InitSeasonEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":true,"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"refundAmount","type":"uint256"}],"name":"RefundEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":true,"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"votingSecret","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"votingFee","type":"uint256"}],"name":"VoteEvent","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_SIGNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NFTs","outputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"directMintTime","type":"uint32"},{"internalType":"uint32","name":"currentMintIdx","type":"uint32"},{"internalType":"uint32","name":"currentSupply","type":"uint32"},{"internalType":"uint256","name":"nftPrice","type":"uint256"},{"internalType":"uint256","name":"creatorFund","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"SeasonMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"SeasonRedeemInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"Seasons","outputs":[{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"bytes32","name":"revealKey","type":"bytes32"},{"internalType":"uint32","name":"unfreezeUpdateNftTime","type":"uint32"},{"internalType":"address","name":"vault","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"cidNFTAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"address","name":"nft","type":"address"}],"name":"collectFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint32","name":"mintNum","type":"uint32"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"directMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"}],"name":"getNFTCreator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"}],"name":"getVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"bytes32","name":"collectionId","type":"bytes32"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"tokenSuffix","type":"string"},{"internalType":"address","name":"nftCreator","type":"address"},{"internalType":"uint256","name":"nftPrice","type":"uint256"},{"internalType":"uint32","name":"nftMaxSupply","type":"uint32"}],"name":"initNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"uint32","name":"voteStartingTime","type":"uint32"},{"internalType":"uint32","name":"voteEndingTime","type":"uint32"}],"name":"initSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"leafRefunded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"bytes32","name":"leafId","type":"bytes32"},{"internalType":"uint256","name":"refundFee","type":"uint256"},{"internalType":"address[]","name":"nfts","type":"address[]"},{"internalType":"uint32[]","name":"tokenNums","type":"uint32[]"},{"internalType":"uint32[]","name":"tokenIds","type":"uint32[]"},{"internalType":"bytes32[]","name":"proofs","type":"bytes32[]"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"bytes32","name":"revealKey","type":"bytes32"},{"internalType":"bytes32","name":"redeemMerkleRoot","type":"bytes32"},{"internalType":"uint32","name":"redeemTime","type":"uint32"},{"internalType":"uint32","name":"unfreezeUpdateNftTime","type":"uint32"},{"components":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint32","name":"currentMintIdx","type":"uint32"},{"internalType":"uint32","name":"currentSupply","type":"uint32"},{"internalType":"uint256","name":"creatorFund","type":"uint256"}],"internalType":"struct Mooar.NFTLaunchResult[]","name":"nftLaunchResults","type":"tuple[]"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"seasonVoterCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint32","name":"currentSupply","type":"uint32"},{"internalType":"uint256","name":"votingCost","type":"uint256"}],"name":"updateNftInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seasonId","type":"bytes32"},{"internalType":"bytes32[]","name":"votingSecrets","type":"bytes32[]"},{"internalType":"uint256[]","name":"votingCosts","type":"uint256[]"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162005f6338038062005f63833981016040819052620000349162000158565b6001805562000045600033620000b7565b620000717f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe6333620000b7565b6200009d7f9c0216d63c69b849e4429e7dcadc07b867718eefd5e162f0472528af97c68c9233620000b7565b6001600160a01b0390921660805260a05260c0526200019d565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000154576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001133390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000806000606084860312156200016e57600080fd5b83516001600160a01b03811681146200018657600080fd5b602085015160409095015190969495509392505050565b60805160a05160c051615d7a620001e960003960006117470152600081816115b30152611cc90152600081816109ad015281816116c101528181611b7f01526120aa0152615d7a6000f3fe60806040523480156200001157600080fd5b5060043610620001d15760003560e01c80639e4c87661162000101578063b8661a4e11620000a3578063d547741f116200007a578063d547741f1462000579578063d60229df1462000590578063e0cdd91814620005be578063f966f75a14620005d557600080fd5b8063b8661a4e1462000517578063cf9568f0146200053f578063d112bb0c146200056257600080fd5b8063b4e63f6911620000d8578063b4e63f6914620003f1578063b7c61f0614620004b7578063b7ce175214620004ef57600080fd5b80639e4c876614620003a2578063a217fddf14620003b9578063a22270e214620003c257600080fd5b806345ac12891162000177578063662ee93d116200014e578063662ee93d14620002e65780636ff8d8f2146200032b57806374ce9d83146200035157806391d14854146200036857600080fd5b806345ac128914620002955780634c1d42fe14620002b857806358ad150614620002cf57600080fd5b80632f2ff15d11620001ac5780632f2ff15d14620002505780633323dfde146200026757806336568abe146200027e57600080fd5b806301ffc9a714620001d65780631a6e0ede1462000202578063248a9ca3146200021b575b600080fd5b620001ed620001e736600462002ccb565b62000655565b60405190151581526020015b60405180910390f35b620002196200021336600462002dc7565b6200068d565b005b620002416200022c36600462002e4e565b60009081526020819052604090206001015490565b604051908152602001620001f9565b620002196200026136600462002e68565b62000bab565b620002196200027836600462002e9b565b62000bc9565b620002196200028f36600462002e68565b620010aa565b62000241620002a636600462002e4e565b60056020526000908152604090205481565b62000219620002c936600462002f58565b6200113a565b62000219620002e036600462002fe3565b62001485565b62000312620002f736600462002e4e565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001620001f9565b620001ed6200033c36600462002e4e565b60076020526000908152604090205460ff1681565b620002196200036236600462003064565b620017c6565b620001ed6200037936600462002e68565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b62000219620003b336600462002e68565b620019f0565b62000241600081565b62000312620003d3366004620030af565b6001600160a01b039081166000908152600860205260409020541690565b6200046262000402366004620030af565b600860205260009081526040902080546001820154600283015460038401546004909401546001600160a01b0390931693919263ffffffff808316936401000000008404821693600160401b8104831693600160601b9091049092169188565b604080516001600160a01b039099168952602089019790975263ffffffff95861696880196909652928416606087015290831660808601529190911660a084015260c083015260e082015261010001620001f9565b62000312620004c836600462002e4e565b6000908152600260208190526040909120015464010000000090046001600160a01b031690565b620002417f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe6381565b620002417f9c0216d63c69b849e4429e7dcadc07b867718eefd5e162f0472528af97c68c9281565b620002416200055036600462002e4e565b60066020526000908152604090205481565b6200021962000573366004620030f2565b62001bfa565b620002196200058a36600462002e68565b62001f3e565b62000241620005a136600462002e68565b600360209081526000928352604080842090915290825290205481565b62000219620005cf366004620031ef565b62001f57565b6200061f620005e636600462002e4e565b600260208190526000918252604090912080546001820154919092015463ffffffff81169064010000000090046001600160a01b031684565b604051620001f99493929190938452602084019290925263ffffffff1660408301526001600160a01b0316606082015260800190565b60006001600160e01b03198216637965db0b60e01b14806200068757506301ffc9a760e01b6001600160e01b03198316145b92915050565b620006976200232a565b60008363ffffffff16118015620006b55750600a8363ffffffff1611155b620007075760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420746f6b656e206e756d62657200000000000000000000000060448201526064015b60405180910390fd5b6000336040516bffffffffffffffffffffffff19606083901b166020820152603481018590529091506000906054016040516020818303038152906040528051906020012090506000620007b484620007ad846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9062002386565b6001600160a01b03811660009081527f7c8d924052a55b4fa06d3b6cc849c9db5fbd865491b9c5ac7bd948f86f587c21602052604090205490915060ff16620008405760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401620006fe565b6001600160a01b038716600090815260086020526040902060020154640100000000900463ffffffff1615801590620008a257506001600160a01b038716600090815260086020526040902060020154640100000000900463ffffffff164210155b620008f05760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420646972656374206d696e742074696d6500000000000000006044820152606401620006fe565b6001600160a01b03871660009081526008602052604090206002015463ffffffff600160601b820481169162000930918991600160401b900416620032fa565b63ffffffff161115620009765760405162461bcd60e51b815260206004820152600d60248201526c4f7574206f6620737570706c7960981b6044820152606401620006fe565b6001600160a01b038716600090815260086020526040812060030154620009a59063ffffffff89169062003325565b905062000a497f0000000000000000000000000000000000000000000000000000000000000000338a6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a0757600080fd5b505afa15801562000a1c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a42919062003347565b84620023ae565b60005b8763ffffffff168163ffffffff16101562000b1b576001600160a01b03891660008181526008602052604090206002015463ac0cc3b790879062000a9f908590600160401b900463ffffffff16620032fa565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015263ffffffff166024820152604401600060405180830381600087803b15801562000aec57600080fd5b505af115801562000b01573d6000803e3d6000fd5b50505050808062000b129062003367565b91505062000a4c565b506001600160a01b03881660009081526008602052604090206002015462000b52908890600160401b900463ffffffff16620032fa565b6001600160a01b0389166000908152600860205260409020600201805463ffffffff92909216600160401b026bffffffff0000000000000000199092169190911790555062000ba5925062002517915050565b50505050565b600062000bb8816200251d565b62000bc483836200252c565b505050565b7f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe6362000bf5816200251d565b600088815260046020908152604090912054901c63ffffffff811642101562000c615760405162461bcd60e51b815260206004820152601560248201527f566f7465206475726174696f6e206e6f7420656e6400000000000000000000006044820152606401620006fe565b60008981526002602081815260409283902083516080810185528154808252600183015482850152919093015463ffffffff81168486015264010000000090046001600160a01b0316606084015283519182018c9052919201604051602081830303815290604052805190602001201462000d1f5760405162461bcd60e51b815260206004820152601260248201527f496e76616c69642072657665616c206b657900000000000000000000000000006044820152606401620006fe565b60008a8152600260208181526040808420600181018e9055909201805463ffffffff191663ffffffff8b8116919091179091556060949094015160058252828420948b1690821b77ffffffffffffffffffffffffffffffffffffffff000000001617909355600690925290812088905590505b63ffffffff81168311156200109f57600084848363ffffffff1681811062000dbe5762000dbe6200338e565b62000dd69260206080909202019081019150620030af565b6001600160a01b03808216600090815260086020908152604091829020825161010081018452815490941684526001810154918401829052600281015463ffffffff80821694860194909452640100000000810484166060860152600160401b810484166080860152600160601b900490921660a0840152600382015460c084015260049091015460e0830152919250908b1462000eb75760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420736561736f6e0000000000000000000000000000000000006044820152606401620006fe565b85858463ffffffff1681811062000ed25762000ed26200338e565b9050608002016060013560001462000f365785858463ffffffff1681811062000eff5762000eff6200338e565b9050608002016060013560086000846001600160a01b03166001600160a01b03168152602001908152602001600020600401819055505b85858463ffffffff1681811062000f515762000f516200338e565b905060800201602001602081019062000f6b9190620033a4565b6001600160a01b038316600090815260086020526040902060020180546bffffffffffffffff000000001916600160401b63ffffffff9384160267ffffffff000000001916176401000000008b84160217905586908690851681811062000fd65762000fd66200338e565b905060800201604001602081019062000ff09190620033a4565b6001600160a01b0383811660008181526008602052604090819020600201805463ffffffff95909516600160601b0263ffffffff60601b19909516949094179093558351925163f2fde38b60e01b81529290911660048301529063f2fde38b90602401600060405180830381600087803b1580156200106e57600080fd5b505af115801562001083573d6000803e3d6000fd5b5050505050508080620010969062003367565b91505062000d92565b505050505050505050565b6001600160a01b03811633146200112a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401620006fe565b620011368282620025cc565b5050565b6001600160a01b03808416600090815260086020908152604091829020825161010081018452815490941684526001810154918401829052600281015463ffffffff80821694860194909452640100000000810484166060860152600160401b810484166080860152600160601b900490921660a0840152600382015460c084015260049091015460e0830152620012035760405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a59081b999d60aa1b6044820152606401620006fe565b60208181015160009081526002808352604091829020825160808101845281548152600182015494810194909452015463ffffffff811691830182905264010000000090046001600160a01b03166060830152158015906200126f5750806040015163ffffffff164210155b620012bd5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c696420757064617465206e667420696e666f2074696d65000000006044820152606401620006fe565b336001600160a01b0316856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200130157600080fd5b505afa15801562001316573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200133c919062003347565b6001600160a01b031614620013945760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206e6674206f776e65722063616e20757064617465000000000000006044820152606401620006fe565b63ffffffff84161562001458578160a0015163ffffffff168463ffffffff1610158015620013d25750816040015163ffffffff168463ffffffff1611155b620014205760405162461bcd60e51b815260206004820152601660248201527f496e76616c69642063757272656e7420737570706c79000000000000000000006044820152606401620006fe565b6001600160a01b0385166000908152600860205260409020600201805463ffffffff60601b1916600160601b63ffffffff8716021790555b82156200147e576001600160a01b03851660009081526008602052604090206003018390555b5050505050565b6200148f6200232a565b60008581526004602090815260409182902054339290919082901c9082901c828015801590620014c557508063ffffffff164210155b8015620014d757508163ffffffff1642105b620015255760405162461bcd60e51b815260206004820152601460248201527f4f7574206f6620766f7465206475726174696f6e0000000000000000000000006044820152606401620006fe565b878614620015665760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620006fe565b6000805b63ffffffff81168a1115620016ba57600089898363ffffffff168181106200159657620015966200338e565b90506020020135905060008184620015af9190620033c2565b90507f00000000000000000000000000000000000000000000000000000000000000008210158015620015e25750838110155b620016305760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420766f74696e6720636f7374000000000000000000000000006044820152606401620006fe565b8093508d896001600160a01b03167fceb7b919c29cc8c2ae1a3eaf2b309df632a48f4689eff7542e3805f21fd37e428f8f8763ffffffff168181106200167a576200167a6200338e565b90506020020135856040516200169a929190918252602082015260400190565b60405180910390a350508080620016b19062003367565b9150506200156a565b50620016e97f0000000000000000000000000000000000000000000000000000000000000000878684620023ae565b60008b81526003602090815260408083206001600160a01b038a168452909152812080548392906200171d908490620033c2565b909155505060008b81526003602090815260408083206001600160a01b038a1684529091529020547f00000000000000000000000000000000000000000000000000000000000000001015620017b65760405162461bcd60e51b815260206004820152601660248201527f4f7574206f66206d617820766f74696e6720636f7374000000000000000000006044820152606401620006fe565b5050505050506200147e60018055565b7f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe63620017f2816200251d565b8263ffffffff16421080156200181357508163ffffffff168363ffffffff16105b620018615760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420736561736f6e206475726174696f6e0000000000000000006044820152606401620006fe565b60008581526002602052604090205415620018bf5760405162461bcd60e51b815260206004820152601560248201527f536561736f6e20616c72656164792065786973747300000000000000000000006044820152606401620006fe565b6000604051620018cf9062002caf565b604051809103906000f080158015620018ec573d6000803e3d6000fd5b5060408051608081018252878152600060208083018281528385018381526001600160a01b03878116606087018181528f8752600280875289882098518955945160018901559251969093018054925163ffffffff9788167fffffffffffffffff00000000000000000000000000000000000000000000000090941693909317640100000000939092169290920217905560048252848320938a169189901b67ffffffff000000001686861b7bffffffffffffffffffffffffffffffffffffffff00000000000000001617919091179092559151929350917f5cd555fef0aefbd53248445605b631524ee801640e615d99d9a2539c447ebfa09190a2505050505050565b620019fa6200232a565b600082815260026020818152604080842081516080808201845282548252600180840154838701529286015463ffffffff808216848701526001600160a01b036401000000009283900481166060808701919091528b82168b52600889529987902087516101008101895281549092168252958601549781019790975296840154808816958701959095528404861696850196909652600160401b8304851695840195909552600160601b90910490921660a0820152600382015460c08201526004919091015460e0820152831580159062001ad95750806020015184145b801562001aea575060008160e00151115b62001b385760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420726566756e640000000000000000000000000000000000006044820152606401620006fe565b6001600160a01b038381166000908152600860205260408082206004908101929092556060850151845160e08601519251636ce5768960e11b8152908516938101939093527f00000000000000000000000000000000000000000000000000000000000000008416602484015260448301919091529091169063d9caed1290606401600060405180830381600087803b15801562001bd557600080fd5b505af115801562001bea573d6000803e3d6000fd5b5050505050506200113660018055565b6000898152600460209081526040808320548b84526009909252909120546001600160a01b03161562001c705760405162461bcd60e51b815260206004820152601260248201527f457869737420636f6c6c656374696f6e496400000000000000000000000000006044820152606401620006fe565b8063ffffffff16421062001cc75760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420736561736f6e2074696d65000000000000000000000000006044820152606401620006fe565b7f0000000000000000000000000000000000000000000000000000000000000000831015801562001d0057506001600160a01b03841615155b801562001d13575060008263ffffffff16115b62001d515760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620006fe565b506000878787878560405162001d679062002cbd565b62001d779594939291906200343a565b604051809103906000f08015801562001d94573d6000803e3d6000fd5b506001600160a01b03808216600090815260086020526040902054919250161562001dee5760405162461bcd60e51b8152602060048201526009602482015268115e1a5cdd0813919560ba1b6044820152606401620006fe565b60408051610100810182526001600160a01b03808716825260208083018e815263ffffffff8088168587019081526000606087018181526080880182815260a0890183815260c08a018e815260e08b018581528d8b1680875260088b528d87209c518d549c1673ffffffffffffffffffffffffffffffffffffffff199c8d16178d55985160018d0155955160028c0180549551945193518916600160601b0263ffffffff60601b19948a16600160401b02949094166fffffffffffffffff000000000000000019958a166401000000000267ffffffffffffffff19909716929099169190911794909417929092169590951794909417905591516003870155516004909501949094558d845260099091528383208054909216811790915591517f5cd555fef0aefbd53248445605b631524ee801640e615d99d9a2539c447ebfa09190a250505050505050505050565b600062001f4b816200251d565b62000bc48383620025cc565b62001f616200232a565b60008b815260056020526040902054339080801580159062001f8957508063ffffffff164210155b62001fd75760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642072656465656d2074696d65000000000000000000000000006044820152606401620006fe565b898814620020185760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620006fe565b506200202f8d838e8e8e8e8e8e8e8e8e8e6200264c565b8a15620021915760008c81526007602052604090205460ff161515600114156200208b5760405162461bcd60e51b815260206004820152600c60248201526b119959481c99599d5b99195960a21b6044820152606401620006fe565b604051636ce5768960e11b81526001600160a01b0383811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018d9052602083901c919082169063d9caed1290606401600060405180830381600087803b1580156200210557600080fd5b505af11580156200211a573d6000803e3d6000fd5b505050506001600760008f815260200190815260200160002060006101000a81548160ff0219169083151502179055508d836001600160a01b03167f27a912cc8a120540e01544afe5b0a236a7629e48e11e992cd807c32a441bf8d68e6040516200218791815260200190565b60405180910390a3505b6000805b63ffffffff81168b11156200230f5760008c8c8363ffffffff16818110620021c157620021c16200338e565b9050602002016020810190620021d89190620030af565b905060008b8b8463ffffffff16818110620021f757620021f76200338e565b90506020020160208101906200220e9190620033a4565b905060005b8163ffffffff168163ffffffff161015620022f657826001600160a01b031663ac0cc3b7888d8d8963ffffffff168181106200225357620022536200338e565b90506020020160208101906200226a9190620033a4565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015263ffffffff166024820152604401600060405180830381600087803b158015620022b757600080fd5b505af1158015620022cc573d6000803e3d6000fd5b505050508480620022dd9062003367565b9550508080620022ed9062003367565b91505062002213565b5050508080620023069062003367565b91505062002195565b505050506200231d60018055565b5050505050505050505050565b600260015414156200237f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401620006fe565b6002600155565b600080600062002397858562002746565b91509150620023a68162002790565b509392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b1790529151600092839290881691620024299190620034a8565b6000604051808303816000865af19150503d806000811462002468576040519150601f19603f3d011682016040523d82523d6000602084013e6200246d565b606091505b50915091508180156200249b5750805115806200249b5750808060200190518101906200249b9190620034c6565b6200250f5760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401620006fe565b505050505050565b60018055565b620025298133620028f1565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662001136576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620025883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562001136576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b620026e5828280806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600660008f8152602001908152602001600020548c8e8d8d8d8d8d8d8d604051602001620026c9999897969594939291906200352a565b604051602081830303815290604052805190602001206200296d565b1515600114620027385760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206d65726b6c652076657269667900000000000000000000006044820152606401620006fe565b505050505050505050505050565b600080825160411415620027815760208301516040840151606085015160001a620027748782858562002985565b9450945050505062002789565b506000905060025b9250929050565b6000816004811115620027a757620027a7620035b4565b1415620027b15750565b6001816004811115620027c857620027c8620035b4565b1415620028185760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401620006fe565b60028160048111156200282f576200282f620035b4565b14156200287f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401620006fe565b6003816004811115620028965762002896620035b4565b1415620025295760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401620006fe565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200113657620029258162002a4e565b6200293283602062002a61565b60405160200162002945929190620035ca565b60408051601f198184030181529082905262461bcd60e51b8252620006fe916004016200364f565b6000826200297c858462002c2f565b14949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115620029be575060009050600362002a45565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801562002a13573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662002a3e5760006001925092505062002a45565b9150600090505b94509492505050565b6060620006876001600160a01b03831660145b6060600062002a7283600262003325565b62002a7f906002620033c2565b67ffffffffffffffff81111562002a9a5762002a9a62002d34565b6040519080825280601f01601f19166020018201604052801562002ac5576020820181803683370190505b509050600360fc1b8160008151811062002ae35762002ae36200338e565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062002b155762002b156200338e565b60200101906001600160f81b031916908160001a905350600062002b3b84600262003325565b62002b48906001620033c2565b90505b600181111562002bd7577f303132333435363738396162636465660000000000000000000000000000000085600f166010811062002b8d5762002b8d6200338e565b1a60f81b82828151811062002ba65762002ba66200338e565b60200101906001600160f81b031916908160001a90535060049490941c9362002bcf8162003664565b905062002b4b565b50831562002c285760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620006fe565b9392505050565b600081815b8451811015620023a65762002c668286838151811062002c585762002c586200338e565b602002602001015162002c7d565b91508062002c74816200367e565b91505062002c34565b600081831062002c9b57600082815260208490526040902062002c28565b600083815260208390526040902062002c28565b6104d2806200369d83390190565b6121d68062003b6f83390190565b60006020828403121562002cde57600080fd5b81356001600160e01b03198116811462002c2857600080fd5b6001600160a01b03811681146200252957600080fd5b803562002d1a8162002cf7565b919050565b803563ffffffff8116811462002d1a57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111562002d685762002d6862002d34565b604051601f8501601f19908116603f0116810190828211818310171562002d935762002d9362002d34565b8160405280935085815286868601111562002dad57600080fd5b858560208301376000602087830101525050509392505050565b6000806000806080858703121562002dde57600080fd5b843562002deb8162002cf7565b935062002dfb6020860162002d1f565b925060408501359150606085013567ffffffffffffffff81111562002e1f57600080fd5b8501601f8101871362002e3157600080fd5b62002e428782356020840162002d4a565b91505092959194509250565b60006020828403121562002e6157600080fd5b5035919050565b6000806040838503121562002e7c57600080fd5b82359150602083013562002e908162002cf7565b809150509250929050565b600080600080600080600060c0888a03121562002eb757600080fd5b87359650602088013595506040880135945062002ed76060890162002d1f565b935062002ee76080890162002d1f565b925060a088013567ffffffffffffffff8082111562002f0557600080fd5b818a0191508a601f83011262002f1a57600080fd5b81358181111562002f2a57600080fd5b8b60208260071b850101111562002f4057600080fd5b60208301945080935050505092959891949750929550565b60008060006060848603121562002f6e57600080fd5b833562002f7b8162002cf7565b925062002f8b6020850162002d1f565b9150604084013590509250925092565b60008083601f84011262002fae57600080fd5b50813567ffffffffffffffff81111562002fc757600080fd5b6020830191508360208260051b85010111156200278957600080fd5b60008060008060006060868803121562002ffc57600080fd5b85359450602086013567ffffffffffffffff808211156200301c57600080fd5b6200302a89838a0162002f9b565b909650945060408801359150808211156200304457600080fd5b50620030538882890162002f9b565b969995985093965092949392505050565b600080600080608085870312156200307b57600080fd5b8435935060208501359250620030946040860162002d1f565b9150620030a46060860162002d1f565b905092959194509250565b600060208284031215620030c257600080fd5b813562002c288162002cf7565b600082601f830112620030e157600080fd5b62002c288383356020850162002d4a565b60008060008060008060008060006101208a8c0312156200311257600080fd5b8935985060208a0135975060408a013567ffffffffffffffff808211156200313957600080fd5b620031478d838e01620030cf565b985060608c01359150808211156200315e57600080fd5b6200316c8d838e01620030cf565b975060808c01359150808211156200318357600080fd5b620031918d838e01620030cf565b965060a08c0135915080821115620031a857600080fd5b50620031b78c828d01620030cf565b945050620031c860c08b0162002d0d565b925060e08a01359150620031e06101008b0162002d1f565b90509295985092959850929598565b600080600080600080600080600080600060e08c8e0312156200321157600080fd5b8b359a5060208c0135995060408c0135985067ffffffffffffffff8060608e013511156200323e57600080fd5b620032508e60608f01358f0162002f9b565b909950975060808d01358110156200326757600080fd5b620032798e60808f01358f0162002f9b565b909750955060a08d01358110156200329057600080fd5b620032a28e60a08f01358f0162002f9b565b909550935060c08d0135811015620032b957600080fd5b50620032cc8d60c08e01358e0162002f9b565b81935080925050509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168185168083038211156200331c576200331c620032e4565b01949350505050565b6000816000190483118215151615620033425762003342620032e4565b500290565b6000602082840312156200335a57600080fd5b815162002c288162002cf7565b600063ffffffff80831681811415620033845762003384620032e4565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620033b757600080fd5b62002c288262002d1f565b60008219821115620033d857620033d8620032e4565b500190565b60005b83811015620033fa578181015183820152602001620033e0565b8381111562000ba55750506000910152565b6000815180845262003426816020860160208601620033dd565b601f01601f19169290920160200192915050565b60a0815260006200344f60a08301886200340c565b82810360208401526200346381886200340c565b905082810360408401526200347981876200340c565b905082810360608401526200348f81866200340c565b91505063ffffffff831660808301529695505050505050565b60008251620034bc818460208701620033dd565b9190910192915050565b600060208284031215620034d957600080fd5b8151801515811462002c2857600080fd5b60008160005b84811015620035205763ffffffff620035098362002d1f565b1686526020958601959190910190600101620034f0565b5093949350505050565b898152600060206bffffffffffffffffffffffff198b60601b1681840152896034840152605483018960005b8a811015620035885781356200356c8162002cf7565b6001600160a01b03168352918301919083019060010162003556565b5050620035a36200359b82898b620034ea565b8688620034ea565b9d9c50505050505050505050505050565b634e487b7160e01b600052602160045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162003604816017850160208801620033dd565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835162003643816028840160208801620033dd565b01602801949350505050565b60208152600062002c2860208301846200340c565b600081620036765762003676620032e4565b506000190190565b6000600019821415620036955762003695620032e4565b506001019056fe608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104548061007e6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063715018a6146100515780638da5cb5b1461005b578063d9caed121461007a578063f2fde38b1461008d575b600080fd5b6100596100a0565b005b600054604080516001600160a01b039092168252519081900360200190f35b610059610088366004610363565b6100b4565b61005961009b36600461039f565b6100cc565b6100a861014a565b6100b260006101a4565b565b6100bc61014a565b6100c7828483610201565b505050565b6100d461014a565b6001600160a01b03811661013e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610147816101a4565b50565b6000546001600160a01b031633146100b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610135565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052915160009283929087169161027291906103c1565b6000604051808303816000865af19150503d80600081146102af576040519150601f19603f3d011682016040523d82523d6000602084013e6102b4565b606091505b50915091508180156102de5750805115806102de5750808060200190518101906102de91906103fc565b6103405760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201526c185b9cd9995c8819985a5b1959609a1b6064820152608401610135565b5050505050565b80356001600160a01b038116811461035e57600080fd5b919050565b60008060006060848603121561037857600080fd5b61038184610347565b925061038f60208501610347565b9150604084013590509250925092565b6000602082840312156103b157600080fd5b6103ba82610347565b9392505050565b6000825160005b818110156103e257602081860181015185830152016103c8565b818111156103f1576000828501525b509190910192915050565b60006020828403121561040e57600080fd5b815180151581146103ba57600080fdfea2646970667358221220321847a7af92fe37c8c8c8bf698bf1a6ff8c7c56031ddc540cb75d383c6ed75264736f6c6343000809003360806040523480156200001157600080fd5b50604051620021d6380380620021d6833981016040819052620000349162000295565b8451859085906200004d90600090602085019062000122565b5080516200006390600190602084019062000122565b505050620000806200007a620000cc60201b60201c565b620000d0565b82516200009590600b90602086019062000122565b50600c80546001600160a01b031916331790558151620000bd90600d90602085019062000122565b50600e55506200039592505050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001309062000358565b90600052602060002090601f0160209004810192826200015457600085556200019f565b82601f106200016f57805160ff19168380011785556200019f565b828001600101855582156200019f579182015b828111156200019f57825182559160200191906001019062000182565b50620001ad929150620001b1565b5090565b5b80821115620001ad5760008155600101620001b2565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b838211156200028b5760008385830101525b9695505050505050565b600080600080600060a08688031215620002ae57600080fd5b85516001600160401b0380821115620002c657600080fd5b620002d489838a01620001de565b96506020880151915080821115620002eb57600080fd5b620002f989838a01620001de565b955060408801519150808211156200031057600080fd5b6200031e89838a01620001de565b945060608801519150808211156200033557600080fd5b506200034488828901620001de565b925050608086015190509295509295909350565b600181811c908216806200036d57607f821691505b602082108114156200038f57634e487b7160e01b600052602260045260246000fd5b50919050565b611e3180620003a56000396000f3fe608060405234801561001057600080fd5b50600436106101625760003560e01c806370a08231116100c8578063ac0cc3b71161008c578063d5abeb0111610066578063d5abeb01146102e8578063e985e9c5146102f1578063f2fde38b1461032d57600080fd5b8063ac0cc3b7146102af578063b88d4fde146102c2578063c87b56dd146102d557600080fd5b806370a0823114610268578063715018a61461027b5780638da5cb5b1461028357806395d89b4114610294578063a22cb4651461029c57600080fd5b806323b872dd1161012a57806342966c681161010457806342966c681461022f5780634f6ccce7146102425780636352211e1461025557600080fd5b806323b872dd146101f65780632f745c591461020957806342842e0e1461021c57600080fd5b806301ffc9a71461016757806306fdde031461018f578063081812fc146101a4578063095ea7b3146101cf57806318160ddd146101e4575b600080fd5b61017a610175366004611977565b610340565b60405190151581526020015b60405180910390f35b61019761036b565b60405161018691906119ec565b6101b76101b23660046119ff565b6103fd565b6040516001600160a01b039091168152602001610186565b6101e26101dd366004611a34565b610424565b005b6008545b604051908152602001610186565b6101e2610204366004611a5e565b61053f565b6101e8610217366004611a34565b6105b7565b6101e261022a366004611a5e565b61064d565b6101e261023d3660046119ff565b610668565b6101e86102503660046119ff565b6106d7565b6101b76102633660046119ff565b61076a565b6101e8610276366004611a9a565b6107cf565b6101e2610855565b600a546001600160a01b03166101b7565b610197610869565b6101e26102aa366004611ab5565b610878565b6101e26102bd366004611a34565b610887565b6101e26102d0366004611b07565b6108f4565b6101976102e33660046119ff565b610972565b6101e8600e5481565b61017a6102ff366004611be3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6101e261033b366004611a9a565b6109c8565b60006001600160e01b031982166307f5828d60e41b1480610365575061036582610a3e565b92915050565b60606000805461037a90611c16565b80601f01602080910402602001604051908101604052809291908181526020018280546103a690611c16565b80156103f35780601f106103c8576101008083540402835291602001916103f3565b820191906000526020600020905b8154815290600101906020018083116103d657829003601f168201915b5050505050905090565b600061040882610a63565b506000908152600460205260409020546001600160a01b031690565b600061042f8261076a565b9050806001600160a01b0316836001600160a01b031614156104a25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806104be57506104be81336102ff565b6105305760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610499565b61053a8383610ac7565b505050565b61054a335b82610b35565b6105ac5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610499565b61053a838383610bb4565b60006105c2836107cf565b82106106245760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610499565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61053a838383604051806020016040528060008152506108f4565b61067133610544565b6106cb5760405162461bcd60e51b815260206004820152602560248201527f4275726e2063616c6c6572206973206e6f74206f776e6572206e6f72206170706044820152641c9bdd995960da1b6064820152608401610499565b6106d481610da1565b50565b60006106e260085490565b82106107455760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610499565b6008828154811061075857610758611c51565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806103655760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610499565b60006001600160a01b0382166108395760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610499565b506001600160a01b031660009081526003602052604090205490565b61085d610e44565b6108676000610e9e565b565b60606001805461037a90611c16565b610883338383610ef0565b5050565b600c546001600160a01b0316336001600160a01b0316146108ea5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920666f72206d6f6f617220636f6e74726163740000000000000000006044820152606401610499565b6108838282610fbf565b6108fe3383610b35565b6109605760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610499565b61096c84848484610fd9565b50505050565b6060600061097f83611057565b90506000600d805461099090611c16565b90501161099d57806109c1565b80600d6040516020016109b1929190611c67565b6040516020818303038152906040525b9392505050565b6109d0610e44565b6001600160a01b038116610a355760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610499565b6106d481610e9e565b60006001600160e01b0319821663780e9d6360e01b14806103655750610365826110a7565b6000818152600260205260409020546001600160a01b03166106d45760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610499565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610afc8261076a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610b418361076a565b9050806001600160a01b0316846001600160a01b03161480610b8857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610bac5750836001600160a01b0316610ba1846103fd565b6001600160a01b0316145b949350505050565b826001600160a01b0316610bc78261076a565b6001600160a01b031614610c2b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610499565b6001600160a01b038216610c8d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610499565b610c9a83838360016110f7565b826001600160a01b0316610cad8261076a565b6001600160a01b031614610d115760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610499565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000610dac8261076a565b9050610dbc8160008460016110f7565b610dc58261076a565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600a546001600160a01b031633146108675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610499565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415610f525760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610499565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61088382826040518060200160405280600081525061123f565b610fe4848484610bb4565b610ff0848484846112bd565b61096c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610499565b606061106282610a63565b600061106c611415565b9050600081511161108c57604051806020016040528060008152506109c1565b8061109684611424565b6040516020016109b1929190611d18565b60006001600160e01b031982166380ac58cd60e01b14806110d857506001600160e01b03198216635b5e139f60e01b145b8061036557506301ffc9a760e01b6001600160e01b0319831614610365565b611103848484846114ce565b600181111561117a5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f7274656400000000000000000000006064820152608401610499565b816001600160a01b0385166111d6576111d181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6111f9565b836001600160a01b0316856001600160a01b0316146111f9576111f98582611556565b6001600160a01b03841661121557611210816115f3565b611238565b846001600160a01b0316846001600160a01b0316146112385761123884826116a2565b5050505050565b61124983836116e6565b61125660008484846112bd565b61053a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610499565b60006001600160a01b0384163b1561140a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611301903390899088908890600401611d47565b602060405180830381600087803b15801561131b57600080fd5b505af192505050801561134b575060408051601f3d908101601f1916820190925261134891810190611d83565b60015b6113f0573d808015611379576040519150601f19603f3d011682016040523d82523d6000602084013e61137e565b606091505b5080516113e85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610499565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610bac565b506001949350505050565b6060600b805461037a90611c16565b606060006114318361187f565b600101905060008167ffffffffffffffff81111561145157611451611af1565b6040519080825280601f01601f19166020018201604052801561147b576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846114c1576114c6565b611485565b509392505050565b600181111561096c576001600160a01b03841615611514576001600160a01b0384166000908152600360205260408120805483929061150e908490611db6565b90915550505b6001600160a01b0383161561096c576001600160a01b0383166000908152600360205260408120805483929061154b908490611dcd565b909155505050505050565b60006001611563846107cf565b61156d9190611db6565b6000838152600760205260409020549091508082146115c0576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061160590600190611db6565b6000838152600960205260408120546008805493945090928490811061162d5761162d611c51565b90600052602060002001549050806008838154811061164e5761164e611c51565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061168657611686611de5565b6001900381819060005260206000200160009055905550505050565b60006116ad836107cf565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b03821661173c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610499565b6000818152600260205260409020546001600160a01b0316156117a15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610499565b6117af6000838360016110f7565b6000818152600260205260409020546001600160a01b0316156118145760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610499565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106118c8577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106118f4576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061191257662386f26fc10000830492506010015b6305f5e100831061192a576305f5e100830492506008015b612710831061193e57612710830492506004015b60648310611950576064830492506002015b600a83106103655760010192915050565b6001600160e01b0319811681146106d457600080fd5b60006020828403121561198957600080fd5b81356109c181611961565b60005b838110156119af578181015183820152602001611997565b8381111561096c5750506000910152565b600081518084526119d8816020860160208601611994565b601f01601f19169290920160200192915050565b6020815260006109c160208301846119c0565b600060208284031215611a1157600080fd5b5035919050565b80356001600160a01b0381168114611a2f57600080fd5b919050565b60008060408385031215611a4757600080fd5b611a5083611a18565b946020939093013593505050565b600080600060608486031215611a7357600080fd5b611a7c84611a18565b9250611a8a60208501611a18565b9150604084013590509250925092565b600060208284031215611aac57600080fd5b6109c182611a18565b60008060408385031215611ac857600080fd5b611ad183611a18565b915060208301358015158114611ae657600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611b1d57600080fd5b611b2685611a18565b9350611b3460208601611a18565b925060408501359150606085013567ffffffffffffffff80821115611b5857600080fd5b818701915087601f830112611b6c57600080fd5b813581811115611b7e57611b7e611af1565b604051601f8201601f19908116603f01168101908382118183101715611ba657611ba6611af1565b816040528281528a6020848701011115611bbf57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611bf657600080fd5b611bff83611a18565b9150611c0d60208401611a18565b90509250929050565b600181811c90821680611c2a57607f821691505b60208210811415611c4b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600083516020611c7a8285838901611994565b845491840191600090600181811c9080831680611c9857607f831692505b858310811415611cb657634e487b7160e01b85526022600452602485fd5b808015611cca5760018114611cdb57611d08565b60ff19851688528388019550611d08565b60008b81526020902060005b85811015611d005781548a820152908401908801611ce7565b505083880195505b50939a9950505050505050505050565b60008351611d2a818460208801611994565b835190830190611d3e818360208801611994565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152611d7960808301846119c0565b9695505050505050565b600060208284031215611d9557600080fd5b81516109c181611961565b634e487b7160e01b600052601160045260246000fd5b600082821015611dc857611dc8611da0565b500390565b60008219821115611de057611de0611da0565b500190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201f6bda4aa5039f7b4c89d0c5c8ce3b1af0d278385bf513f4d2a4abc29c442b5d64736f6c63430008090033a26469706673582212204532defe99b4da864fbcee5901c2703c2a6acf988f97527dce98fa0f45c71e0764736f6c63430008090033000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff740000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000002ba7def3000

Deployed Bytecode

0x60806040523480156200001157600080fd5b5060043610620001d15760003560e01c80639e4c87661162000101578063b8661a4e11620000a3578063d547741f116200007a578063d547741f1462000579578063d60229df1462000590578063e0cdd91814620005be578063f966f75a14620005d557600080fd5b8063b8661a4e1462000517578063cf9568f0146200053f578063d112bb0c146200056257600080fd5b8063b4e63f6911620000d8578063b4e63f6914620003f1578063b7c61f0614620004b7578063b7ce175214620004ef57600080fd5b80639e4c876614620003a2578063a217fddf14620003b9578063a22270e214620003c257600080fd5b806345ac12891162000177578063662ee93d116200014e578063662ee93d14620002e65780636ff8d8f2146200032b57806374ce9d83146200035157806391d14854146200036857600080fd5b806345ac128914620002955780634c1d42fe14620002b857806358ad150614620002cf57600080fd5b80632f2ff15d11620001ac5780632f2ff15d14620002505780633323dfde146200026757806336568abe146200027e57600080fd5b806301ffc9a714620001d65780631a6e0ede1462000202578063248a9ca3146200021b575b600080fd5b620001ed620001e736600462002ccb565b62000655565b60405190151581526020015b60405180910390f35b620002196200021336600462002dc7565b6200068d565b005b620002416200022c36600462002e4e565b60009081526020819052604090206001015490565b604051908152602001620001f9565b620002196200026136600462002e68565b62000bab565b620002196200027836600462002e9b565b62000bc9565b620002196200028f36600462002e68565b620010aa565b62000241620002a636600462002e4e565b60056020526000908152604090205481565b62000219620002c936600462002f58565b6200113a565b62000219620002e036600462002fe3565b62001485565b62000312620002f736600462002e4e565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001620001f9565b620001ed6200033c36600462002e4e565b60076020526000908152604090205460ff1681565b620002196200036236600462003064565b620017c6565b620001ed6200037936600462002e68565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b62000219620003b336600462002e68565b620019f0565b62000241600081565b62000312620003d3366004620030af565b6001600160a01b039081166000908152600860205260409020541690565b6200046262000402366004620030af565b600860205260009081526040902080546001820154600283015460038401546004909401546001600160a01b0390931693919263ffffffff808316936401000000008404821693600160401b8104831693600160601b9091049092169188565b604080516001600160a01b039099168952602089019790975263ffffffff95861696880196909652928416606087015290831660808601529190911660a084015260c083015260e082015261010001620001f9565b62000312620004c836600462002e4e565b6000908152600260208190526040909120015464010000000090046001600160a01b031690565b620002417f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe6381565b620002417f9c0216d63c69b849e4429e7dcadc07b867718eefd5e162f0472528af97c68c9281565b620002416200055036600462002e4e565b60066020526000908152604090205481565b6200021962000573366004620030f2565b62001bfa565b620002196200058a36600462002e68565b62001f3e565b62000241620005a136600462002e68565b600360209081526000928352604080842090915290825290205481565b62000219620005cf366004620031ef565b62001f57565b6200061f620005e636600462002e4e565b600260208190526000918252604090912080546001820154919092015463ffffffff81169064010000000090046001600160a01b031684565b604051620001f99493929190938452602084019290925263ffffffff1660408301526001600160a01b0316606082015260800190565b60006001600160e01b03198216637965db0b60e01b14806200068757506301ffc9a760e01b6001600160e01b03198316145b92915050565b620006976200232a565b60008363ffffffff16118015620006b55750600a8363ffffffff1611155b620007075760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420746f6b656e206e756d62657200000000000000000000000060448201526064015b60405180910390fd5b6000336040516bffffffffffffffffffffffff19606083901b166020820152603481018590529091506000906054016040516020818303038152906040528051906020012090506000620007b484620007ad846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9062002386565b6001600160a01b03811660009081527f7c8d924052a55b4fa06d3b6cc849c9db5fbd865491b9c5ac7bd948f86f587c21602052604090205490915060ff16620008405760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401620006fe565b6001600160a01b038716600090815260086020526040902060020154640100000000900463ffffffff1615801590620008a257506001600160a01b038716600090815260086020526040902060020154640100000000900463ffffffff164210155b620008f05760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420646972656374206d696e742074696d6500000000000000006044820152606401620006fe565b6001600160a01b03871660009081526008602052604090206002015463ffffffff600160601b820481169162000930918991600160401b900416620032fa565b63ffffffff161115620009765760405162461bcd60e51b815260206004820152600d60248201526c4f7574206f6620737570706c7960981b6044820152606401620006fe565b6001600160a01b038716600090815260086020526040812060030154620009a59063ffffffff89169062003325565b905062000a497f000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff740338a6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a0757600080fd5b505afa15801562000a1c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a42919062003347565b84620023ae565b60005b8763ffffffff168163ffffffff16101562000b1b576001600160a01b03891660008181526008602052604090206002015463ac0cc3b790879062000a9f908590600160401b900463ffffffff16620032fa565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015263ffffffff166024820152604401600060405180830381600087803b15801562000aec57600080fd5b505af115801562000b01573d6000803e3d6000fd5b50505050808062000b129062003367565b91505062000a4c565b506001600160a01b03881660009081526008602052604090206002015462000b52908890600160401b900463ffffffff16620032fa565b6001600160a01b0389166000908152600860205260409020600201805463ffffffff92909216600160401b026bffffffff0000000000000000199092169190911790555062000ba5925062002517915050565b50505050565b600062000bb8816200251d565b62000bc483836200252c565b505050565b7f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe6362000bf5816200251d565b600088815260046020908152604090912054901c63ffffffff811642101562000c615760405162461bcd60e51b815260206004820152601560248201527f566f7465206475726174696f6e206e6f7420656e6400000000000000000000006044820152606401620006fe565b60008981526002602081815260409283902083516080810185528154808252600183015482850152919093015463ffffffff81168486015264010000000090046001600160a01b0316606084015283519182018c9052919201604051602081830303815290604052805190602001201462000d1f5760405162461bcd60e51b815260206004820152601260248201527f496e76616c69642072657665616c206b657900000000000000000000000000006044820152606401620006fe565b60008a8152600260208181526040808420600181018e9055909201805463ffffffff191663ffffffff8b8116919091179091556060949094015160058252828420948b1690821b77ffffffffffffffffffffffffffffffffffffffff000000001617909355600690925290812088905590505b63ffffffff81168311156200109f57600084848363ffffffff1681811062000dbe5762000dbe6200338e565b62000dd69260206080909202019081019150620030af565b6001600160a01b03808216600090815260086020908152604091829020825161010081018452815490941684526001810154918401829052600281015463ffffffff80821694860194909452640100000000810484166060860152600160401b810484166080860152600160601b900490921660a0840152600382015460c084015260049091015460e0830152919250908b1462000eb75760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420736561736f6e0000000000000000000000000000000000006044820152606401620006fe565b85858463ffffffff1681811062000ed25762000ed26200338e565b9050608002016060013560001462000f365785858463ffffffff1681811062000eff5762000eff6200338e565b9050608002016060013560086000846001600160a01b03166001600160a01b03168152602001908152602001600020600401819055505b85858463ffffffff1681811062000f515762000f516200338e565b905060800201602001602081019062000f6b9190620033a4565b6001600160a01b038316600090815260086020526040902060020180546bffffffffffffffff000000001916600160401b63ffffffff9384160267ffffffff000000001916176401000000008b84160217905586908690851681811062000fd65762000fd66200338e565b905060800201604001602081019062000ff09190620033a4565b6001600160a01b0383811660008181526008602052604090819020600201805463ffffffff95909516600160601b0263ffffffff60601b19909516949094179093558351925163f2fde38b60e01b81529290911660048301529063f2fde38b90602401600060405180830381600087803b1580156200106e57600080fd5b505af115801562001083573d6000803e3d6000fd5b5050505050508080620010969062003367565b91505062000d92565b505050505050505050565b6001600160a01b03811633146200112a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401620006fe565b620011368282620025cc565b5050565b6001600160a01b03808416600090815260086020908152604091829020825161010081018452815490941684526001810154918401829052600281015463ffffffff80821694860194909452640100000000810484166060860152600160401b810484166080860152600160601b900490921660a0840152600382015460c084015260049091015460e0830152620012035760405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a59081b999d60aa1b6044820152606401620006fe565b60208181015160009081526002808352604091829020825160808101845281548152600182015494810194909452015463ffffffff811691830182905264010000000090046001600160a01b03166060830152158015906200126f5750806040015163ffffffff164210155b620012bd5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c696420757064617465206e667420696e666f2074696d65000000006044820152606401620006fe565b336001600160a01b0316856001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200130157600080fd5b505afa15801562001316573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200133c919062003347565b6001600160a01b031614620013945760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206e6674206f776e65722063616e20757064617465000000000000006044820152606401620006fe565b63ffffffff84161562001458578160a0015163ffffffff168463ffffffff1610158015620013d25750816040015163ffffffff168463ffffffff1611155b620014205760405162461bcd60e51b815260206004820152601660248201527f496e76616c69642063757272656e7420737570706c79000000000000000000006044820152606401620006fe565b6001600160a01b0385166000908152600860205260409020600201805463ffffffff60601b1916600160601b63ffffffff8716021790555b82156200147e576001600160a01b03851660009081526008602052604090206003018390555b5050505050565b6200148f6200232a565b60008581526004602090815260409182902054339290919082901c9082901c828015801590620014c557508063ffffffff164210155b8015620014d757508163ffffffff1642105b620015255760405162461bcd60e51b815260206004820152601460248201527f4f7574206f6620766f7465206475726174696f6e0000000000000000000000006044820152606401620006fe565b878614620015665760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620006fe565b6000805b63ffffffff81168a1115620016ba57600089898363ffffffff168181106200159657620015966200338e565b90506020020135905060008184620015af9190620033c2565b90507f000000000000000000000000000000000000000000000000000000003b9aca008210158015620015e25750838110155b620016305760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420766f74696e6720636f7374000000000000000000000000006044820152606401620006fe565b8093508d896001600160a01b03167fceb7b919c29cc8c2ae1a3eaf2b309df632a48f4689eff7542e3805f21fd37e428f8f8763ffffffff168181106200167a576200167a6200338e565b90506020020135856040516200169a929190918252602082015260400190565b60405180910390a350508080620016b19062003367565b9150506200156a565b50620016e97f000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff740878684620023ae565b60008b81526003602090815260408083206001600160a01b038a168452909152812080548392906200171d908490620033c2565b909155505060008b81526003602090815260408083206001600160a01b038a1684529091529020547f000000000000000000000000000000000000000000000000000002ba7def30001015620017b65760405162461bcd60e51b815260206004820152601660248201527f4f7574206f66206d617820766f74696e6720636f7374000000000000000000006044820152606401620006fe565b5050505050506200147e60018055565b7f8972b9d3322325818f1215107c5cad20b0d1bd8a19dd8c3113a4cda650cdfe63620017f2816200251d565b8263ffffffff16421080156200181357508163ffffffff168363ffffffff16105b620018615760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420736561736f6e206475726174696f6e0000000000000000006044820152606401620006fe565b60008581526002602052604090205415620018bf5760405162461bcd60e51b815260206004820152601560248201527f536561736f6e20616c72656164792065786973747300000000000000000000006044820152606401620006fe565b6000604051620018cf9062002caf565b604051809103906000f080158015620018ec573d6000803e3d6000fd5b5060408051608081018252878152600060208083018281528385018381526001600160a01b03878116606087018181528f8752600280875289882098518955945160018901559251969093018054925163ffffffff9788167fffffffffffffffff00000000000000000000000000000000000000000000000090941693909317640100000000939092169290920217905560048252848320938a169189901b67ffffffff000000001686861b7bffffffffffffffffffffffffffffffffffffffff00000000000000001617919091179092559151929350917f5cd555fef0aefbd53248445605b631524ee801640e615d99d9a2539c447ebfa09190a2505050505050565b620019fa6200232a565b600082815260026020818152604080842081516080808201845282548252600180840154838701529286015463ffffffff808216848701526001600160a01b036401000000009283900481166060808701919091528b82168b52600889529987902087516101008101895281549092168252958601549781019790975296840154808816958701959095528404861696850196909652600160401b8304851695840195909552600160601b90910490921660a0820152600382015460c08201526004919091015460e0820152831580159062001ad95750806020015184145b801562001aea575060008160e00151115b62001b385760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420726566756e640000000000000000000000000000000000006044820152606401620006fe565b6001600160a01b038381166000908152600860205260408082206004908101929092556060850151845160e08601519251636ce5768960e11b8152908516938101939093527f000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff7408416602484015260448301919091529091169063d9caed1290606401600060405180830381600087803b15801562001bd557600080fd5b505af115801562001bea573d6000803e3d6000fd5b5050505050506200113660018055565b6000898152600460209081526040808320548b84526009909252909120546001600160a01b03161562001c705760405162461bcd60e51b815260206004820152601260248201527f457869737420636f6c6c656374696f6e496400000000000000000000000000006044820152606401620006fe565b8063ffffffff16421062001cc75760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420736561736f6e2074696d65000000000000000000000000006044820152606401620006fe565b7f000000000000000000000000000000000000000000000000000000003b9aca00831015801562001d0057506001600160a01b03841615155b801562001d13575060008263ffffffff16115b62001d515760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620006fe565b506000878787878560405162001d679062002cbd565b62001d779594939291906200343a565b604051809103906000f08015801562001d94573d6000803e3d6000fd5b506001600160a01b03808216600090815260086020526040902054919250161562001dee5760405162461bcd60e51b8152602060048201526009602482015268115e1a5cdd0813919560ba1b6044820152606401620006fe565b60408051610100810182526001600160a01b03808716825260208083018e815263ffffffff8088168587019081526000606087018181526080880182815260a0890183815260c08a018e815260e08b018581528d8b1680875260088b528d87209c518d549c1673ffffffffffffffffffffffffffffffffffffffff199c8d16178d55985160018d0155955160028c0180549551945193518916600160601b0263ffffffff60601b19948a16600160401b02949094166fffffffffffffffff000000000000000019958a166401000000000267ffffffffffffffff19909716929099169190911794909417929092169590951794909417905591516003870155516004909501949094558d845260099091528383208054909216811790915591517f5cd555fef0aefbd53248445605b631524ee801640e615d99d9a2539c447ebfa09190a250505050505050505050565b600062001f4b816200251d565b62000bc48383620025cc565b62001f616200232a565b60008b815260056020526040902054339080801580159062001f8957508063ffffffff164210155b62001fd75760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642072656465656d2074696d65000000000000000000000000006044820152606401620006fe565b898814620020185760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620006fe565b506200202f8d838e8e8e8e8e8e8e8e8e8e6200264c565b8a15620021915760008c81526007602052604090205460ff161515600114156200208b5760405162461bcd60e51b815260206004820152600c60248201526b119959481c99599d5b99195960a21b6044820152606401620006fe565b604051636ce5768960e11b81526001600160a01b0383811660048301527f000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff74081166024830152604482018d9052602083901c919082169063d9caed1290606401600060405180830381600087803b1580156200210557600080fd5b505af11580156200211a573d6000803e3d6000fd5b505050506001600760008f815260200190815260200160002060006101000a81548160ff0219169083151502179055508d836001600160a01b03167f27a912cc8a120540e01544afe5b0a236a7629e48e11e992cd807c32a441bf8d68e6040516200218791815260200190565b60405180910390a3505b6000805b63ffffffff81168b11156200230f5760008c8c8363ffffffff16818110620021c157620021c16200338e565b9050602002016020810190620021d89190620030af565b905060008b8b8463ffffffff16818110620021f757620021f76200338e565b90506020020160208101906200220e9190620033a4565b905060005b8163ffffffff168163ffffffff161015620022f657826001600160a01b031663ac0cc3b7888d8d8963ffffffff168181106200225357620022536200338e565b90506020020160208101906200226a9190620033a4565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015263ffffffff166024820152604401600060405180830381600087803b158015620022b757600080fd5b505af1158015620022cc573d6000803e3d6000fd5b505050508480620022dd9062003367565b9550508080620022ed9062003367565b91505062002213565b5050508080620023069062003367565b91505062002195565b505050506200231d60018055565b5050505050505050505050565b600260015414156200237f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401620006fe565b6002600155565b600080600062002397858562002746565b91509150620023a68162002790565b509392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b1790529151600092839290881691620024299190620034a8565b6000604051808303816000865af19150503d806000811462002468576040519150601f19603f3d011682016040523d82523d6000602084013e6200246d565b606091505b50915091508180156200249b5750805115806200249b5750808060200190518101906200249b9190620034c6565b6200250f5760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401620006fe565b505050505050565b60018055565b620025298133620028f1565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662001136576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620025883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562001136576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b620026e5828280806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600660008f8152602001908152602001600020548c8e8d8d8d8d8d8d8d604051602001620026c9999897969594939291906200352a565b604051602081830303815290604052805190602001206200296d565b1515600114620027385760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206d65726b6c652076657269667900000000000000000000006044820152606401620006fe565b505050505050505050505050565b600080825160411415620027815760208301516040840151606085015160001a620027748782858562002985565b9450945050505062002789565b506000905060025b9250929050565b6000816004811115620027a757620027a7620035b4565b1415620027b15750565b6001816004811115620027c857620027c8620035b4565b1415620028185760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401620006fe565b60028160048111156200282f576200282f620035b4565b14156200287f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401620006fe565b6003816004811115620028965762002896620035b4565b1415620025295760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401620006fe565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200113657620029258162002a4e565b6200293283602062002a61565b60405160200162002945929190620035ca565b60408051601f198184030181529082905262461bcd60e51b8252620006fe916004016200364f565b6000826200297c858462002c2f565b14949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115620029be575060009050600362002a45565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801562002a13573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662002a3e5760006001925092505062002a45565b9150600090505b94509492505050565b6060620006876001600160a01b03831660145b6060600062002a7283600262003325565b62002a7f906002620033c2565b67ffffffffffffffff81111562002a9a5762002a9a62002d34565b6040519080825280601f01601f19166020018201604052801562002ac5576020820181803683370190505b509050600360fc1b8160008151811062002ae35762002ae36200338e565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062002b155762002b156200338e565b60200101906001600160f81b031916908160001a905350600062002b3b84600262003325565b62002b48906001620033c2565b90505b600181111562002bd7577f303132333435363738396162636465660000000000000000000000000000000085600f166010811062002b8d5762002b8d6200338e565b1a60f81b82828151811062002ba65762002ba66200338e565b60200101906001600160f81b031916908160001a90535060049490941c9362002bcf8162003664565b905062002b4b565b50831562002c285760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620006fe565b9392505050565b600081815b8451811015620023a65762002c668286838151811062002c585762002c586200338e565b602002602001015162002c7d565b91508062002c74816200367e565b91505062002c34565b600081831062002c9b57600082815260208490526040902062002c28565b600083815260208390526040902062002c28565b6104d2806200369d83390190565b6121d68062003b6f83390190565b60006020828403121562002cde57600080fd5b81356001600160e01b03198116811462002c2857600080fd5b6001600160a01b03811681146200252957600080fd5b803562002d1a8162002cf7565b919050565b803563ffffffff8116811462002d1a57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111562002d685762002d6862002d34565b604051601f8501601f19908116603f0116810190828211818310171562002d935762002d9362002d34565b8160405280935085815286868601111562002dad57600080fd5b858560208301376000602087830101525050509392505050565b6000806000806080858703121562002dde57600080fd5b843562002deb8162002cf7565b935062002dfb6020860162002d1f565b925060408501359150606085013567ffffffffffffffff81111562002e1f57600080fd5b8501601f8101871362002e3157600080fd5b62002e428782356020840162002d4a565b91505092959194509250565b60006020828403121562002e6157600080fd5b5035919050565b6000806040838503121562002e7c57600080fd5b82359150602083013562002e908162002cf7565b809150509250929050565b600080600080600080600060c0888a03121562002eb757600080fd5b87359650602088013595506040880135945062002ed76060890162002d1f565b935062002ee76080890162002d1f565b925060a088013567ffffffffffffffff8082111562002f0557600080fd5b818a0191508a601f83011262002f1a57600080fd5b81358181111562002f2a57600080fd5b8b60208260071b850101111562002f4057600080fd5b60208301945080935050505092959891949750929550565b60008060006060848603121562002f6e57600080fd5b833562002f7b8162002cf7565b925062002f8b6020850162002d1f565b9150604084013590509250925092565b60008083601f84011262002fae57600080fd5b50813567ffffffffffffffff81111562002fc757600080fd5b6020830191508360208260051b85010111156200278957600080fd5b60008060008060006060868803121562002ffc57600080fd5b85359450602086013567ffffffffffffffff808211156200301c57600080fd5b6200302a89838a0162002f9b565b909650945060408801359150808211156200304457600080fd5b50620030538882890162002f9b565b969995985093965092949392505050565b600080600080608085870312156200307b57600080fd5b8435935060208501359250620030946040860162002d1f565b9150620030a46060860162002d1f565b905092959194509250565b600060208284031215620030c257600080fd5b813562002c288162002cf7565b600082601f830112620030e157600080fd5b62002c288383356020850162002d4a565b60008060008060008060008060006101208a8c0312156200311257600080fd5b8935985060208a0135975060408a013567ffffffffffffffff808211156200313957600080fd5b620031478d838e01620030cf565b985060608c01359150808211156200315e57600080fd5b6200316c8d838e01620030cf565b975060808c01359150808211156200318357600080fd5b620031918d838e01620030cf565b965060a08c0135915080821115620031a857600080fd5b50620031b78c828d01620030cf565b945050620031c860c08b0162002d0d565b925060e08a01359150620031e06101008b0162002d1f565b90509295985092959850929598565b600080600080600080600080600080600060e08c8e0312156200321157600080fd5b8b359a5060208c0135995060408c0135985067ffffffffffffffff8060608e013511156200323e57600080fd5b620032508e60608f01358f0162002f9b565b909950975060808d01358110156200326757600080fd5b620032798e60808f01358f0162002f9b565b909750955060a08d01358110156200329057600080fd5b620032a28e60a08f01358f0162002f9b565b909550935060c08d0135811015620032b957600080fd5b50620032cc8d60c08e01358e0162002f9b565b81935080925050509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168185168083038211156200331c576200331c620032e4565b01949350505050565b6000816000190483118215151615620033425762003342620032e4565b500290565b6000602082840312156200335a57600080fd5b815162002c288162002cf7565b600063ffffffff80831681811415620033845762003384620032e4565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620033b757600080fd5b62002c288262002d1f565b60008219821115620033d857620033d8620032e4565b500190565b60005b83811015620033fa578181015183820152602001620033e0565b8381111562000ba55750506000910152565b6000815180845262003426816020860160208601620033dd565b601f01601f19169290920160200192915050565b60a0815260006200344f60a08301886200340c565b82810360208401526200346381886200340c565b905082810360408401526200347981876200340c565b905082810360608401526200348f81866200340c565b91505063ffffffff831660808301529695505050505050565b60008251620034bc818460208701620033dd565b9190910192915050565b600060208284031215620034d957600080fd5b8151801515811462002c2857600080fd5b60008160005b84811015620035205763ffffffff620035098362002d1f565b1686526020958601959190910190600101620034f0565b5093949350505050565b898152600060206bffffffffffffffffffffffff198b60601b1681840152896034840152605483018960005b8a811015620035885781356200356c8162002cf7565b6001600160a01b03168352918301919083019060010162003556565b5050620035a36200359b82898b620034ea565b8688620034ea565b9d9c50505050505050505050505050565b634e487b7160e01b600052602160045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162003604816017850160208801620033dd565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835162003643816028840160208801620033dd565b01602801949350505050565b60208152600062002c2860208301846200340c565b600081620036765762003676620032e4565b506000190190565b6000600019821415620036955762003695620032e4565b506001019056fe608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104548061007e6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063715018a6146100515780638da5cb5b1461005b578063d9caed121461007a578063f2fde38b1461008d575b600080fd5b6100596100a0565b005b600054604080516001600160a01b039092168252519081900360200190f35b610059610088366004610363565b6100b4565b61005961009b36600461039f565b6100cc565b6100a861014a565b6100b260006101a4565b565b6100bc61014a565b6100c7828483610201565b505050565b6100d461014a565b6001600160a01b03811661013e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610147816101a4565b50565b6000546001600160a01b031633146100b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610135565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052915160009283929087169161027291906103c1565b6000604051808303816000865af19150503d80600081146102af576040519150601f19603f3d011682016040523d82523d6000602084013e6102b4565b606091505b50915091508180156102de5750805115806102de5750808060200190518101906102de91906103fc565b6103405760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201526c185b9cd9995c8819985a5b1959609a1b6064820152608401610135565b5050505050565b80356001600160a01b038116811461035e57600080fd5b919050565b60008060006060848603121561037857600080fd5b61038184610347565b925061038f60208501610347565b9150604084013590509250925092565b6000602082840312156103b157600080fd5b6103ba82610347565b9392505050565b6000825160005b818110156103e257602081860181015185830152016103c8565b818111156103f1576000828501525b509190910192915050565b60006020828403121561040e57600080fd5b815180151581146103ba57600080fdfea2646970667358221220321847a7af92fe37c8c8c8bf698bf1a6ff8c7c56031ddc540cb75d383c6ed75264736f6c6343000809003360806040523480156200001157600080fd5b50604051620021d6380380620021d6833981016040819052620000349162000295565b8451859085906200004d90600090602085019062000122565b5080516200006390600190602084019062000122565b505050620000806200007a620000cc60201b60201c565b620000d0565b82516200009590600b90602086019062000122565b50600c80546001600160a01b031916331790558151620000bd90600d90602085019062000122565b50600e55506200039592505050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001309062000358565b90600052602060002090601f0160209004810192826200015457600085556200019f565b82601f106200016f57805160ff19168380011785556200019f565b828001600101855582156200019f579182015b828111156200019f57825182559160200191906001019062000182565b50620001ad929150620001b1565b5090565b5b80821115620001ad5760008155600101620001b2565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b838211156200028b5760008385830101525b9695505050505050565b600080600080600060a08688031215620002ae57600080fd5b85516001600160401b0380821115620002c657600080fd5b620002d489838a01620001de565b96506020880151915080821115620002eb57600080fd5b620002f989838a01620001de565b955060408801519150808211156200031057600080fd5b6200031e89838a01620001de565b945060608801519150808211156200033557600080fd5b506200034488828901620001de565b925050608086015190509295509295909350565b600181811c908216806200036d57607f821691505b602082108114156200038f57634e487b7160e01b600052602260045260246000fd5b50919050565b611e3180620003a56000396000f3fe608060405234801561001057600080fd5b50600436106101625760003560e01c806370a08231116100c8578063ac0cc3b71161008c578063d5abeb0111610066578063d5abeb01146102e8578063e985e9c5146102f1578063f2fde38b1461032d57600080fd5b8063ac0cc3b7146102af578063b88d4fde146102c2578063c87b56dd146102d557600080fd5b806370a0823114610268578063715018a61461027b5780638da5cb5b1461028357806395d89b4114610294578063a22cb4651461029c57600080fd5b806323b872dd1161012a57806342966c681161010457806342966c681461022f5780634f6ccce7146102425780636352211e1461025557600080fd5b806323b872dd146101f65780632f745c591461020957806342842e0e1461021c57600080fd5b806301ffc9a71461016757806306fdde031461018f578063081812fc146101a4578063095ea7b3146101cf57806318160ddd146101e4575b600080fd5b61017a610175366004611977565b610340565b60405190151581526020015b60405180910390f35b61019761036b565b60405161018691906119ec565b6101b76101b23660046119ff565b6103fd565b6040516001600160a01b039091168152602001610186565b6101e26101dd366004611a34565b610424565b005b6008545b604051908152602001610186565b6101e2610204366004611a5e565b61053f565b6101e8610217366004611a34565b6105b7565b6101e261022a366004611a5e565b61064d565b6101e261023d3660046119ff565b610668565b6101e86102503660046119ff565b6106d7565b6101b76102633660046119ff565b61076a565b6101e8610276366004611a9a565b6107cf565b6101e2610855565b600a546001600160a01b03166101b7565b610197610869565b6101e26102aa366004611ab5565b610878565b6101e26102bd366004611a34565b610887565b6101e26102d0366004611b07565b6108f4565b6101976102e33660046119ff565b610972565b6101e8600e5481565b61017a6102ff366004611be3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6101e261033b366004611a9a565b6109c8565b60006001600160e01b031982166307f5828d60e41b1480610365575061036582610a3e565b92915050565b60606000805461037a90611c16565b80601f01602080910402602001604051908101604052809291908181526020018280546103a690611c16565b80156103f35780601f106103c8576101008083540402835291602001916103f3565b820191906000526020600020905b8154815290600101906020018083116103d657829003601f168201915b5050505050905090565b600061040882610a63565b506000908152600460205260409020546001600160a01b031690565b600061042f8261076a565b9050806001600160a01b0316836001600160a01b031614156104a25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806104be57506104be81336102ff565b6105305760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610499565b61053a8383610ac7565b505050565b61054a335b82610b35565b6105ac5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610499565b61053a838383610bb4565b60006105c2836107cf565b82106106245760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610499565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61053a838383604051806020016040528060008152506108f4565b61067133610544565b6106cb5760405162461bcd60e51b815260206004820152602560248201527f4275726e2063616c6c6572206973206e6f74206f776e6572206e6f72206170706044820152641c9bdd995960da1b6064820152608401610499565b6106d481610da1565b50565b60006106e260085490565b82106107455760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610499565b6008828154811061075857610758611c51565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806103655760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610499565b60006001600160a01b0382166108395760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610499565b506001600160a01b031660009081526003602052604090205490565b61085d610e44565b6108676000610e9e565b565b60606001805461037a90611c16565b610883338383610ef0565b5050565b600c546001600160a01b0316336001600160a01b0316146108ea5760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920666f72206d6f6f617220636f6e74726163740000000000000000006044820152606401610499565b6108838282610fbf565b6108fe3383610b35565b6109605760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610499565b61096c84848484610fd9565b50505050565b6060600061097f83611057565b90506000600d805461099090611c16565b90501161099d57806109c1565b80600d6040516020016109b1929190611c67565b6040516020818303038152906040525b9392505050565b6109d0610e44565b6001600160a01b038116610a355760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610499565b6106d481610e9e565b60006001600160e01b0319821663780e9d6360e01b14806103655750610365826110a7565b6000818152600260205260409020546001600160a01b03166106d45760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610499565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610afc8261076a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610b418361076a565b9050806001600160a01b0316846001600160a01b03161480610b8857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610bac5750836001600160a01b0316610ba1846103fd565b6001600160a01b0316145b949350505050565b826001600160a01b0316610bc78261076a565b6001600160a01b031614610c2b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610499565b6001600160a01b038216610c8d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610499565b610c9a83838360016110f7565b826001600160a01b0316610cad8261076a565b6001600160a01b031614610d115760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610499565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000610dac8261076a565b9050610dbc8160008460016110f7565b610dc58261076a565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600a546001600160a01b031633146108675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610499565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415610f525760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610499565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61088382826040518060200160405280600081525061123f565b610fe4848484610bb4565b610ff0848484846112bd565b61096c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610499565b606061106282610a63565b600061106c611415565b9050600081511161108c57604051806020016040528060008152506109c1565b8061109684611424565b6040516020016109b1929190611d18565b60006001600160e01b031982166380ac58cd60e01b14806110d857506001600160e01b03198216635b5e139f60e01b145b8061036557506301ffc9a760e01b6001600160e01b0319831614610365565b611103848484846114ce565b600181111561117a5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f7274656400000000000000000000006064820152608401610499565b816001600160a01b0385166111d6576111d181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6111f9565b836001600160a01b0316856001600160a01b0316146111f9576111f98582611556565b6001600160a01b03841661121557611210816115f3565b611238565b846001600160a01b0316846001600160a01b0316146112385761123884826116a2565b5050505050565b61124983836116e6565b61125660008484846112bd565b61053a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610499565b60006001600160a01b0384163b1561140a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611301903390899088908890600401611d47565b602060405180830381600087803b15801561131b57600080fd5b505af192505050801561134b575060408051601f3d908101601f1916820190925261134891810190611d83565b60015b6113f0573d808015611379576040519150601f19603f3d011682016040523d82523d6000602084013e61137e565b606091505b5080516113e85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610499565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610bac565b506001949350505050565b6060600b805461037a90611c16565b606060006114318361187f565b600101905060008167ffffffffffffffff81111561145157611451611af1565b6040519080825280601f01601f19166020018201604052801561147b576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846114c1576114c6565b611485565b509392505050565b600181111561096c576001600160a01b03841615611514576001600160a01b0384166000908152600360205260408120805483929061150e908490611db6565b90915550505b6001600160a01b0383161561096c576001600160a01b0383166000908152600360205260408120805483929061154b908490611dcd565b909155505050505050565b60006001611563846107cf565b61156d9190611db6565b6000838152600760205260409020549091508082146115c0576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061160590600190611db6565b6000838152600960205260408120546008805493945090928490811061162d5761162d611c51565b90600052602060002001549050806008838154811061164e5761164e611c51565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061168657611686611de5565b6001900381819060005260206000200160009055905550505050565b60006116ad836107cf565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b03821661173c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610499565b6000818152600260205260409020546001600160a01b0316156117a15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610499565b6117af6000838360016110f7565b6000818152600260205260409020546001600160a01b0316156118145760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610499565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106118c8577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106118f4576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061191257662386f26fc10000830492506010015b6305f5e100831061192a576305f5e100830492506008015b612710831061193e57612710830492506004015b60648310611950576064830492506002015b600a83106103655760010192915050565b6001600160e01b0319811681146106d457600080fd5b60006020828403121561198957600080fd5b81356109c181611961565b60005b838110156119af578181015183820152602001611997565b8381111561096c5750506000910152565b600081518084526119d8816020860160208601611994565b601f01601f19169290920160200192915050565b6020815260006109c160208301846119c0565b600060208284031215611a1157600080fd5b5035919050565b80356001600160a01b0381168114611a2f57600080fd5b919050565b60008060408385031215611a4757600080fd5b611a5083611a18565b946020939093013593505050565b600080600060608486031215611a7357600080fd5b611a7c84611a18565b9250611a8a60208501611a18565b9150604084013590509250925092565b600060208284031215611aac57600080fd5b6109c182611a18565b60008060408385031215611ac857600080fd5b611ad183611a18565b915060208301358015158114611ae657600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611b1d57600080fd5b611b2685611a18565b9350611b3460208601611a18565b925060408501359150606085013567ffffffffffffffff80821115611b5857600080fd5b818701915087601f830112611b6c57600080fd5b813581811115611b7e57611b7e611af1565b604051601f8201601f19908116603f01168101908382118183101715611ba657611ba6611af1565b816040528281528a6020848701011115611bbf57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611bf657600080fd5b611bff83611a18565b9150611c0d60208401611a18565b90509250929050565b600181811c90821680611c2a57607f821691505b60208210811415611c4b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600083516020611c7a8285838901611994565b845491840191600090600181811c9080831680611c9857607f831692505b858310811415611cb657634e487b7160e01b85526022600452602485fd5b808015611cca5760018114611cdb57611d08565b60ff19851688528388019550611d08565b60008b81526020902060005b85811015611d005781548a820152908401908801611ce7565b505083880195505b50939a9950505050505050505050565b60008351611d2a818460208801611994565b835190830190611d3e818360208801611994565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152611d7960808301846119c0565b9695505050505050565b600060208284031215611d9557600080fd5b81516109c181611961565b634e487b7160e01b600052601160045260246000fd5b600082821015611dc857611dc8611da0565b500390565b60008219821115611de057611de0611da0565b500190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201f6bda4aa5039f7b4c89d0c5c8ce3b1af0d278385bf513f4d2a4abc29c442b5d64736f6c63430008090033a26469706673582212204532defe99b4da864fbcee5901c2703c2a6acf988f97527dce98fa0f45c71e0764736f6c63430008090033

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

000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff740000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000002ba7def3000

-----Decoded View---------------
Arg [0] : voteToken (address): 0xe3c408BD53c31C085a1746AF401A4042954ff740
Arg [1] : votingBaseUnit (uint256): 1000000000
Arg [2] : votingMaxCostPerAddress (uint256): 3000000000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e3c408bd53c31c085a1746af401a4042954ff740
Arg [1] : 000000000000000000000000000000000000000000000000000000003b9aca00
Arg [2] : 000000000000000000000000000000000000000000000000000002ba7def3000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

MOOAR Launchpad Interactive Contract

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.