ETH Price: $2,398.73 (-3.53%)

Contract

0xA0BFc415631Abee41d5d067BD41dF5d726268197
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...206984842024-09-07 11:40:3525 days ago1725709235IN
Maestro - Genesis: MGEN Token
0 ETH0.000048632.00016306
Set Approval For...202141502024-07-01 20:46:4793 days ago1719866807IN
Maestro - Genesis: MGEN Token
0 ETH0.000401918.69422463
Transfer From199783042024-05-29 21:50:47126 days ago1717019447IN
Maestro - Genesis: MGEN Token
0 ETH0.000850729.58427311
Set Approval For...197208652024-04-23 21:46:11162 days ago1713908771IN
Maestro - Genesis: MGEN Token
0 ETH0.0005649312.19847424
Set Approval For...197122562024-04-22 16:53:47163 days ago1713804827IN
Maestro - Genesis: MGEN Token
0 ETH0.0006941214.9881052
Set Approval For...195889402024-04-05 10:27:23180 days ago1712312843IN
Maestro - Genesis: MGEN Token
0 ETH0.0006811914.73551166
Set Approval For...195546702024-03-31 15:09:11185 days ago1711897751IN
Maestro - Genesis: MGEN Token
0 ETH0.001114324.10446109
Set Approval For...192424652024-02-16 19:14:47229 days ago1708110887IN
Maestro - Genesis: MGEN Token
0 ETH0.0012711427.44750426
Set Approval For...192124762024-02-12 14:15:47233 days ago1707747347IN
Maestro - Genesis: MGEN Token
0 ETH0.0024057252.04043754
Set Approval For...192023622024-02-11 4:10:23235 days ago1707624623IN
Maestro - Genesis: MGEN Token
0 ETH0.0009706620.99726393
Set Approval For...191783962024-02-07 19:27:47238 days ago1707334067IN
Maestro - Genesis: MGEN Token
0 ETH0.0036999180.03623848
Safe Transfer Fr...191066522024-01-28 17:54:23248 days ago1706464463IN
Maestro - Genesis: MGEN Token
0 ETH0.0012167913.27181099
Set Approval For...190387722024-01-19 5:18:59257 days ago1705641539IN
Maestro - Genesis: MGEN Token
0 ETH0.0005505622.5640709
Set Approval For...190383632024-01-19 3:56:47258 days ago1705636607IN
Maestro - Genesis: MGEN Token
0 ETH0.0012043526.05242961
Set Approval For...189615862024-01-08 10:03:23268 days ago1704708203IN
Maestro - Genesis: MGEN Token
0 ETH0.0007467816.15436406
Set Approval For...189380072024-01-05 2:07:35272 days ago1704420455IN
Maestro - Genesis: MGEN Token
0 ETH0.0014350731.04345368
Set Approval For...189376472024-01-05 0:53:23272 days ago1704416003IN
Maestro - Genesis: MGEN Token
0 ETH0.0003648715.00572854
Set Approval For...189295402024-01-03 21:36:23273 days ago1704317783IN
Maestro - Genesis: MGEN Token
0 ETH0.0010010721.61592459
Safe Transfer Fr...189099322024-01-01 3:30:23276 days ago1704079823IN
Maestro - Genesis: MGEN Token
0 ETH0.0009074210.20647779
Set Approval For...189098792024-01-01 3:19:47276 days ago1704079187IN
Maestro - Genesis: MGEN Token
0 ETH0.000446029.64841519
Safe Transfer Fr...189086172023-12-31 23:04:35276 days ago1704063875IN
Maestro - Genesis: MGEN Token
0 ETH0.0016297416.43074569
Safe Transfer Fr...189083302023-12-31 22:06:59276 days ago1704060419IN
Maestro - Genesis: MGEN Token
0 ETH0.0011276912.29671724
Set Approval For...189050502023-12-31 11:05:11276 days ago1704020711IN
Maestro - Genesis: MGEN Token
0 ETH0.0006613714.30689141
Set Approval For...189033642023-12-31 5:24:47276 days ago1704000287IN
Maestro - Genesis: MGEN Token
0 ETH0.0002808111.54837634
Set Approval For...188963732023-12-30 5:50:59277 days ago1703915459IN
Maestro - Genesis: MGEN Token
0 ETH0.0006296213.62005339
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MaestrosGenesis

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 21 : MaestrosGenesis.sol
pragma solidity ^0.8.15;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "./Interfaces/ITickets.sol";
import "./Interfaces/ITicketStaking.sol";

//////////*////@&////////////(((&   ((@( ((//////////*//////////*///////////////
//////****/////@/////////////(**/**#*  ,*%///////////*/////////**///////////////
//////////////@@////**///////#/(       ./*/////(////////////////////////////////
//////////////@//////*///////#/*.*/*,&@%((*////(/(/(//*/////////////////////////
////////////(&&//////////////#*(*@%*,   *&/(//*///(*//////////*/*///////////////
////////////*@////////*/*/////(*/  (/*  /#*//////////////////(/(**//////////////
///////////(&@(//////////*//////(/#/#./ (#*//////////////////((*////////*///////
////////////@#///////////////////(#.  *( *#//////////////////(*/////////////////
////////#/%****/*//////////////(/%/#(*@@@@/*#*/////////////////////*/*//////////
///////*//*((/*/*////////////((/@@@%@@@((**@#@(((///////////////////////////////
///////*@@%@@* ,(//////(((#@@@@*@/,*/#&(*@@/&@@@@*(#/*/////////////*//(/////////
///////*&@@*(, *(/*((@@@@@@@@&/* /    */@@/#@@@@@/(*(///////////////////////////
///*////(*/* *#//(@@@@((@@#@@(. *    *@@@/(@@@@/((*@((//////////*/(/////////////
///////(/ /#@#@(@@@#@@/@@%@@/*      *#@@((@@@@/(%@@@@/(//////////(//////////////
///////(@@%%@@@@@@(@@@@%/@@#*  ,    /@@((@@@@&#(@@@@@#(*/////////*(/#///////*///
//***///(@@@@@@%/@@@@@@/(@@/*    * (@@/(@@@@@((@@@@@@@/(////////////////////*/*/
////*///(@@@@@@@@@@@@@//(@@(, *   *@@&(%@@@@((((@@@@@@@(#////////////////////*//
///*////(@@@@@@@@@@#***(%@@@( ,.*/(@@(/@@@@(/@%(/@@@@@@((////(/((  *(*//////////
//////////@@@@@@(*/**/**@@@@@@#((@@@@(@@@@%/@@((#(@@@@@@/(#@@%(/*./*(*//////////
///////*/*(/((*/*//////*#@@@@@@##@@@@/@@@@@(/@#((((@@@@@@@@@@@@#/  ,@@#((%*/#(//
//////////////((/////////@@@@@#@@@@@%/@@@@@@(#(((//(*/@@@@@@@&#(&*****//*///////
////////////*((/*///////*@@@@@%@@@@@@/@@@@@@((((@#////(########@(@##////////////
//////////////(/*///////*%@@@@@&@%(@@(@@@@@@(#@/@#(/////////////////////////////
//////////////*(///////(/%@@@@@@@@@@@#/@@@@&(*#/&@&#//////*/////////////*///**//
/////////*////*/////*/*(#@@@@@@@@&@@@@/@@@@(@@/(*%/@#(//////**////*/*//(/*//***/
////////////////**///////@@@@@@@@#&@@@(@@@@(@@*&@@@@((/*/*//////////////****////
///////*////*///*//////*/@@@@@@@@#(@@@@/@@@((@((@@@@@(//(((////////////(**//////
/////////////////////////@@@@@@@@@%/@@@%/@@@((&(@@@@@((/**((/////////***////////
////////*///////////////(@@@@@@@@@((/@@@@/%#&/((@@@@@##/////(///////*///////////
/////////////////////////%@@@@@@@@%/**@@@@@@@@/(@@@@@&(///(/////////////////////
/////////////////////////(@@@@@@@@@((//@@@@@@@@/(@@@@@(/////////////////////////
///////////////////////////@@@@@@@@(////#@@@@@@@(#@@@@(#////////////////////////

/**
 * https://opus-labs.io/
 * @title   Maestro - Genesis
 * @notice  The Concert begins!
 * @author  BowTiedPickle
 */
