ETH Price: $3,385.46 (+0.84%)

Token

Meta Driver (METAD)
 

Overview

Max Total Supply

111 METAD

Holders

57

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0xab85f7e3332767367a5571e1d7c24503bcc0ca97
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MetaDriver

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 220 runs

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

pragma solidity ^ 0.8.14;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol";
import "./DefaultOperatorFilterer.sol";

/*
███╗   ███╗███████╗████████╗ █████╗         
████╗ ████║██╔════╝╚══██╔══╝██╔══██╗        
██╔████╔██║█████╗     ██║   ███████║        
██║╚██╔╝██║██╔══╝     ██║   ██╔══██║        
██║ ╚═╝ ██║███████╗   ██║   ██║  ██║        
╚═╝     ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝        
                                            
██████╗ ██████╗ ██╗██╗   ██╗███████╗██████╗ 
██╔══██╗██╔══██╗██║██║   ██║██╔════╝██╔══██╗
██║  ██║██████╔╝██║██║   ██║█████╗  ██████╔╝
██║  ██║██╔══██╗██║╚██╗ ██╔╝██╔══╝  ██╔══██╗
██████╔╝██║  ██║██║ ╚████╔╝ ███████╗██║  ██║
╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═══╝  ╚══════╝╚═╝  ╚═╝
*/
/// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸
contract MetaDriver is ERC1155, Ownable, DefaultOperatorFilterer {
    string public name = "Meta Driver";
    string public symbol = "METAD";
    string private hiddenURI = "ipfs://QmUXDKTsnoxs13ZQ9ynxF2s54XmzSMbqhR7dFAaQPGMotn/hidden.json";
    uint256 public collectionEndID = 777;
    uint256 private cost = 0.02 ether;
    uint256 public maxMintAmount = 3;
    uint256 public maxBatchMintAmount = 3;
    mapping(uint256 => uint256) public batchLimit;
    mapping(address => mapping(uint256 => uint256)) public walletMinted;
    //string private storefront = "ipfs://CID/storefront.json";

    bool public paused = true;
    mapping(uint256 => bool) public pausedBatch;

    mapping(uint256 => uint) private batchMintDateStart;

    uint256 public randomCounter = 1;
    mapping(uint => string) private tokenToURI;
    mapping(uint256 => uint256) private currentSupply;
    mapping(uint256 => uint256) public maxSupply;
    mapping(uint256 => uint256) public maxSupplyForBatch;
    mapping(uint256 => bool) private createdToken;
    mapping(uint256 => bool) private mintInOrder;

    mapping(uint256 => bool) public rollInUse;
    mapping(uint256 => string) public roll;
    mapping(uint256 => uint256) public rollLimitMin;
    mapping(uint256 => uint256) public rollLimitMax;

    mapping(uint256 => uint256[]) public requirementTokens;
    mapping(uint256 => uint256[]) public requirementTokenAmounts;
    mapping(uint256 => uint256[]) public batchRequirementTokens;
    mapping(uint256 => uint256[]) public batchRequirementTokenAmounts;

    uint256[] public collectionBatchEndID;
    uint256[] public tokenNextToMintInBatch;
    string[] public ipfsCIDBatch;
    string[] public uriBatch;
    uint256[] public batchCost;
    mapping(uint256 => uint256) public batchTriggerPoint;
    mapping(uint256 => uint256) public batchCostNext;
    mapping(uint256 => bool) public revealedBatch;
    mapping(uint256 => bool) public presaleBatch;
    mapping(uint256 => uint256) public presaleBatchLimit;
    mapping(address => mapping(uint256 => uint256)) public presaleMinted;
    mapping(address => mapping(uint256 => uint256)) public presaleWalletLimit;
    mapping(uint256 => uint256) public presaleCost;
    mapping(uint256 => bytes32) public rootForBatch;

    address payable public payments;
    address public projectLeader;
    address[] public admins;

    mapping(uint256 => bool) public bindOnMintBatch; //BOM or BOMB are the tokens that cannot be moved after being minted
    mapping(uint256 => bool) public flagged; //flagged tokens cannot be moved
    mapping(address => bool) public restricted; //restricted addresses cannot move tokens

    /* 
    address(0) = 0x0000000000000000000000000000000000000000

    ERROR KEY:
    !D = Not The Date
    BLE = Batch Limit Exceeded
    WLE = Wallet Limit Exceeded
    PWLE = Presale Wallet Limit Exceeded
    !WL = Not Whitelisted
    LE = Limit Exceeded
    $? = Insufficient Funds
    !Batch = Not A Batch
    !B = ID Not Found in Batch
    OOS = Out Of Stock
    !MINT = Cannot Mint
    !A = Amount Cannot Be 0
    MMA = Max Mint Amount Exceeded
    !ID = ID Does Not Exist Yet
    IDs> = IDs Cannot Exceed Max Mint Amount
    IDs != Amounts = IDs List Does Not Match Amounts List
    EID > PB? = End ID Parameter Must Be Greater Than Previous Batch End ID
    MIN <= MAX? = Min Must Be Less Than Or Equal To Max
    NOoPL = Not Owner Or Project Leader
    FID = Flagged ID
    */

    constructor() ERC1155(""){
        collectionBatchEndID.push(collectionEndID);
        ipfsCIDBatch.push("");
        uriBatch.push("");
        //maxSupply[1] = 1;
        maxSupplyForBatch[0] = 1;
        createdToken[1] = true;
        currentSupply[1] = 1;
        tokenNextToMintInBatch.push(2);
        _mint(msg.sender, 1, 1, "");

        mintInOrder[0] = true;
        batchCost.push(cost);
        batchCostNext[0] = cost;
        batchLimit[0] = 3;
    }

    /**
    @dev Admin can set the PAUSE state for all or just a batch.
    @param _pauseAll Whether to pause all batches.
    @param _fromBatch The ID of the batch to pause.
    @param _state Whether to set the batch or all batches as paused or unpaused.
    true = closed to Admin Only
    false = open for Presale or Public
    */
    function pause(bool _pauseAll, uint _fromBatch, bool _state) public onlyAdmins {
        if(_pauseAll){
            paused = _state;
        }
        else{
            pausedBatch[_fromBatch] = _state;
        }
    }

    /**
    @dev Admin can set the state of an OPTION for a batch.
    @param _option The OPTION to set the state of:
    1 = Set the REVEALED state.
    2 = Set the USING ROLLS state allowing Mints to pick a roll randomly within a set range.
    3 = Set the MINT IN ORDER state.     
    4 = Set the BIND on mint state. Note: Bound tokens cannot be moved once minted.
    5 = Set the PRESALE state.
    @param _state The new state of the option:
    true = revealed, on
    false = hidden, off
    @param _fromBatch The batch ID to update the state for.
    */
    function setStateOf(uint _option, bool _state, uint _fromBatch) public onlyAdmins {
        if(_option == 1){
            revealedBatch[_fromBatch] = _state;
            return;
        }
        if(_option == 2){
            rollInUse[_fromBatch] = _state;
            return;
        }
        if(_option == 3){
            mintInOrder[_fromBatch] = _state;
            return;
        }
        if(_option == 4){
            bindOnMintBatch[_fromBatch] = _state;
            return;
        }
        if(_option == 5){
            presaleBatch[_fromBatch] = _state;
            return;
        }
    }

    /**
    @dev Allows an admin to set a start date for minting tokens for a specific batch.
    Tokens can only be minted after this date has passed.
    @param _batch The ID of the batch to set the mint date for.
    @param _unixDate The Unix timestamp for the start date of minting.
    @notice The Unix timestamp must be in the future, otherwise the function will revert.
    */
    function setMintDate(uint256 _batch, uint _unixDate) public onlyAdmins {
        require(_unixDate > block.timestamp, "Date Already Past");
        batchMintDateStart[_batch] = _unixDate;
    }

    /**
    @dev Sets the ID of the next token to be minted in a batch by an Admin.
    @param _id uint ID of the next token to be minted.
    @param _fromBatch uint Batch number of the batch in which the token will be minted.
    Requirements:
    Only accessible by admins.
    */
    function setTokenNextToMintInBatch(uint _id, uint _fromBatch) external onlyAdmins {
        tokenNextToMintInBatch[_fromBatch] = _id;
    }

    /**
    @dev Admin can set the new public or presale cost for a specific batch in WEI. The cost is denominated in wei,
    where 1 ETH = 10^18 WEI. To convert ETH to WEI and vice versa, use a tool such as https://etherscan.io/unitconverter.
    @param _presaleCost boolean indicating whether the new cost applies to presale or not.
    @param _newCost uint256 indicating the new cost for the batch in WEI.
    @param _fromBatch uint indicating the ID of the batch to which the new cost applies.
    Note:
    This also sets the batchCostNext to the new cost so if a setCostNextOnTrigger was set it will need to be reset again.
    Requirements:
    Only accessible by admins.
    */
    function setCost(bool _presaleCost, uint256 _newCost, uint _fromBatch) public onlyAdmins {
        if(!_presaleCost){
            batchCost[_fromBatch] = _newCost;
            batchCostNext[_fromBatch] = _newCost;
        }
        else{
            presaleCost[_fromBatch] = _newCost;
        }
    }

    /**
    @dev Sets the cost for the next mint after a specific token is minted in a batch.
    Only accessible by admins.
    */
    function setCostNextOnTrigger(uint256 _nextCost, uint _triggerPointID, uint _fromBatch) public onlyAdmins {
        batchTriggerPoint[_fromBatch] = _triggerPointID;
        batchCostNext[_fromBatch] = _nextCost;
    }

    /**
    @dev Returns the cost for minting a token from the specified batch ID.
    If the caller is not an Admin, the function will return the presale cost if the batch is a presale batch,
    otherwise it will return the regular batch cost. If the caller is an Admin, the function will return 0.
    */
    function _cost(uint _batchID) public view returns(uint256){
        if (!checkIfAdmin()) {
            if(presaleBatch[_batchID]){
                return presaleCost[_batchID];
            }
            return batchCost[_batchID];
        }
        return 0;
    }

    function checkOut(uint _amount, uint _batchID, bytes32[] calldata proof) private {
        if (!checkIfAdmin()) {
            if (batchMintDateStart[_batchID] > 0) {
                require(block.timestamp >= batchMintDateStart[_batchID], "!D");
            }

            if(batchLimit[_batchID] != 0){
                require(walletMinted[msg.sender][_batchID] + _amount <= batchLimit[_batchID], "BLE");
                walletMinted[msg.sender][_batchID] += _amount;
            }

            if(presaleBatch[_batchID]){
                if(presaleWalletLimit[msg.sender][_batchID] != 0) {
                    require(presaleMinted[msg.sender][_batchID] < presaleWalletLimit[msg.sender][_batchID], "PWLE");
                }
                require(isValid(proof, _batchID, keccak256(abi.encodePacked(msg.sender,_amount))), "!WL");
                require(presaleMinted[msg.sender][_batchID] + _amount <= presaleBatchLimit[_batchID], "LE");
                presaleWalletLimit[msg.sender][_batchID] += _amount;
                presaleMinted[msg.sender][_batchID] += _amount;
            }
            
            require(msg.value >= (_amount * _cost(_batchID)), "$?");
        }
    }

    function checkOutScan(uint _id, uint _fromBatch) private{
        if (!exists(_id)) {
            createdToken[_id] = true;
            if(mintInOrder[_fromBatch]){
                currentSupply[_id] = 1;
            }
        }

        if(rollInUse[_fromBatch]){
            roll[_id] = randomRoll(_fromBatch);
        }

        if(batchCost[_fromBatch] != batchCostNext[_fromBatch] && tokenNextToMintInBatch[_fromBatch] >= batchTriggerPoint[_fromBatch]){
            batchCost[_fromBatch] = batchCostNext[_fromBatch];
        }
        randomCounter++;
    }

    /**
    @dev Checks if a token with the given ID belongs to the specified batch.
    @param _id The ID of the token to check.
    @param _fromBatch The batch to check for token membership.
    @return bool indicating whether the token belongs to the specified batch.
    */
    function checkInBatch(uint _id, uint _fromBatch) public view returns(bool){
        require(_fromBatch < collectionBatchEndID.length, "!Batch");
        if(_fromBatch != 0 && _id <= collectionBatchEndID[_fromBatch] && _id > collectionBatchEndID[_fromBatch - 1]){
            return true;
        }
        if(_fromBatch <= 0 && _id <= collectionBatchEndID[_fromBatch]){
            return true;
        }
        return false;
    }

    /**
    @dev Allows Admins, Whitelisters, and Public to mint NFTs in order from a collection batch.
    Admins can call this function even while the contract is paused.
    @param _to The address to mint the NFTs to.
    @param _numberOfTokensToMint The number of tokens to mint from the batch in order.
    @param _fromBatch The batch to mint the NFTs from.
    @param proof An array of Merkle tree proofs to validate the mint.
    */
    function _mintInOrder(address _to, uint _numberOfTokensToMint, uint _fromBatch, bytes32[] calldata proof) public payable {
        require(mintInOrder[_fromBatch], "mintInOrder");
        require(!exists(collectionBatchEndID[_fromBatch]), "OOS");
        require(_fromBatch >= 0, "!Batch");
        require(_numberOfTokensToMint + tokenNextToMintInBatch[_fromBatch] - 1 <= collectionBatchEndID[_fromBatch], "Please Lower Amount");
        if(!checkIfAdmin()){
            require(!paused, "Paused");
            require(!pausedBatch[_fromBatch], "Paused Batch");

            checkOut(_numberOfTokensToMint, _fromBatch, proof);
        }
        
        _mintBatchTo(_to, _numberOfTokensToMint, _fromBatch);
    }

    function _mintBatchTo(address _to, uint _numberOfTokensToMint, uint _fromBatch)private {
        uint256[] memory _ids = new uint256[](_numberOfTokensToMint);
        uint256[] memory _amounts = new uint256[](_numberOfTokensToMint);
        for (uint256 i = 0; i < _numberOfTokensToMint; i++) {
            uint256 _id = tokenNextToMintInBatch[_fromBatch];
            require(canMintChecker(_id, 1, _fromBatch), "!MINT");
            
            checkOutScan(_id, _fromBatch);

            _ids[i] = tokenNextToMintInBatch[_fromBatch];
            _amounts[i] = 1;
            tokenNextToMintInBatch[_fromBatch]++;
        }
        
        _mintBatch(_to, _ids, _amounts, "");
    }

    /**
    @dev Allows Owner, Whitelisters, and Public to mint a single NFT with the given _id, _amount, and _fromBatch parameters for the specified _to address.
    @param _to The address to mint the NFT to.
    @param _id The ID of the NFT to mint.
    @param _amount The amount of NFTs to mint.
    @param _fromBatch The batch end ID that the NFT belongs to.
    @param proof The Merkle proof verifying the ownership of the tokens being minted.
    Requirements:
    - mintInOrder[_fromBatch] must be false.
    - _id must be within the batch specified by _fromBatch.
    - The total number of NFTs being minted across all batches cannot exceed maxBatchMintAmount.
    - If the caller is not an admin, the contract must not be paused and the batch being minted from must not be paused.
    - The caller must have a valid Merkle proof for the tokens being minted.
    - The amount of tokens being minted must satisfy the canMintChecker function.
    - The ID being minted must not have reached its max supply.
    */
    function mint(address _to, uint _id, uint _amount, uint _fromBatch, bytes32[] calldata proof) public payable {
        require(!mintInOrder[_fromBatch], "Requires mintInOrder False");
        require(checkInBatch(_id, _fromBatch), "!B");
        require(canMintChecker(_id, _amount, _fromBatch), "!MINT");
        if(!checkIfAdmin()){
            require(!paused, "Paused");
            require(!pausedBatch[_fromBatch], "Paused Batch");

            checkOut(_amount, _fromBatch, proof);
        }

        checkOutScan(_id, _fromBatch);
        currentSupply[_id] += _amount;
        
        _mint(_to, _id, _amount, "");
    }

    function canMintChecker(uint _id, uint _amount, uint _fromBatch) private view returns(bool){
        require(_amount > 0, "!A");
        require(_amount <= maxMintAmount, "MMA");
        require(_id <= collectionEndID, "!ID");

        // checks if the id exceeded it's max supply
        if (maxSupply[_id] != 0 && currentSupply[_id] + _amount > maxSupply[_id]) {
            // CANNOT MINT 
            return false;
        }

        // checks if the id exceeded it's max supply limit that each id in the batch is assigned
        if(maxSupplyForBatch[_fromBatch] != 0 && currentSupply[_id] + _amount > maxSupplyForBatch[_fromBatch]){
            // CANNOT MINT 
            return false;
        }
        
        // checks if the id needs requirement token(s)
        if(requirementTokens[_id].length > 0) {
            for (uint256 i = 0; i < requirementTokens[_id].length; i++) {
                uint256 _userTokenBalance = balanceOf(msg.sender, requirementTokens[_id][i]);
                if(_userTokenBalance < requirementTokenAmounts[_id][i]){
                    //CANNOT MINT: DOES NOT HAVE REQUIREMENT TOKEN(S) AMOUNTS
                    return false;
                }
            }
        }

        // checks if the batch (other than the original) that the id resides in needs requirement token(s)
        if(batchRequirementTokens[_fromBatch].length > 0){
            for (uint256 j = 0; j < batchRequirementTokens[_fromBatch].length; j++) {
                uint256 _userBatchTokenBalance = balanceOf(msg.sender, batchRequirementTokens[_fromBatch][j]);
                if(_userBatchTokenBalance < batchRequirementTokenAmounts[_fromBatch][j]){
                    //CANNOT MINT: DOES NOT HAVE REQUIREMENT TOKEN(S) AMOUNTS
                    return false;
                }
            }
        }

        // CAN MINT
        return true;
    }

    /**
    @dev Allows Owner, Whitelisters, and Public to mint multiple NFTs at once, given a list of token IDs, their corresponding amounts,
    and the batch from which they are being minted. Checks if the caller has the required permissions and if the maximum allowed mint
    amount and maximum allowed batch mint amount are not exceeded. Also verifies that the specified token IDs are in the given batch,
    and that the caller has passed a valid proof of a transaction to checkOut.
    */
    function mintBatch(address _to, uint[] memory _ids, uint[] memory _amounts, uint _fromBatch, bytes32[] calldata proof) public payable {
        require(!mintInOrder[_fromBatch], "Requires mintInOrder False");
        require(_ids.length <= maxMintAmount, "IDs>");
        require(_ids.length == _amounts.length, "IDs != Amounts");
        require(canMintBatchChecker(_ids, _amounts, _fromBatch), "!MINT");

        uint256 _totalBatchAmount;
        for (uint256 i = 0; i < _amounts.length; i++) {
            require(checkInBatch(_ids[i], _fromBatch), "!B");
            _totalBatchAmount += _amounts[i];
        }
        require(_totalBatchAmount <= maxBatchMintAmount, "LE");

        if(!checkIfAdmin()){
            require(!paused, "Paused");
            require(!pausedBatch[_fromBatch], "Paused Batch");
            checkOut(_totalBatchAmount, _fromBatch, proof);
        }

        for (uint256 k = 0; k < _ids.length; k++) {
            uint256 _id = _ids[k];
            checkOutScan(_id, _fromBatch);
            currentSupply[_ids[k]] += _amounts[k];
        }

        _mintBatch(_to, _ids, _amounts, "");
    }

    function canMintBatchChecker(uint[] memory _ids, uint[] memory _amounts, uint _fromBatch)private view returns(bool){
        for (uint256 i = 0; i < _ids.length; i++) {
            uint256 _id = _ids[i];
            uint256 _amount = _amounts[i];
            if(!canMintChecker(_id, _amount, _fromBatch)){
                // CANNOT MINT
                return false;
            }
        }

        return true;
    }

    /**
    @dev Allows User to DESTROY a single token they own.
    */
    function burn(uint _id, uint _amount) external {
        currentSupply[_id] -= _amount;
        _burn(msg.sender, _id, _amount);
    }

    /**
    @dev Allows User to DESTROY multiple tokens they own.
    */
    function burnBatch(uint[] memory _ids, uint[] memory _amounts) external {
        for (uint256 i = 0; i < _ids.length; ++i) {
            uint256 _id = _ids[i];
            currentSupply[_id] -= _amounts[i];
        }
        _burnBatch(msg.sender, _ids, _amounts);
    }

    /**
    @dev Allows the contract admin to set the requirement tokens and their corresponding amounts for a specific token ID or batch end ID.
    If `_isBatch` is true, the requirement tokens and amounts will be set for the entire batch. Otherwise, they will be set for a specific token ID.
    @param _id The ID of the token or batch end for which the requirement tokens and amounts will be set.
    @param _isBatch A boolean indicating whether the ID corresponds to a batch end or a specific token.
    @param _requiredIDS An array of token IDs that are required to be owned in order to own the specified token or batch.
    @param _amounts An array of amounts indicating how many of each token ID in `_requiredIDS` are required to be owned in order to own the specified token or batch.
    */
    function setRequirementTokens(uint _id, bool _isBatch, uint[] memory _requiredIDS, uint[] memory _amounts) external onlyAdmins {
        if(_isBatch){
            require(_id >= 0 && _id <= collectionBatchEndID[collectionBatchEndID.length - 1], "!B");
            // is confirmed a Batch, _id = batchID
            batchRequirementTokens[_id] = _requiredIDS;
            batchRequirementTokenAmounts[_id] = _amounts;
        }
        else{
            requirementTokens[_id] = _requiredIDS;
            requirementTokenAmounts[_id] = _amounts;
        }
    }

    /**
    @dev Allows the Admin to set the Uniform Resource Identifier (URI) of a single token or a batch of tokens.
    URI is a string that points to a JSON file that contains metadata about the token. Set the '_isIpfsCID' parameter to
    true if using only IPFS Content Identifier (CID) for the '_uri'. If '_isBatch' is set to true, then the function
    sets the URI for a batch index.
    @param _hidden A boolean that indicates whether the function is setting the URI for the hidden state of all tokens.
    @param _isBatch A boolean that indicates whether the function is setting the URI for a batch of tokens.
    @param _id An unsigned integer that represents a batch index or the ID of the token for which the URI needs to be set.
    @param _uri A string that represents the URI or CID of the token or batch index.
    @param _isIpfsCID A boolean that indicates whether the URI is an IPFS Content Identifier (CID).
    */
    function setURI(bool _hidden, bool _isBatch, uint _id, string memory _uri, bool _isIpfsCID) external onlyAdmins {
        if(_hidden){
            hiddenURI = _uri;
        }
        else{
            if (!_isBatch) {
                if (_isIpfsCID) {
                    string memory _uriIPFS = string(abi.encodePacked(
                        "ipfs://",
                        _uri,
                        "/",
                        Strings.toString(_id),
                        ".json"
                    ));

                    tokenToURI[_id] = _uriIPFS;
                    emit URI(_uriIPFS, _id);
                }
                else {
                    tokenToURI[_id] = _uri;
                    emit URI(_uri, _id);
                }
            }
            else{
                if (_isIpfsCID) {
                    //modify IPFS CID
                    ipfsCIDBatch[_id] = _uri;
                }
                else{
                    //modify URI
                    uriBatch[_id] = _uri;
                }
            }
        }
    }

    /**
    @dev Allows the contract Admin to create a new batch of tokens with a specified end ID, URI or CID, and cost in WEI.
    @param _endBatchID The ending token ID of the new batch. Must be greater than the previous batch end ID.
    @param _newCost The cost of each token in the new batch in WEI.
    @param _uri The base URI or CID for the new batch of tokens.
    @param _isIpfsCID Set to true if the URI is a CID only.
    @param _isMintInOrder Set to true if the new batch should be minted in order.
    Example URI structure if _endBatchID = 55 and _isIpfsCID = false and _uri = BASEURI.EXTENSION
    will output: BASEURI.EXTENSION/55.json for IDs 55 and below until it hits another batch end ID.
    Requirements:
    - The _endBatchID parameter must be greater than the previous batch end ID.
    */
    function createBatchAndSetURI(uint _endBatchID, uint256 _newCost, string memory _uri, bool _isIpfsCID, bool _isMintInOrder) external onlyAdmins {
        require(_endBatchID > collectionBatchEndID[collectionBatchEndID.length-1], "EID > PB?");
        
        tokenNextToMintInBatch.push(collectionBatchEndID[collectionBatchEndID.length-1] + 1); //set mint start ID for batch
                    
        collectionBatchEndID.push(_endBatchID);

        if (_isIpfsCID) {
            //set IPFS CID
            ipfsCIDBatch.push(_uri);
            uriBatch.push("");
        }
        else{
            //set URI
            uriBatch.push(_uri);
            ipfsCIDBatch.push("");
        }

        batchCost.push(_newCost);
        batchCostNext[collectionBatchEndID.length-1] = _newCost;
        if(_isMintInOrder){
            setStateOf(3, true, collectionBatchEndID.length-1);
        }
    }

    /**
    @dev Returns the URI for a given token ID. If the token is a collection,
    the URI may be batched. If the token batch has roll enabled, it will have
    a random roll id. If the token is not found, the URI defaults to a hidden URI.
    @param _id uint256 ID of the token to query the URI of
    @return string representing the URI for the given token ID
    */
    function uri(uint256 _id) override public view returns(string memory){
        bool _batched = true;
        uint256 _batchID;
        string memory _CIDorURI;

        if(createdToken[_id]){
            if (_id <= collectionEndID) {
                if(keccak256(abi.encodePacked((tokenToURI[_id]))) != keccak256(abi.encodePacked(("")))){
                    return tokenToURI[_id];
                }

                for (uint256 i = 0; i < collectionBatchEndID.length; ++i) {
                    if(_id <= collectionBatchEndID[i]){
                        if(keccak256(abi.encodePacked((ipfsCIDBatch[i]))) != keccak256(abi.encodePacked(("")))){
                            _CIDorURI = string(abi.encodePacked(
                                "ipfs://",
                                ipfsCIDBatch[i],
                                "/"
                            ));
                            _batchID = i;
                            break;
                        }
                        if(keccak256(abi.encodePacked((uriBatch[i]))) != keccak256(abi.encodePacked(("")))){
                            _CIDorURI = string(abi.encodePacked(
                                uriBatch[i],
                                "/"
                            ));
                            _batchID = i;
                            break;
                        }
                        continue;
                    }
                    else{
                        //_id was not found in a batch
                        continue;
                    }
                }

                if(_id > collectionBatchEndID[collectionBatchEndID.length - 1]){
                    _batched = false;
                }

                if(_batched && revealedBatch[_batchID]){
                    if(keccak256(abi.encodePacked((roll[_id]))) == keccak256(abi.encodePacked(("")))){
                        //no roll
                        return (
                        string(abi.encodePacked(
                            _CIDorURI,
                            Strings.toString(_id),
                            ".json"
                        )));
                    }
                    else{
                        //has roll
                        return (
                        string(abi.encodePacked(
                            _CIDorURI,
                            roll[_id],
                            ".json"
                        )));
                    }
                }
            }
        }
        //not found default to hidden
        return hiddenURI;
    }

    /**
    @dev Returns a random number between rollLimitMin and rollLimitMax for a given batch _fromBatch.
    @param _fromBatch The ID of the batch to get the roll limit for.
    @return A string representing the randomly selected roll within the specified range.
    */
    function randomRoll(uint _fromBatch) internal view returns (string memory){
        uint random = uint(keccak256(abi.encodePacked(
            block.timestamp,
            block.difficulty,
            msg.sender,
            randomCounter,
            roll[randomCounter - 1])
            )) % rollLimitMax[_fromBatch];
        //return random;
        if(random < rollLimitMin[_fromBatch]){
            return Strings.toString(rollLimitMax[_fromBatch] - (random + 1));
        }
        else{
            return Strings.toString(random + 1);
        }
    }

    /**
    @dev Returns a randomly selected roll within the range specified for a given batch _fromBatch.
    @param _fromBatch The ID of the batch to get the roll limit for.
    @return _roll string representing the randomly selected roll within the specified range.
    */
    function randomPick(uint _fromBatch) public view returns (string memory _roll){
        return randomRoll(_fromBatch);
    }

    /**
    @dev Sets the minimum and maximum values for the roll limit for a given batch _fromBatch.
    @param _min The minimum value of the roll limit (excluded).
    @param _max The maximum value of the roll limit (included).
    @param _fromBatch The ID of the batch to set the roll limit for.
    */
    function rollLimitSet(uint _min, uint _max, uint _fromBatch) external onlyAdmins {
        require(_min <= _max, "MIN <= MAX?");
        rollLimitMin[_fromBatch] = _min;
        rollLimitMax[_fromBatch] = _max;
    }

    /**
    @dev Returns the total number of tokens with a given ID that have been minted.
    @param _id The ID of the token.
    @return total number of tokens with the given ID.
    */
    function totalSupply(uint256 _id) public view returns(uint256) {
        return currentSupply[_id];
    }

    /**
    @dev Returns true if a token with the given ID exists, otherwise returns false.
    @param _id The ID of the token.
    @return bool indicating whether the token with the given ID exists.
    */
    function exists(uint256 _id) public view returns(bool) {
        return createdToken[_id];
    }

    /**
    @dev Returns the maximum supply of a token with the given ID.
    @param _id The ID of the token.
    @param _isBatch A boolean indicating whether the ID is a batch ID or not.
    @return maximum supply of the token with the given ID. If it is 0, the supply is limitless.
    */
    function checkMaxSupply(uint256 _id, bool _isBatch) public view returns(uint256) {        
        if(_isBatch){
            return maxSupplyForBatch[_id];
        }
        else{
            return maxSupply[_id];
        }
    }

    /**
    @dev Allows the admin to set the maximum supply of tokens.
    @param _ids An array of token IDs to set the maximum supply for.
    @param _supplies An array of maximum supplies for the tokens in the corresponding position in _ids.
    @param _isBatchAllSameSupply A boolean indicating whether all tokens in _ids should have the same maximum supply or not.
    Note: If the maximum supply is set to 0, the supply is limitless.
    */
    function setMaxSupplies(uint[] memory _ids, uint[] memory _supplies, bool _isBatchAllSameSupply) external onlyAdmins {
        if(_isBatchAllSameSupply){
            maxSupplyForBatch[_ids[0]] = _supplies[0];          
        }
        else{
            for (uint256 i = 0; i < _ids.length; i++) {
                uint256 _id = _ids[i];
                maxSupply[_id] = _supplies[i];
            }
        }
    }

    /**
    @dev Allows admin to update the collectionEndID which is used to determine the end of the initial collection of NFTs.
    @param _newcollectionEndID The new collectionEndID to set.
    */
    function updatecollectionEndID(uint _newcollectionEndID) external onlyAdmins {
        collectionEndID = _newcollectionEndID;
    }

    /**
    @dev Allows admin to set the maximum amount of NFTs a user can mint in a single session.
    @param _newmaxMintAmount The new maximum amount of NFTs a user can mint in a single session.
    */
    function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyAdmins {
        maxMintAmount = _newmaxMintAmount;
    }

    /**
    @dev Allows admin to set the mint limit for a batch presale or wallet total.
    @param _presale A boolean flag indicating whether the limit is for a presale batch or a wallet.
    @param _limit The new limit to set.
    @param _fromBatch The index of the batch to set the limit for.
    */
    function setMintLimit(bool _presale, uint256 _limit, uint256 _fromBatch, address _user) public onlyAdmins {
        if(_presale){
            if(_user != address(0)){
                presaleWalletLimit[_user][_fromBatch] = _limit;
            }
            else{
                presaleBatchLimit[_fromBatch] = _limit;
            }
        }
        else{
            batchLimit[_fromBatch] = _limit;
        }
    }

    /**
    @dev Allows admin to set the payout address for the contract.
    @param _address The new payout address to set.
    Note: address can be a wallet or a payment splitter contract
    */
    function setPayoutAddress(address _address) external onlyOwner{
        payments = payable(_address);
    }

    /**
    @dev Admin can withdraw the contract's balance to the specified payout address.
    The `payments` address must be set before calling this function.
    The function will revert if `payments` address is not set or the transaction fails.
    */
    function withdraw() public onlyAdmins {
        require(payments != address(0), "Payout address not set");

        uint256 balance = address(this).balance;
        require(balance > 0, "No funds to withdraw");

        // Splitter
        (bool success, ) = payable(payments).call{ value: balance }("");
        require(success, "Withdrawal failed");
    }

    /**
    @dev Auto send funds to the payout address.
    Triggers only if funds were sent directly to this address.
    */
    receive() external payable {
        require(payments != address(0), "Payment address not set.");
        uint256 payout = msg.value;
        payments.transfer(payout);
    }

    /**
    @dev Throws if called by any account other than the owner or admin.
    */
    modifier onlyAdmins() {
        _checkAdmins();
        _;
    }

    /**
    @dev Internal function to check if the sender is an admin.
    */
    function _checkAdmins() internal view virtual {
        require(checkIfAdmin(), "!A");
    }

    /**
    @dev Checks if the sender is an admin.
    @return bool indicating whether the sender is an admin or not.
    */
    function checkIfAdmin() public view returns(bool) {
        if (msg.sender == owner() || msg.sender == projectLeader){
            return true;
        }
        if(admins.length > 0){
            for (uint256 i = 0; i < admins.length; i++) {
                if(msg.sender == admins[i]){
                    return true;
                }
            }
        }
        // Not an Admin
        return false;
    }

    /**
    @dev Owner and Project Leader can set the addresses as approved Admins.
    Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"]
    */
    function setAdmins(address[] calldata _users) public onlyAdmins {
        require(msg.sender == owner() || msg.sender == projectLeader, "NOoPL");
        delete admins;
        admins = _users;
    }

    /**
    @dev Owner or Project Leader can set the address as new Project Leader.
    */
    function setProjectLeader(address _user) external {
        require(msg.sender == owner() || msg.sender == projectLeader, "NOoPL");
        projectLeader = _user;
    }

    /**
     * @dev Admins can set the Whitelist Root for a specific Batch ID.
     */
    function setRootForBatch(bytes32 _root, uint _fromBatch) external onlyAdmins{
        rootForBatch[_fromBatch] = _root;
    }

    /**
     * @dev Validates if a user is on the Whitelist.
     * Note: Empty byte arrays can be left as [] when not using proof for mints.
     */
    function isValid(bytes32[] calldata proof, uint _fromBatch, bytes32 leaf) public view returns (bool) {
        require(MerkleProof.verify(proof, rootForBatch[_fromBatch], leaf), "Verification Failed");
        return MerkleProof.verify(proof, rootForBatch[_fromBatch], leaf);
    }

    /**
     * @dev Owner or Project Leader can set the restricted state of an address.
     * Note: Restricted addresses are banned from moving tokens.
     */
    function restrictAddress(address _user, bool _state) external {
        require(msg.sender == owner() || msg.sender == projectLeader, "NOoPL");
        restricted[_user] = _state;
    }

    /**
     * @dev Owner or Project Leader can set the flag state of a token ID.
     * Note: Flagged tokens are locked and untransferable.
     */
    function flagID(uint256 _id, bool _state) external {
        require(msg.sender == owner() || msg.sender == projectLeader, "NOoPL");
        flagged[_id] = _state;
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     */
    function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual override{
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data); // Call parent hook
        require(restricted[operator] == false && restricted[from] == false && restricted[to] == false, "Operator, From, or To Address is RESTRICTED"); //checks if the any address in use is restricted

        for (uint256 i = 0; i < ids.length; i++) {
            if(flagged[ids[i]]){
                revert("FID"); //reverts if a token has been flagged
            }
        }
    }

    /**
     * @dev Check if an ID is in a bind on mint batch.
     */
    function bindOnMint(uint _id) public view returns(bool){
        uint256 _batchID;
        for (uint256 i = 0; i < collectionBatchEndID.length; i++) {
            if(i != 0 && _id <= collectionBatchEndID[i] && _id > collectionBatchEndID[i - 1]){
                _batchID = i;
                break;
            }
            if(i <= 0 && _id <= collectionBatchEndID[i]){
                _batchID = i;
                break;
            }
        }
        return bindOnMintBatch[_batchID];
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     */
    function _afterTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual override{
        super._afterTokenTransfer(operator, from, to, ids, amounts, data); // Call parent hook

        for (uint256 i = 0; i < ids.length; i++) {
            if(bindOnMint(ids[i])){
                flagged[ids[i]] = true;
            }
        }
    }

    /**
    * @notice This is only called once from OpenSea after deployment
    */
    // function contractURI() public view returns (string memory) {
    //     return storefront;
    // }

    //OPENSEA ROYALTY REQUIREMENT CODE SNIPPET ************_START
    function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
        public
        override
        onlyAllowedOperator()
    {
        super.safeTransferFrom(from, to, tokenId, amount, data);
    }

    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override onlyAllowedOperator() {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }
    //OPENSEA ROYALTY REQUIREMENT CODE SNIPPET ************_END
}

File 2 of 18 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";

contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

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

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

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

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds 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 from 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) {
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds 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 from 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) {
            unchecked {
                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 4 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

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

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 5 of 18 : 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 6 of 18 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] memory accounts,
        uint256[] memory ids
    ) public view virtual override returns (uint256[] memory) {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(address from, uint256 id, uint256 amount) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @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, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 7 of 18 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 18 : 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 10 of 18 : 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 11 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 12 of 18 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 13 of 18 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 18 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 15 of 18 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";

contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant operatorFilterRegistry =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(operatorFilterRegistry).code.length > 0) {
            if (subscribe) {
                operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    operatorFilterRegistry.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator() virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(operatorFilterRegistry).code.length > 0) {
            if (!operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }
}

File 16 of 18 : 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 17 of 18 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

File 18 of 18 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"_batchID","type":"uint256"}],"name":"_cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_numberOfTokensToMint","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"_mintInOrder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"admins","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchCostNext","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchRequirementTokenAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchRequirementTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchTriggerPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"bindOnMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bindOnMintBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkIfAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"checkInBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_isBatch","type":"bool"}],"name":"checkMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionBatchEndID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectionEndID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endBatchID","type":"uint256"},{"internalType":"uint256","name":"_newCost","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"bool","name":"_isIpfsCID","type":"bool"},{"internalType":"bool","name":"_isMintInOrder","type":"bool"}],"name":"createBatchAndSetURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"flagID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"flagged","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ipfsCIDBatch","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"isValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxSupplyForBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_pauseAll","type":"bool"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pausedBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payments","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleBatchLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleWalletLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectLeader","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"randomPick","outputs":[{"internalType":"string","name":"_roll","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"requirementTokenAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"requirementTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"restrictAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"restricted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"revealedBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roll","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rollInUse","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rollLimitMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rollLimitMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"rollLimitSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rootForBatch","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","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":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"setAdmins","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":"_presaleCost","type":"bool"},{"internalType":"uint256","name":"_newCost","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nextCost","type":"uint256"},{"internalType":"uint256","name":"_triggerPointID","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"setCostNextOnTrigger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newmaxMintAmount","type":"uint256"}],"name":"setMaxMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_supplies","type":"uint256[]"},{"internalType":"bool","name":"_isBatchAllSameSupply","type":"bool"}],"name":"setMaxSupplies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batch","type":"uint256"},{"internalType":"uint256","name":"_unixDate","type":"uint256"}],"name":"setMintDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_presale","type":"bool"},{"internalType":"uint256","name":"_limit","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setPayoutAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"setProjectLeader","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_isBatch","type":"bool"},{"internalType":"uint256[]","name":"_requiredIDS","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"setRequirementTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"setRootForBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_option","type":"uint256"},{"internalType":"bool","name":"_state","type":"bool"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"setStateOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_fromBatch","type":"uint256"}],"name":"setTokenNextToMintInBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_hidden","type":"bool"},{"internalType":"bool","name":"_isBatch","type":"bool"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"bool","name":"_isIpfsCID","type":"bool"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenNextToMintInBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newcollectionEndID","type":"uint256"}],"name":"updatecollectionEndID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uriBatch","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"walletMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c0604052600b60808190526a26b2ba3090223934bb32b960a91b60a09081526200002e916004919062000ba8565b5060408051808201909152600580825264135155105160da1b60209092019182526200005b918162000ba8565b5060405180608001604052806041815260200162006eb26041913980516200008c9160069160209091019062000ba8565b5061030960075566470de4df82000060085560036009819055600a55600d805460ff19166001908117909155601055348015620000c857600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb66001604051806020016040528060008152506200010181620004a760201b60201c565b506200010d33620004c0565b6daaeb6d7670e522a718067333cd4e3b1562000252578015620001a057604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200018157600080fd5b505af115801562000196573d6000803e3d6000fd5b5050505062000252565b6001600160a01b03821615620001f15760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000166565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200023857600080fd5b505af11580156200024d573d6000803e3d6000fd5b505050505b5050600754601f805460018181019092557fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d80701919091556021805491820181556000908152604080516020810191829052829052620002d4927f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b570019162000ba8565b5060228054600181018255600091825260408051602081019182905283905262000323927f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e5109092019162000ba8565b5060017f4f26c3876aa9f4b92579780beea1161a61f87ebf1ec6ee865b299e447ecba99c8190557f27739e4bb5e6f8b5e4b57a047dca8767cc9b982a011081e086cbb0dfa9de818d805460ff191682179055601260209081527f71a67924699a20698523213e55fe499d539379d7769cd5567e2c45d583f815a382905580548083018255600082815260027fc97bfaf2f8ee708c303a06d134f5ecd8389ae0432af62dc132a24118292866bb909201919091556040805192830190528152620003f0913391819062000512565b7f0263c2b778d062355049effc2dece97bc6547ff8a88a3258daa512061c2153dd805460ff191660019081179091556008546023805492830190557fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230909101819055600080527fa54b3e90672405a607381bd4d34034a12c5aad31607067a7ad26573f504ad6e255600b60205260037fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f765562000ecd565b8051620004bc90600290602084019062000ba8565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416620005785760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084015b60405180910390fd5b336000620005868562000656565b90506000620005958562000656565b9050620005a883600089858589620006a4565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290620005da90849062000c64565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46200063c8360008985858962000818565b6200064d83600089898989620008d1565b50505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811062000693576200069362000c7f565b602090810291909101015292915050565b620006bf86868686868662000a9d60201b62001ea81760201c565b6001600160a01b03861660009081526032602052604090205460ff161580156200070257506001600160a01b03851660009081526032602052604090205460ff16155b80156200072857506001600160a01b03841660009081526032602052604090205460ff16155b6200078a5760405162461bcd60e51b815260206004820152602b60248201527f4f70657261746f722c2046726f6d2c206f7220546f204164647265737320697360448201526a08149154d5149250d5115160aa1b60648201526084016200056f565b60005b83518110156200064d5760316000858381518110620007b057620007b062000c7f565b60209081029190910181015182528101919091526040016000205460ff1615620008035760405162461bcd60e51b815260206004820152600360248201526211925160ea1b60448201526064016200056f565b806200080f8162000c95565b9150506200078d565b6200083386868686868662000a9d60201b62001ea81760201c565b60005b83518110156200064d576200086d84828151811062000859576200085962000c7f565b602002602001015162000aa560201b60201c565b15620008bc576001603160008684815181106200088e576200088e62000c7f565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80620008c88162000c95565b91505062000836565b620008f0846001600160a01b031662000b9960201b620031801760201c565b1562000a9d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906200092c908990899088908890889060040162000d01565b6020604051808303816000875af19250505080156200096a575060408051601f3d908101601f19168201909252620009679181019062000d48565b60015b62000a2a576200097962000d7b565b806308c379a003620009b957506200099062000dd3565b806200099d5750620009bb565b8060405162461bcd60e51b81526004016200056f919062000e62565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016200056f565b6001600160e01b0319811663f23a6e6160e01b146200064d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016200056f565b505050505050565b60008060005b601f5481101562000b8057801580159062000ae65750601f818154811062000ad75762000ad762000c7f565b90600052602060002001548411155b801562000b1e5750601f62000afd60018362000e77565b8154811062000b105762000b1062000c7f565b906000526020600020015484115b1562000b2d5780915062000b80565b8015801562000b5c5750601f818154811062000b4d5762000b4d62000c7f565b90600052602060002001548411155b1562000b6b5780915062000b80565b8062000b778162000c95565b91505062000aab565b5060009081526030602052604090205460ff1692915050565b6001600160a01b03163b151590565b82805462000bb69062000e91565b90600052602060002090601f01602090048101928262000bda576000855562000c25565b82601f1062000bf557805160ff191683800117855562000c25565b8280016001018555821562000c25579182015b8281111562000c2557825182559160200191906001019062000c08565b5062000c3392915062000c37565b5090565b5b8082111562000c33576000815560010162000c38565b634e487b7160e01b600052601160045260246000fd5b6000821982111562000c7a5762000c7a62000c4e565b500190565b634e487b7160e01b600052603260045260246000fd5b60006001820162000caa5762000caa62000c4e565b5060010190565b6000815180845260005b8181101562000cd95760208185018101518683018201520162000cbb565b8181111562000cec576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009062000d3d9083018462000cb1565b979650505050505050565b60006020828403121562000d5b57600080fd5b81516001600160e01b03198116811462000d7457600080fd5b9392505050565b600060033d111562000d955760046000803e5060005160e01c5b90565b601f8201601f191681016001600160401b038111828210171562000dcc57634e487b7160e01b600052604160045260246000fd5b6040525050565b600060443d101562000de25790565b6040516003193d81016004833e81513d6001600160401b03808311602484018310171562000e1257505050505090565b828501915081518181111562000e2b5750505050505090565b843d870101602082850101111562000e465750505050505090565b62000e576020828601018762000d98565b509095945050505050565b60208152600062000d74602083018462000cb1565b60008282101562000e8c5762000e8c62000c4e565b500390565b600181811c9082168062000ea657607f821691505b60208210810362000ec757634e487b7160e01b600052602260045260246000fd5b50919050565b615fd58062000edd6000396000f3fe6080604052600436106104b85760003560e01c8063869f75941161026b578063bb1e05281161014f578063d6199f8d116100c1578063e985e9c511610085578063e985e9c514611077578063ed00e653146110c0578063f242432a146110d5578063f2fde38b146110f5578063fc2f0fd814611115578063fda100e11461113557600080fd5b8063d6199f8d14610fba578063d8d9d6bc14610fda578063dc8519c11461100a578063e49adb7314611037578063e5211d8b1461105757600080fd5b8063c791d96811610113578063c791d96814610ee7578063c848d6c714610f17578063ca397ed914610f2d578063cc328f1714610f4d578063cdc12af114610f7a578063d5cce90414610f9a57600080fd5b8063bb1e052814610e20578063bd85b03914610e4d578063bff67e9b14610e7a578063c3394bc614610e9a578063c5ac4e4014610eba57600080fd5b8063a370c668116101e8578063a6d23e10116101ac578063a6d23e1014610d67578063abc7c86614610d87578063accc1d5e14610db7578063b390c0ab14610dd7578063b4387f7f14610df7578063b7bc15a214610e0a57600080fd5b8063a370c66814610cb7578063a4c2f65114610ce7578063a5492f4414610d07578063a684c47114610d27578063a6b431af14610d4757600080fd5b806394357c251161022f57806394357c2514610c1557806395d89b4114610c35578063a037cd5014610c4a578063a22cb46514610c77578063a2b7258514610c9757600080fd5b8063869f759414610b77578063881773db14610ba45780638c0163b714610bc45780638da5cb5b14610bd75780638da754ea14610bf557600080fd5b80633e4a4e771161039d5780636aec6a371161030f5780637cd8ab94116102d35780637cd8ab9414610ab75780637ce8fab014610ad75780637d929b4f14610af75780637ffd97c114610b1757806383ca4b6f14610b375780638413c6c914610b5757600080fd5b80636aec6a3714610a155780636c30a22f14610a35578063715018a614610a55578063743efaf014610a6a5780637630e90214610a8a57600080fd5b80634f558e79116103615780634f558e791461096257806352addee514610992578063531a0155146109b25780635c975abb146109c5578063644e54ab146109df57806368fd7eee146109f557600080fd5b80633e4a4e7714610895578063446f0617146108b55780634816b2f8146108e55780634afc75c5146109155780634e1273f41461093557600080fd5b806318f1911311610436578063239c70ae116103fa578063239c70ae146107c55780632a9f2a23146107db5780632eb2c2d6146108135780632ed6cd461461083357806333ea51a8146108605780633ccfd60b1461088057600080fd5b806318f19113146107155780631aacb575146107355780631b5c9b4d146107655780631f7b4f3014610785578063214a5e50146107a557600080fd5b80630e89341c1161047d5780630e89341c146106385780630ef31dbd1461065857806314905abc1461068557806314bfd6d0146106bd578063165da72a146106f557600080fd5b8062fdd58e1461055b57806301ffc9a71461058e57806303d9885c146105be57806306fdde03146105f6578063088a4ed01461061857600080fd5b3661055657602d546001600160a01b031661051a5760405162461bcd60e51b815260206004820152601860248201527f5061796d656e742061646472657373206e6f74207365742e000000000000000060448201526064015b60405180910390fd5b602d5460405134916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610554573d6000803e3d6000fd5b005b600080fd5b34801561056757600080fd5b5061057b610576366004614d9e565b611162565b6040519081526020015b60405180910390f35b34801561059a57600080fd5b506105ae6105a9366004614dde565b6111f6565b6040519015158152602001610585565b3480156105ca57600080fd5b5061057b6105d9366004614d9e565b602960209081526000928352604080842090915290825290205481565b34801561060257600080fd5b5061060b611246565b6040516105859190614e53565b34801561062457600080fd5b50610554610633366004614e66565b6112d4565b34801561064457600080fd5b5061060b610653366004614e66565b6112e1565b34801561066457600080fd5b5061057b610673366004614e66565b60286020526000908152604090205481565b34801561069157600080fd5b5061057b6106a0366004614d9e565b600c60209081526000928352604080842090915290825290205481565b3480156106c957600080fd5b506106dd6106d8366004614e66565b611664565b6040516001600160a01b039091168152602001610585565b34801561070157600080fd5b506105ae610710366004614e66565b61168e565b34801561072157600080fd5b50610554610730366004614f63565b61176c565b34801561074157600080fd5b506105ae610750366004614e66565b60176020526000908152604090205460ff1681565b34801561077157600080fd5b5061057b610780366004614fe2565b611850565b34801561079157600080fd5b5061060b6107a0366004614e66565b611882565b3480156107b157600080fd5b506105546107c0366004615012565b61189b565b3480156107d157600080fd5b5061057b60095481565b3480156107e757600080fd5b5061057b6107f6366004614d9e565b602a60209081526000928352604080842090915290825290205481565b34801561081f57600080fd5b5061055461082e3660046150cd565b61190c565b34801561083f57600080fd5b5061057b61084e366004614e66565b60146020526000908152604090205481565b34801561086c57600080fd5b5061055461087b366004615176565b6119c2565b34801561088c57600080fd5b506105546119ec565b3480156108a157600080fd5b506105546108b0366004615191565b611b25565b3480156108c157600080fd5b506105ae6108d0366004614e66565b60306020526000908152604090205460ff1681565b3480156108f157600080fd5b506105ae610900366004614e66565b60276020526000908152604090205460ff1681565b34801561092157600080fd5b5061060b610930366004614e66565b611bf3565b34801561094157600080fd5b50610955610950366004615208565b611bfe565b604051610585919061530d565b34801561096e57600080fd5b506105ae61097d366004614e66565b60009081526015602052604090205460ff1690565b34801561099e57600080fd5b5061057b6109ad366004614e66565b611d27565b6105546109c036600461536b565b611d48565b3480156109d157600080fd5b50600d546105ae9060ff1681565b3480156109eb57600080fd5b5061057b600a5481565b348015610a0157600080fd5b506105ae610a103660046153db565b611eb0565b348015610a2157600080fd5b50610554610a303660046153db565b611f99565b348015610a4157600080fd5b50610554610a503660046153fd565b611ff6565b348015610a6157600080fd5b5061055461201b565b348015610a7657600080fd5b50610554610a853660046153db565b61202f565b348015610a9657600080fd5b5061057b610aa5366004614e66565b602b6020526000908152604090205481565b348015610ac357600080fd5b50610554610ad2366004615429565b61205b565b348015610ae357600080fd5b5061057b610af2366004614e66565b6121e0565b348015610b0357600080fd5b5061057b610b123660046153db565b6121f0565b348015610b2357600080fd5b5061057b610b323660046153db565b612221565b348015610b4357600080fd5b50610554610b523660046154a9565b61223d565b348015610b6357600080fd5b50610554610b723660046153fd565b6122c7565b348015610b8357600080fd5b5061057b610b92366004614e66565b60136020526000908152604090205481565b348015610bb057600080fd5b50610554610bbf3660046154f5565b61232d565b610554610bd236600461552d565b6123fd565b348015610be357600080fd5b506003546001600160a01b03166106dd565b348015610c0157600080fd5b50610554610c10366004615594565b6125be565b348015610c2157600080fd5b5061057b610c303660046153db565b612858565b348015610c4157600080fd5b5061060b612874565b348015610c5657600080fd5b5061057b610c65366004614e66565b600b6020526000908152604090205481565b348015610c8357600080fd5b50610554610c923660046155fd565b612881565b348015610ca357600080fd5b5061057b610cb2366004614e66565b61288c565b348015610cc357600080fd5b506105ae610cd2366004614e66565b60316020526000908152604090205460ff1681565b348015610cf357600080fd5b50610554610d02366004615176565b61289c565b348015610d1357600080fd5b50610554610d223660046155fd565b6128fd565b348015610d3357600080fd5b50602e546106dd906001600160a01b031681565b348015610d5357600080fd5b50610554610d62366004615629565b612967565b348015610d7357600080fd5b50602d546106dd906001600160a01b031681565b348015610d9357600080fd5b506105ae610da2366004614e66565b600e6020526000908152604090205460ff1681565b348015610dc357600080fd5b50610554610dd236600461565e565b6129bb565b348015610de357600080fd5b50610554610df23660046153db565b612a1a565b610554610e0536600461569f565b612a49565b348015610e1657600080fd5b5061057b60075481565b348015610e2c57600080fd5b5061057b610e3b366004614e66565b60256020526000908152604090205481565b348015610e5957600080fd5b5061057b610e68366004614e66565b60009081526012602052604090205490565b348015610e8657600080fd5b5061060b610e95366004614e66565b612d3c565b348015610ea657600080fd5b50610554610eb5366004614e66565b612d67565b348015610ec657600080fd5b5061057b610ed5366004614e66565b602c6020526000908152604090205481565b348015610ef357600080fd5b506105ae610f02366004614e66565b60266020526000908152604090205460ff1681565b348015610f2357600080fd5b5061057b60105481565b348015610f3957600080fd5b5061057b610f48366004614e66565b612d74565b348015610f5957600080fd5b5061057b610f68366004614e66565b601a6020526000908152604090205481565b348015610f8657600080fd5b506105ae610f95366004615735565b612dd9565b348015610fa657600080fd5b5061057b610fb53660046153db565b612ebc565b348015610fc657600080fd5b5061060b610fd5366004614e66565b612ed8565b348015610fe657600080fd5b506105ae610ff5366004615176565b60326020526000908152604090205460ff1681565b34801561101657600080fd5b5061057b611025366004614e66565b60246020526000908152604090205481565b34801561104357600080fd5b506105546110523660046153db565b612ee8565b34801561106357600080fd5b50610554611072366004614fe2565b612f01565b34801561108357600080fd5b506105ae611092366004615785565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156110cc57600080fd5b506105ae612f60565b3480156110e157600080fd5b506105546110f03660046157b8565b61300d565b34801561110157600080fd5b50610554611110366004615176565b6130c3565b34801561112157600080fd5b5061055461113036600461581c565b61313c565b34801561114157600080fd5b5061057b611150366004614e66565b60196020526000908152604090205481565b60006001600160a01b0383166111cd5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401610511565b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061122757506001600160e01b031982166303a24d0760e21b145b806111f057506301ffc9a760e01b6001600160e01b03198316146111f0565b6004805461125390615853565b80601f016020809104026020016040519081016040528092919081815260200182805461127f90615853565b80156112cc5780601f106112a1576101008083540402835291602001916112cc565b820191906000526020600020905b8154815290600101906020018083116112af57829003601f168201915b505050505081565b6112dc61318f565b600955565b600081815260156020526040812054606091600191839060ff16156116575760075485116116575760408051600080825260208083018085528351902089835260119091529083902090926113369201615920565b60405160208183030381529060405280519060200120146113f2576000858152601160205260409020805461136a90615853565b80601f016020809104026020016040519081016040528092919081815260200182805461139690615853565b80156113e35780601f106113b8576101008083540402835291602001916113e3565b820191906000526020600020905b8154815290600101906020018083116113c657829003601f168201915b50505050509350505050919050565b60005b601f5481101561155e57601f81815481106114125761141261592c565b9060005260206000200154861161154e5760408051600081526020810191829052519020602180548390811061144a5761144a61592c565b906000526020600020016040516020016114649190615920565b60405160208183030381529060405280519060200120146114c557602181815481106114925761149261592c565b906000526020600020016040516020016114ac9190615942565b604051602081830303815290604052915080925061155e565b6040805160008152602081019182905251902060228054839081106114ec576114ec61592c565b906000526020600020016040516020016115069190615920565b604051602081830303815290604052805190602001201461154e57602281815481106115345761153461592c565b906000526020600020016040516020016114ac919061596f565b61155781615991565b90506113f5565b50601f805461156f906001906159aa565b8154811061157f5761157f61592c565b906000526020600020015485111561159657600092505b8280156115b1575060008281526026602052604090205460ff165b156116575760408051600080825260208083018085528351902089835260189091529083902090926115e39201615920565b60405160208183030381529060405280519060200120036116325780611608866131c8565b6040516020016116199291906159c1565b6040516020818303038152906040529350505050919050565b8060186000878152602001908152602001600020604051602001611619929190615a00565b6006805461136a90615853565b602f818154811061167457600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060005b601f548110156117535780158015906116ca5750601f81815481106116bb576116bb61592c565b90600052602060002001548411155b80156116fc5750601f6116de6001836159aa565b815481106116ee576116ee61592c565b906000526020600020015484115b1561170957809150611753565b801580156117345750601f81815481106117255761172561592c565b90600052602060002001548411155b1561174157809150611753565b8061174b81615991565b915050611694565b5060009081526030602052604090205460ff1692915050565b61177461318f565b821561180957601f805461178a906001906159aa565b8154811061179a5761179a61592c565b90600052602060002001548411156117c45760405162461bcd60e51b815260040161051190615a35565b6000848152601d6020908152604090912083516117e392850190614c3e565b506000848152601e60209081526040909120825161180392840190614c3e565b5061184a565b6000848152601b60209081526040909120835161182892850190614c3e565b506000848152601c60209081526040909120825161184892840190614c3e565b505b50505050565b6000811561186d57506000828152601460205260409020546111f0565b506000828152601360205260409020546111f0565b6018602052600090815260409020805461125390615853565b6118a361318f565b83156118f9576001600160a01b038116156118e3576001600160a01b0381166000908152602a60209081526040808320858452909152902083905561184a565b600082815260286020526040902083905561184a565b506000908152600b602052604090205550565b6daaeb6d7670e522a718067333cd4e3b156119b557604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015611972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119969190615a51565b6119b557604051633b79c77360e21b8152336004820152602401610511565b611848858585858561325a565b6119ca61329f565b602d80546001600160a01b0319166001600160a01b0392909216919091179055565b6119f461318f565b602d546001600160a01b0316611a455760405162461bcd60e51b815260206004820152601660248201527514185e5bdd5d081859191c995cdcc81b9bdd081cd95d60521b6044820152606401610511565b4780611a8a5760405162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b6044820152606401610511565b602d546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611ad7576040519150601f19603f3d011682016040523d82523d6000602084013e611adc565b606091505b5050905080611b215760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610511565b5050565b611b2d61318f565b8015611b845781600081518110611b4657611b4661592c565b60200260200101516014600085600081518110611b6557611b6561592c565b6020026020010151815260200190815260200160002081905550505050565b60005b835181101561184a576000848281518110611ba457611ba461592c565b60200260200101519050838281518110611bc057611bc061592c565b6020908102919091018101516000928352601390915260409091205580611be681615991565b915050611b87565b505050565b60606111f0826132f9565b60608151835114611c635760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610511565b600083516001600160401b03811115611c7e57611c7e614e8d565b604051908082528060200260200182016040528015611ca7578160200160208202803683370190505b50905060005b8451811015611d1f57611cf2858281518110611ccb57611ccb61592c565b6020026020010151858381518110611ce557611ce561592c565b6020026020010151611162565b828281518110611d0457611d0461592c565b6020908102919091010152611d1881615991565b9050611cad565b509392505050565b601f8181548110611d3757600080fd5b600091825260209091200154905081565b60008381526016602052604090205460ff1615611da75760405162461bcd60e51b815260206004820152601a60248201527f5265717569726573206d696e74496e4f726465722046616c73650000000000006044820152606401610511565b611db18584611eb0565b611dcd5760405162461bcd60e51b815260040161051190615a35565b611dd88585856133c9565b611df45760405162461bcd60e51b815260040161051190615a6e565b611dfc612f60565b611e5e57600d5460ff1615611e235760405162461bcd60e51b815260040161051190615a8d565b6000838152600e602052604090205460ff1615611e525760405162461bcd60e51b815260040161051190615aad565b611e5e84848484613678565b611e6885846139a5565b60008581526012602052604081208054869290611e86908490615ad3565b92505081905550611ea886868660405180602001604052806000815250613afc565b505050505050565b601f546000908210611eed5760405162461bcd60e51b815260206004820152600660248201526504284c2e8c6d60d31b6044820152606401610511565b8115801590611f195750601f8281548110611f0a57611f0a61592c565b90600052602060002001548311155b8015611f4b5750601f611f2d6001846159aa565b81548110611f3d57611f3d61592c565b906000526020600020015483115b15611f58575060016111f0565b81158015611f835750601f8281548110611f7457611f7461592c565b90600052602060002001548311155b15611f90575060016111f0565b50600092915050565b611fa161318f565b428111611fe45760405162461bcd60e51b815260206004820152601160248201527011185d1948105b1c9958591e4814185cdd607a1b6044820152606401610511565b6000918252600f602052604090912055565b611ffe61318f565b600090815260246020908152604080832093909355602590522055565b61202361329f565b61202d6000613beb565b565b61203761318f565b816020828154811061204b5761204b61592c565b6000918252602090912001555050565b61206361318f565b841561208257815161207c906006906020850190614c89565b50611848565b8361217857801561211b57600082612099856131c8565b6040516020016120aa929190615aeb565b60408051601f1981840301815291815260008681526011602090815291902082519293506120dc929091840190614c89565b50837f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8260405161210d9190614e53565b60405180910390a250611848565b6000838152601160209081526040909120835161213a92850190614c89565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360405161216b9190614e53565b60405180910390a2611848565b80156121af5781602184815481106121925761219261592c565b90600052602060002001908051906020019061207c929190614c89565b81602284815481106121c3576121c361592c565b906000526020600020019080519060200190611ea8929190614c89565b60208181548110611d3757600080fd5b601d602052816000526040600020818154811061220c57600080fd5b90600052602060002001600091509150505481565b601e602052816000526040600020818154811061220c57600080fd5b60005b82518110156122bb57600083828151811061225d5761225d61592c565b602002602001015190508282815181106122795761227961592c565b60200260200101516012600083815260200190815260200160002060008282546122a391906159aa565b909155506122b49150829050615991565b9050612240565b50611b21338383613c3d565b6122cf61318f565b8183111561230d5760405162461bcd60e51b815260206004820152600b60248201526a4d494e203c3d204d41583f60a81b6044820152606401610511565b600090815260196020908152604080832094909455601a90529190912055565b61233561318f565b8260010361235d576000908152602660205260409020805460ff191691151591909117905550565b82600203612385576000908152601760205260409020805460ff191691151591909117905550565b826003036123ad576000908152601660205260409020805460ff191691151591909117905550565b826004036123d5576000908152603060205260409020805460ff191691151591909117905550565b82600503611bee576000908152602760205260409020805460ff191691151591909117905550565b60008381526016602052604090205460ff166124495760405162461bcd60e51b815260206004820152600b60248201526a36b4b73a24b727b93232b960a91b6044820152606401610511565b61247f601f848154811061245f5761245f61592c565b906000526020600020015460009081526015602052604090205460ff1690565b156124b25760405162461bcd60e51b81526020600482015260036024820152624f4f5360e81b6044820152606401610511565b601f83815481106124c5576124c561592c565b90600052602060002001546001602085815481106124e5576124e561592c565b9060005260206000200154866124fb9190615ad3565b61250591906159aa565b11156125495760405162461bcd60e51b8152602060048201526013602482015272141b19585cd948131bddd95c88105b5bdd5b9d606a1b6044820152606401610511565b612551612f60565b6125b357600d5460ff16156125785760405162461bcd60e51b815260040161051190615a8d565b6000838152600e602052604090205460ff16156125a75760405162461bcd60e51b815260040161051190615aad565b6125b384848484613678565b611848858585613de3565b6125c661318f565b601f80546125d6906001906159aa565b815481106125e6576125e661592c565b9060005260206000200154851161262b5760405162461bcd60e51b8152602060048201526009602482015268454944203e2050423f60b81b6044820152606401610511565b601f80546020919061263f906001906159aa565b8154811061264f5761264f61592c565b906000526020600020015460016126669190615ad3565b81546001818101845560009384526020842090910191909155601f805491820181559091527fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d80701859055811561274c576021805460018101825560009190915283516126f9917f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b57001906020860190614c89565b50602280546001810182556000918252604080516020810191829052839052612746927f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e51090920191614c89565b506127de565b60228054600181018255600091909152835161278f917f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e51001906020860190614c89565b506021805460018101825560009182526040805160208101918290528390526127dc927f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b57090920191614c89565b505b602380546001818101835560009283527fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230909101869055601f548692602592909161282991906159aa565b81526020810191909152604001600020558015611848576118486003600180601f80549050610bbf91906159aa565b601b602052816000526040600020818154811061220c57600080fd5b6005805461125390615853565b611b21338383613f88565b60238181548110611d3757600080fd5b6003546001600160a01b03163314806128bf5750602e546001600160a01b031633145b6128db5760405162461bcd60e51b815260040161051190615b4c565b602e80546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314806129205750602e546001600160a01b031633145b61293c5760405162461bcd60e51b815260040161051190615b4c565b6001600160a01b03919091166000908152603260205260409020805460ff1916911515919091179055565b61296f61318f565b826129a95781602382815481106129885761298861592c565b60009182526020808320919091019290925591825260259052604090205550565b6000908152602b602052604090205550565b6129c361318f565b6003546001600160a01b03163314806129e65750602e546001600160a01b031633145b612a025760405162461bcd60e51b815260040161051190615b4c565b612a0e602f6000614cfc565b611bee602f8383614d1a565b60008281526012602052604081208054839290612a389084906159aa565b90915550611b219050338383614068565b60008381526016602052604090205460ff1615612aa85760405162461bcd60e51b815260206004820152601a60248201527f5265717569726573206d696e74496e4f726465722046616c73650000000000006044820152606401610511565b60095485511115612ae45760405162461bcd60e51b81526004016105119060208082526004908201526324a2399f60e11b604082015260600190565b8351855114612b265760405162461bcd60e51b815260206004820152600e60248201526d49447320213d20416d6f756e747360901b6044820152606401610511565b612b3185858561418a565b612b4d5760405162461bcd60e51b815260040161051190615a6e565b6000805b8551811015612bd257612b7d878281518110612b6f57612b6f61592c565b602002602001015186611eb0565b612b995760405162461bcd60e51b815260040161051190615a35565b858181518110612bab57612bab61592c565b602002602001015182612bbe9190615ad3565b915080612bca81615991565b915050612b51565b50600a54811115612c0a5760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b612c12612f60565b612c7457600d5460ff1615612c395760405162461bcd60e51b815260040161051190615a8d565b6000848152600e602052604090205460ff1615612c685760405162461bcd60e51b815260040161051190615aad565b612c7481858585613678565b60005b8651811015612d17576000878281518110612c9457612c9461592c565b60200260200101519050612ca881876139a5565b868281518110612cba57612cba61592c565b6020026020010151601260008a8581518110612cd857612cd861592c565b602002602001015181526020019081526020016000206000828254612cfd9190615ad3565b90915550829150612d0f905081615991565b915050612c77565b50612d3387878760405180602001604052806000815250614203565b50505050505050565b60228181548110612d4c57600080fd5b90600052602060002001600091509050805461125390615853565b612d6f61318f565b600755565b6000612d7e612f60565b612dd15760008281526027602052604090205460ff1615612dac57506000908152602b602052604090205490565b60238281548110612dbf57612dbf61592c565b90600052602060002001549050919050565b506000919050565b6000612e268585808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250888152602c6020526040902054925086915061436c9050565b612e685760405162461bcd60e51b815260206004820152601360248201527215995c9a599a58d85d1a5bdb8811985a5b1959606a1b6044820152606401610511565b612eb38585808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250888152602c6020526040902054925086915061436c9050565b95945050505050565b601c602052816000526040600020818154811061220c57600080fd5b60218181548110612d4c57600080fd5b612ef061318f565b6000908152602c6020526040902055565b6003546001600160a01b0316331480612f245750602e546001600160a01b031633145b612f405760405162461bcd60e51b815260040161051190615b4c565b600091825260316020526040909120805460ff1916911515919091179055565b6000612f746003546001600160a01b031690565b6001600160a01b0316336001600160a01b03161480612f9d5750602e546001600160a01b031633145b15612fa85750600190565b602f54156130075760005b602f5481101561300557602f8181548110612fd057612fd061592c565b6000918252602090912001546001600160a01b03163303612ff357600191505090565b80612ffd81615991565b915050612fb3565b505b50600090565b6daaeb6d7670e522a718067333cd4e3b156130b657604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015613073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130979190615a51565b6130b657604051633b79c77360e21b8152336004820152602401610511565b6118488585858585614382565b6130cb61329f565b6001600160a01b0381166131305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610511565b61313981613beb565b50565b61314461318f565b821561315f57600d805482151560ff19909116179055505050565b6000828152600e60205260409020805482151560ff19909116179055505050565b6001600160a01b03163b151590565b613197612f60565b61202d5760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b606060006131d5836143c7565b60010190506000816001600160401b038111156131f4576131f4614e8d565b6040519080825280601f01601f19166020018201604052801561321e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461322857509392505050565b6001600160a01b03851633148061327657506132768533611092565b6132925760405162461bcd60e51b815260040161051190615b6b565b611848858585858561449f565b6003546001600160a01b0316331461202d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610511565b6000818152601a602052604081205460105460609291904290449033906018866133246001846159aa565b8152602001908152602001600020604051602001613346959493929190615bb9565b6040516020818303038152906040528051906020012060001c6133699190615bfa565b6000848152601960205260409020549091508110156133b5576133ae613390826001615ad3565b6000858152601a60205260409020546133a991906159aa565b6131c8565b9392505050565b6133ae6133a9826001615ad3565b50919050565b60008083116133ff5760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b6009548311156134375760405162461bcd60e51b81526020600482015260036024820152624d4d4160e81b6044820152606401610511565b60075484111561346f5760405162461bcd60e51b815260206004820152600360248201526208525160ea1b6044820152606401610511565b600084815260136020526040902054158015906134af57506000848152601360209081526040808320546012909252909120546134ad908590615ad3565b115b156134bc575060006133ae565b600082815260146020526040902054158015906134ff57506000828152601460209081526040808320548784526012909252909120546134fd908590615ad3565b115b1561350c575060006133ae565b6000848152601b6020526040902054156135c55760005b6000858152601b60205260409020548110156135c3576000858152601b60205260408120805461356f9133918590811061355f5761355f61592c565b9060005260206000200154611162565b6000878152601c60205260409020805491925090839081106135935761359361592c565b90600052602060002001548110156135b0576000925050506133ae565b50806135bb81615991565b915050613523565b505b6000828152601d60205260409020541561366e5760005b6000838152601d602052604090205481101561366c576000838152601d6020526040812080546136189133918590811061355f5761355f61592c565b6000858152601e602052604090208054919250908390811061363c5761363c61592c565b9060005260206000200154811015613659576000925050506133ae565b508061366481615991565b9150506135dc565b505b5060019392505050565b613680612f60565b61184a576000838152600f6020526040902054156136db576000838152600f60205260409020544210156136db5760405162461bcd60e51b8152602060048201526002602482015261085160f21b6044820152606401610511565b6000838152600b602052604090205415613784576000838152600b6020908152604080832054338452600c835281842087855290925290912054613720908690615ad3565b11156137545760405162461bcd60e51b8152602060048201526003602482015262424c4560e81b6044820152606401610511565b336000908152600c602090815260408083208684529091528120805486929061377e908490615ad3565b90915550505b60008381526027602052604090205460ff161561395e57336000908152602a602090815260408083208684529091529020541561381f57336000818152602a60209081526040808320878452825280832054938352602982528083208784529091529020541061381f5760405162461bcd60e51b81526004016105119060208082526004908201526350574c4560e01b604082015260600190565b6040516bffffffffffffffffffffffff193360601b166020820152603481018590526138699083908390869060540160405160208183030381529060405280519060200120612dd9565b61389b5760405162461bcd60e51b81526020600482015260036024820152620855d360ea1b6044820152606401610511565b60008381526028602090815260408083205433845260298352818420878552909252909120546138cc908690615ad3565b11156138ff5760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b336000908152602a6020908152604080832086845290915281208054869290613929908490615ad3565b909155505033600090815260296020908152604080832086845290915281208054869290613958908490615ad3565b90915550505b61396783612d74565b6139719085615c1c565b34101561184a5760405162461bcd60e51b8152602060048201526002602482015261243f60f01b6044820152606401610511565b60008281526015602052604090205460ff166139fd576000828152601560209081526040808320805460ff19166001179055838352601690915290205460ff16156139fd576000828152601260205260409020600190555b60008181526017602052604090205460ff1615613a4257613a1d816132f9565b60008381526018602090815260409091208251613a409391929190910190614c89565b505b6000818152602560205260409020546023805483908110613a6557613a6561592c565b906000526020600020015414158015613aae5750602460008281526020019081526020016000205460208281548110613aa057613aa061592c565b906000526020600020015410155b15613ae3576000818152602560205260409020546023805483908110613ad657613ad661592c565b6000918252602090912001555b60108054906000613af383615991565b91905055505050565b6001600160a01b038416613b225760405162461bcd60e51b815260040161051190615c3b565b336000613b2e8561464f565b90506000613b3b8561464f565b9050613b4c8360008985858961469a565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290613b7c908490615ad3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613bdc836000898585896147e6565b612d3383600089898989614871565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316613c635760405162461bcd60e51b815260040161051190615c7c565b8051825114613c845760405162461bcd60e51b815260040161051190615cbf565b6000339050613ca78185600086866040518060200160405280600081525061469a565b60005b8351811015613d6c576000848281518110613cc757613cc761592c565b602002602001015190506000848381518110613ce557613ce561592c565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015613d355760405162461bcd60e51b815260040161051190615d07565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580613d6481615991565b915050613caa565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613dbd929190615d4b565b60405180910390a461184a818560008686604051806020016040528060008152506147e6565b6000826001600160401b03811115613dfd57613dfd614e8d565b604051908082528060200260200182016040528015613e26578160200160208202803683370190505b5090506000836001600160401b03811115613e4357613e43614e8d565b604051908082528060200260200182016040528015613e6c578160200160208202803683370190505b50905060005b84811015613f6c57600060208581548110613e8f57613e8f61592c565b90600052602060002001549050613ea8816001876133c9565b613ec45760405162461bcd60e51b815260040161051190615a6e565b613ece81866139a5565b60208581548110613ee157613ee161592c565b9060005260206000200154848381518110613efe57613efe61592c565b6020026020010181815250506001838381518110613f1e57613f1e61592c565b60200260200101818152505060208581548110613f3d57613f3d61592c565b60009182526020822001805491613f5383615991565b9190505550508080613f6490615991565b915050613e72565b5061184885838360405180602001604052806000815250614203565b816001600160a01b0316836001600160a01b031603613ffb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610511565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03831661408e5760405162461bcd60e51b815260040161051190615c7c565b33600061409a8461464f565b905060006140a78461464f565b90506140c78387600085856040518060200160405280600081525061469a565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156141085760405162461bcd60e51b815260040161051190615d07565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612d33848860008686604051806020016040528060008152506147e6565b6000805b845181101561366c5760008582815181106141ab576141ab61592c565b6020026020010151905060008583815181106141c9576141c961592c565b602002602001015190506141de8282876133c9565b6141ee57600093505050506133ae565b505080806141fb90615991565b91505061418e565b6001600160a01b0384166142295760405162461bcd60e51b815260040161051190615c3b565b815183511461424a5760405162461bcd60e51b815260040161051190615cbf565b3361425a8160008787878761469a565b60005b84518110156142f5578381815181106142785761427861592c565b60200260200101516000808784815181106142955761429561592c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546142dd9190615ad3565b909155508190506142ed81615991565b91505061425d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051614346929190615d4b565b60405180910390a461435d816000878787876147e6565b611848816000878787876149cc565b6000826143798584614a87565b14949350505050565b6001600160a01b03851633148061439e575061439e8533611092565b6143ba5760405162461bcd60e51b815260040161051190615b6b565b6118488585858585614acc565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106144065772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614432576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061445057662386f26fc10000830492506010015b6305f5e1008310614468576305f5e100830492506008015b612710831061447c57612710830492506004015b6064831061448e576064830492506002015b600a83106111f05760010192915050565b81518351146144c05760405162461bcd60e51b815260040161051190615cbf565b6001600160a01b0384166144e65760405162461bcd60e51b815260040161051190615d70565b336144f581878787878761469a565b60005b84518110156145db5760008582815181106145155761451561592c565b6020026020010151905060008583815181106145335761453361592c565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156145835760405162461bcd60e51b815260040161051190615db5565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906145c0908490615ad3565b92505081905550505050806145d490615991565b90506144f8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161462b929190615d4b565b60405180910390a46146418187878787876147e6565b611ea88187878787876149cc565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106146895761468961592c565b602090810291909101015292915050565b6001600160a01b03861660009081526032602052604090205460ff161580156146dc57506001600160a01b03851660009081526032602052604090205460ff16155b801561470157506001600160a01b03841660009081526032602052604090205460ff16155b6147615760405162461bcd60e51b815260206004820152602b60248201527f4f70657261746f722c2046726f6d2c206f7220546f204164647265737320697360448201526a08149154d5149250d5115160aa1b6064820152608401610511565b60005b8351811015612d3357603160008583815181106147835761478361592c565b60209081029190910181015182528101919091526040016000205460ff16156147d45760405162461bcd60e51b815260206004820152600360248201526211925160ea1b6044820152606401610511565b806147de81615991565b915050614764565b60005b8351811015612d33576148148482815181106148075761480761592c565b602002602001015161168e565b1561485f576001603160008684815181106148315761483161592c565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061486981615991565b9150506147e9565b6001600160a01b0384163b15611ea85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906148b59089908990889088908890600401615dff565b6020604051808303816000875af19250505080156148f0575060408051601f3d908101601f191682019092526148ed91810190615e37565b60015b61499c576148fc615e54565b806308c379a0036149355750614910615e70565b8061491b5750614937565b8060405162461bcd60e51b81526004016105119190614e53565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610511565b6001600160e01b0319811663f23a6e6160e01b14612d335760405162461bcd60e51b815260040161051190615ef9565b6001600160a01b0384163b15611ea85760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190614a109089908990889088908890600401615f41565b6020604051808303816000875af1925050508015614a4b575060408051601f3d908101601f19168201909252614a4891810190615e37565b60015b614a57576148fc615e54565b6001600160e01b0319811663bc197c8160e01b14612d335760405162461bcd60e51b815260040161051190615ef9565b600081815b8451811015611d1f57614ab882868381518110614aab57614aab61592c565b6020026020010151614c12565b915080614ac481615991565b915050614a8c565b6001600160a01b038416614af25760405162461bcd60e51b815260040161051190615d70565b336000614afe8561464f565b90506000614b0b8561464f565b9050614b1b83898985858961469a565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015614b5c5760405162461bcd60e51b815260040161051190615db5565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290614b99908490615ad3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4614bf9848a8a86868a6147e6565b614c07848a8a8a8a8a614871565b505050505050505050565b6000818310614c2e5760008281526020849052604090206133ae565b5060009182526020526040902090565b828054828255906000526020600020908101928215614c79579160200282015b82811115614c79578251825591602001919060010190614c5e565b50614c85929150614d6d565b5090565b828054614c9590615853565b90600052602060002090601f016020900481019282614cb75760008555614c79565b82601f10614cd057805160ff1916838001178555614c79565b82800160010185558215614c795791820182811115614c79578251825591602001919060010190614c5e565b50805460008255906000526020600020908101906131399190614d6d565b828054828255906000526020600020908101928215614c79579160200282015b82811115614c795781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614d3a565b5b80821115614c855760008155600101614d6e565b80356001600160a01b0381168114614d9957600080fd5b919050565b60008060408385031215614db157600080fd5b614dba83614d82565b946020939093013593505050565b6001600160e01b03198116811461313957600080fd5b600060208284031215614df057600080fd5b81356133ae81614dc8565b60005b83811015614e16578181015183820152602001614dfe565b8381111561184a5750506000910152565b60008151808452614e3f816020860160208601614dfb565b601f01601f19169290920160200192915050565b6020815260006133ae6020830184614e27565b600060208284031215614e7857600080fd5b5035919050565b801515811461313957600080fd5b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614ec857614ec8614e8d565b6040525050565b60006001600160401b03821115614ee857614ee8614e8d565b5060051b60200190565b600082601f830112614f0357600080fd5b81356020614f1082614ecf565b604051614f1d8282614ea3565b83815260059390931b8501820192828101915086841115614f3d57600080fd5b8286015b84811015614f585780358352918301918301614f41565b509695505050505050565b60008060008060808587031215614f7957600080fd5b843593506020850135614f8b81614e7f565b925060408501356001600160401b0380821115614fa757600080fd5b614fb388838901614ef2565b93506060870135915080821115614fc957600080fd5b50614fd687828801614ef2565b91505092959194509250565b60008060408385031215614ff557600080fd5b82359150602083013561500781614e7f565b809150509250929050565b6000806000806080858703121561502857600080fd5b843561503381614e7f565b9350602085013592506040850135915061504f60608601614d82565b905092959194509250565b600082601f83011261506b57600080fd5b81356001600160401b0381111561508457615084614e8d565b60405161509b601f8301601f191660200182614ea3565b8181528460208386010111156150b057600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156150e557600080fd5b6150ee86614d82565b94506150fc60208701614d82565b935060408601356001600160401b038082111561511857600080fd5b61512489838a01614ef2565b9450606088013591508082111561513a57600080fd5b61514689838a01614ef2565b9350608088013591508082111561515c57600080fd5b506151698882890161505a565b9150509295509295909350565b60006020828403121561518857600080fd5b6133ae82614d82565b6000806000606084860312156151a657600080fd5b83356001600160401b03808211156151bd57600080fd5b6151c987838801614ef2565b945060208601359150808211156151df57600080fd5b506151ec86828701614ef2565b92505060408401356151fd81614e7f565b809150509250925092565b6000806040838503121561521b57600080fd5b82356001600160401b038082111561523257600080fd5b818501915085601f83011261524657600080fd5b8135602061525382614ecf565b6040516152608282614ea3565b83815260059390931b850182019282810191508984111561528057600080fd5b948201945b838610156152a55761529686614d82565b82529482019490820190615285565b965050860135925050808211156152bb57600080fd5b506152c885828601614ef2565b9150509250929050565b600081518084526020808501945080840160005b83811015615302578151875295820195908201906001016152e6565b509495945050505050565b6020815260006133ae60208301846152d2565b60008083601f84011261533257600080fd5b5081356001600160401b0381111561534957600080fd5b6020830191508360208260051b850101111561536457600080fd5b9250929050565b60008060008060008060a0878903121561538457600080fd5b61538d87614d82565b955060208701359450604087013593506060870135925060808701356001600160401b038111156153bd57600080fd5b6153c989828a01615320565b979a9699509497509295939492505050565b600080604083850312156153ee57600080fd5b50508035926020909101359150565b60008060006060848603121561541257600080fd5b505081359360208301359350604090920135919050565b600080600080600060a0868803121561544157600080fd5b853561544c81614e7f565b9450602086013561545c81614e7f565b93506040860135925060608601356001600160401b0381111561547e57600080fd5b61548a8882890161505a565b925050608086013561549b81614e7f565b809150509295509295909350565b600080604083850312156154bc57600080fd5b82356001600160401b03808211156154d357600080fd5b6154df86838701614ef2565b935060208501359150808211156152bb57600080fd5b60008060006060848603121561550a57600080fd5b83359250602084013561551c81614e7f565b929592945050506040919091013590565b60008060008060006080868803121561554557600080fd5b61554e86614d82565b9450602086013593506040860135925060608601356001600160401b0381111561557757600080fd5b61558388828901615320565b969995985093965092949392505050565b600080600080600060a086880312156155ac57600080fd5b853594506020860135935060408601356001600160401b038111156155d057600080fd5b6155dc8882890161505a565b93505060608601356155ed81614e7f565b9150608086013561549b81614e7f565b6000806040838503121561561057600080fd5b61561983614d82565b9150602083013561500781614e7f565b60008060006060848603121561563e57600080fd5b833561564981614e7f565b95602085013595506040909401359392505050565b6000806020838503121561567157600080fd5b82356001600160401b0381111561568757600080fd5b61569385828601615320565b90969095509350505050565b60008060008060008060a087890312156156b857600080fd5b6156c187614d82565b955060208701356001600160401b03808211156156dd57600080fd5b6156e98a838b01614ef2565b965060408901359150808211156156ff57600080fd5b61570b8a838b01614ef2565b955060608901359450608089013591508082111561572857600080fd5b506153c989828a01615320565b6000806000806060858703121561574b57600080fd5b84356001600160401b0381111561576157600080fd5b61576d87828801615320565b90989097506020870135966040013595509350505050565b6000806040838503121561579857600080fd5b6157a183614d82565b91506157af60208401614d82565b90509250929050565b600080600080600060a086880312156157d057600080fd5b6157d986614d82565b94506157e760208701614d82565b9350604086013592506060860135915060808601356001600160401b0381111561581057600080fd5b6151698882890161505a565b60008060006060848603121561583157600080fd5b833561583c81614e7f565b92506020840135915060408401356151fd81614e7f565b600181811c9082168061586757607f821691505b6020821081036133c357634e487b7160e01b600052602260045260246000fd5b8054600090600181811c90808316806158a157607f831692505b602080841082036158c257634e487b7160e01b600052602260045260246000fd5b8180156158d657600181146158e757615914565b60ff19861689528489019650615914565b60008881526020902060005b8681101561590c5781548b8201529085019083016158f3565b505084890196505b50505050505092915050565b60006133ae8284615887565b634e487b7160e01b600052603260045260246000fd5b66697066733a2f2f60c81b8152600061595e6007830184615887565b602f60f81b81526001019392505050565b600061595e8284615887565b634e487b7160e01b600052601160045260246000fd5b6000600182016159a3576159a361597b565b5060010190565b6000828210156159bc576159bc61597b565b500390565b600083516159d3818460208801614dfb565b8351908301906159e7818360208801614dfb565b64173539b7b760d91b9101908152600501949350505050565b60008351615a12818460208801614dfb565b615a1e81840185615887565b64173539b7b760d91b815260050195945050505050565b60208082526002908201526110a160f11b604082015260600190565b600060208284031215615a6357600080fd5b81516133ae81614e7f565b602080825260059082015264085352539560da1b604082015260600190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252600c908201526b0a0c2eae6cac84084c2e8c6d60a31b604082015260600190565b60008219821115615ae657615ae661597b565b500190565b66697066733a2f2f60c81b815260008351615b0d816007850160208801614dfb565b602f60f81b6007918401918201528351615b2e816008840160208801614dfb565b64173539b7b760d91b60089290910191820152600d01949350505050565b6020808252600590820152641393dbd41360da1b604082015260600190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b8581528460208201526bffffffffffffffffffffffff198460601b1660408201528260548201526000615bef6074830184615887565b979650505050505050565b600082615c1757634e487b7160e01b600052601260045260246000fd5b500690565b6000816000190483118215151615615c3657615c3661597b565b500290565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081526000615d5e60408301856152d2565b8281036020840152612eb381856152d2565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615bef60a0830184614e27565b600060208284031215615e4957600080fd5b81516133ae81614dc8565b600060033d1115615e6d5760046000803e5060005160e01c5b90565b600060443d1015615e7e5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615ead57505050505090565b8285019150815181811115615ec55750505050505090565b843d8701016020828501011115615edf5750505050505090565b615eee60208286010187614ea3565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60006001600160a01b03808816835280871660208401525060a06040830152615f6d60a08301866152d2565b8281036060840152615f7f81866152d2565b90508281036080840152615f938185614e27565b9897505050505050505056fea2646970667358221220c40ba00f91c79683498899b10416bf98aa6aae43b8e581e10dc3f2184741dc4e64736f6c634300080e0033697066733a2f2f516d5558444b54736e6f787331335a5139796e784632733534586d7a534d6271685237644641615150474d6f746e2f68696464656e2e6a736f6e

Deployed Bytecode

0x6080604052600436106104b85760003560e01c8063869f75941161026b578063bb1e05281161014f578063d6199f8d116100c1578063e985e9c511610085578063e985e9c514611077578063ed00e653146110c0578063f242432a146110d5578063f2fde38b146110f5578063fc2f0fd814611115578063fda100e11461113557600080fd5b8063d6199f8d14610fba578063d8d9d6bc14610fda578063dc8519c11461100a578063e49adb7314611037578063e5211d8b1461105757600080fd5b8063c791d96811610113578063c791d96814610ee7578063c848d6c714610f17578063ca397ed914610f2d578063cc328f1714610f4d578063cdc12af114610f7a578063d5cce90414610f9a57600080fd5b8063bb1e052814610e20578063bd85b03914610e4d578063bff67e9b14610e7a578063c3394bc614610e9a578063c5ac4e4014610eba57600080fd5b8063a370c668116101e8578063a6d23e10116101ac578063a6d23e1014610d67578063abc7c86614610d87578063accc1d5e14610db7578063b390c0ab14610dd7578063b4387f7f14610df7578063b7bc15a214610e0a57600080fd5b8063a370c66814610cb7578063a4c2f65114610ce7578063a5492f4414610d07578063a684c47114610d27578063a6b431af14610d4757600080fd5b806394357c251161022f57806394357c2514610c1557806395d89b4114610c35578063a037cd5014610c4a578063a22cb46514610c77578063a2b7258514610c9757600080fd5b8063869f759414610b77578063881773db14610ba45780638c0163b714610bc45780638da5cb5b14610bd75780638da754ea14610bf557600080fd5b80633e4a4e771161039d5780636aec6a371161030f5780637cd8ab94116102d35780637cd8ab9414610ab75780637ce8fab014610ad75780637d929b4f14610af75780637ffd97c114610b1757806383ca4b6f14610b375780638413c6c914610b5757600080fd5b80636aec6a3714610a155780636c30a22f14610a35578063715018a614610a55578063743efaf014610a6a5780637630e90214610a8a57600080fd5b80634f558e79116103615780634f558e791461096257806352addee514610992578063531a0155146109b25780635c975abb146109c5578063644e54ab146109df57806368fd7eee146109f557600080fd5b80633e4a4e7714610895578063446f0617146108b55780634816b2f8146108e55780634afc75c5146109155780634e1273f41461093557600080fd5b806318f1911311610436578063239c70ae116103fa578063239c70ae146107c55780632a9f2a23146107db5780632eb2c2d6146108135780632ed6cd461461083357806333ea51a8146108605780633ccfd60b1461088057600080fd5b806318f19113146107155780631aacb575146107355780631b5c9b4d146107655780631f7b4f3014610785578063214a5e50146107a557600080fd5b80630e89341c1161047d5780630e89341c146106385780630ef31dbd1461065857806314905abc1461068557806314bfd6d0146106bd578063165da72a146106f557600080fd5b8062fdd58e1461055b57806301ffc9a71461058e57806303d9885c146105be57806306fdde03146105f6578063088a4ed01461061857600080fd5b3661055657602d546001600160a01b031661051a5760405162461bcd60e51b815260206004820152601860248201527f5061796d656e742061646472657373206e6f74207365742e000000000000000060448201526064015b60405180910390fd5b602d5460405134916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610554573d6000803e3d6000fd5b005b600080fd5b34801561056757600080fd5b5061057b610576366004614d9e565b611162565b6040519081526020015b60405180910390f35b34801561059a57600080fd5b506105ae6105a9366004614dde565b6111f6565b6040519015158152602001610585565b3480156105ca57600080fd5b5061057b6105d9366004614d9e565b602960209081526000928352604080842090915290825290205481565b34801561060257600080fd5b5061060b611246565b6040516105859190614e53565b34801561062457600080fd5b50610554610633366004614e66565b6112d4565b34801561064457600080fd5b5061060b610653366004614e66565b6112e1565b34801561066457600080fd5b5061057b610673366004614e66565b60286020526000908152604090205481565b34801561069157600080fd5b5061057b6106a0366004614d9e565b600c60209081526000928352604080842090915290825290205481565b3480156106c957600080fd5b506106dd6106d8366004614e66565b611664565b6040516001600160a01b039091168152602001610585565b34801561070157600080fd5b506105ae610710366004614e66565b61168e565b34801561072157600080fd5b50610554610730366004614f63565b61176c565b34801561074157600080fd5b506105ae610750366004614e66565b60176020526000908152604090205460ff1681565b34801561077157600080fd5b5061057b610780366004614fe2565b611850565b34801561079157600080fd5b5061060b6107a0366004614e66565b611882565b3480156107b157600080fd5b506105546107c0366004615012565b61189b565b3480156107d157600080fd5b5061057b60095481565b3480156107e757600080fd5b5061057b6107f6366004614d9e565b602a60209081526000928352604080842090915290825290205481565b34801561081f57600080fd5b5061055461082e3660046150cd565b61190c565b34801561083f57600080fd5b5061057b61084e366004614e66565b60146020526000908152604090205481565b34801561086c57600080fd5b5061055461087b366004615176565b6119c2565b34801561088c57600080fd5b506105546119ec565b3480156108a157600080fd5b506105546108b0366004615191565b611b25565b3480156108c157600080fd5b506105ae6108d0366004614e66565b60306020526000908152604090205460ff1681565b3480156108f157600080fd5b506105ae610900366004614e66565b60276020526000908152604090205460ff1681565b34801561092157600080fd5b5061060b610930366004614e66565b611bf3565b34801561094157600080fd5b50610955610950366004615208565b611bfe565b604051610585919061530d565b34801561096e57600080fd5b506105ae61097d366004614e66565b60009081526015602052604090205460ff1690565b34801561099e57600080fd5b5061057b6109ad366004614e66565b611d27565b6105546109c036600461536b565b611d48565b3480156109d157600080fd5b50600d546105ae9060ff1681565b3480156109eb57600080fd5b5061057b600a5481565b348015610a0157600080fd5b506105ae610a103660046153db565b611eb0565b348015610a2157600080fd5b50610554610a303660046153db565b611f99565b348015610a4157600080fd5b50610554610a503660046153fd565b611ff6565b348015610a6157600080fd5b5061055461201b565b348015610a7657600080fd5b50610554610a853660046153db565b61202f565b348015610a9657600080fd5b5061057b610aa5366004614e66565b602b6020526000908152604090205481565b348015610ac357600080fd5b50610554610ad2366004615429565b61205b565b348015610ae357600080fd5b5061057b610af2366004614e66565b6121e0565b348015610b0357600080fd5b5061057b610b123660046153db565b6121f0565b348015610b2357600080fd5b5061057b610b323660046153db565b612221565b348015610b4357600080fd5b50610554610b523660046154a9565b61223d565b348015610b6357600080fd5b50610554610b723660046153fd565b6122c7565b348015610b8357600080fd5b5061057b610b92366004614e66565b60136020526000908152604090205481565b348015610bb057600080fd5b50610554610bbf3660046154f5565b61232d565b610554610bd236600461552d565b6123fd565b348015610be357600080fd5b506003546001600160a01b03166106dd565b348015610c0157600080fd5b50610554610c10366004615594565b6125be565b348015610c2157600080fd5b5061057b610c303660046153db565b612858565b348015610c4157600080fd5b5061060b612874565b348015610c5657600080fd5b5061057b610c65366004614e66565b600b6020526000908152604090205481565b348015610c8357600080fd5b50610554610c923660046155fd565b612881565b348015610ca357600080fd5b5061057b610cb2366004614e66565b61288c565b348015610cc357600080fd5b506105ae610cd2366004614e66565b60316020526000908152604090205460ff1681565b348015610cf357600080fd5b50610554610d02366004615176565b61289c565b348015610d1357600080fd5b50610554610d223660046155fd565b6128fd565b348015610d3357600080fd5b50602e546106dd906001600160a01b031681565b348015610d5357600080fd5b50610554610d62366004615629565b612967565b348015610d7357600080fd5b50602d546106dd906001600160a01b031681565b348015610d9357600080fd5b506105ae610da2366004614e66565b600e6020526000908152604090205460ff1681565b348015610dc357600080fd5b50610554610dd236600461565e565b6129bb565b348015610de357600080fd5b50610554610df23660046153db565b612a1a565b610554610e0536600461569f565b612a49565b348015610e1657600080fd5b5061057b60075481565b348015610e2c57600080fd5b5061057b610e3b366004614e66565b60256020526000908152604090205481565b348015610e5957600080fd5b5061057b610e68366004614e66565b60009081526012602052604090205490565b348015610e8657600080fd5b5061060b610e95366004614e66565b612d3c565b348015610ea657600080fd5b50610554610eb5366004614e66565b612d67565b348015610ec657600080fd5b5061057b610ed5366004614e66565b602c6020526000908152604090205481565b348015610ef357600080fd5b506105ae610f02366004614e66565b60266020526000908152604090205460ff1681565b348015610f2357600080fd5b5061057b60105481565b348015610f3957600080fd5b5061057b610f48366004614e66565b612d74565b348015610f5957600080fd5b5061057b610f68366004614e66565b601a6020526000908152604090205481565b348015610f8657600080fd5b506105ae610f95366004615735565b612dd9565b348015610fa657600080fd5b5061057b610fb53660046153db565b612ebc565b348015610fc657600080fd5b5061060b610fd5366004614e66565b612ed8565b348015610fe657600080fd5b506105ae610ff5366004615176565b60326020526000908152604090205460ff1681565b34801561101657600080fd5b5061057b611025366004614e66565b60246020526000908152604090205481565b34801561104357600080fd5b506105546110523660046153db565b612ee8565b34801561106357600080fd5b50610554611072366004614fe2565b612f01565b34801561108357600080fd5b506105ae611092366004615785565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156110cc57600080fd5b506105ae612f60565b3480156110e157600080fd5b506105546110f03660046157b8565b61300d565b34801561110157600080fd5b50610554611110366004615176565b6130c3565b34801561112157600080fd5b5061055461113036600461581c565b61313c565b34801561114157600080fd5b5061057b611150366004614e66565b60196020526000908152604090205481565b60006001600160a01b0383166111cd5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401610511565b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061122757506001600160e01b031982166303a24d0760e21b145b806111f057506301ffc9a760e01b6001600160e01b03198316146111f0565b6004805461125390615853565b80601f016020809104026020016040519081016040528092919081815260200182805461127f90615853565b80156112cc5780601f106112a1576101008083540402835291602001916112cc565b820191906000526020600020905b8154815290600101906020018083116112af57829003601f168201915b505050505081565b6112dc61318f565b600955565b600081815260156020526040812054606091600191839060ff16156116575760075485116116575760408051600080825260208083018085528351902089835260119091529083902090926113369201615920565b60405160208183030381529060405280519060200120146113f2576000858152601160205260409020805461136a90615853565b80601f016020809104026020016040519081016040528092919081815260200182805461139690615853565b80156113e35780601f106113b8576101008083540402835291602001916113e3565b820191906000526020600020905b8154815290600101906020018083116113c657829003601f168201915b50505050509350505050919050565b60005b601f5481101561155e57601f81815481106114125761141261592c565b9060005260206000200154861161154e5760408051600081526020810191829052519020602180548390811061144a5761144a61592c565b906000526020600020016040516020016114649190615920565b60405160208183030381529060405280519060200120146114c557602181815481106114925761149261592c565b906000526020600020016040516020016114ac9190615942565b604051602081830303815290604052915080925061155e565b6040805160008152602081019182905251902060228054839081106114ec576114ec61592c565b906000526020600020016040516020016115069190615920565b604051602081830303815290604052805190602001201461154e57602281815481106115345761153461592c565b906000526020600020016040516020016114ac919061596f565b61155781615991565b90506113f5565b50601f805461156f906001906159aa565b8154811061157f5761157f61592c565b906000526020600020015485111561159657600092505b8280156115b1575060008281526026602052604090205460ff165b156116575760408051600080825260208083018085528351902089835260189091529083902090926115e39201615920565b60405160208183030381529060405280519060200120036116325780611608866131c8565b6040516020016116199291906159c1565b6040516020818303038152906040529350505050919050565b8060186000878152602001908152602001600020604051602001611619929190615a00565b6006805461136a90615853565b602f818154811061167457600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060005b601f548110156117535780158015906116ca5750601f81815481106116bb576116bb61592c565b90600052602060002001548411155b80156116fc5750601f6116de6001836159aa565b815481106116ee576116ee61592c565b906000526020600020015484115b1561170957809150611753565b801580156117345750601f81815481106117255761172561592c565b90600052602060002001548411155b1561174157809150611753565b8061174b81615991565b915050611694565b5060009081526030602052604090205460ff1692915050565b61177461318f565b821561180957601f805461178a906001906159aa565b8154811061179a5761179a61592c565b90600052602060002001548411156117c45760405162461bcd60e51b815260040161051190615a35565b6000848152601d6020908152604090912083516117e392850190614c3e565b506000848152601e60209081526040909120825161180392840190614c3e565b5061184a565b6000848152601b60209081526040909120835161182892850190614c3e565b506000848152601c60209081526040909120825161184892840190614c3e565b505b50505050565b6000811561186d57506000828152601460205260409020546111f0565b506000828152601360205260409020546111f0565b6018602052600090815260409020805461125390615853565b6118a361318f565b83156118f9576001600160a01b038116156118e3576001600160a01b0381166000908152602a60209081526040808320858452909152902083905561184a565b600082815260286020526040902083905561184a565b506000908152600b602052604090205550565b6daaeb6d7670e522a718067333cd4e3b156119b557604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015611972573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119969190615a51565b6119b557604051633b79c77360e21b8152336004820152602401610511565b611848858585858561325a565b6119ca61329f565b602d80546001600160a01b0319166001600160a01b0392909216919091179055565b6119f461318f565b602d546001600160a01b0316611a455760405162461bcd60e51b815260206004820152601660248201527514185e5bdd5d081859191c995cdcc81b9bdd081cd95d60521b6044820152606401610511565b4780611a8a5760405162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b6044820152606401610511565b602d546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611ad7576040519150601f19603f3d011682016040523d82523d6000602084013e611adc565b606091505b5050905080611b215760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610511565b5050565b611b2d61318f565b8015611b845781600081518110611b4657611b4661592c565b60200260200101516014600085600081518110611b6557611b6561592c565b6020026020010151815260200190815260200160002081905550505050565b60005b835181101561184a576000848281518110611ba457611ba461592c565b60200260200101519050838281518110611bc057611bc061592c565b6020908102919091018101516000928352601390915260409091205580611be681615991565b915050611b87565b505050565b60606111f0826132f9565b60608151835114611c635760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610511565b600083516001600160401b03811115611c7e57611c7e614e8d565b604051908082528060200260200182016040528015611ca7578160200160208202803683370190505b50905060005b8451811015611d1f57611cf2858281518110611ccb57611ccb61592c565b6020026020010151858381518110611ce557611ce561592c565b6020026020010151611162565b828281518110611d0457611d0461592c565b6020908102919091010152611d1881615991565b9050611cad565b509392505050565b601f8181548110611d3757600080fd5b600091825260209091200154905081565b60008381526016602052604090205460ff1615611da75760405162461bcd60e51b815260206004820152601a60248201527f5265717569726573206d696e74496e4f726465722046616c73650000000000006044820152606401610511565b611db18584611eb0565b611dcd5760405162461bcd60e51b815260040161051190615a35565b611dd88585856133c9565b611df45760405162461bcd60e51b815260040161051190615a6e565b611dfc612f60565b611e5e57600d5460ff1615611e235760405162461bcd60e51b815260040161051190615a8d565b6000838152600e602052604090205460ff1615611e525760405162461bcd60e51b815260040161051190615aad565b611e5e84848484613678565b611e6885846139a5565b60008581526012602052604081208054869290611e86908490615ad3565b92505081905550611ea886868660405180602001604052806000815250613afc565b505050505050565b601f546000908210611eed5760405162461bcd60e51b815260206004820152600660248201526504284c2e8c6d60d31b6044820152606401610511565b8115801590611f195750601f8281548110611f0a57611f0a61592c565b90600052602060002001548311155b8015611f4b5750601f611f2d6001846159aa565b81548110611f3d57611f3d61592c565b906000526020600020015483115b15611f58575060016111f0565b81158015611f835750601f8281548110611f7457611f7461592c565b90600052602060002001548311155b15611f90575060016111f0565b50600092915050565b611fa161318f565b428111611fe45760405162461bcd60e51b815260206004820152601160248201527011185d1948105b1c9958591e4814185cdd607a1b6044820152606401610511565b6000918252600f602052604090912055565b611ffe61318f565b600090815260246020908152604080832093909355602590522055565b61202361329f565b61202d6000613beb565b565b61203761318f565b816020828154811061204b5761204b61592c565b6000918252602090912001555050565b61206361318f565b841561208257815161207c906006906020850190614c89565b50611848565b8361217857801561211b57600082612099856131c8565b6040516020016120aa929190615aeb565b60408051601f1981840301815291815260008681526011602090815291902082519293506120dc929091840190614c89565b50837f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8260405161210d9190614e53565b60405180910390a250611848565b6000838152601160209081526040909120835161213a92850190614c89565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360405161216b9190614e53565b60405180910390a2611848565b80156121af5781602184815481106121925761219261592c565b90600052602060002001908051906020019061207c929190614c89565b81602284815481106121c3576121c361592c565b906000526020600020019080519060200190611ea8929190614c89565b60208181548110611d3757600080fd5b601d602052816000526040600020818154811061220c57600080fd5b90600052602060002001600091509150505481565b601e602052816000526040600020818154811061220c57600080fd5b60005b82518110156122bb57600083828151811061225d5761225d61592c565b602002602001015190508282815181106122795761227961592c565b60200260200101516012600083815260200190815260200160002060008282546122a391906159aa565b909155506122b49150829050615991565b9050612240565b50611b21338383613c3d565b6122cf61318f565b8183111561230d5760405162461bcd60e51b815260206004820152600b60248201526a4d494e203c3d204d41583f60a81b6044820152606401610511565b600090815260196020908152604080832094909455601a90529190912055565b61233561318f565b8260010361235d576000908152602660205260409020805460ff191691151591909117905550565b82600203612385576000908152601760205260409020805460ff191691151591909117905550565b826003036123ad576000908152601660205260409020805460ff191691151591909117905550565b826004036123d5576000908152603060205260409020805460ff191691151591909117905550565b82600503611bee576000908152602760205260409020805460ff191691151591909117905550565b60008381526016602052604090205460ff166124495760405162461bcd60e51b815260206004820152600b60248201526a36b4b73a24b727b93232b960a91b6044820152606401610511565b61247f601f848154811061245f5761245f61592c565b906000526020600020015460009081526015602052604090205460ff1690565b156124b25760405162461bcd60e51b81526020600482015260036024820152624f4f5360e81b6044820152606401610511565b601f83815481106124c5576124c561592c565b90600052602060002001546001602085815481106124e5576124e561592c565b9060005260206000200154866124fb9190615ad3565b61250591906159aa565b11156125495760405162461bcd60e51b8152602060048201526013602482015272141b19585cd948131bddd95c88105b5bdd5b9d606a1b6044820152606401610511565b612551612f60565b6125b357600d5460ff16156125785760405162461bcd60e51b815260040161051190615a8d565b6000838152600e602052604090205460ff16156125a75760405162461bcd60e51b815260040161051190615aad565b6125b384848484613678565b611848858585613de3565b6125c661318f565b601f80546125d6906001906159aa565b815481106125e6576125e661592c565b9060005260206000200154851161262b5760405162461bcd60e51b8152602060048201526009602482015268454944203e2050423f60b81b6044820152606401610511565b601f80546020919061263f906001906159aa565b8154811061264f5761264f61592c565b906000526020600020015460016126669190615ad3565b81546001818101845560009384526020842090910191909155601f805491820181559091527fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d80701859055811561274c576021805460018101825560009190915283516126f9917f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b57001906020860190614c89565b50602280546001810182556000918252604080516020810191829052839052612746927f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e51090920191614c89565b506127de565b60228054600181018255600091909152835161278f917f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e51001906020860190614c89565b506021805460018101825560009182526040805160208101918290528390526127dc927f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b57090920191614c89565b505b602380546001818101835560009283527fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230909101869055601f548692602592909161282991906159aa565b81526020810191909152604001600020558015611848576118486003600180601f80549050610bbf91906159aa565b601b602052816000526040600020818154811061220c57600080fd5b6005805461125390615853565b611b21338383613f88565b60238181548110611d3757600080fd5b6003546001600160a01b03163314806128bf5750602e546001600160a01b031633145b6128db5760405162461bcd60e51b815260040161051190615b4c565b602e80546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314806129205750602e546001600160a01b031633145b61293c5760405162461bcd60e51b815260040161051190615b4c565b6001600160a01b03919091166000908152603260205260409020805460ff1916911515919091179055565b61296f61318f565b826129a95781602382815481106129885761298861592c565b60009182526020808320919091019290925591825260259052604090205550565b6000908152602b602052604090205550565b6129c361318f565b6003546001600160a01b03163314806129e65750602e546001600160a01b031633145b612a025760405162461bcd60e51b815260040161051190615b4c565b612a0e602f6000614cfc565b611bee602f8383614d1a565b60008281526012602052604081208054839290612a389084906159aa565b90915550611b219050338383614068565b60008381526016602052604090205460ff1615612aa85760405162461bcd60e51b815260206004820152601a60248201527f5265717569726573206d696e74496e4f726465722046616c73650000000000006044820152606401610511565b60095485511115612ae45760405162461bcd60e51b81526004016105119060208082526004908201526324a2399f60e11b604082015260600190565b8351855114612b265760405162461bcd60e51b815260206004820152600e60248201526d49447320213d20416d6f756e747360901b6044820152606401610511565b612b3185858561418a565b612b4d5760405162461bcd60e51b815260040161051190615a6e565b6000805b8551811015612bd257612b7d878281518110612b6f57612b6f61592c565b602002602001015186611eb0565b612b995760405162461bcd60e51b815260040161051190615a35565b858181518110612bab57612bab61592c565b602002602001015182612bbe9190615ad3565b915080612bca81615991565b915050612b51565b50600a54811115612c0a5760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b612c12612f60565b612c7457600d5460ff1615612c395760405162461bcd60e51b815260040161051190615a8d565b6000848152600e602052604090205460ff1615612c685760405162461bcd60e51b815260040161051190615aad565b612c7481858585613678565b60005b8651811015612d17576000878281518110612c9457612c9461592c565b60200260200101519050612ca881876139a5565b868281518110612cba57612cba61592c565b6020026020010151601260008a8581518110612cd857612cd861592c565b602002602001015181526020019081526020016000206000828254612cfd9190615ad3565b90915550829150612d0f905081615991565b915050612c77565b50612d3387878760405180602001604052806000815250614203565b50505050505050565b60228181548110612d4c57600080fd5b90600052602060002001600091509050805461125390615853565b612d6f61318f565b600755565b6000612d7e612f60565b612dd15760008281526027602052604090205460ff1615612dac57506000908152602b602052604090205490565b60238281548110612dbf57612dbf61592c565b90600052602060002001549050919050565b506000919050565b6000612e268585808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250888152602c6020526040902054925086915061436c9050565b612e685760405162461bcd60e51b815260206004820152601360248201527215995c9a599a58d85d1a5bdb8811985a5b1959606a1b6044820152606401610511565b612eb38585808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250888152602c6020526040902054925086915061436c9050565b95945050505050565b601c602052816000526040600020818154811061220c57600080fd5b60218181548110612d4c57600080fd5b612ef061318f565b6000908152602c6020526040902055565b6003546001600160a01b0316331480612f245750602e546001600160a01b031633145b612f405760405162461bcd60e51b815260040161051190615b4c565b600091825260316020526040909120805460ff1916911515919091179055565b6000612f746003546001600160a01b031690565b6001600160a01b0316336001600160a01b03161480612f9d5750602e546001600160a01b031633145b15612fa85750600190565b602f54156130075760005b602f5481101561300557602f8181548110612fd057612fd061592c565b6000918252602090912001546001600160a01b03163303612ff357600191505090565b80612ffd81615991565b915050612fb3565b505b50600090565b6daaeb6d7670e522a718067333cd4e3b156130b657604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015613073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130979190615a51565b6130b657604051633b79c77360e21b8152336004820152602401610511565b6118488585858585614382565b6130cb61329f565b6001600160a01b0381166131305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610511565b61313981613beb565b50565b61314461318f565b821561315f57600d805482151560ff19909116179055505050565b6000828152600e60205260409020805482151560ff19909116179055505050565b6001600160a01b03163b151590565b613197612f60565b61202d5760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b606060006131d5836143c7565b60010190506000816001600160401b038111156131f4576131f4614e8d565b6040519080825280601f01601f19166020018201604052801561321e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461322857509392505050565b6001600160a01b03851633148061327657506132768533611092565b6132925760405162461bcd60e51b815260040161051190615b6b565b611848858585858561449f565b6003546001600160a01b0316331461202d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610511565b6000818152601a602052604081205460105460609291904290449033906018866133246001846159aa565b8152602001908152602001600020604051602001613346959493929190615bb9565b6040516020818303038152906040528051906020012060001c6133699190615bfa565b6000848152601960205260409020549091508110156133b5576133ae613390826001615ad3565b6000858152601a60205260409020546133a991906159aa565b6131c8565b9392505050565b6133ae6133a9826001615ad3565b50919050565b60008083116133ff5760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b6009548311156134375760405162461bcd60e51b81526020600482015260036024820152624d4d4160e81b6044820152606401610511565b60075484111561346f5760405162461bcd60e51b815260206004820152600360248201526208525160ea1b6044820152606401610511565b600084815260136020526040902054158015906134af57506000848152601360209081526040808320546012909252909120546134ad908590615ad3565b115b156134bc575060006133ae565b600082815260146020526040902054158015906134ff57506000828152601460209081526040808320548784526012909252909120546134fd908590615ad3565b115b1561350c575060006133ae565b6000848152601b6020526040902054156135c55760005b6000858152601b60205260409020548110156135c3576000858152601b60205260408120805461356f9133918590811061355f5761355f61592c565b9060005260206000200154611162565b6000878152601c60205260409020805491925090839081106135935761359361592c565b90600052602060002001548110156135b0576000925050506133ae565b50806135bb81615991565b915050613523565b505b6000828152601d60205260409020541561366e5760005b6000838152601d602052604090205481101561366c576000838152601d6020526040812080546136189133918590811061355f5761355f61592c565b6000858152601e602052604090208054919250908390811061363c5761363c61592c565b9060005260206000200154811015613659576000925050506133ae565b508061366481615991565b9150506135dc565b505b5060019392505050565b613680612f60565b61184a576000838152600f6020526040902054156136db576000838152600f60205260409020544210156136db5760405162461bcd60e51b8152602060048201526002602482015261085160f21b6044820152606401610511565b6000838152600b602052604090205415613784576000838152600b6020908152604080832054338452600c835281842087855290925290912054613720908690615ad3565b11156137545760405162461bcd60e51b8152602060048201526003602482015262424c4560e81b6044820152606401610511565b336000908152600c602090815260408083208684529091528120805486929061377e908490615ad3565b90915550505b60008381526027602052604090205460ff161561395e57336000908152602a602090815260408083208684529091529020541561381f57336000818152602a60209081526040808320878452825280832054938352602982528083208784529091529020541061381f5760405162461bcd60e51b81526004016105119060208082526004908201526350574c4560e01b604082015260600190565b6040516bffffffffffffffffffffffff193360601b166020820152603481018590526138699083908390869060540160405160208183030381529060405280519060200120612dd9565b61389b5760405162461bcd60e51b81526020600482015260036024820152620855d360ea1b6044820152606401610511565b60008381526028602090815260408083205433845260298352818420878552909252909120546138cc908690615ad3565b11156138ff5760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b336000908152602a6020908152604080832086845290915281208054869290613929908490615ad3565b909155505033600090815260296020908152604080832086845290915281208054869290613958908490615ad3565b90915550505b61396783612d74565b6139719085615c1c565b34101561184a5760405162461bcd60e51b8152602060048201526002602482015261243f60f01b6044820152606401610511565b60008281526015602052604090205460ff166139fd576000828152601560209081526040808320805460ff19166001179055838352601690915290205460ff16156139fd576000828152601260205260409020600190555b60008181526017602052604090205460ff1615613a4257613a1d816132f9565b60008381526018602090815260409091208251613a409391929190910190614c89565b505b6000818152602560205260409020546023805483908110613a6557613a6561592c565b906000526020600020015414158015613aae5750602460008281526020019081526020016000205460208281548110613aa057613aa061592c565b906000526020600020015410155b15613ae3576000818152602560205260409020546023805483908110613ad657613ad661592c565b6000918252602090912001555b60108054906000613af383615991565b91905055505050565b6001600160a01b038416613b225760405162461bcd60e51b815260040161051190615c3b565b336000613b2e8561464f565b90506000613b3b8561464f565b9050613b4c8360008985858961469a565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290613b7c908490615ad3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613bdc836000898585896147e6565b612d3383600089898989614871565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316613c635760405162461bcd60e51b815260040161051190615c7c565b8051825114613c845760405162461bcd60e51b815260040161051190615cbf565b6000339050613ca78185600086866040518060200160405280600081525061469a565b60005b8351811015613d6c576000848281518110613cc757613cc761592c565b602002602001015190506000848381518110613ce557613ce561592c565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015613d355760405162461bcd60e51b815260040161051190615d07565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580613d6481615991565b915050613caa565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613dbd929190615d4b565b60405180910390a461184a818560008686604051806020016040528060008152506147e6565b6000826001600160401b03811115613dfd57613dfd614e8d565b604051908082528060200260200182016040528015613e26578160200160208202803683370190505b5090506000836001600160401b03811115613e4357613e43614e8d565b604051908082528060200260200182016040528015613e6c578160200160208202803683370190505b50905060005b84811015613f6c57600060208581548110613e8f57613e8f61592c565b90600052602060002001549050613ea8816001876133c9565b613ec45760405162461bcd60e51b815260040161051190615a6e565b613ece81866139a5565b60208581548110613ee157613ee161592c565b9060005260206000200154848381518110613efe57613efe61592c565b6020026020010181815250506001838381518110613f1e57613f1e61592c565b60200260200101818152505060208581548110613f3d57613f3d61592c565b60009182526020822001805491613f5383615991565b9190505550508080613f6490615991565b915050613e72565b5061184885838360405180602001604052806000815250614203565b816001600160a01b0316836001600160a01b031603613ffb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610511565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03831661408e5760405162461bcd60e51b815260040161051190615c7c565b33600061409a8461464f565b905060006140a78461464f565b90506140c78387600085856040518060200160405280600081525061469a565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156141085760405162461bcd60e51b815260040161051190615d07565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612d33848860008686604051806020016040528060008152506147e6565b6000805b845181101561366c5760008582815181106141ab576141ab61592c565b6020026020010151905060008583815181106141c9576141c961592c565b602002602001015190506141de8282876133c9565b6141ee57600093505050506133ae565b505080806141fb90615991565b91505061418e565b6001600160a01b0384166142295760405162461bcd60e51b815260040161051190615c3b565b815183511461424a5760405162461bcd60e51b815260040161051190615cbf565b3361425a8160008787878761469a565b60005b84518110156142f5578381815181106142785761427861592c565b60200260200101516000808784815181106142955761429561592c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546142dd9190615ad3565b909155508190506142ed81615991565b91505061425d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051614346929190615d4b565b60405180910390a461435d816000878787876147e6565b611848816000878787876149cc565b6000826143798584614a87565b14949350505050565b6001600160a01b03851633148061439e575061439e8533611092565b6143ba5760405162461bcd60e51b815260040161051190615b6b565b6118488585858585614acc565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106144065772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614432576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061445057662386f26fc10000830492506010015b6305f5e1008310614468576305f5e100830492506008015b612710831061447c57612710830492506004015b6064831061448e576064830492506002015b600a83106111f05760010192915050565b81518351146144c05760405162461bcd60e51b815260040161051190615cbf565b6001600160a01b0384166144e65760405162461bcd60e51b815260040161051190615d70565b336144f581878787878761469a565b60005b84518110156145db5760008582815181106145155761451561592c565b6020026020010151905060008583815181106145335761453361592c565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156145835760405162461bcd60e51b815260040161051190615db5565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906145c0908490615ad3565b92505081905550505050806145d490615991565b90506144f8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161462b929190615d4b565b60405180910390a46146418187878787876147e6565b611ea88187878787876149cc565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106146895761468961592c565b602090810291909101015292915050565b6001600160a01b03861660009081526032602052604090205460ff161580156146dc57506001600160a01b03851660009081526032602052604090205460ff16155b801561470157506001600160a01b03841660009081526032602052604090205460ff16155b6147615760405162461bcd60e51b815260206004820152602b60248201527f4f70657261746f722c2046726f6d2c206f7220546f204164647265737320697360448201526a08149154d5149250d5115160aa1b6064820152608401610511565b60005b8351811015612d3357603160008583815181106147835761478361592c565b60209081029190910181015182528101919091526040016000205460ff16156147d45760405162461bcd60e51b815260206004820152600360248201526211925160ea1b6044820152606401610511565b806147de81615991565b915050614764565b60005b8351811015612d33576148148482815181106148075761480761592c565b602002602001015161168e565b1561485f576001603160008684815181106148315761483161592c565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061486981615991565b9150506147e9565b6001600160a01b0384163b15611ea85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906148b59089908990889088908890600401615dff565b6020604051808303816000875af19250505080156148f0575060408051601f3d908101601f191682019092526148ed91810190615e37565b60015b61499c576148fc615e54565b806308c379a0036149355750614910615e70565b8061491b5750614937565b8060405162461bcd60e51b81526004016105119190614e53565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610511565b6001600160e01b0319811663f23a6e6160e01b14612d335760405162461bcd60e51b815260040161051190615ef9565b6001600160a01b0384163b15611ea85760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190614a109089908990889088908890600401615f41565b6020604051808303816000875af1925050508015614a4b575060408051601f3d908101601f19168201909252614a4891810190615e37565b60015b614a57576148fc615e54565b6001600160e01b0319811663bc197c8160e01b14612d335760405162461bcd60e51b815260040161051190615ef9565b600081815b8451811015611d1f57614ab882868381518110614aab57614aab61592c565b6020026020010151614c12565b915080614ac481615991565b915050614a8c565b6001600160a01b038416614af25760405162461bcd60e51b815260040161051190615d70565b336000614afe8561464f565b90506000614b0b8561464f565b9050614b1b83898985858961469a565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015614b5c5760405162461bcd60e51b815260040161051190615db5565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290614b99908490615ad3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4614bf9848a8a86868a6147e6565b614c07848a8a8a8a8a614871565b505050505050505050565b6000818310614c2e5760008281526020849052604090206133ae565b5060009182526020526040902090565b828054828255906000526020600020908101928215614c79579160200282015b82811115614c79578251825591602001919060010190614c5e565b50614c85929150614d6d565b5090565b828054614c9590615853565b90600052602060002090601f016020900481019282614cb75760008555614c79565b82601f10614cd057805160ff1916838001178555614c79565b82800160010185558215614c795791820182811115614c79578251825591602001919060010190614c5e565b50805460008255906000526020600020908101906131399190614d6d565b828054828255906000526020600020908101928215614c79579160200282015b82811115614c795781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614d3a565b5b80821115614c855760008155600101614d6e565b80356001600160a01b0381168114614d9957600080fd5b919050565b60008060408385031215614db157600080fd5b614dba83614d82565b946020939093013593505050565b6001600160e01b03198116811461313957600080fd5b600060208284031215614df057600080fd5b81356133ae81614dc8565b60005b83811015614e16578181015183820152602001614dfe565b8381111561184a5750506000910152565b60008151808452614e3f816020860160208601614dfb565b601f01601f19169290920160200192915050565b6020815260006133ae6020830184614e27565b600060208284031215614e7857600080fd5b5035919050565b801515811461313957600080fd5b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614ec857614ec8614e8d565b6040525050565b60006001600160401b03821115614ee857614ee8614e8d565b5060051b60200190565b600082601f830112614f0357600080fd5b81356020614f1082614ecf565b604051614f1d8282614ea3565b83815260059390931b8501820192828101915086841115614f3d57600080fd5b8286015b84811015614f585780358352918301918301614f41565b509695505050505050565b60008060008060808587031215614f7957600080fd5b843593506020850135614f8b81614e7f565b925060408501356001600160401b0380821115614fa757600080fd5b614fb388838901614ef2565b93506060870135915080821115614fc957600080fd5b50614fd687828801614ef2565b91505092959194509250565b60008060408385031215614ff557600080fd5b82359150602083013561500781614e7f565b809150509250929050565b6000806000806080858703121561502857600080fd5b843561503381614e7f565b9350602085013592506040850135915061504f60608601614d82565b905092959194509250565b600082601f83011261506b57600080fd5b81356001600160401b0381111561508457615084614e8d565b60405161509b601f8301601f191660200182614ea3565b8181528460208386010111156150b057600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156150e557600080fd5b6150ee86614d82565b94506150fc60208701614d82565b935060408601356001600160401b038082111561511857600080fd5b61512489838a01614ef2565b9450606088013591508082111561513a57600080fd5b61514689838a01614ef2565b9350608088013591508082111561515c57600080fd5b506151698882890161505a565b9150509295509295909350565b60006020828403121561518857600080fd5b6133ae82614d82565b6000806000606084860312156151a657600080fd5b83356001600160401b03808211156151bd57600080fd5b6151c987838801614ef2565b945060208601359150808211156151df57600080fd5b506151ec86828701614ef2565b92505060408401356151fd81614e7f565b809150509250925092565b6000806040838503121561521b57600080fd5b82356001600160401b038082111561523257600080fd5b818501915085601f83011261524657600080fd5b8135602061525382614ecf565b6040516152608282614ea3565b83815260059390931b850182019282810191508984111561528057600080fd5b948201945b838610156152a55761529686614d82565b82529482019490820190615285565b965050860135925050808211156152bb57600080fd5b506152c885828601614ef2565b9150509250929050565b600081518084526020808501945080840160005b83811015615302578151875295820195908201906001016152e6565b509495945050505050565b6020815260006133ae60208301846152d2565b60008083601f84011261533257600080fd5b5081356001600160401b0381111561534957600080fd5b6020830191508360208260051b850101111561536457600080fd5b9250929050565b60008060008060008060a0878903121561538457600080fd5b61538d87614d82565b955060208701359450604087013593506060870135925060808701356001600160401b038111156153bd57600080fd5b6153c989828a01615320565b979a9699509497509295939492505050565b600080604083850312156153ee57600080fd5b50508035926020909101359150565b60008060006060848603121561541257600080fd5b505081359360208301359350604090920135919050565b600080600080600060a0868803121561544157600080fd5b853561544c81614e7f565b9450602086013561545c81614e7f565b93506040860135925060608601356001600160401b0381111561547e57600080fd5b61548a8882890161505a565b925050608086013561549b81614e7f565b809150509295509295909350565b600080604083850312156154bc57600080fd5b82356001600160401b03808211156154d357600080fd5b6154df86838701614ef2565b935060208501359150808211156152bb57600080fd5b60008060006060848603121561550a57600080fd5b83359250602084013561551c81614e7f565b929592945050506040919091013590565b60008060008060006080868803121561554557600080fd5b61554e86614d82565b9450602086013593506040860135925060608601356001600160401b0381111561557757600080fd5b61558388828901615320565b969995985093965092949392505050565b600080600080600060a086880312156155ac57600080fd5b853594506020860135935060408601356001600160401b038111156155d057600080fd5b6155dc8882890161505a565b93505060608601356155ed81614e7f565b9150608086013561549b81614e7f565b6000806040838503121561561057600080fd5b61561983614d82565b9150602083013561500781614e7f565b60008060006060848603121561563e57600080fd5b833561564981614e7f565b95602085013595506040909401359392505050565b6000806020838503121561567157600080fd5b82356001600160401b0381111561568757600080fd5b61569385828601615320565b90969095509350505050565b60008060008060008060a087890312156156b857600080fd5b6156c187614d82565b955060208701356001600160401b03808211156156dd57600080fd5b6156e98a838b01614ef2565b965060408901359150808211156156ff57600080fd5b61570b8a838b01614ef2565b955060608901359450608089013591508082111561572857600080fd5b506153c989828a01615320565b6000806000806060858703121561574b57600080fd5b84356001600160401b0381111561576157600080fd5b61576d87828801615320565b90989097506020870135966040013595509350505050565b6000806040838503121561579857600080fd5b6157a183614d82565b91506157af60208401614d82565b90509250929050565b600080600080600060a086880312156157d057600080fd5b6157d986614d82565b94506157e760208701614d82565b9350604086013592506060860135915060808601356001600160401b0381111561581057600080fd5b6151698882890161505a565b60008060006060848603121561583157600080fd5b833561583c81614e7f565b92506020840135915060408401356151fd81614e7f565b600181811c9082168061586757607f821691505b6020821081036133c357634e487b7160e01b600052602260045260246000fd5b8054600090600181811c90808316806158a157607f831692505b602080841082036158c257634e487b7160e01b600052602260045260246000fd5b8180156158d657600181146158e757615914565b60ff19861689528489019650615914565b60008881526020902060005b8681101561590c5781548b8201529085019083016158f3565b505084890196505b50505050505092915050565b60006133ae8284615887565b634e487b7160e01b600052603260045260246000fd5b66697066733a2f2f60c81b8152600061595e6007830184615887565b602f60f81b81526001019392505050565b600061595e8284615887565b634e487b7160e01b600052601160045260246000fd5b6000600182016159a3576159a361597b565b5060010190565b6000828210156159bc576159bc61597b565b500390565b600083516159d3818460208801614dfb565b8351908301906159e7818360208801614dfb565b64173539b7b760d91b9101908152600501949350505050565b60008351615a12818460208801614dfb565b615a1e81840185615887565b64173539b7b760d91b815260050195945050505050565b60208082526002908201526110a160f11b604082015260600190565b600060208284031215615a6357600080fd5b81516133ae81614e7f565b602080825260059082015264085352539560da1b604082015260600190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252600c908201526b0a0c2eae6cac84084c2e8c6d60a31b604082015260600190565b60008219821115615ae657615ae661597b565b500190565b66697066733a2f2f60c81b815260008351615b0d816007850160208801614dfb565b602f60f81b6007918401918201528351615b2e816008840160208801614dfb565b64173539b7b760d91b60089290910191820152600d01949350505050565b6020808252600590820152641393dbd41360da1b604082015260600190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b8581528460208201526bffffffffffffffffffffffff198460601b1660408201528260548201526000615bef6074830184615887565b979650505050505050565b600082615c1757634e487b7160e01b600052601260045260246000fd5b500690565b6000816000190483118215151615615c3657615c3661597b565b500290565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081526000615d5e60408301856152d2565b8281036020840152612eb381856152d2565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615bef60a0830184614e27565b600060208284031215615e4957600080fd5b81516133ae81614dc8565b600060033d1115615e6d5760046000803e5060005160e01c5b90565b600060443d1015615e7e5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615ead57505050505090565b8285019150815181811115615ec55750505050505090565b843d8701016020828501011115615edf5750505050505090565b615eee60208286010187614ea3565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60006001600160a01b03808816835280871660208401525060a06040830152615f6d60a08301866152d2565b8281036060840152615f7f81866152d2565b90508281036080840152615f938185614e27565b9897505050505050505056fea2646970667358221220c40ba00f91c79683498899b10416bf98aa6aae43b8e581e10dc3f2184741dc4e64736f6c634300080e0033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.