contract MaestrosGenesis is ERC721, ERC721Enumerable, ERC2981, Ownable {
    using SafeERC20 for IERC20;
    using Strings for uint256;

    // ----- Events -----

    event NewRoot(bytes32 oldRoot, bytes32 newRoot);
    event NewPrice(uint256 oldPrice, uint256 newPrice);
    event NewMaxPerWallet(uint256 oldMax, uint256 newMax);
    event NewURI(string oldURI, string newURI);
    event NewRoyalty(uint96 newRoyalty);
    event NewOffset(uint256 offset);
    event NewHash(bytes32 oldHash, bytes32 newHash);
    event PhaseStatus(uint256 indexed phase, bool oldStatus, bool newStatus);
    event BoostStatus(bool oldStatus, bool newStatus);
    event Withdrawal(uint256 amount);
    event URIFrozen(string finalURI);
    event Composing(uint256 indexed token, bool status);
    event Notified(address indexed user, bool status, uint8 tier);

    // ----- Minting State Variables -----

    uint8 public constant TICKET_DIAMOND = 1;
    uint8 public constant TICKET_GOLD = 2;
    uint8 public constant TICKET_SILVER = 3;
    uint8 public constant TICKET_BRONZE = 4;

    uint8 internal constant TYPE_PUBLIC = 0;
    uint8 internal constant TYPE_TREASURY = 1;

    uint256 public maxPerWallet = 1;

    uint256 public constant maxSupply = 1555;
    uint256 public constant reservedSupply_Tickets = 1152;
    uint256 public constant reservedSupply_Founders = 5;
    uint256 public constant reservedSupply_Treasury = 250;
    uint256 public constant reservedSupply_Public = 148;
    uint256 public available_Public = reservedSupply_Public;
    uint256 public available_Treasury = reservedSupply_Treasury - 1;
    uint256 public available_Tickets = reservedSupply_Tickets;

    uint256 internal nextTicket = 1; // 1-5 for founders, 6 for super legendary, 7-1306 for ticket holders and OGs
    uint256 internal nextTreasury = 1307; // 1307-1555 for treasury NFTs

    bytes32 public whitelistMerkleRoot;

    bool public claimActive;
    bool public mintActive;
    bool public publicActive;

    /// @notice Whether a ticket token ID has claimed its maestros
    mapping(uint256 => bool) public claimed;

    /// @notice How many NFTs an address has minted
    mapping(address => uint256) public minted;

    /// @notice Mint price in USDC
    uint256 public mintPrice;

    // ----- Permanent State Variables -----

    string public unrevealedURI;
    string public baseURI;
    uint256 public offset;
    bool public frozen;
    bytes32 public provenanceHash;

    uint256 internal constant offsetMinId = 7; // Lowest ID to apply offset for
    uint256 internal constant offsetMaxId = 1306; // Highest ID to apply offset for

    IERC20 public immutable USDC;
    ITickets public immutable maestroTickets;
    ITicketStaking public immutable ticketStaking;

    // ----- Composition -----

    mapping(uint256 => uint256) public tokenToComposeTime;
    mapping(uint256 => uint256) public tokenToBoost;
    mapping(address => uint256) public stakedBalance;

    uint256 composingLock = 1;

    mapping(uint8 => uint256) public tierToWeight;
    mapping(address => mapping(uint8 => uint256)) userToTierToAvailableBoosts;
    uint256 public constant WEIGHT_DENOMINATOR = 10_000;

    bool public boostEnabled = true;

    // ----- Construction and Initialization -----

    /**
     * @param   _USDC             Address of USDC implementation
     * @param   _maestroTickets   Address of Maestro - Tickets contract
     * @param   _ticketStaking    Address of Ticket staking contract
     * @param   _founders         Addresses to receive founder NFTs
     * @param   _treasury         Address to receive 1/1 tokenId 6
     * @param   _mintPrice        Mint price in USDC
     */
    constructor(
        IERC20 _USDC,
        ITickets _maestroTickets,
        ITicketStaking _ticketStaking,
        address[] memory _founders,
        address _treasury,
        uint256 _mintPrice
    ) ERC721("Maestro - Genesis", "MGEN") {
        require(_founders.length == reservedSupply_Founders, "!length");

        // Mint Founders
        for (uint256 i; i < reservedSupply_Founders; ) {
            // TYPE_PUBLIC
            mintInternal(_founders[i], 1, TYPE_PUBLIC);
            unchecked {
                ++i;
            }
        }

        // Mint Treasury
        mintInternal(_treasury, 1, TYPE_PUBLIC);

        USDC = _USDC;
        maestroTickets = _maestroTickets;
        ticketStaking = _ticketStaking;
        mintPrice = _mintPrice;

        // Manual override to prevent a lost ticket from claiming Maestros if it resurfaces
        claimed[25] = true;

        tierToWeight[TICKET_DIAMOND] = 20_000;
        tierToWeight[TICKET_GOLD] = 15_000;
        tierToWeight[TICKET_SILVER] = 12_500;
        tierToWeight[TICKET_BRONZE] = 11_000;

        _setDefaultRoyalty(msg.sender, 500);
    }

    // ----- Minting Functions -----

    /**
     * @notice  Purchase Maestros
     * @dev     Approve this contract for the desired amount of USDC first
     * @param   _to     NFT destination address
     * @param   _qty    Number of Maestros to mint
     * @param   _proof  Merkle proof of whitelist
     */
    function mint(
        address _to,
        uint8 _qty,
        bytes32[] calldata _proof
    ) external {
        require(mintActive, "!active");
        require(_qty > 0, "!zeroQty");
        require(minted[_to] + _qty <= maxPerWallet, "!userMax");
        require(available_Public >= _qty, "!supply");

        if (!publicActive) {
            bytes32 leaf = keccak256(abi.encodePacked(_to));
            require(
                MerkleProof.verify(_proof, whitelistMerkleRoot, leaf),
                "!proof"
            );
        }

        USDC.safeTransferFrom(msg.sender, address(this), mintPrice * _qty);

        unchecked {
            available_Public -= _qty; // Already checked
            minted[_to] += _qty; // Adding uint8 capped at available_Public will never overflow uint256
        }

        mintInternal(_to, _qty, TYPE_PUBLIC);
    }

    /**
     * @notice  Claim the Maestros associated with your Maestro - Tickets NFT
     * @param   _token  Ticket ID
     */
    function claim(uint256 _token) external {
        require(msg.sender == maestroTickets.ownerOf(_token), "!ticketOwner");

        claimInternal(msg.sender, _token);
    }

    // ----- Staking -----

    /**
     * @notice  Stake a Maestro to start generating Notes
     * @param   _token  Token ID of the Maestro to stake
     */
    function compose(uint256 _token) external {
        composeInternal(_token);
    }

    /**
     * @notice  Stake multiple Maestros to start generating Notes
     * @param   _tokens     Token IDs of the Maestros to stake
     */
    function composeMultiple(uint256[] calldata _tokens) external {
        uint256 len = _tokens.length;
        for (uint256 i; i < len; ) {
            composeInternal(_tokens[i]);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice  Unstake a Maestro to stop generating Notes
     * @param   _token  Token ID of the Maestro to unstake
     */
    function retire(uint256 _token) external {
        retireInternal(msg.sender, _token);
    }

    /**
     * @notice  Unstake multiple Maestros to stop generating Notes
     * @param   _tokens     Token IDs of the Maestros to unstake
     */
    function retireMultiple(uint256[] calldata _tokens) external {
        uint256 len = _tokens.length;
        for (uint256 i; i < len; ) {
            retireInternal(msg.sender, _tokens[i]);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice  Transfer a Maestro safely while it is still composing
     * @dev     May only be called by the token owner
     * @param   _from   From address
     * @param   _to     Destination address
     * @param   _token  Token ID
     */
    function transferWhileComposing(
        address _from,
        address _to,
        uint256 _token
    ) external {
        require(msg.sender == ownerOf(_token), "!owner");
        composingLock = 2;
        _safeTransfer(_from, _to, _token, "");
        composingLock = 1;
    }

    /**
     * @notice  Update the Maestro - Genesis contract when a ticket is staked or unstaked
     * @dev     May only be called by the ticket staking contract
     */
    function notifyTicketStaked(
        bool _status,
        address _user,
        uint8 _tier
    ) external {
        require(msg.sender == address(ticketStaking), "!stakingContract");
        uint256 qty = tierToQty(_tier);
        if (_status) {
            userToTierToAvailableBoosts[_user][_tier] += qty;
        } else {
            userToTierToAvailableBoosts[_user][_tier] -= qty;
        }
        updateBoosts(_user);
        emit Notified(_user, _status, _tier);
    }

    // ----- Internal Functions -----

    function claimInternal(address _to, uint256 _token) internal {
        require(claimActive, "!active");
        require(!claimed[_token], "!claimed");

        uint8 tier = maestroTickets.ticketTier(_token);
        uint256 qty = tierToQty(tier);

        require(available_Tickets >= qty, "!ticketsSupply");
        unchecked {
            available_Tickets -= qty; // Already checked
        }
        claimed[_token] = true;
        mintInternal(_to, qty, TYPE_PUBLIC);
    }

    function tierToQty(uint8 _tier) internal pure returns (uint256) {
        uint256 qty;
        if (_tier == TICKET_DIAMOND) {
            qty = 5;
        } else if (_tier == TICKET_GOLD) {
            qty = 3;
        } else if (_tier == TICKET_SILVER) {
            qty = 2;
        } else if (_tier == TICKET_BRONZE) {
            qty = 1;
        } else {
            revert("!tier");
        }

        return qty;
    }

    function mintInternal(
        address _to,
        uint256 _qty,
        uint8 _type
    ) internal {
        uint256 tokenId;
        if (_type == TYPE_PUBLIC) {
            for (uint256 i; i < _qty; ++i) {
                tokenId = nextTicket;
                unchecked {
                    ++nextTicket;
                }
                _mint(_to, tokenId);
            }
        } else if (_type == TYPE_TREASURY) {
            for (uint256 i; i < _qty; ++i) {
                tokenId = nextTreasury;
                unchecked {
                    ++nextTreasury;
                }
                _mint(_to, tokenId);
            }
        } else {
            revert("!type");
        }
    }

    function composeInternal(uint256 _token) internal {
        require(tokenToComposeTime[_token] == 0, "composing");
        require(msg.sender == ownerOf(_token), "!owner");
        tokenToComposeTime[_token] = block.timestamp;
        ++stakedBalance[msg.sender];
        updateBoosts(msg.sender);
        emit Composing(_token, true);
    }

    function retireInternal(address _user, uint256 _token) internal {
        require(_user == ownerOf(_token), "!owner");
        require(tokenToComposeTime[_token] != 0, "!composing");
        tokenToComposeTime[_token] = 0;
        --stakedBalance[_user];
        updateBoosts(_user);
        emit Composing(_token, false);
    }

    /// @dev    Update the ticket boosts
    function updateBoosts(address _user) internal {
        uint256 balance = balanceOf(_user);
        uint256[4] memory boosts = viewAvailableBoosts(_user);
        uint256[4] memory used;

        uint256 tokenId;
        for (uint256 i; i < balance; ++i) {
            tokenId = tokenOfOwnerByIndex(_user, i);
            tokenToBoost[tokenId] = 0;
            if (tokenToComposeTime[tokenId] != 0 && boostEnabled) {
                for (
                    uint8 tier = TICKET_DIAMOND;
                    tier <= TICKET_BRONZE;
                    ++tier
                ) {
                    if (boosts[tier - 1] > used[tier - 1]) {
                        tokenToBoost[tokenId] = tierToWeight[tier];
                        ++used[tier - 1];
                        break;
                    }
                }
            }
        }
    }

    // ----- View Functions -----

    /**
     * @notice  View the time an Maestro has been composing
     * @param   _token  Token ID of the Maestro
     * @return  Duration in seconds
     */
    function timeComposing(uint256 _token) public view returns (uint256) {
        uint256 composeTime = tokenToComposeTime[_token];
        return composeTime > 0 ? block.timestamp - composeTime : 0;
    }

    /**
     * @notice  View the Notes balance a Maestro has accumulated
     * @param   _token  Token ID of the Maestro
     * @return  Notes balance
     */
    function notesBalance(uint256 _token) public view returns (uint256) {
        return
            (timeComposing(_token) *
                (WEIGHT_DENOMINATOR + tokenToBoost[_token])) /
            WEIGHT_DENOMINATOR;
    }

    /**
     * @notice  View the Notes balance a user has accumulated across all staked Maestros
     * @param   _user   Address of the user
     * @return  Total notes balance
     */
    function notesBalanceByUser(address _user) external view returns (uint256) {
        uint256 balance = balanceOf(_user);
        uint256 totalNotes;
        for (uint256 i; i < balance; ++i) {
            totalNotes += notesBalance(tokenOfOwnerByIndex(_user, i));
        }
        return totalNotes;
    }

    /**
     * @notice  View if a Maestro is currently staked
     * @param   _token  Token ID of the Maestro
     * @return  True if staked, false if not staked
     */
    function isStaked(uint256 _token) external view returns (bool) {
        return tokenToComposeTime[_token] > 0;
    }

    /**
     * @notice  View the token ID with offset calculation for metadata purposes
     * @param   _tokenId    Raw token ID
     * @return  Metadata token ID
     */
    function getShuffledTokenId(uint256 _tokenId)
        public
        view
        returns (uint256)
    {
        if (_tokenId < offsetMinId || _tokenId > offsetMaxId) return _tokenId;

        uint256 newId = _tokenId + offset;
        if (newId > offsetMaxId) {
            // If min is 1 and max is 1000, newId 1001 should wrap to 1
            // newId = 1 + 1001 - 1000 - 1 = 1
            newId = offsetMinId + newId - offsetMaxId - 1;
        }
        return newId;
    }

    /**
     * @notice  View the boosts a user is eligible for
     * @param   _user   Address of the Maestro holder
     * @return  Available boosts by tier, [diamond, gold, silver, bronze]
     */
    function viewAvailableBoosts(address _user)
        public
        view
        returns (uint256[4] memory)
    {
        uint256[4] memory boosts;
        for (uint8 i = TICKET_DIAMOND; i <= TICKET_BRONZE; ) {
            boosts[i - 1] = userToTierToAvailableBoosts[_user][i];
            unchecked {
                ++i;
            }
        }
        return boosts;
    }

    /**
     * @notice  View the boosts a user is eligible for, for a specific tier of ticket
     * @param   _user   Address of the Maestro holder
     * @param   _tier   Ticket tier to query
     * @return  Available boosts for that tier
     */
    function viewAvailableBoostsByTier(address _user, uint8 _tier)
        public
        view
        returns (uint256)
    {
        return userToTierToAvailableBoosts[_user][_tier];
    }

    // ----- Admin Functions -----

    /**
     * @notice  Claim the Maestros associated with any Maestro - Tickets NFT
     * @dev     Permissioned
     * @param   _to     Destination address
     * @param   _token  Ticket ID
     */
    function claimFor(address _to, uint256 _token) external onlyOwner {
        require(_to == maestroTickets.ownerOf(_token), "!ticketOwner");

        claimInternal(_to, _token);
    }

    /**
     * @notice  Force unstake a user in case staking's transfer blocking is being used for malicious means
     * @dev     Permissioned
     * @param   _owner  Token owner of the Maestro
     * @param   _token  Token ID of the Maestro
     */
    function retireFor(address _owner, uint256 _token) external onlyOwner {
        retireInternal(_owner, _token);
    }

    /**
     * @notice  Permissioned mint function
     * @dev     Does not count against per-wallet maximums
     * @param   _to             NFT destination address
     * @param   _qty            Number of tickets to mint
     * @param   _useTreasury    True to mint from treasury allocation, false to mint from public allocation
     */
    function adminMint(
        address _to,
        uint256 _qty,
        bool _useTreasury
    ) external onlyOwner {
        adminMintInternal(_to, _qty, _useTreasury);
    }

    /**
     * @notice  Permissioned multiple mint function
     * @dev     Does not count against per-wallet maximums
     * @param   _to             NFT destination addresses
     * @param   _qty            Number of tickets to mint
     * @param   _useTreasury    True to mint from treasury allocation, false to mint from public allocation
     */
    function adminMintMultiple(
        address[] calldata _to,
        uint256[] calldata _qty,
        bool[] calldata _useTreasury
    ) external onlyOwner {
        uint256 len = _to.length;
        require(_qty.length == len && _useTreasury.length == len, "!lengths");
        for (uint256 i; i < len; ) {
            adminMintInternal(_to[i], _qty[i], _useTreasury[i]);
            unchecked {
                ++i;
            }
        }
    }

    function adminMintInternal(
        address _to,
        uint256 _qty,
        bool _useTreasury
    ) internal {
        require(_qty > 0, "!zeroQty");

        if (_useTreasury) {
            require(available_Treasury >= _qty, "!treasurySupply");
            unchecked {
                available_Treasury -= _qty; // Already checked
            }
            mintInternal(_to, _qty, TYPE_TREASURY);
        } else {
            require(available_Public >= _qty, "!publicSupply");
            unchecked {
                available_Public -= _qty; // Already checked
            }
            mintInternal(_to, _qty, TYPE_PUBLIC);
        }
    }

    /**
     * @notice  Withdraw USDC profits from the contract
     */
    function withdraw() external onlyOwner {
        uint256 balance = USDC.balanceOf(address(this));
        USDC.safeTransfer(owner(), balance);
        emit Withdrawal(balance);
    }

    /**
     * @notice  Set a new mint price
     * @param   _newPrice    New price of the Maestro in USDC
     */
    function setPrice(uint256 _newPrice) external onlyOwner {
        emit NewPrice(mintPrice, _newPrice);
        mintPrice = _newPrice;
    }

    /**
     * @notice  Set a new maximum per wallet
     * @param   _newMax     New maximum per wallet
     */
    function setMaxPerWallet(uint256 _newMax) external onlyOwner {
        emit NewMaxPerWallet(maxPerWallet, _newMax);
        maxPerWallet = _newMax;
    }

    /**
     * @notice  Set the merkle root
     * @param   _newRoot    New Merkle tree root
     */
    function setMerkleRoot(bytes32 _newRoot) external onlyOwner {
        emit NewRoot(whitelistMerkleRoot, _newRoot);
        whitelistMerkleRoot = _newRoot;
    }

    /**
     * @notice  Set ticket boost enabled or disabled
     * @param   _newStatus  True for enable, false for
     */
    function setBoostEnabled(bool _newStatus) external onlyOwner {
        emit BoostStatus(boostEnabled, _newStatus);
        boostEnabled = _newStatus;
    }

    /**
     * @notice  Set the sale activity status of a mint phase
     * @param   _ID         0 for claim, 1 for mint, 2 for public mint
     * @param   _newStatus  true for phase active, false for inactive
     */
    function setPhaseStatus(uint256 _ID, bool _newStatus) external onlyOwner {
        require(_ID < 3, "!id");
        if (_ID == 0) {
            emit PhaseStatus(_ID, claimActive, _newStatus);
            claimActive = _newStatus;
        } else if (_ID == 1) {
            emit PhaseStatus(_ID, mintActive, _newStatus);
            mintActive = _newStatus;
        } else {
            emit PhaseStatus(_ID, publicActive, _newStatus);
            publicActive = _newStatus;
        }
    }

    /**
     * @notice  Sets a new royalty numerator
     * @dev     Cannot exceed 10%
     * @param   _royaltyBPS   New royalty, denominated in BPS (10000 = 100%)
     */
    function setRoyalty(uint96 _royaltyBPS) external onlyOwner {
        require(_royaltyBPS <= 1000, "!bps");

        _setDefaultRoyalty(owner(), _royaltyBPS);

        emit NewRoyalty(_royaltyBPS);
    }

    /**
     * @notice  Set a new base URI
     * @param   _newURI     new URI string
     */
    function setURI(string memory _newURI) external onlyOwner {
        require(!frozen, "!frozen");
        emit NewURI(baseURI, _newURI);
        baseURI = _newURI;
    }

    /**
     * @notice  Set a new unrevealed URI
     * @param   _newURI     new URI string
     */
    function setUnrevealedURI(string memory _newURI) external onlyOwner {
        require(!frozen, "!frozen");
        emit NewURI(unrevealedURI, _newURI);
        unrevealedURI = _newURI;
    }

    /**
     * @notice  Set a new provenance hash
     * @param   _newHash    New hash
     */
    function setProvenanceHash(bytes32 _newHash) external onlyOwner {
        require(!frozen, "!frozen");
        emit NewHash(provenanceHash, _newHash);
        provenanceHash = _newHash;
    }

    // ----- Irreversible Admin Functions -----

    /**
     * @notice  Freeze the URI, preventing further changes
     * @dev     May only be called once
     */
    function freezeURI() external onlyOwner {
        require(!frozen, "!frozen");
        frozen = true;
        emit URIFrozen(baseURI);
    }

    /**
     * @notice  Irreversibly set the offset for fair reveal
     * @dev     May only be called once
     * @param   _seed   Randomness seed
     */
    function setOffset(uint256 _seed) external onlyOwner {
        require(offset == 0, "!set");
        uint256 randomness = uint256(
            keccak256(abi.encodePacked(block.timestamp, _seed))
        );
        offset =
            (randomness % (reservedSupply_Public + reservedSupply_Tickets)) +
            1;
        emit NewOffset(offset);
    }

    // ----- Overrides -----

    /// @inheritdoc ERC721
    function _baseURI() internal view override returns (string memory) {
        return baseURI;
    }

    /// @inheritdoc ERC721
    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        _requireMinted(tokenId);

        string memory uri;
        if (offset > 0) {
            if (bytes(baseURI).length == 0) return "";
            uint256 newId = getShuffledTokenId(tokenId);
            uri = string(abi.encodePacked(baseURI, newId.toString(), ".json"));
        } else {
            uri = unrevealedURI;
        }

        return uri;
    }

    /**
     * @dev Prohibits transfer of composing tokens by normal transfer
     * @inheritdoc ERC721
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        require(
            tokenToComposeTime[tokenId] == 0 || composingLock == 2,
            "composing"
        );
        ERC721Enumerable._beforeTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Support transfer of composing tokens
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721) {
        if (tokenToComposeTime[tokenId] != 0) {
            if (from != address(0)) updateBoosts(from);
            if (to != address(0)) updateBoosts(to);
        }
    }

    /// @inheritdoc ERC721
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721, ERC721Enumerable, ERC2981)
        returns (bool)
    {
        return
            interfaceId == type(ERC2981).interfaceId ||
            ERC721Enumerable.supportsInterface(interfaceId);
    }
}

File 2 of 21 : 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 3 of 21 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 = _owners[tokenId];
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = 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);

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(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.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 5 of 21 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library 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 proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

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

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

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

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

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

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

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

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

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

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

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

File 7 of 21 : 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 8 of 21 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

File 10 of 21 : ITickets.sol
pragma solidity ^0.8.15;

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

interface ITickets is IERC721 {
    /**
     * @notice  Returns the tier of the given token
     * @param   tokenID    TokenID to query
     * @return  0 if token nonexistent, 1 through 4 otherwise
     */
    function ticketTier(uint256 tokenID) external view returns (uint8);
}

File 11 of 21 : ITicketStaking.sol
pragma solidity ^0.8.15;

interface ITicketStaking {
    struct StakeInfo {
        address depositor;
        uint8 tier;
        uint256 stakeTime;
    }

    /**
     * @notice  Stake a Maestro - Ticket NFT
     * @param   _token  Token ID of the ticket to stake
     */
    function stake(uint256 _token) external;

    /**
     * @notice  Unstake a Maestro - Ticket NFT
     * @param   _token  Token ID of the ticket to unstake
     */
    function unstake(uint256 _token) external;

    /**
     * @notice  View the time a ticket has been staking
     * @param   _token  Token ID of the ticket
     */
    function timeStaking(uint256 _token) external view returns (uint256);

    /**
     * @notice  View if a ticket is currently staked
     * @param   _token  Token ID of the ticket
     */
    function isStaked(uint256 _token) external view returns (bool);

    /**
     * @notice  View all staking information for a ticket
     * @param   _token  Token ID of the ticket
     */
    function getStakeInfo(uint256 _token)
        external
        view
        returns (StakeInfo memory);
}

File 12 of 21 : 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 13 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 14 of 21 : 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 15 of 21 : 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 16 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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 functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 17 of 21 : 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 21 : 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 21 : 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 20 of 21 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_USDC","type":"address"},{"internalType":"contract ITickets","name":"_maestroTickets","type":"address"},{"internalType":"contract ITicketStaking","name":"_ticketStaking","type":"address"},{"internalType":"address[]","name":"_founders","type":"address[]"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"oldStatus","type":"bool"},{"indexed":false,"internalType":"bool","name":"newStatus","type":"bool"}],"name":"BoostStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"token","type":"uint256"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"Composing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"oldHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newHash","type":"bytes32"}],"name":"NewHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"NewMaxPerWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"offset","type":"uint256"}],"name":"NewOffset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"NewPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"oldRoot","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"NewRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint96","name":"newRoyalty","type":"uint96"}],"name":"NewRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"NewURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"},{"indexed":false,"internalType":"uint8","name":"tier","type":"uint8"}],"name":"Notified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"phase","type":"uint256"},{"indexed":false,"internalType":"bool","name":"oldStatus","type":"bool"},{"indexed":false,"internalType":"bool","name":"newStatus","type":"bool"}],"name":"PhaseStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"finalURI","type":"string"}],"name":"URIFrozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"TICKET_BRONZE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_DIAMOND","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_GOLD","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_SILVER","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WEIGHT_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_qty","type":"uint256"},{"internalType":"bool","name":"_useTreasury","type":"bool"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_qty","type":"uint256[]"},{"internalType":"bool[]","name":"_useTreasury","type":"bool[]"}],"name":"adminMintMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"available_Public","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"available_Tickets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"available_Treasury","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"claimFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"compose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"composeMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"frozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getShuffledTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maestroTickets","outputs":[{"internalType":"contract ITickets","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint8","name":"_qty","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"notesBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"notesBalanceByUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"notifyTicketStaked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedSupply_Founders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedSupply_Public","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedSupply_Tickets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedSupply_Treasury","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"retire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"retireFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"retireMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setBoostEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMax","type":"uint256"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_seed","type":"uint256"}],"name":"setOffset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ID","type":"uint256"},{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPhaseStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newHash","type":"bytes32"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_royaltyBPS","type":"uint96"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setUnrevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ticketStaking","outputs":[{"internalType":"contract ITicketStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"tierToWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"timeComposing","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToComposeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"transferWhileComposing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unrevealedURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"viewAvailableBoosts","outputs":[{"internalType":"uint256[4]","name":"","type":"uint256[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"viewAvailableBoostsByTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040526001600d556094600e55600160fa6200001e919062000cbb565b600f556104806010556001601181905561051b60125560208190556023805460ff191690911790553480156200005357600080fd5b5060405162005e1038038062005e10833981016040819052620000769162000d16565b604051806040016040528060118152602001704d61657374726f202d2047656e6573697360781b8152506040518060400160405280600481526020016326a3a2a760e11b8152508160009081620000ce919062000ecd565b506001620000dd828262000ecd565b505050620000fa620000f46200029460201b60201c565b62000298565b60058351146200013b5760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b60448201526064015b60405180910390fd5b60005b600581101562000182576200017984828151811062000161576200016162000f99565b602002602001015160016000620002ea60201b60201c565b6001016200013e565b50620001928260016000620002ea565b6001600160a01b0380871660805285811660a052841660c05260178190557f5c52232733ab6d157f34c383d32a0af3ada64da2faf95dd17c342031fe555a2c805460ff191660011790556021602052614e207f2b59c9df127166d3570f589f0cb7377a6b175795e70ab275ebf42fa16c0a23f455613a987f914a2534c436de5a3f77164e6b9b90d20144139ce899b6a8d30a442e7b9ef533556130d47fbae8fb7bb9008c9bfa6625328b7613a2bedfb2f936a7718f51173039a77c107c556004600052612af87f1ae06646c6742a506302a1833f6c3f508643fd4c5dcb1e323706d5c3441af2985562000288336101f4620003b0565b50505050505062001044565b3390565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060ff8216620003345760005b838110156200032d57601180546001810190915591506200031a8583620004b1565b620003258162000faf565b9050620002f8565b50620003aa565b60001960ff831601620003795760005b838110156200032d5760128054600181019091559150620003668583620004b1565b620003718162000faf565b905062000344565b60405162461bcd60e51b8152602060048201526005602482015264217479706560d81b604482015260640162000132565b50505050565b6127106001600160601b0382161115620004205760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840162000132565b6001600160a01b038216620004785760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000132565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600a55565b6001600160a01b038216620005095760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000132565b6000818152600260205260409020546001600160a01b031615620005705760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000132565b6200057e6000838362000615565b6001600160a01b0382166000908152600360205260408120805460019290620005a990849062000fcb565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a462000611600083836200068a565b5050565b6000818152601d602052604090205415806200063357506020546002145b6200066d5760405162461bcd60e51b8152602060048201526009602482015268636f6d706f73696e6760b81b604482015260640162000132565b62000685838383620006d560201b620027451760201c565b505050565b6000818152601d60205260409020541562000685576001600160a01b03831615620006ba57620006ba83620007b1565b6001600160a01b0382161562000685576200068582620007b1565b620006ed8383836200068560201b62000ffb1760201c565b6001600160a01b0383166200074b576200074581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b62000771565b816001600160a01b0316836001600160a01b03161462000771576200077183826200091f565b6001600160a01b0382166200078b576200068581620009cc565b826001600160a01b0316826001600160a01b031614620006855762000685828262000a86565b6000620007be8262000ad7565b90506000620007cd8362000b5f565b9050620007d962000c87565b6000805b848110156200091757620007f2868262000be2565b6000818152601e60209081526040808320839055601d9091529020549092501580159062000822575060235460ff165b15620009045760015b600460ff8216116200090257836200084560018362000fe6565b60ff16600481106200085b576200085b62000f99565b6020020151856200086e60018462000fe6565b60ff166004811062000884576200088462000f99565b60200201511115620008ef5760ff8116600090815260216020908152604080832054868452601e9092529091205583620008c060018362000fe6565b60ff1660048110620008d657620008d662000f99565b602002018051620008e79062000faf565b905262000902565b620008fa816200100c565b90506200082b565b505b6200090f8162000faf565b9050620007dd565b505050505050565b60006001620009398462000ad760201b620019cf1760201c565b62000945919062000cbb565b60008381526007602052604090205490915080821462000999576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090620009e09060019062000cbb565b6000838152600960205260408120546008805493945090928490811062000a0b5762000a0b62000f99565b90600052602060002001549050806008838154811062000a2f5762000a2f62000f99565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548062000a6a5762000a6a6200102e565b6001900381819060005260206000200160009055905550505050565b600062000a9e8362000ad760201b620019cf1760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b03821662000b435760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840162000132565b506001600160a01b031660009081526003602052604090205490565b62000b6962000c87565b62000b7362000c87565b60015b600460ff82161162000bdb576001600160a01b038416600090815260226020908152604080832060ff851684529091529020548262000bb760018462000fe6565b60ff166004811062000bcd5762000bcd62000f99565b602002015260010162000b76565b5092915050565b600062000bfa8362000ad760201b620019cf1760201c565b821062000c5e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840162000132565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60405180608001604052806004906020820280368337509192915050565b634e487b7160e01b600052601160045260246000fd5b60008282101562000cd05762000cd062000ca5565b500390565b6001600160a01b038116811462000ceb57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b805162000d118162000cd5565b919050565b60008060008060008060c0878903121562000d3057600080fd5b865162000d3d8162000cd5565b8096505060208088015162000d528162000cd5565b604089015190965062000d658162000cd5565b60608901519095506001600160401b038082111562000d8357600080fd5b818a0191508a601f83011262000d9857600080fd5b81518181111562000dad5762000dad62000cee565b8060051b604051601f19603f8301168101818110858211171562000dd55762000dd562000cee565b60405291825284820192508381018501918d83111562000df457600080fd5b938501935b8285101562000e1d5762000e0d8562000d04565b8452938501939285019262000df9565b80985050505050505062000e346080880162000d04565b915060a087015190509295509295509295565b600181811c9082168062000e5c57607f821691505b60208210810362000e7d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200068557600081815260208120601f850160051c8101602086101562000eac5750805b601f850160051c820191505b81811015620009175782815560010162000eb8565b81516001600160401b0381111562000ee95762000ee962000cee565b62000f018162000efa845462000e47565b8462000e83565b602080601f83116001811462000f39576000841562000f205750858301515b600019600386901b1c1916600185901b17855562000917565b600085815260208120601f198616915b8281101562000f6a5788860151825594840194600190910190840162000f49565b508582101562000f895787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60006001820162000fc45762000fc462000ca5565b5060010190565b6000821982111562000fe15762000fe162000ca5565b500190565b600060ff821660ff84168082101562001003576200100362000ca5565b90039392505050565b600060ff821660ff810362001025576200102562000ca5565b60010192915050565b634e487b7160e01b600052603160045260246000fd5b60805160a05160c051614d6b620010a5600039600081816108f5015261167001526000818161065e015281816110bd015281816114420152612a570152600081816109ae01528181611558015281816115ec01526125db0152614d6b6000f3fe608060405234801561001057600080fd5b50600436106105b75760003560e01c80637b75403c116102f8578063baa51f861161019c578063d5556544116100ee578063ea6bb349116100a2578063faedfd3f1161007c578063faedfd3f14610c29578063fb878ece14610c3c578063fe2c7fee14610c4557600080fd5b8063ea6bb34914610bf0578063f2fde38b14610c03578063f9628b7c14610c1657600080fd5b8063dbe7e3bd116100d3578063dbe7e3bd14610b7e578063e268e4d314610ba1578063e985e9c514610bb457600080fd5b8063d555654414610b6c578063d5abeb0114610b7557600080fd5b8063c6ab67a311610150578063cac926691161012a578063cac9266914610b39578063cfedd61b14610b4c578063d4a6a2fd14610b5f57600080fd5b8063c6ab67a314610b15578063c793803c14610b1e578063c87b56dd14610b2657600080fd5b8063c2f6dde111610181578063c2f6dde114610ae6578063c311bc7914610af9578063c36f99f514610b0257600080fd5b8063baa51f8614610ab1578063c12aecd114610ad357600080fd5b80638f4f67d0116102555780639aa5d3c511610209578063aa98e0c6116101e3578063aa98e0c614610a8d578063b88d4fde14610a96578063ba808f3414610aa957600080fd5b80639aa5d3c514610a6a578063a16062ae14610a72578063a22cb46514610a7a57600080fd5b806392cf76241161023a57806392cf762414610a3a57806395d89b4114610a5a578063997bf9f614610a6257600080fd5b80638f4f67d014610a1457806391b7f5ed14610a2757600080fd5b806380d7437b116102ac57806389e376b51161029157806389e376b5146109d05780638d5b6757146109e35780638da5cb5b14610a0357600080fd5b806380d7437b1461098957806389a30271146109a957600080fd5b80637f8d4aa7116102dd5780637f8d4aa714610960578063809b18d51461097357806380a9f28e1461097c57600080fd5b80637b75403c1461093a5780637cb647591461094d57600080fd5b80633790cf571161045f5780636352211e116103bc5780636ba0839c116103705780637035bf181161034a5780637035bf181461091757806370a082311461091f578063715018a61461093257600080fd5b80636ba0839c146108d55780636c0360eb146108e85780636cc97934146108f057600080fd5b806366a7481d116103a157806366a7481d1461089f5780636817c76c146108b95780636986caf0146108c257600080fd5b80636352211e1461088357806364f751091461089657600080fd5b8063453c2310116104135780634f6ccce7116103f85780634f6ccce7146108305780636021726714610843578063612d3f1a1461086357600080fd5b8063453c2310146108145780634d4b8c881461081d57600080fd5b80633ccfd60b116104445780633ccfd60b146107e65780633f2981cf146107ee57806342842e0e1461080157600080fd5b80633790cf57146107c0578063379607f5146107d357600080fd5b80630f7bbf1e1161051857806323b872dd116104cc5780632a55205a116104a65780632a55205a146107735780632e5827f6146107a55780632f745c59146107ad57600080fd5b806323b872dd1461073b57806325fd90f31461074e57806327f99fda1461076057600080fd5b806318160ddd116104fd57806318160ddd146106d85780631dfbafb5146106e05780631e7269c51461071b57600080fd5b80630f7bbf1e146106b95780631455ecf6146106d057600080fd5b8063081812fc1161056f578063095ea7b311610554578063095ea7b314610680578063099b6bfa146106935780630de05659146106a657600080fd5b8063081812fc1461062e578063090e94191461065957600080fd5b806302fe5305116105a057806302fe5305146105f9578063054f7d9c1461060c57806306fdde031461061957600080fd5b806301e343db146105bc57806301ffc9a7146105d1575b600080fd5b6105cf6105ca36600461421d565b610c58565b005b6105e46105df36600461424c565b610d43565b60405190151581526020015b60405180910390f35b6105cf6106073660046142f5565b610d87565b601b546105e49060ff1681565b610621610e16565b6040516105f09190614396565b61064161063c36600461421d565b610ea8565b6040516001600160a01b0390911681526020016105f0565b6106417f000000000000000000000000000000000000000000000000000000000000000081565b6105cf61068e3660046143be565b610ecf565b6105cf6106a136600461421d565b611000565b6105cf6106b43660046143be565b611086565b6106c261048081565b6040519081526020016105f0565b6106c2600581565b6008546106c2565b6106c26106ee3660046143f9565b6001600160a01b038216600090815260226020908152604080832060ff8516845290915290205492915050565b6106c2610729366004614432565b60166020526000908152604090205481565b6105cf61074936600461444f565b61119a565b6014546105e490610100900460ff1681565b6105cf61076e36600461449e565b611221565b6107866107813660046144bb565b61127f565b604080516001600160a01b0390931683526020830191909152016105f0565b6106c2609481565b6106c26107bb3660046143be565b61135e565b6105cf6107ce36600461421d565b611406565b6105cf6107e136600461421d565b611413565b6105cf61151f565b6014546105e49062010000900460ff1681565b6105cf61080f36600461444f565b61164a565b6106c2600d5481565b6105cf61082b3660046144dd565b611665565b6106c261083e36600461421d565b6117c4565b6106c2610851366004614432565b601f6020526000908152604090205481565b6106c2610871366004614528565b60216020526000908152604090205481565b61064161089136600461421d565b611868565b6106c260105481565b6108a7600481565b60405160ff90911681526020016105f0565b6106c260175481565b6106c26108d036600461421d565b6118cd565b6105cf6108e336600461458a565b6118f9565b610621611934565b6106417f000000000000000000000000000000000000000000000000000000000000000081565b6106216119c2565b6106c261092d366004614432565b6119cf565b6105cf611a69565b6105cf6109483660046145cc565b611a7d565b6105cf61095b36600461421d565b611c3e565b6105cf61096e3660046143be565b611c87565b6106c261271081565b6023546105e49060ff1681565b61099c610997366004614432565b611c99565b6040516105f091906145f1565b6106417f000000000000000000000000000000000000000000000000000000000000000081565b6106c26109de36600461421d565b611d11565b6106c26109f136600461421d565b601e6020526000908152604090205481565b600c546001600160a01b0316610641565b6105cf610a2236600461421d565b611d4b565b6105cf610a3536600461421d565b611d54565b6106c2610a4836600461421d565b601d6020526000908152604090205481565b610621611d9d565b6108a7600281565b6106c260fa81565b6108a7600381565b6105cf610a88366004614622565b611dac565b6106c260135481565b6105cf610aa4366004614650565b611db7565b6108a7600181565b6105e4610abf36600461421d565b6000908152601d6020526040902054151590565b6105cf610ae136600461458a565b611e3f565b6105cf610af43660046146d0565b611e75565b6106c2600e5481565b6106c2610b10366004614432565b611e88565b6106c2601c5481565b6105cf611ed3565b610621610b3436600461421d565b611f60565b6105cf610b47366004614707565b612075565b6106c2610b5a36600461421d565b612138565b6014546105e49060ff1681565b6106c2601a5481565b6106c261061381565b6105e4610b8c36600461421d565b60156020526000908152604090205460ff1681565b6105cf610baf36600461421d565b612193565b6105e4610bc2366004614735565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6105cf610bfe366004614763565b6121dc565b6105cf610c11366004614432565b6122cb565b6105cf610c243660046147fd565b612358565b6105cf610c3736600461444f565b61263b565b6106c2600f5481565b6105cf610c533660046142f5565b6126ba565b610c606127fd565b601a5415610cbb5760405162461bcd60e51b8152600401610cb29060208082526004908201527f2173657400000000000000000000000000000000000000000000000000000000604082015260600190565b60405180910390fd5b604080514260208083019190915281830184905282518083038401815260609092019092528051910120610cf26104806094614878565b610cfc90826148a6565b610d07906001614878565b601a8190556040519081527fe1885e3eec4149d2813cbef9660f93d83a9407732218aef3684a2f49576dc8359060200160405180910390a15050565b60006001600160e01b031982167f2baae9fd000000000000000000000000000000000000000000000000000000001480610d815750610d8182612857565b92915050565b610d8f6127fd565b601b5460ff1615610dcc5760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b7feb0ff494c0855e7c27233e02cb7987f997be6005d24b09af504d00f2e349c891601982604051610dfe929190614971565b60405180910390a16019610e1282826149e5565b5050565b606060008054610e25906148ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610e51906148ba565b8015610e9e5780601f10610e7357610100808354040283529160200191610e9e565b820191906000526020600020905b815481529060010190602001808311610e8157829003601f168201915b5050505050905090565b6000610eb382612895565b506000908152600460205260409020546001600160a01b031690565b6000610eda82611868565b9050806001600160a01b0316836001600160a01b031603610f635760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610cb2565b336001600160a01b0382161480610f7f5750610f7f8133610bc2565b610ff15760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610cb2565b610ffb83836128f9565b505050565b6110086127fd565b601b5460ff16156110455760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b601c5460408051918252602082018390527fa5a1ff5ae2c83e84c67ccf88aa36b771582ddb9bf09c3ad5a3222e4f1b7ce043910160405180910390a1601c55565b61108e6127fd565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa15801561110c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111309190614aa5565b6001600160a01b0316826001600160a01b0316146111905760405162461bcd60e51b815260206004820152600c60248201527f217469636b65744f776e657200000000000000000000000000000000000000006044820152606401610cb2565b610e128282612974565b6111a43382612b5a565b6112165760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610cb2565b610ffb838383612bd9565b6112296127fd565b6023546040805160ff9092161515825282151560208301527fd033994ed606cb1b6c5a4d9c44a536542d87e30177e3a2eb02913999d84415f0910160405180910390a16023805460ff1916911515919091179055565b6000828152600b602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291611320575060408051808201909152600a546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090611344906bffffffffffffffffffffffff1687614ac2565b61134e9190614ae1565b91519350909150505b9250929050565b6000611369836119cf565b82106113dd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610cb2565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6114103382612dc4565b50565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015611491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b59190614aa5565b6001600160a01b0316336001600160a01b0316146115155760405162461bcd60e51b815260206004820152600c60248201527f217469636b65744f776e657200000000000000000000000000000000000000006044820152606401610cb2565b6114103382612974565b6115276127fd565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156115a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cb9190614af5565b90506116136115e2600c546001600160a01b031690565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083612eef565b6040518181527f4e70a604b23a8edee2b1d0a656e9b9c00b73ad8bb1afc2c59381ee9f69197de7906020015b60405180910390a150565b610ffb83838360405180602001604052806000815250611db7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116dd5760405162461bcd60e51b815260206004820152601060248201527f217374616b696e67436f6e7472616374000000000000000000000000000000006044820152606401610cb2565b60006116e882612f80565b90508315611731576001600160a01b038316600090815260226020908152604080832060ff8616845290915281208054839290611726908490614878565b9091555061176d9050565b6001600160a01b038316600090815260226020908152604080832060ff8616845290915281208054839290611767908490614b0e565b90915550505b61177683613075565b60408051851515815260ff841660208201526001600160a01b038516917fb330639968750299210f5e98fc41c760dac2c6937f85aca27fd38063696d8aff910160405180910390a250505050565b60006117cf60085490565b82106118435760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610cb2565b6008828154811061185657611856614b25565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b031680610d815760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610cb2565b6000818152601d6020526040812054806118e85760006118f2565b6118f28142614b0e565b9392505050565b8060005b8181101561192e5761192684848381811061191a5761191a614b25565b905060200201356131be565b6001016118fd565b50505050565b60198054611941906148ba565b80601f016020809104026020016040519081016040528092919081815260200182805461196d906148ba565b80156119ba5780601f1061198f576101008083540402835291602001916119ba565b820191906000526020600020905b81548152906001019060200180831161199d57829003601f168201915b505050505081565b60188054611941906148ba565b60006001600160a01b038216611a4d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610cb2565b506001600160a01b031660009081526003602052604090205490565b611a716127fd565b611a7b60006132de565b565b611a856127fd565b60038210611ad55760405162461bcd60e51b815260206004820152600360248201527f21696400000000000000000000000000000000000000000000000000000000006044820152606401610cb2565b81600003611b36576014546040805160ff90921615158252821515602083015283917f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e72910160405180910390a26014805482151560ff199091161790555050565b81600103611bbd576014546040805161010090920460ff1615158252821515602083015283917f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e72910160405180910390a260148054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790555050565b601454604080516201000090920460ff1615158252821515602083015283917f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e72910160405180910390a26014805482151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9091161790555050565b611c466127fd565b60135460408051918252602082018390527f191a34cdab35c3a3a2ef7ba4d54d4e55a5416f6807b90652ee8ee0be41699583910160405180910390a1601355565b611c8f6127fd565b610e128282612dc4565b611ca16141ff565b611ca96141ff565b60015b600460ff821611611d0a576001600160a01b038416600090815260226020908152604080832060ff8516845290915290205482611cea600184614b3b565b60ff1660048110611cfd57611cfd614b25565b6020020152600101611cac565b5092915050565b6000818152601e602052604081205461271090611d2e9082614878565b611d37846118cd565b611d419190614ac2565b610d819190614ae1565b611410816131be565b611d5c6127fd565b60175460408051918252602082018390527fb9362b96e28efbb7a7e63bb4a97faf9924ec0394635feff8588a6ae2a5f784fe910160405180910390a1601755565b606060018054610e25906148ba565b610e1233838361333d565b611dc13383612b5a565b611e335760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610cb2565b61192e8484848461340b565b8060005b8181101561192e57611e6d33858584818110611e6157611e61614b25565b90506020020135612dc4565b600101611e43565b611e7d6127fd565b610ffb838383613494565b600080611e94836119cf565b90506000805b82811015611ecb57611eaf6109de868361135e565b611eb99083614878565b9150611ec481614b5e565b9050611e9a565b509392505050565b611edb6127fd565b601b5460ff1615611f185760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b601b805460ff191660011790556040517f80769e0fec5395870efbeb7790ddbe4c3669e465667108c34094cbcdd7c0ac5090611f5690601990614b78565b60405180910390a1565b6060611f6b82612895565b601a5460609015611fe25760198054611f83906148ba565b9050600003611fa2575050604080516020810190915260008152919050565b6000611fad84612138565b90506019611fba826135b8565b604051602001611fcb929190614b8b565b604051602081830303815290604052915050610d81565b60188054611fef906148ba565b80601f016020809104026020016040519081016040528092919081815260200182805461201b906148ba565b80156120685780601f1061203d57610100808354040283529160200191612068565b820191906000526020600020905b81548152906001019060200180831161204b57829003601f168201915b5050505050905092915050565b61207d6127fd565b6103e8816bffffffffffffffffffffffff1611156120df5760405162461bcd60e51b8152600401610cb29060208082526004908201527f2162707300000000000000000000000000000000000000000000000000000000604082015260600190565b6120fa6120f4600c546001600160a01b031690565b826136ed565b6040516bffffffffffffffffffffffff821681527f3cf4fec9aae458c3a169ef0c25423c15fbfc6175238fa756786f345d9d9fdbc99060200161163f565b6000600782108061214a575061051a82115b15612153575090565b6000601a54836121639190614878565b905061051a811115610d8157600161051a61217f836007614878565b6121899190614b0e565b6118f29190614b0e565b61219b6127fd565b600d5460408051918252602082018390527f91d83d678e463f3bd36117413cec5e4cd93c2b7688234e854c4b662fb7fc493b910160405180910390a1600d55565b6121e46127fd565b8483811480156121f357508181145b61223f5760405162461bcd60e51b815260206004820152600860248201527f216c656e677468730000000000000000000000000000000000000000000000006044820152606401610cb2565b60005b818110156122c1576122b988888381811061225f5761225f614b25565b90506020020160208101906122749190614432565b87878481811061228657612286614b25565b9050602002013586868581811061229f5761229f614b25565b90506020020160208101906122b4919061449e565b613494565b600101612242565b5050505050505050565b6122d36127fd565b6001600160a01b03811661234f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610cb2565b611410816132de565b601454610100900460ff166123af5760405162461bcd60e51b815260206004820152600760248201527f21616374697665000000000000000000000000000000000000000000000000006044820152606401610cb2565b60008360ff16116124025760405162461bcd60e51b815260206004820152600860248201527f217a65726f5174790000000000000000000000000000000000000000000000006044820152606401610cb2565b600d546001600160a01b03851660009081526016602052604090205461242c9060ff861690614878565b111561247a5760405162461bcd60e51b815260206004820152600860248201527f21757365724d61780000000000000000000000000000000000000000000000006044820152606401610cb2565b8260ff16600e5410156124cf5760405162461bcd60e51b815260206004820152600760248201527f21737570706c79000000000000000000000000000000000000000000000000006044820152606401610cb2565b60145462010000900460ff166125bb576040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602082015260009060340160405160208183030381529060405280519060200120905061256d838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506013549150849050613818565b6125b95760405162461bcd60e51b815260206004820152600660248201527f2170726f6f6600000000000000000000000000000000000000000000000000006044820152606401610cb2565b505b61260333308560ff166017546125d19190614ac2565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692919061382e565b600e805460ff8516908190039091556001600160a01b038516600090815260166020526040812080548301905561192e91869161387f565b61264481611868565b6001600160a01b0316336001600160a01b03161461268d5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610cb2565b60026020819055506126b08383836040518060200160405280600081525061340b565b5050600160205550565b6126c26127fd565b601b5460ff16156126ff5760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b7feb0ff494c0855e7c27233e02cb7987f997be6005d24b09af504d00f2e349c891601882604051612731929190614971565b60405180910390a16018610e1282826149e5565b6001600160a01b0383166127a05761279b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6127c3565b816001600160a01b0316836001600160a01b0316146127c3576127c38382613947565b6001600160a01b0382166127da57610ffb816139e4565b826001600160a01b0316826001600160a01b031614610ffb57610ffb8282613a93565b600c546001600160a01b03163314611a7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cb2565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610d815750610d8182613ad7565b6000818152600260205260409020546001600160a01b03166114105760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610cb2565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061293b82611868565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60145460ff166129c65760405162461bcd60e51b815260206004820152600760248201527f21616374697665000000000000000000000000000000000000000000000000006044820152606401610cb2565b60008181526015602052604090205460ff1615612a255760405162461bcd60e51b815260206004820152600860248201527f21636c61696d65640000000000000000000000000000000000000000000000006044820152606401610cb2565b6040517f5bef6364000000000000000000000000000000000000000000000000000000008152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635bef636490602401602060405180830381865afa158015612aa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aca9190614c3a565b90506000612ad782612f80565b9050806010541015612b2b5760405162461bcd60e51b815260206004820152600e60248201527f217469636b657473537570706c790000000000000000000000000000000000006044820152606401610cb2565b6010805482900390556000838152601560205260408120805460ff1916600117905561192e908590839061387f565b600080612b6683611868565b9050806001600160a01b0316846001600160a01b03161480612bad57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612bd15750836001600160a01b0316612bc684610ea8565b6001600160a01b0316145b949350505050565b826001600160a01b0316612bec82611868565b6001600160a01b031614612c685760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610cb2565b6001600160a01b038216612ce35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610cb2565b612cee838383613b72565b612cf96000826128f9565b6001600160a01b0383166000908152600360205260408120805460019290612d22908490614b0e565b90915550506001600160a01b0382166000908152600360205260408120805460019290612d50908490614878565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610ffb838383613be6565b612dcd81611868565b6001600160a01b0316826001600160a01b031614612e165760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610cb2565b6000818152601d60205260408120549003612e735760405162461bcd60e51b815260206004820152600a60248201527f21636f6d706f73696e67000000000000000000000000000000000000000000006044820152606401610cb2565b6000818152601d602090815260408083208390556001600160a01b0385168352601f90915281208054909190612ea890614c57565b90915550612eb582613075565b6040516000815281907fa12025774224352cb08248f1196c3fd61a0fbe40efec13c87aa3cd426942529c9060200160405180910390a25050565b6040516001600160a01b038316602482015260448101829052610ffb9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152613c2a565b60008060001960ff841601612f9757506005610d81565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60ff841601612fc957506003610d81565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd60ff841601612ffb57506002610d81565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60ff84160161302d57506001610d81565b60405162461bcd60e51b815260206004820152600560248201527f21746965720000000000000000000000000000000000000000000000000000006044820152606401610cb2565b6000613080826119cf565b9050600061308d83611c99565b90506130976141ff565b6000805b848110156131b6576130ad868261135e565b6000818152601e60209081526040808320839055601d909152902054909250158015906130dc575060235460ff165b156131a65760015b600460ff8216116131a457836130fb600183614b3b565b60ff166004811061310e5761310e614b25565b60200201518561311f600184614b3b565b60ff166004811061313257613132614b25565b602002015111156131945760ff8116600090815260216020908152604080832054868452601e909252909120558361316b600183614b3b565b60ff166004811061317e5761317e614b25565b60200201805161318d90614b5e565b90526131a4565b61319d81614c6e565b90506130e4565b505b6131af81614b5e565b905061309b565b505050505050565b6000818152601d60205260409020541561321a5760405162461bcd60e51b815260206004820152600960248201527f636f6d706f73696e6700000000000000000000000000000000000000000000006044820152606401610cb2565b61322381611868565b6001600160a01b0316336001600160a01b03161461326c5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610cb2565b6000818152601d60209081526040808320429055338352601f9091528120805490919061329890614b5e565b909155506132a533613075565b6040516001815281907fa12025774224352cb08248f1196c3fd61a0fbe40efec13c87aa3cd426942529c9060200160405180910390a250565b600c80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361339e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610cb2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613416848484612bd9565b61342284848484613d0f565b61192e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610cb2565b600082116134e45760405162461bcd60e51b815260206004820152600860248201527f217a65726f5174790000000000000000000000000000000000000000000000006044820152606401610cb2565b80156135515781600f54101561353c5760405162461bcd60e51b815260206004820152600f60248201527f217472656173757279537570706c7900000000000000000000000000000000006044820152606401610cb2565b600f80548390039055610ffb8383600161387f565b81600e5410156135a35760405162461bcd60e51b815260206004820152600d60248201527f217075626c6963537570706c79000000000000000000000000000000000000006044820152606401610cb2565b600e80548390039055610ffb8383600061387f565b6060816000036135fb57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613625578061360f81614b5e565b915061361e9050600a83614ae1565b91506135ff565b60008167ffffffffffffffff81111561364057613640614269565b6040519080825280601f01601f19166020018201604052801561366a576020820181803683370190505b5090505b8415612bd15761367f600183614b0e565b915061368c600a866148a6565b613697906030614878565b60f81b8183815181106136ac576136ac614b25565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506136e6600a86614ae1565b945061366e565b6127106bffffffffffffffffffffffff821611156137735760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610cb2565b6001600160a01b0382166137c95760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610cb2565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600a55565b6000826138258584613e98565b14949350505050565b6040516001600160a01b038085166024830152831660448201526064810182905261192e9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612f34565b600060ff82166138c15760005b838110156138bb57601180546001810190915591506138ab8583613edd565b6138b481614b5e565b905061388c565b5061192e565b60001960ff8316016138ff5760005b838110156138bb57601280546001810190915591506138ef8583613edd565b6138f881614b5e565b90506138d0565b60405162461bcd60e51b815260206004820152600560248201527f21747970650000000000000000000000000000000000000000000000000000006044820152606401610cb2565b60006001613954846119cf565b61395e9190614b0e565b6000838152600760205260409020549091508082146139b1576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906139f690600190614b0e565b60008381526009602052604081205460088054939450909284908110613a1e57613a1e614b25565b906000526020600020015490508060088381548110613a3f57613a3f614b25565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613a7757613a77614c8d565b6001900381819060005260206000200160009055905550505050565b6000613a9e836119cf565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480613b3a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610d8157507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610d81565b6000818152601d60205260409020541580613b8f57506020546002145b613bdb5760405162461bcd60e51b815260206004820152600960248201527f636f6d706f73696e6700000000000000000000000000000000000000000000006044820152606401610cb2565b610ffb838383612745565b6000818152601d602052604090205415610ffb576001600160a01b03831615613c1257613c1283613075565b6001600160a01b03821615610ffb57610ffb82613075565b6000613c7f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140409092919063ffffffff16565b805190915015610ffb5780806020019051810190613c9d9190614ca3565b610ffb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610cb2565b60006001600160a01b0384163b15613e8d576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290613d6c903390899088908890600401614cc0565b6020604051808303816000875af1925050508015613da7575060408051601f3d908101601f19168201909252613da491810190614cfc565b60015b613e5a573d808015613dd5576040519150601f19603f3d011682016040523d82523d6000602084013e613dda565b606091505b508051600003613e525760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610cb2565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050612bd1565b506001949350505050565b600081815b8451811015611ecb57613ec982868381518110613ebc57613ebc614b25565b602002602001015161404f565b915080613ed581614b5e565b915050613e9d565b6001600160a01b038216613f335760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610cb2565b6000818152600260205260409020546001600160a01b031615613f985760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610cb2565b613fa460008383613b72565b6001600160a01b0382166000908152600360205260408120805460019290613fcd908490614878565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610e1260008383613be6565b6060612bd1848460008561407e565b600081831061406b5760008281526020849052604090206118f2565b60008381526020839052604090206118f2565b6060824710156140f65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610cb2565b6001600160a01b0385163b61414d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cb2565b600080866001600160a01b031685876040516141699190614d19565b60006040518083038185875af1925050503d80600081146141a6576040519150601f19603f3d011682016040523d82523d6000602084013e6141ab565b606091505b50915091506141bb8282866141c6565b979650505050505050565b606083156141d55750816118f2565b8251156141e55782518084602001fd5b8160405162461bcd60e51b8152600401610cb29190614396565b60405180608001604052806004906020820280368337509192915050565b60006020828403121561422f57600080fd5b5035919050565b6001600160e01b03198116811461141057600080fd5b60006020828403121561425e57600080fd5b81356118f281614236565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561429a5761429a614269565b604051601f8501601f19908116603f011681019082821181831017156142c2576142c2614269565b816040528093508581528686860111156142db57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561430757600080fd5b813567ffffffffffffffff81111561431e57600080fd5b8201601f8101841361432f57600080fd5b612bd18482356020840161427f565b60005b83811015614359578181015183820152602001614341565b8381111561192e5750506000910152565b6000815180845261438281602086016020860161433e565b601f01601f19169290920160200192915050565b6020815260006118f2602083018461436a565b6001600160a01b038116811461141057600080fd5b600080604083850312156143d157600080fd5b82356143dc816143a9565b946020939093013593505050565b60ff8116811461141057600080fd5b6000806040838503121561440c57600080fd5b8235614417816143a9565b91506020830135614427816143ea565b809150509250929050565b60006020828403121561444457600080fd5b81356118f2816143a9565b60008060006060848603121561446457600080fd5b833561446f816143a9565b9250602084013561447f816143a9565b929592945050506040919091013590565b801515811461141057600080fd5b6000602082840312156144b057600080fd5b81356118f281614490565b600080604083850312156144ce57600080fd5b50508035926020909101359150565b6000806000606084860312156144f257600080fd5b83356144fd81614490565b9250602084013561450d816143a9565b9150604084013561451d816143ea565b809150509250925092565b60006020828403121561453a57600080fd5b81356118f2816143ea565b60008083601f84011261455757600080fd5b50813567ffffffffffffffff81111561456f57600080fd5b6020830191508360208260051b850101111561135757600080fd5b6000806020838503121561459d57600080fd5b823567ffffffffffffffff8111156145b457600080fd5b6145c085828601614545565b90969095509350505050565b600080604083850312156145df57600080fd5b82359150602083013561442781614490565b60808101818360005b60048110156146195781518352602092830192909101906001016145fa565b50505092915050565b6000806040838503121561463557600080fd5b8235614640816143a9565b9150602083013561442781614490565b6000806000806080858703121561466657600080fd5b8435614671816143a9565b93506020850135614681816143a9565b925060408501359150606085013567ffffffffffffffff8111156146a457600080fd5b8501601f810187136146b557600080fd5b6146c48782356020840161427f565b91505092959194509250565b6000806000606084860312156146e557600080fd5b83356146f0816143a9565b925060208401359150604084013561451d81614490565b60006020828403121561471957600080fd5b81356bffffffffffffffffffffffff811681146118f257600080fd5b6000806040838503121561474857600080fd5b8235614753816143a9565b91506020830135614427816143a9565b6000806000806000806060878903121561477c57600080fd5b863567ffffffffffffffff8082111561479457600080fd5b6147a08a838b01614545565b909850965060208901359150808211156147b957600080fd5b6147c58a838b01614545565b909650945060408901359150808211156147de57600080fd5b506147eb89828a01614545565b979a9699509497509295939492505050565b6000806000806060858703121561481357600080fd5b843561481e816143a9565b9350602085013561482e816143ea565b9250604085013567ffffffffffffffff81111561484a57600080fd5b61485687828801614545565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561488b5761488b614862565b500190565b634e487b7160e01b600052601260045260246000fd5b6000826148b5576148b5614890565b500690565b600181811c908216806148ce57607f821691505b6020821081036148ee57634e487b7160e01b600052602260045260246000fd5b50919050565b60008154614901816148ba565b80855260206001838116801561491e576001811461493857614966565b60ff198516838901528284151560051b8901019550614966565b866000528260002060005b8581101561495e5781548a8201860152908301908401614943565b890184019650505b505050505092915050565b60408152600061498460408301856148f4565b8281036020840152614996818561436a565b95945050505050565b601f821115610ffb57600081815260208120601f850160051c810160208610156149c65750805b601f850160051c820191505b818110156131b6578281556001016149d2565b815167ffffffffffffffff8111156149ff576149ff614269565b614a1381614a0d84546148ba565b8461499f565b602080601f831160018114614a485760008415614a305750858301515b600019600386901b1c1916600185901b1785556131b6565b600085815260208120601f198616915b82811015614a7757888601518255948401946001909101908401614a58565b5085821015614a955787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614ab757600080fd5b81516118f2816143a9565b6000816000190483118215151615614adc57614adc614862565b500290565b600082614af057614af0614890565b500490565b600060208284031215614b0757600080fd5b5051919050565b600082821015614b2057614b20614862565b500390565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff841680821015614b5557614b55614862565b90039392505050565b60006000198203614b7157614b71614862565b5060010190565b6020815260006118f260208301846148f4565b6000808454614b99816148ba565b60018281168015614bb15760018114614bc657614bf5565b60ff1984168752821515830287019450614bf5565b8860005260208060002060005b85811015614bec5781548a820152908401908201614bd3565b50505082870194505b505050508351614c0981836020880161433e565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b600060208284031215614c4c57600080fd5b81516118f2816143ea565b600081614c6657614c66614862565b506000190190565b600060ff821660ff8103614c8457614c84614862565b60010192915050565b634e487b7160e01b600052603160045260246000fd5b600060208284031215614cb557600080fd5b81516118f281614490565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614cf2608083018461436a565b9695505050505050565b600060208284031215614d0e57600080fd5b81516118f281614236565b60008251614d2b81846020870161433e565b919091019291505056fea26469706673582212203ae588ea627672454845c1d31fdb34c557592e06cc422f943f0161c0c7f80b9064736f6c634300080f0033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b00000000000000000000000044896710c31d890ecfd6870fafea7300a9cf185900000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000e69674cc21158fbddebf3494520f9eacbdd55e410000000000000000000000000000000000000000000000000000000059682f000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000faf241943ccaefefaf6e36ca7c4475ba814d1655000000000000000000000000a1180bd93442c0925948306e8d8d99673b91de2f0000000000000000000000008fe24df2a028afb7c0c837ec0c1711355f67ac6000000000000000000000000022603939a7b086064a66b9dee79eb7e73ae1e110000000000000000000000000ad3c9c4e03cbc7b0cbb392d9ce8ebda41ca97c4d

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106105b75760003560e01c80637b75403c116102f8578063baa51f861161019c578063d5556544116100ee578063ea6bb349116100a2578063faedfd3f1161007c578063faedfd3f14610c29578063fb878ece14610c3c578063fe2c7fee14610c4557600080fd5b8063ea6bb34914610bf0578063f2fde38b14610c03578063f9628b7c14610c1657600080fd5b8063dbe7e3bd116100d3578063dbe7e3bd14610b7e578063e268e4d314610ba1578063e985e9c514610bb457600080fd5b8063d555654414610b6c578063d5abeb0114610b7557600080fd5b8063c6ab67a311610150578063cac926691161012a578063cac9266914610b39578063cfedd61b14610b4c578063d4a6a2fd14610b5f57600080fd5b8063c6ab67a314610b15578063c793803c14610b1e578063c87b56dd14610b2657600080fd5b8063c2f6dde111610181578063c2f6dde114610ae6578063c311bc7914610af9578063c36f99f514610b0257600080fd5b8063baa51f8614610ab1578063c12aecd114610ad357600080fd5b80638f4f67d0116102555780639aa5d3c511610209578063aa98e0c6116101e3578063aa98e0c614610a8d578063b88d4fde14610a96578063ba808f3414610aa957600080fd5b80639aa5d3c514610a6a578063a16062ae14610a72578063a22cb46514610a7a57600080fd5b806392cf76241161023a57806392cf762414610a3a57806395d89b4114610a5a578063997bf9f614610a6257600080fd5b80638f4f67d014610a1457806391b7f5ed14610a2757600080fd5b806380d7437b116102ac57806389e376b51161029157806389e376b5146109d05780638d5b6757146109e35780638da5cb5b14610a0357600080fd5b806380d7437b1461098957806389a30271146109a957600080fd5b80637f8d4aa7116102dd5780637f8d4aa714610960578063809b18d51461097357806380a9f28e1461097c57600080fd5b80637b75403c1461093a5780637cb647591461094d57600080fd5b80633790cf571161045f5780636352211e116103bc5780636ba0839c116103705780637035bf181161034a5780637035bf181461091757806370a082311461091f578063715018a61461093257600080fd5b80636ba0839c146108d55780636c0360eb146108e85780636cc97934146108f057600080fd5b806366a7481d116103a157806366a7481d1461089f5780636817c76c146108b95780636986caf0146108c257600080fd5b80636352211e1461088357806364f751091461089657600080fd5b8063453c2310116104135780634f6ccce7116103f85780634f6ccce7146108305780636021726714610843578063612d3f1a1461086357600080fd5b8063453c2310146108145780634d4b8c881461081d57600080fd5b80633ccfd60b116104445780633ccfd60b146107e65780633f2981cf146107ee57806342842e0e1461080157600080fd5b80633790cf57146107c0578063379607f5146107d357600080fd5b80630f7bbf1e1161051857806323b872dd116104cc5780632a55205a116104a65780632a55205a146107735780632e5827f6146107a55780632f745c59146107ad57600080fd5b806323b872dd1461073b57806325fd90f31461074e57806327f99fda1461076057600080fd5b806318160ddd116104fd57806318160ddd146106d85780631dfbafb5146106e05780631e7269c51461071b57600080fd5b80630f7bbf1e146106b95780631455ecf6146106d057600080fd5b8063081812fc1161056f578063095ea7b311610554578063095ea7b314610680578063099b6bfa146106935780630de05659146106a657600080fd5b8063081812fc1461062e578063090e94191461065957600080fd5b806302fe5305116105a057806302fe5305146105f9578063054f7d9c1461060c57806306fdde031461061957600080fd5b806301e343db146105bc57806301ffc9a7146105d1575b600080fd5b6105cf6105ca36600461421d565b610c58565b005b6105e46105df36600461424c565b610d43565b60405190151581526020015b60405180910390f35b6105cf6106073660046142f5565b610d87565b601b546105e49060ff1681565b610621610e16565b6040516105f09190614396565b61064161063c36600461421d565b610ea8565b6040516001600160a01b0390911681526020016105f0565b6106417f000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b81565b6105cf61068e3660046143be565b610ecf565b6105cf6106a136600461421d565b611000565b6105cf6106b43660046143be565b611086565b6106c261048081565b6040519081526020016105f0565b6106c2600581565b6008546106c2565b6106c26106ee3660046143f9565b6001600160a01b038216600090815260226020908152604080832060ff8516845290915290205492915050565b6106c2610729366004614432565b60166020526000908152604090205481565b6105cf61074936600461444f565b61119a565b6014546105e490610100900460ff1681565b6105cf61076e36600461449e565b611221565b6107866107813660046144bb565b61127f565b604080516001600160a01b0390931683526020830191909152016105f0565b6106c2609481565b6106c26107bb3660046143be565b61135e565b6105cf6107ce36600461421d565b611406565b6105cf6107e136600461421d565b611413565b6105cf61151f565b6014546105e49062010000900460ff1681565b6105cf61080f36600461444f565b61164a565b6106c2600d5481565b6105cf61082b3660046144dd565b611665565b6106c261083e36600461421d565b6117c4565b6106c2610851366004614432565b601f6020526000908152604090205481565b6106c2610871366004614528565b60216020526000908152604090205481565b61064161089136600461421d565b611868565b6106c260105481565b6108a7600481565b60405160ff90911681526020016105f0565b6106c260175481565b6106c26108d036600461421d565b6118cd565b6105cf6108e336600461458a565b6118f9565b610621611934565b6106417f00000000000000000000000044896710c31d890ecfd6870fafea7300a9cf185981565b6106216119c2565b6106c261092d366004614432565b6119cf565b6105cf611a69565b6105cf6109483660046145cc565b611a7d565b6105cf61095b36600461421d565b611c3e565b6105cf61096e3660046143be565b611c87565b6106c261271081565b6023546105e49060ff1681565b61099c610997366004614432565b611c99565b6040516105f091906145f1565b6106417f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6106c26109de36600461421d565b611d11565b6106c26109f136600461421d565b601e6020526000908152604090205481565b600c546001600160a01b0316610641565b6105cf610a2236600461421d565b611d4b565b6105cf610a3536600461421d565b611d54565b6106c2610a4836600461421d565b601d6020526000908152604090205481565b610621611d9d565b6108a7600281565b6106c260fa81565b6108a7600381565b6105cf610a88366004614622565b611dac565b6106c260135481565b6105cf610aa4366004614650565b611db7565b6108a7600181565b6105e4610abf36600461421d565b6000908152601d6020526040902054151590565b6105cf610ae136600461458a565b611e3f565b6105cf610af43660046146d0565b611e75565b6106c2600e5481565b6106c2610b10366004614432565b611e88565b6106c2601c5481565b6105cf611ed3565b610621610b3436600461421d565b611f60565b6105cf610b47366004614707565b612075565b6106c2610b5a36600461421d565b612138565b6014546105e49060ff1681565b6106c2601a5481565b6106c261061381565b6105e4610b8c36600461421d565b60156020526000908152604090205460ff1681565b6105cf610baf36600461421d565b612193565b6105e4610bc2366004614735565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6105cf610bfe366004614763565b6121dc565b6105cf610c11366004614432565b6122cb565b6105cf610c243660046147fd565b612358565b6105cf610c3736600461444f565b61263b565b6106c2600f5481565b6105cf610c533660046142f5565b6126ba565b610c606127fd565b601a5415610cbb5760405162461bcd60e51b8152600401610cb29060208082526004908201527f2173657400000000000000000000000000000000000000000000000000000000604082015260600190565b60405180910390fd5b604080514260208083019190915281830184905282518083038401815260609092019092528051910120610cf26104806094614878565b610cfc90826148a6565b610d07906001614878565b601a8190556040519081527fe1885e3eec4149d2813cbef9660f93d83a9407732218aef3684a2f49576dc8359060200160405180910390a15050565b60006001600160e01b031982167f2baae9fd000000000000000000000000000000000000000000000000000000001480610d815750610d8182612857565b92915050565b610d8f6127fd565b601b5460ff1615610dcc5760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b7feb0ff494c0855e7c27233e02cb7987f997be6005d24b09af504d00f2e349c891601982604051610dfe929190614971565b60405180910390a16019610e1282826149e5565b5050565b606060008054610e25906148ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610e51906148ba565b8015610e9e5780601f10610e7357610100808354040283529160200191610e9e565b820191906000526020600020905b815481529060010190602001808311610e8157829003601f168201915b5050505050905090565b6000610eb382612895565b506000908152600460205260409020546001600160a01b031690565b6000610eda82611868565b9050806001600160a01b0316836001600160a01b031603610f635760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610cb2565b336001600160a01b0382161480610f7f5750610f7f8133610bc2565b610ff15760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610cb2565b610ffb83836128f9565b505050565b6110086127fd565b601b5460ff16156110455760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b601c5460408051918252602082018390527fa5a1ff5ae2c83e84c67ccf88aa36b771582ddb9bf09c3ad5a3222e4f1b7ce043910160405180910390a1601c55565b61108e6127fd565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b6001600160a01b031690636352211e90602401602060405180830381865afa15801561110c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111309190614aa5565b6001600160a01b0316826001600160a01b0316146111905760405162461bcd60e51b815260206004820152600c60248201527f217469636b65744f776e657200000000000000000000000000000000000000006044820152606401610cb2565b610e128282612974565b6111a43382612b5a565b6112165760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610cb2565b610ffb838383612bd9565b6112296127fd565b6023546040805160ff9092161515825282151560208301527fd033994ed606cb1b6c5a4d9c44a536542d87e30177e3a2eb02913999d84415f0910160405180910390a16023805460ff1916911515919091179055565b6000828152600b602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291611320575060408051808201909152600a546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090611344906bffffffffffffffffffffffff1687614ac2565b61134e9190614ae1565b91519350909150505b9250929050565b6000611369836119cf565b82106113dd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610cb2565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6114103382612dc4565b50565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b6001600160a01b031690636352211e90602401602060405180830381865afa158015611491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b59190614aa5565b6001600160a01b0316336001600160a01b0316146115155760405162461bcd60e51b815260206004820152600c60248201527f217469636b65744f776e657200000000000000000000000000000000000000006044820152606401610cb2565b6114103382612974565b6115276127fd565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa1580156115a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cb9190614af5565b90506116136115e2600c546001600160a01b031690565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169083612eef565b6040518181527f4e70a604b23a8edee2b1d0a656e9b9c00b73ad8bb1afc2c59381ee9f69197de7906020015b60405180910390a150565b610ffb83838360405180602001604052806000815250611db7565b336001600160a01b037f00000000000000000000000044896710c31d890ecfd6870fafea7300a9cf185916146116dd5760405162461bcd60e51b815260206004820152601060248201527f217374616b696e67436f6e7472616374000000000000000000000000000000006044820152606401610cb2565b60006116e882612f80565b90508315611731576001600160a01b038316600090815260226020908152604080832060ff8616845290915281208054839290611726908490614878565b9091555061176d9050565b6001600160a01b038316600090815260226020908152604080832060ff8616845290915281208054839290611767908490614b0e565b90915550505b61177683613075565b60408051851515815260ff841660208201526001600160a01b038516917fb330639968750299210f5e98fc41c760dac2c6937f85aca27fd38063696d8aff910160405180910390a250505050565b60006117cf60085490565b82106118435760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610cb2565b6008828154811061185657611856614b25565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b031680610d815760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610cb2565b6000818152601d6020526040812054806118e85760006118f2565b6118f28142614b0e565b9392505050565b8060005b8181101561192e5761192684848381811061191a5761191a614b25565b905060200201356131be565b6001016118fd565b50505050565b60198054611941906148ba565b80601f016020809104026020016040519081016040528092919081815260200182805461196d906148ba565b80156119ba5780601f1061198f576101008083540402835291602001916119ba565b820191906000526020600020905b81548152906001019060200180831161199d57829003601f168201915b505050505081565b60188054611941906148ba565b60006001600160a01b038216611a4d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610cb2565b506001600160a01b031660009081526003602052604090205490565b611a716127fd565b611a7b60006132de565b565b611a856127fd565b60038210611ad55760405162461bcd60e51b815260206004820152600360248201527f21696400000000000000000000000000000000000000000000000000000000006044820152606401610cb2565b81600003611b36576014546040805160ff90921615158252821515602083015283917f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e72910160405180910390a26014805482151560ff199091161790555050565b81600103611bbd576014546040805161010090920460ff1615158252821515602083015283917f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e72910160405180910390a260148054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790555050565b601454604080516201000090920460ff1615158252821515602083015283917f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e72910160405180910390a26014805482151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9091161790555050565b611c466127fd565b60135460408051918252602082018390527f191a34cdab35c3a3a2ef7ba4d54d4e55a5416f6807b90652ee8ee0be41699583910160405180910390a1601355565b611c8f6127fd565b610e128282612dc4565b611ca16141ff565b611ca96141ff565b60015b600460ff821611611d0a576001600160a01b038416600090815260226020908152604080832060ff8516845290915290205482611cea600184614b3b565b60ff1660048110611cfd57611cfd614b25565b6020020152600101611cac565b5092915050565b6000818152601e602052604081205461271090611d2e9082614878565b611d37846118cd565b611d419190614ac2565b610d819190614ae1565b611410816131be565b611d5c6127fd565b60175460408051918252602082018390527fb9362b96e28efbb7a7e63bb4a97faf9924ec0394635feff8588a6ae2a5f784fe910160405180910390a1601755565b606060018054610e25906148ba565b610e1233838361333d565b611dc13383612b5a565b611e335760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610cb2565b61192e8484848461340b565b8060005b8181101561192e57611e6d33858584818110611e6157611e61614b25565b90506020020135612dc4565b600101611e43565b611e7d6127fd565b610ffb838383613494565b600080611e94836119cf565b90506000805b82811015611ecb57611eaf6109de868361135e565b611eb99083614878565b9150611ec481614b5e565b9050611e9a565b509392505050565b611edb6127fd565b601b5460ff1615611f185760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b601b805460ff191660011790556040517f80769e0fec5395870efbeb7790ddbe4c3669e465667108c34094cbcdd7c0ac5090611f5690601990614b78565b60405180910390a1565b6060611f6b82612895565b601a5460609015611fe25760198054611f83906148ba565b9050600003611fa2575050604080516020810190915260008152919050565b6000611fad84612138565b90506019611fba826135b8565b604051602001611fcb929190614b8b565b604051602081830303815290604052915050610d81565b60188054611fef906148ba565b80601f016020809104026020016040519081016040528092919081815260200182805461201b906148ba565b80156120685780601f1061203d57610100808354040283529160200191612068565b820191906000526020600020905b81548152906001019060200180831161204b57829003601f168201915b5050505050905092915050565b61207d6127fd565b6103e8816bffffffffffffffffffffffff1611156120df5760405162461bcd60e51b8152600401610cb29060208082526004908201527f2162707300000000000000000000000000000000000000000000000000000000604082015260600190565b6120fa6120f4600c546001600160a01b031690565b826136ed565b6040516bffffffffffffffffffffffff821681527f3cf4fec9aae458c3a169ef0c25423c15fbfc6175238fa756786f345d9d9fdbc99060200161163f565b6000600782108061214a575061051a82115b15612153575090565b6000601a54836121639190614878565b905061051a811115610d8157600161051a61217f836007614878565b6121899190614b0e565b6118f29190614b0e565b61219b6127fd565b600d5460408051918252602082018390527f91d83d678e463f3bd36117413cec5e4cd93c2b7688234e854c4b662fb7fc493b910160405180910390a1600d55565b6121e46127fd565b8483811480156121f357508181145b61223f5760405162461bcd60e51b815260206004820152600860248201527f216c656e677468730000000000000000000000000000000000000000000000006044820152606401610cb2565b60005b818110156122c1576122b988888381811061225f5761225f614b25565b90506020020160208101906122749190614432565b87878481811061228657612286614b25565b9050602002013586868581811061229f5761229f614b25565b90506020020160208101906122b4919061449e565b613494565b600101612242565b5050505050505050565b6122d36127fd565b6001600160a01b03811661234f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610cb2565b611410816132de565b601454610100900460ff166123af5760405162461bcd60e51b815260206004820152600760248201527f21616374697665000000000000000000000000000000000000000000000000006044820152606401610cb2565b60008360ff16116124025760405162461bcd60e51b815260206004820152600860248201527f217a65726f5174790000000000000000000000000000000000000000000000006044820152606401610cb2565b600d546001600160a01b03851660009081526016602052604090205461242c9060ff861690614878565b111561247a5760405162461bcd60e51b815260206004820152600860248201527f21757365724d61780000000000000000000000000000000000000000000000006044820152606401610cb2565b8260ff16600e5410156124cf5760405162461bcd60e51b815260206004820152600760248201527f21737570706c79000000000000000000000000000000000000000000000000006044820152606401610cb2565b60145462010000900460ff166125bb576040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602082015260009060340160405160208183030381529060405280519060200120905061256d838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506013549150849050613818565b6125b95760405162461bcd60e51b815260206004820152600660248201527f2170726f6f6600000000000000000000000000000000000000000000000000006044820152606401610cb2565b505b61260333308560ff166017546125d19190614ac2565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481692919061382e565b600e805460ff8516908190039091556001600160a01b038516600090815260166020526040812080548301905561192e91869161387f565b61264481611868565b6001600160a01b0316336001600160a01b03161461268d5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610cb2565b60026020819055506126b08383836040518060200160405280600081525061340b565b5050600160205550565b6126c26127fd565b601b5460ff16156126ff5760405162461bcd60e51b815260206004820152600760248201526610b33937bd32b760c91b6044820152606401610cb2565b7feb0ff494c0855e7c27233e02cb7987f997be6005d24b09af504d00f2e349c891601882604051612731929190614971565b60405180910390a16018610e1282826149e5565b6001600160a01b0383166127a05761279b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6127c3565b816001600160a01b0316836001600160a01b0316146127c3576127c38382613947565b6001600160a01b0382166127da57610ffb816139e4565b826001600160a01b0316826001600160a01b031614610ffb57610ffb8282613a93565b600c546001600160a01b03163314611a7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cb2565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610d815750610d8182613ad7565b6000818152600260205260409020546001600160a01b03166114105760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610cb2565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061293b82611868565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60145460ff166129c65760405162461bcd60e51b815260206004820152600760248201527f21616374697665000000000000000000000000000000000000000000000000006044820152606401610cb2565b60008181526015602052604090205460ff1615612a255760405162461bcd60e51b815260206004820152600860248201527f21636c61696d65640000000000000000000000000000000000000000000000006044820152606401610cb2565b6040517f5bef6364000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b6001600160a01b031690635bef636490602401602060405180830381865afa158015612aa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aca9190614c3a565b90506000612ad782612f80565b9050806010541015612b2b5760405162461bcd60e51b815260206004820152600e60248201527f217469636b657473537570706c790000000000000000000000000000000000006044820152606401610cb2565b6010805482900390556000838152601560205260408120805460ff1916600117905561192e908590839061387f565b600080612b6683611868565b9050806001600160a01b0316846001600160a01b03161480612bad57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612bd15750836001600160a01b0316612bc684610ea8565b6001600160a01b0316145b949350505050565b826001600160a01b0316612bec82611868565b6001600160a01b031614612c685760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610cb2565b6001600160a01b038216612ce35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610cb2565b612cee838383613b72565b612cf96000826128f9565b6001600160a01b0383166000908152600360205260408120805460019290612d22908490614b0e565b90915550506001600160a01b0382166000908152600360205260408120805460019290612d50908490614878565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610ffb838383613be6565b612dcd81611868565b6001600160a01b0316826001600160a01b031614612e165760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610cb2565b6000818152601d60205260408120549003612e735760405162461bcd60e51b815260206004820152600a60248201527f21636f6d706f73696e67000000000000000000000000000000000000000000006044820152606401610cb2565b6000818152601d602090815260408083208390556001600160a01b0385168352601f90915281208054909190612ea890614c57565b90915550612eb582613075565b6040516000815281907fa12025774224352cb08248f1196c3fd61a0fbe40efec13c87aa3cd426942529c9060200160405180910390a25050565b6040516001600160a01b038316602482015260448101829052610ffb9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152613c2a565b60008060001960ff841601612f9757506005610d81565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60ff841601612fc957506003610d81565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd60ff841601612ffb57506002610d81565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60ff84160161302d57506001610d81565b60405162461bcd60e51b815260206004820152600560248201527f21746965720000000000000000000000000000000000000000000000000000006044820152606401610cb2565b6000613080826119cf565b9050600061308d83611c99565b90506130976141ff565b6000805b848110156131b6576130ad868261135e565b6000818152601e60209081526040808320839055601d909152902054909250158015906130dc575060235460ff165b156131a65760015b600460ff8216116131a457836130fb600183614b3b565b60ff166004811061310e5761310e614b25565b60200201518561311f600184614b3b565b60ff166004811061313257613132614b25565b602002015111156131945760ff8116600090815260216020908152604080832054868452601e909252909120558361316b600183614b3b565b60ff166004811061317e5761317e614b25565b60200201805161318d90614b5e565b90526131a4565b61319d81614c6e565b90506130e4565b505b6131af81614b5e565b905061309b565b505050505050565b6000818152601d60205260409020541561321a5760405162461bcd60e51b815260206004820152600960248201527f636f6d706f73696e6700000000000000000000000000000000000000000000006044820152606401610cb2565b61322381611868565b6001600160a01b0316336001600160a01b03161461326c5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610cb2565b6000818152601d60209081526040808320429055338352601f9091528120805490919061329890614b5e565b909155506132a533613075565b6040516001815281907fa12025774224352cb08248f1196c3fd61a0fbe40efec13c87aa3cd426942529c9060200160405180910390a250565b600c80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361339e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610cb2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613416848484612bd9565b61342284848484613d0f565b61192e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610cb2565b600082116134e45760405162461bcd60e51b815260206004820152600860248201527f217a65726f5174790000000000000000000000000000000000000000000000006044820152606401610cb2565b80156135515781600f54101561353c5760405162461bcd60e51b815260206004820152600f60248201527f217472656173757279537570706c7900000000000000000000000000000000006044820152606401610cb2565b600f80548390039055610ffb8383600161387f565b81600e5410156135a35760405162461bcd60e51b815260206004820152600d60248201527f217075626c6963537570706c79000000000000000000000000000000000000006044820152606401610cb2565b600e80548390039055610ffb8383600061387f565b6060816000036135fb57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613625578061360f81614b5e565b915061361e9050600a83614ae1565b91506135ff565b60008167ffffffffffffffff81111561364057613640614269565b6040519080825280601f01601f19166020018201604052801561366a576020820181803683370190505b5090505b8415612bd15761367f600183614b0e565b915061368c600a866148a6565b613697906030614878565b60f81b8183815181106136ac576136ac614b25565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506136e6600a86614ae1565b945061366e565b6127106bffffffffffffffffffffffff821611156137735760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610cb2565b6001600160a01b0382166137c95760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610cb2565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600a55565b6000826138258584613e98565b14949350505050565b6040516001600160a01b038085166024830152831660448201526064810182905261192e9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612f34565b600060ff82166138c15760005b838110156138bb57601180546001810190915591506138ab8583613edd565b6138b481614b5e565b905061388c565b5061192e565b60001960ff8316016138ff5760005b838110156138bb57601280546001810190915591506138ef8583613edd565b6138f881614b5e565b90506138d0565b60405162461bcd60e51b815260206004820152600560248201527f21747970650000000000000000000000000000000000000000000000000000006044820152606401610cb2565b60006001613954846119cf565b61395e9190614b0e565b6000838152600760205260409020549091508082146139b1576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906139f690600190614b0e565b60008381526009602052604081205460088054939450909284908110613a1e57613a1e614b25565b906000526020600020015490508060088381548110613a3f57613a3f614b25565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613a7757613a77614c8d565b6001900381819060005260206000200160009055905550505050565b6000613a9e836119cf565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480613b3a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610d8157507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610d81565b6000818152601d60205260409020541580613b8f57506020546002145b613bdb5760405162461bcd60e51b815260206004820152600960248201527f636f6d706f73696e6700000000000000000000000000000000000000000000006044820152606401610cb2565b610ffb838383612745565b6000818152601d602052604090205415610ffb576001600160a01b03831615613c1257613c1283613075565b6001600160a01b03821615610ffb57610ffb82613075565b6000613c7f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166140409092919063ffffffff16565b805190915015610ffb5780806020019051810190613c9d9190614ca3565b610ffb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610cb2565b60006001600160a01b0384163b15613e8d576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290613d6c903390899088908890600401614cc0565b6020604051808303816000875af1925050508015613da7575060408051601f3d908101601f19168201909252613da491810190614cfc565b60015b613e5a573d808015613dd5576040519150601f19603f3d011682016040523d82523d6000602084013e613dda565b606091505b508051600003613e525760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610cb2565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050612bd1565b506001949350505050565b600081815b8451811015611ecb57613ec982868381518110613ebc57613ebc614b25565b602002602001015161404f565b915080613ed581614b5e565b915050613e9d565b6001600160a01b038216613f335760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610cb2565b6000818152600260205260409020546001600160a01b031615613f985760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610cb2565b613fa460008383613b72565b6001600160a01b0382166000908152600360205260408120805460019290613fcd908490614878565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610e1260008383613be6565b6060612bd1848460008561407e565b600081831061406b5760008281526020849052604090206118f2565b60008381526020839052604090206118f2565b6060824710156140f65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610cb2565b6001600160a01b0385163b61414d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cb2565b600080866001600160a01b031685876040516141699190614d19565b60006040518083038185875af1925050503d80600081146141a6576040519150601f19603f3d011682016040523d82523d6000602084013e6141ab565b606091505b50915091506141bb8282866141c6565b979650505050505050565b606083156141d55750816118f2565b8251156141e55782518084602001fd5b8160405162461bcd60e51b8152600401610cb29190614396565b60405180608001604052806004906020820280368337509192915050565b60006020828403121561422f57600080fd5b5035919050565b6001600160e01b03198116811461141057600080fd5b60006020828403121561425e57600080fd5b81356118f281614236565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561429a5761429a614269565b604051601f8501601f19908116603f011681019082821181831017156142c2576142c2614269565b816040528093508581528686860111156142db57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561430757600080fd5b813567ffffffffffffffff81111561431e57600080fd5b8201601f8101841361432f57600080fd5b612bd18482356020840161427f565b60005b83811015614359578181015183820152602001614341565b8381111561192e5750506000910152565b6000815180845261438281602086016020860161433e565b601f01601f19169290920160200192915050565b6020815260006118f2602083018461436a565b6001600160a01b038116811461141057600080fd5b600080604083850312156143d157600080fd5b82356143dc816143a9565b946020939093013593505050565b60ff8116811461141057600080fd5b6000806040838503121561440c57600080fd5b8235614417816143a9565b91506020830135614427816143ea565b809150509250929050565b60006020828403121561444457600080fd5b81356118f2816143a9565b60008060006060848603121561446457600080fd5b833561446f816143a9565b9250602084013561447f816143a9565b929592945050506040919091013590565b801515811461141057600080fd5b6000602082840312156144b057600080fd5b81356118f281614490565b600080604083850312156144ce57600080fd5b50508035926020909101359150565b6000806000606084860312156144f257600080fd5b83356144fd81614490565b9250602084013561450d816143a9565b9150604084013561451d816143ea565b809150509250925092565b60006020828403121561453a57600080fd5b81356118f2816143ea565b60008083601f84011261455757600080fd5b50813567ffffffffffffffff81111561456f57600080fd5b6020830191508360208260051b850101111561135757600080fd5b6000806020838503121561459d57600080fd5b823567ffffffffffffffff8111156145b457600080fd5b6145c085828601614545565b90969095509350505050565b600080604083850312156145df57600080fd5b82359150602083013561442781614490565b60808101818360005b60048110156146195781518352602092830192909101906001016145fa565b50505092915050565b6000806040838503121561463557600080fd5b8235614640816143a9565b9150602083013561442781614490565b6000806000806080858703121561466657600080fd5b8435614671816143a9565b93506020850135614681816143a9565b925060408501359150606085013567ffffffffffffffff8111156146a457600080fd5b8501601f810187136146b557600080fd5b6146c48782356020840161427f565b91505092959194509250565b6000806000606084860312156146e557600080fd5b83356146f0816143a9565b925060208401359150604084013561451d81614490565b60006020828403121561471957600080fd5b81356bffffffffffffffffffffffff811681146118f257600080fd5b6000806040838503121561474857600080fd5b8235614753816143a9565b91506020830135614427816143a9565b6000806000806000806060878903121561477c57600080fd5b863567ffffffffffffffff8082111561479457600080fd5b6147a08a838b01614545565b909850965060208901359150808211156147b957600080fd5b6147c58a838b01614545565b909650945060408901359150808211156147de57600080fd5b506147eb89828a01614545565b979a9699509497509295939492505050565b6000806000806060858703121561481357600080fd5b843561481e816143a9565b9350602085013561482e816143ea565b9250604085013567ffffffffffffffff81111561484a57600080fd5b61485687828801614545565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561488b5761488b614862565b500190565b634e487b7160e01b600052601260045260246000fd5b6000826148b5576148b5614890565b500690565b600181811c908216806148ce57607f821691505b6020821081036148ee57634e487b7160e01b600052602260045260246000fd5b50919050565b60008154614901816148ba565b80855260206001838116801561491e576001811461493857614966565b60ff198516838901528284151560051b8901019550614966565b866000528260002060005b8581101561495e5781548a8201860152908301908401614943565b890184019650505b505050505092915050565b60408152600061498460408301856148f4565b8281036020840152614996818561436a565b95945050505050565b601f821115610ffb57600081815260208120601f850160051c810160208610156149c65750805b601f850160051c820191505b818110156131b6578281556001016149d2565b815167ffffffffffffffff8111156149ff576149ff614269565b614a1381614a0d84546148ba565b8461499f565b602080601f831160018114614a485760008415614a305750858301515b600019600386901b1c1916600185901b1785556131b6565b600085815260208120601f198616915b82811015614a7757888601518255948401946001909101908401614a58565b5085821015614a955787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614ab757600080fd5b81516118f2816143a9565b6000816000190483118215151615614adc57614adc614862565b500290565b600082614af057614af0614890565b500490565b600060208284031215614b0757600080fd5b5051919050565b600082821015614b2057614b20614862565b500390565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff841680821015614b5557614b55614862565b90039392505050565b60006000198203614b7157614b71614862565b5060010190565b6020815260006118f260208301846148f4565b6000808454614b99816148ba565b60018281168015614bb15760018114614bc657614bf5565b60ff1984168752821515830287019450614bf5565b8860005260208060002060005b85811015614bec5781548a820152908401908201614bd3565b50505082870194505b505050508351614c0981836020880161433e565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b600060208284031215614c4c57600080fd5b81516118f2816143ea565b600081614c6657614c66614862565b506000190190565b600060ff821660ff8103614c8457614c84614862565b60010192915050565b634e487b7160e01b600052603160045260246000fd5b600060208284031215614cb557600080fd5b81516118f281614490565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614cf2608083018461436a565b9695505050505050565b600060208284031215614d0e57600080fd5b81516118f281614236565b60008251614d2b81846020870161433e565b919091019291505056fea26469706673582212203ae588ea627672454845c1d31fdb34c557592e06cc422f943f0161c0c7f80b9064736f6c634300080f0033

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

000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b00000000000000000000000044896710c31d890ecfd6870fafea7300a9cf185900000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000e69674cc21158fbddebf3494520f9eacbdd55e410000000000000000000000000000000000000000000000000000000059682f000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000faf241943ccaefefaf6e36ca7c4475ba814d1655000000000000000000000000a1180bd93442c0925948306e8d8d99673b91de2f0000000000000000000000008fe24df2a028afb7c0c837ec0c1711355f67ac6000000000000000000000000022603939a7b086064a66b9dee79eb7e73ae1e110000000000000000000000000ad3c9c4e03cbc7b0cbb392d9ce8ebda41ca97c4d

-----Decoded View---------------
Arg [0] : _USDC (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [1] : _maestroTickets (address): 0xfD991CBC50908CC4567D8525Fc980abb8df7058B
Arg [2] : _ticketStaking (address): 0x44896710C31D890ecFD6870FAfea7300a9Cf1859
Arg [3] : _founders (address[]): 0xfAF241943CcaEfEfaf6E36Ca7C4475bA814D1655,0xA1180bD93442C0925948306E8D8d99673B91de2F,0x8fe24df2a028AFB7C0c837ec0c1711355F67AC60,0x22603939A7B086064A66B9dEE79eB7e73Ae1e110,0xad3c9C4e03cbC7B0cbB392d9ce8EbDA41cA97C4d
Arg [4] : _treasury (address): 0xe69674cc21158FbdDebf3494520F9eACbDd55e41
Arg [5] : _mintPrice (uint256): 1500000000

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : 000000000000000000000000fd991cbc50908cc4567d8525fc980abb8df7058b
Arg [2] : 00000000000000000000000044896710c31d890ecfd6870fafea7300a9cf1859
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 000000000000000000000000e69674cc21158fbddebf3494520f9eacbdd55e41
Arg [5] : 0000000000000000000000000000000000000000000000000000000059682f00
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [7] : 000000000000000000000000faf241943ccaefefaf6e36ca7c4475ba814d1655
Arg [8] : 000000000000000000000000a1180bd93442c0925948306e8d8d99673b91de2f
Arg [9] : 0000000000000000000000008fe24df2a028afb7c0c837ec0c1711355f67ac60
Arg [10] : 00000000000000000000000022603939a7b086064a66b9dee79eb7e73ae1e110
Arg [11] : 000000000000000000000000ad3c9c4e03cbc7b0cbb392d9ce8ebda41ca97c4d


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

The Maestro NFT will unlock a world of utility never before seen in Web3! - Guaranteed lifetime allow list for all Opus-Labs partner projects.- Mentorship and 1 on 1 access to founders.- Educational classes focused on a myriad of topics and life skills.- Discounts o...

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.