ETH Price: $3,410.75 (+2.98%)

Token

LeprechaunTown_WTF_Stuff (LTWTFS)
 

Overview

Max Total Supply

135 LTWTFS

Holders

117

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
kaleesa.eth
0x915559abb477083058d3b42fccc8b96e6ec9fbd6
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:
LeprechaunTown_WTF_Stuff

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 220 runs

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

pragma solidity ^ 0.8.19;

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

/*
█     ▄███▄   █ ▄▄  █▄▄▄▄ ▄███▄   ▄█▄     ▄  █ ██     ▄      ▄     ▄▄▄▄▀ ████▄   ▄ ▄      ▄   
█     █▀   ▀  █   █ █  ▄▀ █▀   ▀  █▀ ▀▄  █   █ █ █     █      █ ▀▀▀ █    █   █  █   █      █  
█     ██▄▄    █▀▀▀  █▀▀▌  ██▄▄    █   ▀  ██▀▀█ █▄▄█ █   █ ██   █    █    █   █ █ ▄   █ ██   █ 
███▄  █▄   ▄▀ █     █  █  █▄   ▄▀ █▄  ▄▀ █   █ █  █ █   █ █ █  █   █     ▀████ █  █  █ █ █  █ 
    ▀ ▀███▀    █      █   ▀███▀   ▀███▀     █     █ █▄ ▄█ █  █ █  ▀             █ █ █  █  █ █ 
                ▀    ▀                     ▀     █   ▀▀▀  █   ██                 ▀ ▀   █   ██ 
                                                ▀                                             
  ▄ ▄     ▄▄▄▄▀ ▄████         ▄▄▄▄▄      ▄▄▄▄▀ ▄   ▄████  ▄████         .-. .-.                           
 █   █ ▀▀▀ █    █▀   ▀       █     ▀▄ ▀▀▀ █     █  █▀   ▀ █▀   ▀       (   |   )                         
█ ▄   █    █    █▀▀        ▄  ▀▀▀▀▄       █  █   █ █▀▀    █▀▀        .-.:  |  ;,-.                          
█  █  █   █     █           ▀▄▄▄▄▀       █   █   █ █      █         (_ __`.|.'_ __)                          
 █ █ █   ▀       █                      ▀    █▄ ▄█  █      █        (    ./Y\.    )                          
  ▀ ▀             ▀                           ▀▀▀    ▀      ▀        `-.-' | `-.-'  
    🌈      ☘️       🎱      🍻      🍺                                       \ 
Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27
*/
/// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸
contract LeprechaunTown_WTF_Stuff is ERC1155, Ownable, DefaultOperatorFilterer {
    string public name = "LeprechaunTown_WTF_Stuff";
    string public symbol = "LTWTFS";
    string private hiddenURI;
    uint256 public collectionEndID = 0;
    uint256 private cost = 0.1 ether;
    uint256 public maxMintAmount = 20;
    uint256 public maxBatchMintAmount = 20;
    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[0] = 1777;
        createdToken[0] = true;
        currentSupply[0] = 1;
        tokenNextToMintInBatch.push(1);
        _mint(msg.sender, 0, 1, "");

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

    /**
    @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");
                }
                if(presaleBatchLimit[_batchID] != 0) {
                    require(isValid(proof, _batchID, keccak256(abi.encodePacked(msg.sender,_amount))), "!WL");
                    require(presaleMinted[msg.sender][_batchID] + _amount <= presaleBatchLimit[_batchID], "LE");
                }
                else{
                    require(isValid(proof, _batchID, keccak256(abi.encodePacked(msg.sender))), "!WL");
                }
                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");
        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");
        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.prevrandao,
            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) {
        bool isValidProof = MerkleProof.verify(proof, rootForBatch[_fromBatch], leaf);
        require(isValidProof, "Verification Failed");
        return isValidProof;
    }

    /**
     * @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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                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"}]

60c0604052601860809081527f4c65707265636861756e546f776e5f5754465f5374756666000000000000000060a0526004906200003e908262000b74565b506040805180820190915260068152654c545754465360d01b60208201526005906200006b908262000b74565b50600060075567016345785d8a000060085560146009819055600a55600d805460ff19166001908117909155601055348015620000a757600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb6600160405180602001604052806000815250620000e0816200043260201b60201c565b50620000ec3362000444565b6daaeb6d7670e522a718067333cd4e3b15620002315780156200017f57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200016057600080fd5b505af115801562000175573d6000803e3d6000fd5b5050505062000231565b6001600160a01b03821615620001d05760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000145565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200021757600080fd5b505af11580156200022c573d6000803e3d6000fd5b505050505b5050600754601f805460018181019092557fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d8070191909155602180549182018155600090815260408051602081019091529081527f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b57090910190620002b5908262000b74565b5060228054600181018255600091825260408051602081019091529182527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510019062000302908262000b74565b506106f17f8fa6efc3be94b5b348b21fea823fe8d100408cee9b7f90524494500445d8ff6c557fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed805460ff19166001908117909155601260209081527f7e7fa33969761a458e04f477e039a608702b4f924981d6653935a8319a08ad7b8290558054808301825560008281527fc97bfaf2f8ee708c303a06d134f5ecd8389ae0432af62dc132a24118292866bb909101839055604080519283019052808252620003ce92339262000496565b60085460238054600181019091557fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230018190556000805260256020527fa54b3e90672405a607381bd4d34034a12c5aad31607067a7ad26573f504ad6e25562000e6c565b600262000440828262000b74565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416620004fc5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084015b60405180910390fd5b3360006200050a85620005da565b905060006200051985620005da565b90506200052c8360008985858962000628565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906200055e90849062000c56565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4620005c08360008985858962000781565b620005d1836000898989896200081f565b50505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811062000617576200061762000c72565b602090810291909101015292915050565b6001600160a01b03861660009081526032602052604090205460ff161580156200066b57506001600160a01b03851660009081526032602052604090205460ff16155b80156200069157506001600160a01b03841660009081526032602052604090205460ff16155b620006f35760405162461bcd60e51b815260206004820152602b60248201527f4f70657261746f722c2046726f6d2c206f7220546f204164647265737320697360448201526a08149154d5149250d5115160aa1b6064820152608401620004f3565b60005b8351811015620005d1576031600085838151811062000719576200071962000c72565b60209081029190910181015182528101919091526040016000205460ff16156200076c5760405162461bcd60e51b815260206004820152600360248201526211925160ea1b6044820152606401620004f3565b80620007788162000c88565b915050620006f6565b60005b8351811015620005d157620007bb848281518110620007a757620007a762000c72565b6020026020010151620009df60201b60201c565b156200080a57600160316000868481518110620007dc57620007dc62000c72565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80620008168162000c88565b91505062000784565b6001600160a01b0384163b15620009d75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619062000866908990899088908890889060040162000cec565b6020604051808303816000875af1925050508015620008a4575060408051601f3d908101601f19168201909252620008a19181019062000d33565b60015b6200096457620008b362000d66565b806308c379a003620008f35750620008ca62000db2565b80620008d75750620008f5565b8060405162461bcd60e51b8152600401620004f3919062000e41565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401620004f3565b6001600160e01b0319811663f23a6e6160e01b14620005d15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401620004f3565b505050505050565b60008060005b601f5481101562000aba57801580159062000a205750601f818154811062000a115762000a1162000c72565b90600052602060002001548411155b801562000a585750601f62000a3760018362000e56565b8154811062000a4a5762000a4a62000c72565b906000526020600020015484115b1562000a675780915062000aba565b8015801562000a965750601f818154811062000a875762000a8762000c72565b90600052602060002001548411155b1562000aa55780915062000aba565b8062000ab18162000c88565b915050620009e5565b5060009081526030602052604090205460ff1692915050565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062000afe57607f821691505b60208210810362000b1f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000b6f57600081815260208120601f850160051c8101602086101562000b4e5750805b601f850160051c820191505b81811015620009d75782815560010162000b5a565b505050565b81516001600160401b0381111562000b905762000b9062000ad3565b62000ba88162000ba1845462000ae9565b8462000b25565b602080601f83116001811462000be0576000841562000bc75750858301515b600019600386901b1c1916600185901b178555620009d7565b600085815260208120601f198616915b8281101562000c115788860151825594840194600190910190840162000bf0565b508582101562000c305787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000c6c5762000c6c62000c40565b92915050565b634e487b7160e01b600052603260045260246000fd5b60006001820162000c9d5762000c9d62000c40565b5060010190565b6000815180845260005b8181101562000ccc5760208185018101518683018201520162000cae565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009062000d289083018462000ca4565b979650505050505050565b60006020828403121562000d4657600080fd5b81516001600160e01b03198116811462000d5f57600080fd5b9392505050565b600060033d111562000d805760046000803e5060005160e01c5b90565b601f8201601f191681016001600160401b038111828210171562000dab5762000dab62000ad3565b6040525050565b600060443d101562000dc15790565b6040516003193d81016004833e81513d6001600160401b03808311602484018310171562000df157505050505090565b828501915081518181111562000e0a5750505050505090565b843d870101602082850101111562000e255750505050505090565b62000e366020828601018762000d83565b509095945050505050565b60208152600062000d5f602083018462000ca4565b8181038181111562000c6c5762000c6c62000c40565b615ff98062000e7c6000396000f3fe6080604052600436106104b85760003560e01c8063869f75941161026b578063bb1e05281161014f578063d6199f8d116100c1578063e985e9c511610085578063e985e9c514611077578063ed00e653146110c0578063f242432a146110d5578063f2fde38b146110f5578063fc2f0fd814611115578063fda100e11461113557600080fd5b8063d6199f8d14610fba578063d8d9d6bc14610fda578063dc8519c11461100a578063e49adb7314611037578063e5211d8b1461105757600080fd5b8063c791d96811610113578063c791d96814610ee7578063c848d6c714610f17578063ca397ed914610f2d578063cc328f1714610f4d578063cdc12af114610f7a578063d5cce90414610f9a57600080fd5b8063bb1e052814610e20578063bd85b03914610e4d578063bff67e9b14610e7a578063c3394bc614610e9a578063c5ac4e4014610eba57600080fd5b8063a370c668116101e8578063a6d23e10116101ac578063a6d23e1014610d67578063abc7c86614610d87578063accc1d5e14610db7578063b390c0ab14610dd7578063b4387f7f14610df7578063b7bc15a214610e0a57600080fd5b8063a370c66814610cb7578063a4c2f65114610ce7578063a5492f4414610d07578063a684c47114610d27578063a6b431af14610d4757600080fd5b806394357c251161022f57806394357c2514610c1557806395d89b4114610c35578063a037cd5014610c4a578063a22cb46514610c77578063a2b7258514610c9757600080fd5b8063869f759414610b77578063881773db14610ba45780638c0163b714610bc45780638da5cb5b14610bd75780638da754ea14610bf557600080fd5b80633e4a4e771161039d5780636aec6a371161030f5780637cd8ab94116102d35780637cd8ab9414610ab75780637ce8fab014610ad75780637d929b4f14610af75780637ffd97c114610b1757806383ca4b6f14610b375780638413c6c914610b5757600080fd5b80636aec6a3714610a155780636c30a22f14610a35578063715018a614610a55578063743efaf014610a6a5780637630e90214610a8a57600080fd5b80634f558e79116103615780634f558e791461096257806352addee514610992578063531a0155146109b25780635c975abb146109c5578063644e54ab146109df57806368fd7eee146109f557600080fd5b80633e4a4e7714610895578063446f0617146108b55780634816b2f8146108e55780634afc75c5146109155780634e1273f41461093557600080fd5b806318f1911311610436578063239c70ae116103fa578063239c70ae146107c55780632a9f2a23146107db5780632eb2c2d6146108135780632ed6cd461461083357806333ea51a8146108605780633ccfd60b1461088057600080fd5b806318f19113146107155780631aacb575146107355780631b5c9b4d146107655780631f7b4f3014610785578063214a5e50146107a557600080fd5b80630e89341c1161047d5780630e89341c146106385780630ef31dbd1461065857806314905abc1461068557806314bfd6d0146106bd578063165da72a146106f557600080fd5b8062fdd58e1461055b57806301ffc9a71461058e57806303d9885c146105be57806306fdde03146105f6578063088a4ed01461061857600080fd5b3661055657602d546001600160a01b031661051a5760405162461bcd60e51b815260206004820152601760248201527f5061796d656e742061646472657373206e6f742073657400000000000000000060448201526064015b60405180910390fd5b602d5460405134916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610554573d6000803e3d6000fd5b005b600080fd5b34801561056757600080fd5b5061057b610576366004614cfc565b611162565b6040519081526020015b60405180910390f35b34801561059a57600080fd5b506105ae6105a9366004614d3c565b6111f6565b6040519015158152602001610585565b3480156105ca57600080fd5b5061057b6105d9366004614cfc565b602960209081526000928352604080842090915290825290205481565b34801561060257600080fd5b5061060b611246565b6040516105859190614da9565b34801561062457600080fd5b50610554610633366004614dbc565b6112d4565b34801561064457600080fd5b5061060b610653366004614dbc565b6112e1565b34801561066457600080fd5b5061057b610673366004614dbc565b60286020526000908152604090205481565b34801561069157600080fd5b5061057b6106a0366004614cfc565b600c60209081526000928352604080842090915290825290205481565b3480156106c957600080fd5b506106dd6106d8366004614dbc565b611664565b6040516001600160a01b039091168152602001610585565b34801561070157600080fd5b506105ae610710366004614dbc565b61168e565b34801561072157600080fd5b50610554610730366004614eb9565b61176c565b34801561074157600080fd5b506105ae610750366004614dbc565b60176020526000908152604090205460ff1681565b34801561077157600080fd5b5061057b610780366004614f38565b611850565b34801561079157600080fd5b5061060b6107a0366004614dbc565b611882565b3480156107b157600080fd5b506105546107c0366004614f68565b61189b565b3480156107d157600080fd5b5061057b60095481565b3480156107e757600080fd5b5061057b6107f6366004614cfc565b602a60209081526000928352604080842090915290825290205481565b34801561081f57600080fd5b5061055461082e366004615023565b61190c565b34801561083f57600080fd5b5061057b61084e366004614dbc565b60146020526000908152604090205481565b34801561086c57600080fd5b5061055461087b3660046150cc565b6119c2565b34801561088c57600080fd5b506105546119ec565b3480156108a157600080fd5b506105546108b03660046150e7565b611b25565b3480156108c157600080fd5b506105ae6108d0366004614dbc565b60306020526000908152604090205460ff1681565b3480156108f157600080fd5b506105ae610900366004614dbc565b60276020526000908152604090205460ff1681565b34801561092157600080fd5b5061060b610930366004614dbc565b611bf3565b34801561094157600080fd5b5061095561095036600461515e565b611bfe565b6040516105859190615263565b34801561096e57600080fd5b506105ae61097d366004614dbc565b60009081526015602052604090205460ff1690565b34801561099e57600080fd5b5061057b6109ad366004614dbc565b611d27565b6105546109c03660046152c1565b611d48565b3480156109d157600080fd5b50600d546105ae9060ff1681565b3480156109eb57600080fd5b5061057b600a5481565b348015610a0157600080fd5b506105ae610a10366004615331565b611ea8565b348015610a2157600080fd5b50610554610a30366004615331565b611f91565b348015610a4157600080fd5b50610554610a50366004615353565b611fee565b348015610a6157600080fd5b50610554612013565b348015610a7657600080fd5b50610554610a85366004615331565b612027565b348015610a9657600080fd5b5061057b610aa5366004614dbc565b602b6020526000908152604090205481565b348015610ac357600080fd5b50610554610ad236600461537f565b612053565b348015610ae357600080fd5b5061057b610af2366004614dbc565b6121b2565b348015610b0357600080fd5b5061057b610b12366004615331565b6121c2565b348015610b2357600080fd5b5061057b610b32366004615331565b6121f3565b348015610b4357600080fd5b50610554610b523660046153ff565b61220f565b348015610b6357600080fd5b50610554610b72366004615353565b612299565b348015610b8357600080fd5b5061057b610b92366004614dbc565b60136020526000908152604090205481565b348015610bb057600080fd5b50610554610bbf36600461544b565b6122ff565b610554610bd2366004615483565b6123cf565b348015610be357600080fd5b506003546001600160a01b03166106dd565b348015610c0157600080fd5b50610554610c103660046154ea565b612590565b348015610c2157600080fd5b5061057b610c30366004615331565b612818565b348015610c4157600080fd5b5061060b612834565b348015610c5657600080fd5b5061057b610c65366004614dbc565b600b6020526000908152604090205481565b348015610c8357600080fd5b50610554610c92366004615553565b612841565b348015610ca357600080fd5b5061057b610cb2366004614dbc565b61284c565b348015610cc357600080fd5b506105ae610cd2366004614dbc565b60316020526000908152604090205460ff1681565b348015610cf357600080fd5b50610554610d023660046150cc565b61285c565b348015610d1357600080fd5b50610554610d22366004615553565b6128bd565b348015610d3357600080fd5b50602e546106dd906001600160a01b031681565b348015610d5357600080fd5b50610554610d6236600461557f565b612927565b348015610d7357600080fd5b50602d546106dd906001600160a01b031681565b348015610d9357600080fd5b506105ae610da2366004614dbc565b600e6020526000908152604090205460ff1681565b348015610dc357600080fd5b50610554610dd23660046155b4565b61297b565b348015610de357600080fd5b50610554610df2366004615331565b6129da565b610554610e053660046155f5565b612a09565b348015610e1657600080fd5b5061057b60075481565b348015610e2c57600080fd5b5061057b610e3b366004614dbc565b60256020526000908152604090205481565b348015610e5957600080fd5b5061057b610e68366004614dbc565b60009081526012602052604090205490565b348015610e8657600080fd5b5061060b610e95366004614dbc565b612cf4565b348015610ea657600080fd5b50610554610eb5366004614dbc565b612d1f565b348015610ec657600080fd5b5061057b610ed5366004614dbc565b602c6020526000908152604090205481565b348015610ef357600080fd5b506105ae610f02366004614dbc565b60266020526000908152604090205460ff1681565b348015610f2357600080fd5b5061057b60105481565b348015610f3957600080fd5b5061057b610f48366004614dbc565b612d2c565b348015610f5957600080fd5b5061057b610f68366004614dbc565b601a6020526000908152604090205481565b348015610f8657600080fd5b506105ae610f9536600461568b565b612d91565b348015610fa657600080fd5b5061057b610fb5366004615331565b612e2d565b348015610fc657600080fd5b5061060b610fd5366004614dbc565b612e49565b348015610fe657600080fd5b506105ae610ff53660046150cc565b60326020526000908152604090205460ff1681565b34801561101657600080fd5b5061057b611025366004614dbc565b60246020526000908152604090205481565b34801561104357600080fd5b50610554611052366004615331565b612e59565b34801561106357600080fd5b50610554611072366004614f38565b612e72565b34801561108357600080fd5b506105ae6110923660046156db565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156110cc57600080fd5b506105ae612ed1565b3480156110e157600080fd5b506105546110f036600461570e565b612f7e565b34801561110157600080fd5b506105546111103660046150cc565b613034565b34801561112157600080fd5b50610554611130366004615772565b6130ad565b34801561114157600080fd5b5061057b611150366004614dbc565b60196020526000908152604090205481565b60006001600160a01b0383166111cd5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401610511565b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061122757506001600160e01b031982166303a24d0760e21b145b806111f057506301ffc9a760e01b6001600160e01b03198316146111f0565b60048054611253906157a9565b80601f016020809104026020016040519081016040528092919081815260200182805461127f906157a9565b80156112cc5780601f106112a1576101008083540402835291602001916112cc565b820191906000526020600020905b8154815290600101906020018083116112af57829003601f168201915b505050505081565b6112dc6130f1565b600955565b600081815260156020526040812054606091600191839060ff16156116575760075485116116575760408051600080825260208083018085528351902089835260119091529083902090926113369201615850565b60405160208183030381529060405280519060200120146113f2576000858152601160205260409020805461136a906157a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611396906157a9565b80156113e35780601f106113b8576101008083540402835291602001916113e3565b820191906000526020600020905b8154815290600101906020018083116113c657829003601f168201915b50505050509350505050919050565b60005b601f5481101561155e57601f81815481106114125761141261585c565b9060005260206000200154861161154e5760408051600081526020810191829052519020602180548390811061144a5761144a61585c565b906000526020600020016040516020016114649190615850565b60405160208183030381529060405280519060200120146114c557602181815481106114925761149261585c565b906000526020600020016040516020016114ac9190615872565b604051602081830303815290604052915080925061155e565b6040805160008152602081019182905251902060228054839081106114ec576114ec61585c565b906000526020600020016040516020016115069190615850565b604051602081830303815290604052805190602001201461154e57602281815481106115345761153461585c565b906000526020600020016040516020016114ac919061589f565b611557816158c1565b90506113f5565b50601f805461156f906001906158da565b8154811061157f5761157f61585c565b906000526020600020015485111561159657600092505b8280156115b1575060008281526026602052604090205460ff165b156116575760408051600080825260208083018085528351902089835260189091529083902090926115e39201615850565b604051602081830303815290604052805190602001200361163257806116088661312a565b6040516020016116199291906158ed565b6040516020818303038152906040529350505050919050565b806018600087815260200190815260200160002060405160200161161992919061592c565b6006805461136a906157a9565b602f818154811061167457600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060005b601f548110156117535780158015906116ca5750601f81815481106116bb576116bb61585c565b90600052602060002001548411155b80156116fc5750601f6116de6001836158da565b815481106116ee576116ee61585c565b906000526020600020015484115b1561170957809150611753565b801580156117345750601f81815481106117255761172561585c565b90600052602060002001548411155b1561174157809150611753565b8061174b816158c1565b915050611694565b5060009081526030602052604090205460ff1692915050565b6117746130f1565b821561180957601f805461178a906001906158da565b8154811061179a5761179a61585c565b90600052602060002001548411156117c45760405162461bcd60e51b815260040161051190615961565b6000848152601d6020908152604090912083516117e392850190614c0f565b506000848152601e60209081526040909120825161180392840190614c0f565b5061184a565b6000848152601b60209081526040909120835161182892850190614c0f565b506000848152601c60209081526040909120825161184892840190614c0f565b505b50505050565b6000811561186d57506000828152601460205260409020546111f0565b506000828152601360205260409020546111f0565b60186020526000908152604090208054611253906157a9565b6118a36130f1565b83156118f9576001600160a01b038116156118e3576001600160a01b0381166000908152602a60209081526040808320858452909152902083905561184a565b600082815260286020526040902083905561184a565b506000908152600b602052604090205550565b6daaeb6d7670e522a718067333cd4e3b156119b557604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015611972573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611996919061597d565b6119b557604051633b79c77360e21b8152336004820152602401610511565b61184885858585856131bc565b6119ca613201565b602d80546001600160a01b0319166001600160a01b0392909216919091179055565b6119f46130f1565b602d546001600160a01b0316611a455760405162461bcd60e51b815260206004820152601660248201527514185e5bdd5d081859191c995cdcc81b9bdd081cd95d60521b6044820152606401610511565b4780611a8a5760405162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b6044820152606401610511565b602d546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611ad7576040519150601f19603f3d011682016040523d82523d6000602084013e611adc565b606091505b5050905080611b215760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610511565b5050565b611b2d6130f1565b8015611b845781600081518110611b4657611b4661585c565b60200260200101516014600085600081518110611b6557611b6561585c565b6020026020010151815260200190815260200160002081905550505050565b60005b835181101561184a576000848281518110611ba457611ba461585c565b60200260200101519050838281518110611bc057611bc061585c565b6020908102919091018101516000928352601390915260409091205580611be6816158c1565b915050611b87565b505050565b60606111f08261325b565b60608151835114611c635760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610511565b600083516001600160401b03811115611c7e57611c7e614de3565b604051908082528060200260200182016040528015611ca7578160200160208202803683370190505b50905060005b8451811015611d1f57611cf2858281518110611ccb57611ccb61585c565b6020026020010151858381518110611ce557611ce561585c565b6020026020010151611162565b828281518110611d0457611d0461585c565b6020908102919091010152611d18816158c1565b9050611cad565b509392505050565b601f8181548110611d3757600080fd5b600091825260209091200154905081565b60008381526016602052604090205460ff1615611d9f5760405162461bcd60e51b81526020600482015260156024820152742932b8bab4b932b99010b6b4b73a24b727b93232b960591b6044820152606401610511565b611da98584611ea8565b611dc55760405162461bcd60e51b815260040161051190615961565b611dd085858561332b565b611dec5760405162461bcd60e51b81526004016105119061599a565b611df4612ed1565b611e5657600d5460ff1615611e1b5760405162461bcd60e51b8152600401610511906159b9565b6000838152600e602052604090205460ff1615611e4a5760405162461bcd60e51b8152600401610511906159d9565b611e56848484846135da565b611e608584613980565b60008581526012602052604081208054869290611e7e9084906159ff565b92505081905550611ea086868660405180602001604052806000815250613acd565b505050505050565b601f546000908210611ee55760405162461bcd60e51b815260206004820152600660248201526504284c2e8c6d60d31b6044820152606401610511565b8115801590611f115750601f8281548110611f0257611f0261585c565b90600052602060002001548311155b8015611f435750601f611f256001846158da565b81548110611f3557611f3561585c565b906000526020600020015483115b15611f50575060016111f0565b81158015611f7b5750601f8281548110611f6c57611f6c61585c565b90600052602060002001548311155b15611f88575060016111f0565b50600092915050565b611f996130f1565b428111611fdc5760405162461bcd60e51b815260206004820152601160248201527011185d1948105b1c9958591e4814185cdd607a1b6044820152606401610511565b6000918252600f602052604090912055565b611ff66130f1565b600090815260246020908152604080832093909355602590522055565b61201b613201565b6120256000613bbc565b565b61202f6130f1565b81602082815481106120435761204361585c565b6000918252602090912001555050565b61205b6130f1565b841561207357600661206d8382615a58565b50611848565b836121585780156121025760008261208a8561312a565b60405160200161209b929190615b17565b60408051601f1981840301815291815260008681526011602052209091506120c38282615a58565b50837f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b826040516120f49190614da9565b60405180910390a250611848565b600083815260116020526040902061211a8382615a58565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360405161214b9190614da9565b60405180910390a2611848565b80156121885781602184815481106121725761217261585c565b90600052602060002001908161206d9190615a58565b816022848154811061219c5761219c61585c565b906000526020600020019081611ea09190615a58565b60208181548110611d3757600080fd5b601d60205281600052604060002081815481106121de57600080fd5b90600052602060002001600091509150505481565b601e60205281600052604060002081815481106121de57600080fd5b60005b825181101561228d57600083828151811061222f5761222f61585c565b6020026020010151905082828151811061224b5761224b61585c565b602002602001015160126000838152602001908152602001600020600082825461227591906158da565b9091555061228691508290506158c1565b9050612212565b50611b21338383613c0e565b6122a16130f1565b818311156122df5760405162461bcd60e51b815260206004820152600b60248201526a4d494e203c3d204d41583f60a81b6044820152606401610511565b600090815260196020908152604080832094909455601a90529190912055565b6123076130f1565b8260010361232f576000908152602660205260409020805460ff191691151591909117905550565b82600203612357576000908152601760205260409020805460ff191691151591909117905550565b8260030361237f576000908152601660205260409020805460ff191691151591909117905550565b826004036123a7576000908152603060205260409020805460ff191691151591909117905550565b82600503611bee576000908152602760205260409020805460ff191691151591909117905550565b60008381526016602052604090205460ff1661241b5760405162461bcd60e51b815260206004820152600b60248201526a36b4b73a24b727b93232b960a91b6044820152606401610511565b612451601f84815481106124315761243161585c565b906000526020600020015460009081526015602052604090205460ff1690565b156124845760405162461bcd60e51b81526020600482015260036024820152624f4f5360e81b6044820152606401610511565b601f83815481106124975761249761585c565b90600052602060002001546001602085815481106124b7576124b761585c565b9060005260206000200154866124cd91906159ff565b6124d791906158da565b111561251b5760405162461bcd60e51b8152602060048201526013602482015272141b19585cd948131bddd95c88105b5bdd5b9d606a1b6044820152606401610511565b612523612ed1565b61258557600d5460ff161561254a5760405162461bcd60e51b8152600401610511906159b9565b6000838152600e602052604090205460ff16156125795760405162461bcd60e51b8152600401610511906159d9565b612585848484846135da565b611848858585613db4565b6125986130f1565b601f80546125a8906001906158da565b815481106125b8576125b861585c565b906000526020600020015485116125fd5760405162461bcd60e51b8152602060048201526009602482015268454944203e2050423f60b81b6044820152606401610511565b601f805460209190612611906001906158da565b815481106126215761262161585c565b9060005260206000200154600161263891906159ff565b81546001818101845560009384526020842090910191909155601f805491820181559091527fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d80701859055811561271557602180546001810182556000919091527f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b570016126c48482615a58565b5060228054600181018255600091825260408051602081019091529182527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510019061270f9082615a58565b5061279e565b602280546001810182556000919091527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510016127518482615a58565b5060218054600181018255600091825260408051602081019091529182527f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b570019061279c9082615a58565b505b602380546001818101835560009283527fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230909101869055601f54869260259290916127e991906158da565b81526020810191909152604001600020558015611848576118486003600180601f80549050610bbf91906158da565b601b60205281600052604060002081815481106121de57600080fd5b60058054611253906157a9565b611b21338383613f59565b60238181548110611d3757600080fd5b6003546001600160a01b031633148061287f5750602e546001600160a01b031633145b61289b5760405162461bcd60e51b815260040161051190615b78565b602e80546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314806128e05750602e546001600160a01b031633145b6128fc5760405162461bcd60e51b815260040161051190615b78565b6001600160a01b03919091166000908152603260205260409020805460ff1916911515919091179055565b61292f6130f1565b826129695781602382815481106129485761294861585c565b60009182526020808320919091019290925591825260259052604090205550565b6000908152602b602052604090205550565b6129836130f1565b6003546001600160a01b03163314806129a65750602e546001600160a01b031633145b6129c25760405162461bcd60e51b815260040161051190615b78565b6129ce602f6000614c5a565b611bee602f8383614c78565b600082815260126020526040812080548392906129f89084906158da565b90915550611b219050338383614039565b60008381526016602052604090205460ff1615612a605760405162461bcd60e51b81526020600482015260156024820152742932b8bab4b932b99010b6b4b73a24b727b93232b960591b6044820152606401610511565b60095485511115612a9c5760405162461bcd60e51b81526004016105119060208082526004908201526324a2399f60e11b604082015260600190565b8351855114612ade5760405162461bcd60e51b815260206004820152600e60248201526d49447320213d20416d6f756e747360901b6044820152606401610511565b612ae985858561415b565b612b055760405162461bcd60e51b81526004016105119061599a565b6000805b8551811015612b8a57612b35878281518110612b2757612b2761585c565b602002602001015186611ea8565b612b515760405162461bcd60e51b815260040161051190615961565b858181518110612b6357612b6361585c565b602002602001015182612b7691906159ff565b915080612b82816158c1565b915050612b09565b50600a54811115612bc25760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b612bca612ed1565b612c2c57600d5460ff1615612bf15760405162461bcd60e51b8152600401610511906159b9565b6000848152600e602052604090205460ff1615612c205760405162461bcd60e51b8152600401610511906159d9565b612c2c818585856135da565b60005b8651811015612ccf576000878281518110612c4c57612c4c61585c565b60200260200101519050612c608187613980565b868281518110612c7257612c7261585c565b6020026020010151601260008a8581518110612c9057612c9061585c565b602002602001015181526020019081526020016000206000828254612cb591906159ff565b90915550829150612cc79050816158c1565b915050612c2f565b50612ceb878787604051806020016040528060008152506141d4565b50505050505050565b60228181548110612d0457600080fd5b906000526020600020016000915090508054611253906157a9565b612d276130f1565b600755565b6000612d36612ed1565b612d895760008281526027602052604090205460ff1615612d6457506000908152602b602052604090205490565b60238281548110612d7757612d7761585c565b90600052602060002001549050919050565b506000919050565b600080612ddf8686808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250898152602c6020526040902054925087915061433d9050565b905080612e245760405162461bcd60e51b815260206004820152601360248201527215995c9a599a58d85d1a5bdb8811985a5b1959606a1b6044820152606401610511565b95945050505050565b601c60205281600052604060002081815481106121de57600080fd5b60218181548110612d0457600080fd5b612e616130f1565b6000908152602c6020526040902055565b6003546001600160a01b0316331480612e955750602e546001600160a01b031633145b612eb15760405162461bcd60e51b815260040161051190615b78565b600091825260316020526040909120805460ff1916911515919091179055565b6000612ee56003546001600160a01b031690565b6001600160a01b0316336001600160a01b03161480612f0e5750602e546001600160a01b031633145b15612f195750600190565b602f5415612f785760005b602f54811015612f7657602f8181548110612f4157612f4161585c565b6000918252602090912001546001600160a01b03163303612f6457600191505090565b80612f6e816158c1565b915050612f24565b505b50600090565b6daaeb6d7670e522a718067333cd4e3b1561302757604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015612fe4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613008919061597d565b61302757604051633b79c77360e21b8152336004820152602401610511565b6118488585858585614353565b61303c613201565b6001600160a01b0381166130a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610511565b6130aa81613bbc565b50565b6130b56130f1565b82156130d057600d805482151560ff19909116179055505050565b6000828152600e60205260409020805482151560ff19909116179055505050565b6130f9612ed1565b6120255760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b6060600061313783614398565b60010190506000816001600160401b0381111561315657613156614de3565b6040519080825280601f01601f191660200182016040528015613180576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461318a57509392505050565b6001600160a01b0385163314806131d857506131d88533611092565b6131f45760405162461bcd60e51b815260040161051190615b97565b6118488585858585614470565b6003546001600160a01b031633146120255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610511565b6000818152601a602052604081205460105460609291904290449033906018866132866001846158da565b81526020019081526020016000206040516020016132a8959493929190615be5565b6040516020818303038152906040528051906020012060001c6132cb9190615c26565b600084815260196020526040902054909150811015613317576133106132f28260016159ff565b6000858152601a602052604090205461330b91906158da565b61312a565b9392505050565b61331061330b8260016159ff565b50919050565b60008083116133615760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b6009548311156133995760405162461bcd60e51b81526020600482015260036024820152624d4d4160e81b6044820152606401610511565b6007548411156133d15760405162461bcd60e51b815260206004820152600360248201526208525160ea1b6044820152606401610511565b60008481526013602052604090205415801590613411575060008481526013602090815260408083205460129092529091205461340f9085906159ff565b115b1561341e57506000613310565b60008281526014602052604090205415801590613461575060008281526014602090815260408083205487845260129092529091205461345f9085906159ff565b115b1561346e57506000613310565b6000848152601b6020526040902054156135275760005b6000858152601b6020526040902054811015613525576000858152601b6020526040812080546134d1913391859081106134c1576134c161585c565b9060005260206000200154611162565b6000878152601c60205260409020805491925090839081106134f5576134f561585c565b906000526020600020015481101561351257600092505050613310565b508061351d816158c1565b915050613485565b505b6000828152601d6020526040902054156135d05760005b6000838152601d60205260409020548110156135ce576000838152601d60205260408120805461357a913391859081106134c1576134c161585c565b6000858152601e602052604090208054919250908390811061359e5761359e61585c565b90600052602060002001548110156135bb57600092505050613310565b50806135c6816158c1565b91505061353e565b505b5060019392505050565b6135e2612ed1565b61184a576000838152600f60205260409020541561363d576000838152600f602052604090205442101561363d5760405162461bcd60e51b8152602060048201526002602482015261085160f21b6044820152606401610511565b6000838152600b6020526040902054156136e6576000838152600b6020908152604080832054338452600c8352818420878552909252909120546136829086906159ff565b11156136b65760405162461bcd60e51b8152602060048201526003602482015262424c4560e81b6044820152606401610511565b336000908152600c60209081526040808320868452909152812080548692906136e09084906159ff565b90915550505b60008381526027602052604090205460ff161561393957336000908152602a602090815260408083208684529091529020541561378157336000818152602a6020908152604080832087845282528083205493835260298252808320878452909152902054106137815760405162461bcd60e51b81526004016105119060208082526004908201526350574c4560e01b604082015260600190565b6000838152602860205260409020541561387b576040516bffffffffffffffffffffffff193360601b166020820152603481018590526137e0908390839086906054015b60405160208183030381529060405280519060200120612d91565b6138125760405162461bcd60e51b81526020600482015260036024820152620855d360ea1b6044820152606401610511565b60008381526028602090815260408083205433845260298352818420878552909252909120546138439086906159ff565b11156138765760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b6138da565b6040516bffffffffffffffffffffffff193360601b1660208201526138a8908390839086906034016137c5565b6138da5760405162461bcd60e51b81526020600482015260036024820152620855d360ea1b6044820152606401610511565b336000908152602a60209081526040808320868452909152812080548692906139049084906159ff565b9091555050336000908152602960209081526040808320868452909152812080548692906139339084906159ff565b90915550505b61394283612d2c565b61394c9085615c48565b34101561184a5760405162461bcd60e51b8152602060048201526002602482015261243f60f01b6044820152606401610511565b60008281526015602052604090205460ff166139d8576000828152601560209081526040808320805460ff19166001179055838352601690915290205460ff16156139d8576000828152601260205260409020600190555b60008181526017602052604090205460ff1615613a13576139f88161325b565b600083815260186020526040902090613a119082615a58565b505b6000818152602560205260409020546023805483908110613a3657613a3661585c565b906000526020600020015414158015613a7f5750602460008281526020019081526020016000205460208281548110613a7157613a7161585c565b906000526020600020015410155b15613ab4576000818152602560205260409020546023805483908110613aa757613aa761585c565b6000918252602090912001555b60108054906000613ac4836158c1565b91905055505050565b6001600160a01b038416613af35760405162461bcd60e51b815260040161051190615c5f565b336000613aff85614620565b90506000613b0c85614620565b9050613b1d8360008985858961466b565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290613b4d9084906159ff565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613bad836000898585896147b7565b612ceb83600089898989614842565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316613c345760405162461bcd60e51b815260040161051190615ca0565b8051825114613c555760405162461bcd60e51b815260040161051190615ce3565b6000339050613c788185600086866040518060200160405280600081525061466b565b60005b8351811015613d3d576000848281518110613c9857613c9861585c565b602002602001015190506000848381518110613cb657613cb661585c565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015613d065760405162461bcd60e51b815260040161051190615d2b565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580613d35816158c1565b915050613c7b565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613d8e929190615d6f565b60405180910390a461184a818560008686604051806020016040528060008152506147b7565b6000826001600160401b03811115613dce57613dce614de3565b604051908082528060200260200182016040528015613df7578160200160208202803683370190505b5090506000836001600160401b03811115613e1457613e14614de3565b604051908082528060200260200182016040528015613e3d578160200160208202803683370190505b50905060005b84811015613f3d57600060208581548110613e6057613e6061585c565b90600052602060002001549050613e798160018761332b565b613e955760405162461bcd60e51b81526004016105119061599a565b613e9f8186613980565b60208581548110613eb257613eb261585c565b9060005260206000200154848381518110613ecf57613ecf61585c565b6020026020010181815250506001838381518110613eef57613eef61585c565b60200260200101818152505060208581548110613f0e57613f0e61585c565b60009182526020822001805491613f24836158c1565b9190505550508080613f35906158c1565b915050613e43565b50611848858383604051806020016040528060008152506141d4565b816001600160a01b0316836001600160a01b031603613fcc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610511565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03831661405f5760405162461bcd60e51b815260040161051190615ca0565b33600061406b84614620565b9050600061407884614620565b90506140988387600085856040518060200160405280600081525061466b565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156140d95760405162461bcd60e51b815260040161051190615d2b565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612ceb848860008686604051806020016040528060008152506147b7565b6000805b84518110156135ce57600085828151811061417c5761417c61585c565b60200260200101519050600085838151811061419a5761419a61585c565b602002602001015190506141af82828761332b565b6141bf5760009350505050613310565b505080806141cc906158c1565b91505061415f565b6001600160a01b0384166141fa5760405162461bcd60e51b815260040161051190615c5f565b815183511461421b5760405162461bcd60e51b815260040161051190615ce3565b3361422b8160008787878761466b565b60005b84518110156142c6578381815181106142495761424961585c565b60200260200101516000808784815181106142665761426661585c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546142ae91906159ff565b909155508190506142be816158c1565b91505061422e565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051614317929190615d6f565b60405180910390a461432e816000878787876147b7565b6118488160008787878761499d565b60008261434a8584614a58565b14949350505050565b6001600160a01b03851633148061436f575061436f8533611092565b61438b5760405162461bcd60e51b815260040161051190615b97565b6118488585858585614a9d565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106143d75772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614403576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061442157662386f26fc10000830492506010015b6305f5e1008310614439576305f5e100830492506008015b612710831061444d57612710830492506004015b6064831061445f576064830492506002015b600a83106111f05760010192915050565b81518351146144915760405162461bcd60e51b815260040161051190615ce3565b6001600160a01b0384166144b75760405162461bcd60e51b815260040161051190615d94565b336144c681878787878761466b565b60005b84518110156145ac5760008582815181106144e6576144e661585c565b6020026020010151905060008583815181106145045761450461585c565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156145545760405162461bcd60e51b815260040161051190615dd9565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906145919084906159ff565b92505081905550505050806145a5906158c1565b90506144c9565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516145fc929190615d6f565b60405180910390a46146128187878787876147b7565b611ea081878787878761499d565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061465a5761465a61585c565b602090810291909101015292915050565b6001600160a01b03861660009081526032602052604090205460ff161580156146ad57506001600160a01b03851660009081526032602052604090205460ff16155b80156146d257506001600160a01b03841660009081526032602052604090205460ff16155b6147325760405162461bcd60e51b815260206004820152602b60248201527f4f70657261746f722c2046726f6d2c206f7220546f204164647265737320697360448201526a08149154d5149250d5115160aa1b6064820152608401610511565b60005b8351811015612ceb57603160008583815181106147545761475461585c565b60209081029190910181015182528101919091526040016000205460ff16156147a55760405162461bcd60e51b815260206004820152600360248201526211925160ea1b6044820152606401610511565b806147af816158c1565b915050614735565b60005b8351811015612ceb576147e58482815181106147d8576147d861585c565b602002602001015161168e565b15614830576001603160008684815181106148025761480261585c565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061483a816158c1565b9150506147ba565b6001600160a01b0384163b15611ea05760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906148869089908990889088908890600401615e23565b6020604051808303816000875af19250505080156148c1575060408051601f3d908101601f191682019092526148be91810190615e5b565b60015b61496d576148cd615e78565b806308c379a00361490657506148e1615e94565b806148ec5750614908565b8060405162461bcd60e51b81526004016105119190614da9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610511565b6001600160e01b0319811663f23a6e6160e01b14612ceb5760405162461bcd60e51b815260040161051190615f1d565b6001600160a01b0384163b15611ea05760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906149e19089908990889088908890600401615f65565b6020604051808303816000875af1925050508015614a1c575060408051601f3d908101601f19168201909252614a1991810190615e5b565b60015b614a28576148cd615e78565b6001600160e01b0319811663bc197c8160e01b14612ceb5760405162461bcd60e51b815260040161051190615f1d565b600081815b8451811015611d1f57614a8982868381518110614a7c57614a7c61585c565b6020026020010151614be3565b915080614a95816158c1565b915050614a5d565b6001600160a01b038416614ac35760405162461bcd60e51b815260040161051190615d94565b336000614acf85614620565b90506000614adc85614620565b9050614aec83898985858961466b565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015614b2d5760405162461bcd60e51b815260040161051190615dd9565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290614b6a9084906159ff565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4614bca848a8a86868a6147b7565b614bd8848a8a8a8a8a614842565b505050505050505050565b6000818310614bff576000828152602084905260409020613310565b5060009182526020526040902090565b828054828255906000526020600020908101928215614c4a579160200282015b82811115614c4a578251825591602001919060010190614c2f565b50614c56929150614ccb565b5090565b50805460008255906000526020600020908101906130aa9190614ccb565b828054828255906000526020600020908101928215614c4a579160200282015b82811115614c4a5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614c98565b5b80821115614c565760008155600101614ccc565b80356001600160a01b0381168114614cf757600080fd5b919050565b60008060408385031215614d0f57600080fd5b614d1883614ce0565b946020939093013593505050565b6001600160e01b0319811681146130aa57600080fd5b600060208284031215614d4e57600080fd5b813561331081614d26565b60005b83811015614d74578181015183820152602001614d5c565b50506000910152565b60008151808452614d95816020860160208601614d59565b601f01601f19169290920160200192915050565b6020815260006133106020830184614d7d565b600060208284031215614dce57600080fd5b5035919050565b80151581146130aa57600080fd5b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614e1e57614e1e614de3565b6040525050565b60006001600160401b03821115614e3e57614e3e614de3565b5060051b60200190565b600082601f830112614e5957600080fd5b81356020614e6682614e25565b604051614e738282614df9565b83815260059390931b8501820192828101915086841115614e9357600080fd5b8286015b84811015614eae5780358352918301918301614e97565b509695505050505050565b60008060008060808587031215614ecf57600080fd5b843593506020850135614ee181614dd5565b925060408501356001600160401b0380821115614efd57600080fd5b614f0988838901614e48565b93506060870135915080821115614f1f57600080fd5b50614f2c87828801614e48565b91505092959194509250565b60008060408385031215614f4b57600080fd5b823591506020830135614f5d81614dd5565b809150509250929050565b60008060008060808587031215614f7e57600080fd5b8435614f8981614dd5565b93506020850135925060408501359150614fa560608601614ce0565b905092959194509250565b600082601f830112614fc157600080fd5b81356001600160401b03811115614fda57614fda614de3565b604051614ff1601f8301601f191660200182614df9565b81815284602083860101111561500657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561503b57600080fd5b61504486614ce0565b945061505260208701614ce0565b935060408601356001600160401b038082111561506e57600080fd5b61507a89838a01614e48565b9450606088013591508082111561509057600080fd5b61509c89838a01614e48565b935060808801359150808211156150b257600080fd5b506150bf88828901614fb0565b9150509295509295909350565b6000602082840312156150de57600080fd5b61331082614ce0565b6000806000606084860312156150fc57600080fd5b83356001600160401b038082111561511357600080fd5b61511f87838801614e48565b9450602086013591508082111561513557600080fd5b5061514286828701614e48565b925050604084013561515381614dd5565b809150509250925092565b6000806040838503121561517157600080fd5b82356001600160401b038082111561518857600080fd5b818501915085601f83011261519c57600080fd5b813560206151a982614e25565b6040516151b68282614df9565b83815260059390931b85018201928281019150898411156151d657600080fd5b948201945b838610156151fb576151ec86614ce0565b825294820194908201906151db565b9650508601359250508082111561521157600080fd5b5061521e85828601614e48565b9150509250929050565b600081518084526020808501945080840160005b838110156152585781518752958201959082019060010161523c565b509495945050505050565b6020815260006133106020830184615228565b60008083601f84011261528857600080fd5b5081356001600160401b0381111561529f57600080fd5b6020830191508360208260051b85010111156152ba57600080fd5b9250929050565b60008060008060008060a087890312156152da57600080fd5b6152e387614ce0565b955060208701359450604087013593506060870135925060808701356001600160401b0381111561531357600080fd5b61531f89828a01615276565b979a9699509497509295939492505050565b6000806040838503121561534457600080fd5b50508035926020909101359150565b60008060006060848603121561536857600080fd5b505081359360208301359350604090920135919050565b600080600080600060a0868803121561539757600080fd5b85356153a281614dd5565b945060208601356153b281614dd5565b93506040860135925060608601356001600160401b038111156153d457600080fd5b6153e088828901614fb0565b92505060808601356153f181614dd5565b809150509295509295909350565b6000806040838503121561541257600080fd5b82356001600160401b038082111561542957600080fd5b61543586838701614e48565b9350602085013591508082111561521157600080fd5b60008060006060848603121561546057600080fd5b83359250602084013561547281614dd5565b929592945050506040919091013590565b60008060008060006080868803121561549b57600080fd5b6154a486614ce0565b9450602086013593506040860135925060608601356001600160401b038111156154cd57600080fd5b6154d988828901615276565b969995985093965092949392505050565b600080600080600060a0868803121561550257600080fd5b853594506020860135935060408601356001600160401b0381111561552657600080fd5b61553288828901614fb0565b935050606086013561554381614dd5565b915060808601356153f181614dd5565b6000806040838503121561556657600080fd5b61556f83614ce0565b91506020830135614f5d81614dd5565b60008060006060848603121561559457600080fd5b833561559f81614dd5565b95602085013595506040909401359392505050565b600080602083850312156155c757600080fd5b82356001600160401b038111156155dd57600080fd5b6155e985828601615276565b90969095509350505050565b60008060008060008060a0878903121561560e57600080fd5b61561787614ce0565b955060208701356001600160401b038082111561563357600080fd5b61563f8a838b01614e48565b9650604089013591508082111561565557600080fd5b6156618a838b01614e48565b955060608901359450608089013591508082111561567e57600080fd5b5061531f89828a01615276565b600080600080606085870312156156a157600080fd5b84356001600160401b038111156156b757600080fd5b6156c387828801615276565b90989097506020870135966040013595509350505050565b600080604083850312156156ee57600080fd5b6156f783614ce0565b915061570560208401614ce0565b90509250929050565b600080600080600060a0868803121561572657600080fd5b61572f86614ce0565b945061573d60208701614ce0565b9350604086013592506060860135915060808601356001600160401b0381111561576657600080fd5b6150bf88828901614fb0565b60008060006060848603121561578757600080fd5b833561579281614dd5565b925060208401359150604084013561515381614dd5565b600181811c908216806157bd57607f821691505b60208210810361332557634e487b7160e01b600052602260045260246000fd5b600081546157ea816157a9565b60018281168015615802576001811461581757615846565b60ff1984168752821515830287019450615846565b8560005260208060002060005b8581101561583d5781548a820152908401908201615824565b50505082870194505b5050505092915050565b600061331082846157dd565b634e487b7160e01b600052603260045260246000fd5b66697066733a2f2f60c81b8152600061588e60078301846157dd565b602f60f81b81526001019392505050565b600061588e82846157dd565b634e487b7160e01b600052601160045260246000fd5b6000600182016158d3576158d36158ab565b5060010190565b818103818111156111f0576111f06158ab565b600083516158ff818460208801614d59565b835190830190615913818360208801614d59565b64173539b7b760d91b9101908152600501949350505050565b6000835161593e818460208801614d59565b61594a818401856157dd565b64173539b7b760d91b815260050195945050505050565b60208082526002908201526110a160f11b604082015260600190565b60006020828403121561598f57600080fd5b815161331081614dd5565b602080825260059082015264085352539560da1b604082015260600190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252600c908201526b0a0c2eae6cac84084c2e8c6d60a31b604082015260600190565b808201808211156111f0576111f06158ab565b601f821115611bee57600081815260208120601f850160051c81016020861015615a395750805b601f850160051c820191505b81811015611ea057828155600101615a45565b81516001600160401b03811115615a7157615a71614de3565b615a8581615a7f84546157a9565b84615a12565b602080601f831160018114615aba5760008415615aa25750858301515b600019600386901b1c1916600185901b178555611ea0565b600085815260208120601f198616915b82811015615ae957888601518255948401946001909101908401615aca565b5085821015615b075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b66697066733a2f2f60c81b815260008351615b39816007850160208801614d59565b602f60f81b6007918401918201528351615b5a816008840160208801614d59565b64173539b7b760d91b60089290910191820152600d01949350505050565b6020808252600590820152641393dbd41360da1b604082015260600190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b8581528460208201526bffffffffffffffffffffffff198460601b1660408201528260548201526000615c1b60748301846157dd565b979650505050505050565b600082615c4357634e487b7160e01b600052601260045260246000fd5b500690565b80820281158282048414176111f0576111f06158ab565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081526000615d826040830185615228565b8281036020840152612e248185615228565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615c1b60a0830184614d7d565b600060208284031215615e6d57600080fd5b815161331081614d26565b600060033d1115615e915760046000803e5060005160e01c5b90565b600060443d1015615ea25790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615ed157505050505090565b8285019150815181811115615ee95750505050505090565b843d8701016020828501011115615f035750505050505090565b615f1260208286010187614df9565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60006001600160a01b03808816835280871660208401525060a06040830152615f9160a0830186615228565b8281036060840152615fa38186615228565b90508281036080840152615fb78185614d7d565b9897505050505050505056fea264697066735822122024fe714d32a1ba01e8a3328f360de54b1093f27c4a5ee82bd6c7ade359fe585064736f6c63430008130033

Deployed Bytecode

0x6080604052600436106104b85760003560e01c8063869f75941161026b578063bb1e05281161014f578063d6199f8d116100c1578063e985e9c511610085578063e985e9c514611077578063ed00e653146110c0578063f242432a146110d5578063f2fde38b146110f5578063fc2f0fd814611115578063fda100e11461113557600080fd5b8063d6199f8d14610fba578063d8d9d6bc14610fda578063dc8519c11461100a578063e49adb7314611037578063e5211d8b1461105757600080fd5b8063c791d96811610113578063c791d96814610ee7578063c848d6c714610f17578063ca397ed914610f2d578063cc328f1714610f4d578063cdc12af114610f7a578063d5cce90414610f9a57600080fd5b8063bb1e052814610e20578063bd85b03914610e4d578063bff67e9b14610e7a578063c3394bc614610e9a578063c5ac4e4014610eba57600080fd5b8063a370c668116101e8578063a6d23e10116101ac578063a6d23e1014610d67578063abc7c86614610d87578063accc1d5e14610db7578063b390c0ab14610dd7578063b4387f7f14610df7578063b7bc15a214610e0a57600080fd5b8063a370c66814610cb7578063a4c2f65114610ce7578063a5492f4414610d07578063a684c47114610d27578063a6b431af14610d4757600080fd5b806394357c251161022f57806394357c2514610c1557806395d89b4114610c35578063a037cd5014610c4a578063a22cb46514610c77578063a2b7258514610c9757600080fd5b8063869f759414610b77578063881773db14610ba45780638c0163b714610bc45780638da5cb5b14610bd75780638da754ea14610bf557600080fd5b80633e4a4e771161039d5780636aec6a371161030f5780637cd8ab94116102d35780637cd8ab9414610ab75780637ce8fab014610ad75780637d929b4f14610af75780637ffd97c114610b1757806383ca4b6f14610b375780638413c6c914610b5757600080fd5b80636aec6a3714610a155780636c30a22f14610a35578063715018a614610a55578063743efaf014610a6a5780637630e90214610a8a57600080fd5b80634f558e79116103615780634f558e791461096257806352addee514610992578063531a0155146109b25780635c975abb146109c5578063644e54ab146109df57806368fd7eee146109f557600080fd5b80633e4a4e7714610895578063446f0617146108b55780634816b2f8146108e55780634afc75c5146109155780634e1273f41461093557600080fd5b806318f1911311610436578063239c70ae116103fa578063239c70ae146107c55780632a9f2a23146107db5780632eb2c2d6146108135780632ed6cd461461083357806333ea51a8146108605780633ccfd60b1461088057600080fd5b806318f19113146107155780631aacb575146107355780631b5c9b4d146107655780631f7b4f3014610785578063214a5e50146107a557600080fd5b80630e89341c1161047d5780630e89341c146106385780630ef31dbd1461065857806314905abc1461068557806314bfd6d0146106bd578063165da72a146106f557600080fd5b8062fdd58e1461055b57806301ffc9a71461058e57806303d9885c146105be57806306fdde03146105f6578063088a4ed01461061857600080fd5b3661055657602d546001600160a01b031661051a5760405162461bcd60e51b815260206004820152601760248201527f5061796d656e742061646472657373206e6f742073657400000000000000000060448201526064015b60405180910390fd5b602d5460405134916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610554573d6000803e3d6000fd5b005b600080fd5b34801561056757600080fd5b5061057b610576366004614cfc565b611162565b6040519081526020015b60405180910390f35b34801561059a57600080fd5b506105ae6105a9366004614d3c565b6111f6565b6040519015158152602001610585565b3480156105ca57600080fd5b5061057b6105d9366004614cfc565b602960209081526000928352604080842090915290825290205481565b34801561060257600080fd5b5061060b611246565b6040516105859190614da9565b34801561062457600080fd5b50610554610633366004614dbc565b6112d4565b34801561064457600080fd5b5061060b610653366004614dbc565b6112e1565b34801561066457600080fd5b5061057b610673366004614dbc565b60286020526000908152604090205481565b34801561069157600080fd5b5061057b6106a0366004614cfc565b600c60209081526000928352604080842090915290825290205481565b3480156106c957600080fd5b506106dd6106d8366004614dbc565b611664565b6040516001600160a01b039091168152602001610585565b34801561070157600080fd5b506105ae610710366004614dbc565b61168e565b34801561072157600080fd5b50610554610730366004614eb9565b61176c565b34801561074157600080fd5b506105ae610750366004614dbc565b60176020526000908152604090205460ff1681565b34801561077157600080fd5b5061057b610780366004614f38565b611850565b34801561079157600080fd5b5061060b6107a0366004614dbc565b611882565b3480156107b157600080fd5b506105546107c0366004614f68565b61189b565b3480156107d157600080fd5b5061057b60095481565b3480156107e757600080fd5b5061057b6107f6366004614cfc565b602a60209081526000928352604080842090915290825290205481565b34801561081f57600080fd5b5061055461082e366004615023565b61190c565b34801561083f57600080fd5b5061057b61084e366004614dbc565b60146020526000908152604090205481565b34801561086c57600080fd5b5061055461087b3660046150cc565b6119c2565b34801561088c57600080fd5b506105546119ec565b3480156108a157600080fd5b506105546108b03660046150e7565b611b25565b3480156108c157600080fd5b506105ae6108d0366004614dbc565b60306020526000908152604090205460ff1681565b3480156108f157600080fd5b506105ae610900366004614dbc565b60276020526000908152604090205460ff1681565b34801561092157600080fd5b5061060b610930366004614dbc565b611bf3565b34801561094157600080fd5b5061095561095036600461515e565b611bfe565b6040516105859190615263565b34801561096e57600080fd5b506105ae61097d366004614dbc565b60009081526015602052604090205460ff1690565b34801561099e57600080fd5b5061057b6109ad366004614dbc565b611d27565b6105546109c03660046152c1565b611d48565b3480156109d157600080fd5b50600d546105ae9060ff1681565b3480156109eb57600080fd5b5061057b600a5481565b348015610a0157600080fd5b506105ae610a10366004615331565b611ea8565b348015610a2157600080fd5b50610554610a30366004615331565b611f91565b348015610a4157600080fd5b50610554610a50366004615353565b611fee565b348015610a6157600080fd5b50610554612013565b348015610a7657600080fd5b50610554610a85366004615331565b612027565b348015610a9657600080fd5b5061057b610aa5366004614dbc565b602b6020526000908152604090205481565b348015610ac357600080fd5b50610554610ad236600461537f565b612053565b348015610ae357600080fd5b5061057b610af2366004614dbc565b6121b2565b348015610b0357600080fd5b5061057b610b12366004615331565b6121c2565b348015610b2357600080fd5b5061057b610b32366004615331565b6121f3565b348015610b4357600080fd5b50610554610b523660046153ff565b61220f565b348015610b6357600080fd5b50610554610b72366004615353565b612299565b348015610b8357600080fd5b5061057b610b92366004614dbc565b60136020526000908152604090205481565b348015610bb057600080fd5b50610554610bbf36600461544b565b6122ff565b610554610bd2366004615483565b6123cf565b348015610be357600080fd5b506003546001600160a01b03166106dd565b348015610c0157600080fd5b50610554610c103660046154ea565b612590565b348015610c2157600080fd5b5061057b610c30366004615331565b612818565b348015610c4157600080fd5b5061060b612834565b348015610c5657600080fd5b5061057b610c65366004614dbc565b600b6020526000908152604090205481565b348015610c8357600080fd5b50610554610c92366004615553565b612841565b348015610ca357600080fd5b5061057b610cb2366004614dbc565b61284c565b348015610cc357600080fd5b506105ae610cd2366004614dbc565b60316020526000908152604090205460ff1681565b348015610cf357600080fd5b50610554610d023660046150cc565b61285c565b348015610d1357600080fd5b50610554610d22366004615553565b6128bd565b348015610d3357600080fd5b50602e546106dd906001600160a01b031681565b348015610d5357600080fd5b50610554610d6236600461557f565b612927565b348015610d7357600080fd5b50602d546106dd906001600160a01b031681565b348015610d9357600080fd5b506105ae610da2366004614dbc565b600e6020526000908152604090205460ff1681565b348015610dc357600080fd5b50610554610dd23660046155b4565b61297b565b348015610de357600080fd5b50610554610df2366004615331565b6129da565b610554610e053660046155f5565b612a09565b348015610e1657600080fd5b5061057b60075481565b348015610e2c57600080fd5b5061057b610e3b366004614dbc565b60256020526000908152604090205481565b348015610e5957600080fd5b5061057b610e68366004614dbc565b60009081526012602052604090205490565b348015610e8657600080fd5b5061060b610e95366004614dbc565b612cf4565b348015610ea657600080fd5b50610554610eb5366004614dbc565b612d1f565b348015610ec657600080fd5b5061057b610ed5366004614dbc565b602c6020526000908152604090205481565b348015610ef357600080fd5b506105ae610f02366004614dbc565b60266020526000908152604090205460ff1681565b348015610f2357600080fd5b5061057b60105481565b348015610f3957600080fd5b5061057b610f48366004614dbc565b612d2c565b348015610f5957600080fd5b5061057b610f68366004614dbc565b601a6020526000908152604090205481565b348015610f8657600080fd5b506105ae610f9536600461568b565b612d91565b348015610fa657600080fd5b5061057b610fb5366004615331565b612e2d565b348015610fc657600080fd5b5061060b610fd5366004614dbc565b612e49565b348015610fe657600080fd5b506105ae610ff53660046150cc565b60326020526000908152604090205460ff1681565b34801561101657600080fd5b5061057b611025366004614dbc565b60246020526000908152604090205481565b34801561104357600080fd5b50610554611052366004615331565b612e59565b34801561106357600080fd5b50610554611072366004614f38565b612e72565b34801561108357600080fd5b506105ae6110923660046156db565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156110cc57600080fd5b506105ae612ed1565b3480156110e157600080fd5b506105546110f036600461570e565b612f7e565b34801561110157600080fd5b506105546111103660046150cc565b613034565b34801561112157600080fd5b50610554611130366004615772565b6130ad565b34801561114157600080fd5b5061057b611150366004614dbc565b60196020526000908152604090205481565b60006001600160a01b0383166111cd5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401610511565b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061122757506001600160e01b031982166303a24d0760e21b145b806111f057506301ffc9a760e01b6001600160e01b03198316146111f0565b60048054611253906157a9565b80601f016020809104026020016040519081016040528092919081815260200182805461127f906157a9565b80156112cc5780601f106112a1576101008083540402835291602001916112cc565b820191906000526020600020905b8154815290600101906020018083116112af57829003601f168201915b505050505081565b6112dc6130f1565b600955565b600081815260156020526040812054606091600191839060ff16156116575760075485116116575760408051600080825260208083018085528351902089835260119091529083902090926113369201615850565b60405160208183030381529060405280519060200120146113f2576000858152601160205260409020805461136a906157a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611396906157a9565b80156113e35780601f106113b8576101008083540402835291602001916113e3565b820191906000526020600020905b8154815290600101906020018083116113c657829003601f168201915b50505050509350505050919050565b60005b601f5481101561155e57601f81815481106114125761141261585c565b9060005260206000200154861161154e5760408051600081526020810191829052519020602180548390811061144a5761144a61585c565b906000526020600020016040516020016114649190615850565b60405160208183030381529060405280519060200120146114c557602181815481106114925761149261585c565b906000526020600020016040516020016114ac9190615872565b604051602081830303815290604052915080925061155e565b6040805160008152602081019182905251902060228054839081106114ec576114ec61585c565b906000526020600020016040516020016115069190615850565b604051602081830303815290604052805190602001201461154e57602281815481106115345761153461585c565b906000526020600020016040516020016114ac919061589f565b611557816158c1565b90506113f5565b50601f805461156f906001906158da565b8154811061157f5761157f61585c565b906000526020600020015485111561159657600092505b8280156115b1575060008281526026602052604090205460ff165b156116575760408051600080825260208083018085528351902089835260189091529083902090926115e39201615850565b604051602081830303815290604052805190602001200361163257806116088661312a565b6040516020016116199291906158ed565b6040516020818303038152906040529350505050919050565b806018600087815260200190815260200160002060405160200161161992919061592c565b6006805461136a906157a9565b602f818154811061167457600080fd5b6000918252602090912001546001600160a01b0316905081565b60008060005b601f548110156117535780158015906116ca5750601f81815481106116bb576116bb61585c565b90600052602060002001548411155b80156116fc5750601f6116de6001836158da565b815481106116ee576116ee61585c565b906000526020600020015484115b1561170957809150611753565b801580156117345750601f81815481106117255761172561585c565b90600052602060002001548411155b1561174157809150611753565b8061174b816158c1565b915050611694565b5060009081526030602052604090205460ff1692915050565b6117746130f1565b821561180957601f805461178a906001906158da565b8154811061179a5761179a61585c565b90600052602060002001548411156117c45760405162461bcd60e51b815260040161051190615961565b6000848152601d6020908152604090912083516117e392850190614c0f565b506000848152601e60209081526040909120825161180392840190614c0f565b5061184a565b6000848152601b60209081526040909120835161182892850190614c0f565b506000848152601c60209081526040909120825161184892840190614c0f565b505b50505050565b6000811561186d57506000828152601460205260409020546111f0565b506000828152601360205260409020546111f0565b60186020526000908152604090208054611253906157a9565b6118a36130f1565b83156118f9576001600160a01b038116156118e3576001600160a01b0381166000908152602a60209081526040808320858452909152902083905561184a565b600082815260286020526040902083905561184a565b506000908152600b602052604090205550565b6daaeb6d7670e522a718067333cd4e3b156119b557604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015611972573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611996919061597d565b6119b557604051633b79c77360e21b8152336004820152602401610511565b61184885858585856131bc565b6119ca613201565b602d80546001600160a01b0319166001600160a01b0392909216919091179055565b6119f46130f1565b602d546001600160a01b0316611a455760405162461bcd60e51b815260206004820152601660248201527514185e5bdd5d081859191c995cdcc81b9bdd081cd95d60521b6044820152606401610511565b4780611a8a5760405162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b6044820152606401610511565b602d546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611ad7576040519150601f19603f3d011682016040523d82523d6000602084013e611adc565b606091505b5050905080611b215760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610511565b5050565b611b2d6130f1565b8015611b845781600081518110611b4657611b4661585c565b60200260200101516014600085600081518110611b6557611b6561585c565b6020026020010151815260200190815260200160002081905550505050565b60005b835181101561184a576000848281518110611ba457611ba461585c565b60200260200101519050838281518110611bc057611bc061585c565b6020908102919091018101516000928352601390915260409091205580611be6816158c1565b915050611b87565b505050565b60606111f08261325b565b60608151835114611c635760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610511565b600083516001600160401b03811115611c7e57611c7e614de3565b604051908082528060200260200182016040528015611ca7578160200160208202803683370190505b50905060005b8451811015611d1f57611cf2858281518110611ccb57611ccb61585c565b6020026020010151858381518110611ce557611ce561585c565b6020026020010151611162565b828281518110611d0457611d0461585c565b6020908102919091010152611d18816158c1565b9050611cad565b509392505050565b601f8181548110611d3757600080fd5b600091825260209091200154905081565b60008381526016602052604090205460ff1615611d9f5760405162461bcd60e51b81526020600482015260156024820152742932b8bab4b932b99010b6b4b73a24b727b93232b960591b6044820152606401610511565b611da98584611ea8565b611dc55760405162461bcd60e51b815260040161051190615961565b611dd085858561332b565b611dec5760405162461bcd60e51b81526004016105119061599a565b611df4612ed1565b611e5657600d5460ff1615611e1b5760405162461bcd60e51b8152600401610511906159b9565b6000838152600e602052604090205460ff1615611e4a5760405162461bcd60e51b8152600401610511906159d9565b611e56848484846135da565b611e608584613980565b60008581526012602052604081208054869290611e7e9084906159ff565b92505081905550611ea086868660405180602001604052806000815250613acd565b505050505050565b601f546000908210611ee55760405162461bcd60e51b815260206004820152600660248201526504284c2e8c6d60d31b6044820152606401610511565b8115801590611f115750601f8281548110611f0257611f0261585c565b90600052602060002001548311155b8015611f435750601f611f256001846158da565b81548110611f3557611f3561585c565b906000526020600020015483115b15611f50575060016111f0565b81158015611f7b5750601f8281548110611f6c57611f6c61585c565b90600052602060002001548311155b15611f88575060016111f0565b50600092915050565b611f996130f1565b428111611fdc5760405162461bcd60e51b815260206004820152601160248201527011185d1948105b1c9958591e4814185cdd607a1b6044820152606401610511565b6000918252600f602052604090912055565b611ff66130f1565b600090815260246020908152604080832093909355602590522055565b61201b613201565b6120256000613bbc565b565b61202f6130f1565b81602082815481106120435761204361585c565b6000918252602090912001555050565b61205b6130f1565b841561207357600661206d8382615a58565b50611848565b836121585780156121025760008261208a8561312a565b60405160200161209b929190615b17565b60408051601f1981840301815291815260008681526011602052209091506120c38282615a58565b50837f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b826040516120f49190614da9565b60405180910390a250611848565b600083815260116020526040902061211a8382615a58565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360405161214b9190614da9565b60405180910390a2611848565b80156121885781602184815481106121725761217261585c565b90600052602060002001908161206d9190615a58565b816022848154811061219c5761219c61585c565b906000526020600020019081611ea09190615a58565b60208181548110611d3757600080fd5b601d60205281600052604060002081815481106121de57600080fd5b90600052602060002001600091509150505481565b601e60205281600052604060002081815481106121de57600080fd5b60005b825181101561228d57600083828151811061222f5761222f61585c565b6020026020010151905082828151811061224b5761224b61585c565b602002602001015160126000838152602001908152602001600020600082825461227591906158da565b9091555061228691508290506158c1565b9050612212565b50611b21338383613c0e565b6122a16130f1565b818311156122df5760405162461bcd60e51b815260206004820152600b60248201526a4d494e203c3d204d41583f60a81b6044820152606401610511565b600090815260196020908152604080832094909455601a90529190912055565b6123076130f1565b8260010361232f576000908152602660205260409020805460ff191691151591909117905550565b82600203612357576000908152601760205260409020805460ff191691151591909117905550565b8260030361237f576000908152601660205260409020805460ff191691151591909117905550565b826004036123a7576000908152603060205260409020805460ff191691151591909117905550565b82600503611bee576000908152602760205260409020805460ff191691151591909117905550565b60008381526016602052604090205460ff1661241b5760405162461bcd60e51b815260206004820152600b60248201526a36b4b73a24b727b93232b960a91b6044820152606401610511565b612451601f84815481106124315761243161585c565b906000526020600020015460009081526015602052604090205460ff1690565b156124845760405162461bcd60e51b81526020600482015260036024820152624f4f5360e81b6044820152606401610511565b601f83815481106124975761249761585c565b90600052602060002001546001602085815481106124b7576124b761585c565b9060005260206000200154866124cd91906159ff565b6124d791906158da565b111561251b5760405162461bcd60e51b8152602060048201526013602482015272141b19585cd948131bddd95c88105b5bdd5b9d606a1b6044820152606401610511565b612523612ed1565b61258557600d5460ff161561254a5760405162461bcd60e51b8152600401610511906159b9565b6000838152600e602052604090205460ff16156125795760405162461bcd60e51b8152600401610511906159d9565b612585848484846135da565b611848858585613db4565b6125986130f1565b601f80546125a8906001906158da565b815481106125b8576125b861585c565b906000526020600020015485116125fd5760405162461bcd60e51b8152602060048201526009602482015268454944203e2050423f60b81b6044820152606401610511565b601f805460209190612611906001906158da565b815481106126215761262161585c565b9060005260206000200154600161263891906159ff565b81546001818101845560009384526020842090910191909155601f805491820181559091527fa03837a25210ee280c2113ff4b77ca23440b19d4866cca721c801278fd08d80701859055811561271557602180546001810182556000919091527f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b570016126c48482615a58565b5060228054600181018255600091825260408051602081019091529182527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510019061270f9082615a58565b5061279e565b602280546001810182556000919091527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510016127518482615a58565b5060218054600181018255600091825260408051602081019091529182527f3a6357012c1a3ae0a17d304c9920310382d968ebcc4b1771f41c6b304205b570019061279c9082615a58565b505b602380546001818101835560009283527fd57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230909101869055601f54869260259290916127e991906158da565b81526020810191909152604001600020558015611848576118486003600180601f80549050610bbf91906158da565b601b60205281600052604060002081815481106121de57600080fd5b60058054611253906157a9565b611b21338383613f59565b60238181548110611d3757600080fd5b6003546001600160a01b031633148061287f5750602e546001600160a01b031633145b61289b5760405162461bcd60e51b815260040161051190615b78565b602e80546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314806128e05750602e546001600160a01b031633145b6128fc5760405162461bcd60e51b815260040161051190615b78565b6001600160a01b03919091166000908152603260205260409020805460ff1916911515919091179055565b61292f6130f1565b826129695781602382815481106129485761294861585c565b60009182526020808320919091019290925591825260259052604090205550565b6000908152602b602052604090205550565b6129836130f1565b6003546001600160a01b03163314806129a65750602e546001600160a01b031633145b6129c25760405162461bcd60e51b815260040161051190615b78565b6129ce602f6000614c5a565b611bee602f8383614c78565b600082815260126020526040812080548392906129f89084906158da565b90915550611b219050338383614039565b60008381526016602052604090205460ff1615612a605760405162461bcd60e51b81526020600482015260156024820152742932b8bab4b932b99010b6b4b73a24b727b93232b960591b6044820152606401610511565b60095485511115612a9c5760405162461bcd60e51b81526004016105119060208082526004908201526324a2399f60e11b604082015260600190565b8351855114612ade5760405162461bcd60e51b815260206004820152600e60248201526d49447320213d20416d6f756e747360901b6044820152606401610511565b612ae985858561415b565b612b055760405162461bcd60e51b81526004016105119061599a565b6000805b8551811015612b8a57612b35878281518110612b2757612b2761585c565b602002602001015186611ea8565b612b515760405162461bcd60e51b815260040161051190615961565b858181518110612b6357612b6361585c565b602002602001015182612b7691906159ff565b915080612b82816158c1565b915050612b09565b50600a54811115612bc25760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b612bca612ed1565b612c2c57600d5460ff1615612bf15760405162461bcd60e51b8152600401610511906159b9565b6000848152600e602052604090205460ff1615612c205760405162461bcd60e51b8152600401610511906159d9565b612c2c818585856135da565b60005b8651811015612ccf576000878281518110612c4c57612c4c61585c565b60200260200101519050612c608187613980565b868281518110612c7257612c7261585c565b6020026020010151601260008a8581518110612c9057612c9061585c565b602002602001015181526020019081526020016000206000828254612cb591906159ff565b90915550829150612cc79050816158c1565b915050612c2f565b50612ceb878787604051806020016040528060008152506141d4565b50505050505050565b60228181548110612d0457600080fd5b906000526020600020016000915090508054611253906157a9565b612d276130f1565b600755565b6000612d36612ed1565b612d895760008281526027602052604090205460ff1615612d6457506000908152602b602052604090205490565b60238281548110612d7757612d7761585c565b90600052602060002001549050919050565b506000919050565b600080612ddf8686808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250898152602c6020526040902054925087915061433d9050565b905080612e245760405162461bcd60e51b815260206004820152601360248201527215995c9a599a58d85d1a5bdb8811985a5b1959606a1b6044820152606401610511565b95945050505050565b601c60205281600052604060002081815481106121de57600080fd5b60218181548110612d0457600080fd5b612e616130f1565b6000908152602c6020526040902055565b6003546001600160a01b0316331480612e955750602e546001600160a01b031633145b612eb15760405162461bcd60e51b815260040161051190615b78565b600091825260316020526040909120805460ff1916911515919091179055565b6000612ee56003546001600160a01b031690565b6001600160a01b0316336001600160a01b03161480612f0e5750602e546001600160a01b031633145b15612f195750600190565b602f5415612f785760005b602f54811015612f7657602f8181548110612f4157612f4161585c565b6000918252602090912001546001600160a01b03163303612f6457600191505090565b80612f6e816158c1565b915050612f24565b505b50600090565b6daaeb6d7670e522a718067333cd4e3b1561302757604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015612fe4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613008919061597d565b61302757604051633b79c77360e21b8152336004820152602401610511565b6118488585858585614353565b61303c613201565b6001600160a01b0381166130a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610511565b6130aa81613bbc565b50565b6130b56130f1565b82156130d057600d805482151560ff19909116179055505050565b6000828152600e60205260409020805482151560ff19909116179055505050565b6130f9612ed1565b6120255760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b6060600061313783614398565b60010190506000816001600160401b0381111561315657613156614de3565b6040519080825280601f01601f191660200182016040528015613180576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461318a57509392505050565b6001600160a01b0385163314806131d857506131d88533611092565b6131f45760405162461bcd60e51b815260040161051190615b97565b6118488585858585614470565b6003546001600160a01b031633146120255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610511565b6000818152601a602052604081205460105460609291904290449033906018866132866001846158da565b81526020019081526020016000206040516020016132a8959493929190615be5565b6040516020818303038152906040528051906020012060001c6132cb9190615c26565b600084815260196020526040902054909150811015613317576133106132f28260016159ff565b6000858152601a602052604090205461330b91906158da565b61312a565b9392505050565b61331061330b8260016159ff565b50919050565b60008083116133615760405162461bcd60e51b8152602060048201526002602482015261214160f01b6044820152606401610511565b6009548311156133995760405162461bcd60e51b81526020600482015260036024820152624d4d4160e81b6044820152606401610511565b6007548411156133d15760405162461bcd60e51b815260206004820152600360248201526208525160ea1b6044820152606401610511565b60008481526013602052604090205415801590613411575060008481526013602090815260408083205460129092529091205461340f9085906159ff565b115b1561341e57506000613310565b60008281526014602052604090205415801590613461575060008281526014602090815260408083205487845260129092529091205461345f9085906159ff565b115b1561346e57506000613310565b6000848152601b6020526040902054156135275760005b6000858152601b6020526040902054811015613525576000858152601b6020526040812080546134d1913391859081106134c1576134c161585c565b9060005260206000200154611162565b6000878152601c60205260409020805491925090839081106134f5576134f561585c565b906000526020600020015481101561351257600092505050613310565b508061351d816158c1565b915050613485565b505b6000828152601d6020526040902054156135d05760005b6000838152601d60205260409020548110156135ce576000838152601d60205260408120805461357a913391859081106134c1576134c161585c565b6000858152601e602052604090208054919250908390811061359e5761359e61585c565b90600052602060002001548110156135bb57600092505050613310565b50806135c6816158c1565b91505061353e565b505b5060019392505050565b6135e2612ed1565b61184a576000838152600f60205260409020541561363d576000838152600f602052604090205442101561363d5760405162461bcd60e51b8152602060048201526002602482015261085160f21b6044820152606401610511565b6000838152600b6020526040902054156136e6576000838152600b6020908152604080832054338452600c8352818420878552909252909120546136829086906159ff565b11156136b65760405162461bcd60e51b8152602060048201526003602482015262424c4560e81b6044820152606401610511565b336000908152600c60209081526040808320868452909152812080548692906136e09084906159ff565b90915550505b60008381526027602052604090205460ff161561393957336000908152602a602090815260408083208684529091529020541561378157336000818152602a6020908152604080832087845282528083205493835260298252808320878452909152902054106137815760405162461bcd60e51b81526004016105119060208082526004908201526350574c4560e01b604082015260600190565b6000838152602860205260409020541561387b576040516bffffffffffffffffffffffff193360601b166020820152603481018590526137e0908390839086906054015b60405160208183030381529060405280519060200120612d91565b6138125760405162461bcd60e51b81526020600482015260036024820152620855d360ea1b6044820152606401610511565b60008381526028602090815260408083205433845260298352818420878552909252909120546138439086906159ff565b11156138765760405162461bcd60e51b81526020600482015260026024820152614c4560f01b6044820152606401610511565b6138da565b6040516bffffffffffffffffffffffff193360601b1660208201526138a8908390839086906034016137c5565b6138da5760405162461bcd60e51b81526020600482015260036024820152620855d360ea1b6044820152606401610511565b336000908152602a60209081526040808320868452909152812080548692906139049084906159ff565b9091555050336000908152602960209081526040808320868452909152812080548692906139339084906159ff565b90915550505b61394283612d2c565b61394c9085615c48565b34101561184a5760405162461bcd60e51b8152602060048201526002602482015261243f60f01b6044820152606401610511565b60008281526015602052604090205460ff166139d8576000828152601560209081526040808320805460ff19166001179055838352601690915290205460ff16156139d8576000828152601260205260409020600190555b60008181526017602052604090205460ff1615613a13576139f88161325b565b600083815260186020526040902090613a119082615a58565b505b6000818152602560205260409020546023805483908110613a3657613a3661585c565b906000526020600020015414158015613a7f5750602460008281526020019081526020016000205460208281548110613a7157613a7161585c565b906000526020600020015410155b15613ab4576000818152602560205260409020546023805483908110613aa757613aa761585c565b6000918252602090912001555b60108054906000613ac4836158c1565b91905055505050565b6001600160a01b038416613af35760405162461bcd60e51b815260040161051190615c5f565b336000613aff85614620565b90506000613b0c85614620565b9050613b1d8360008985858961466b565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290613b4d9084906159ff565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613bad836000898585896147b7565b612ceb83600089898989614842565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316613c345760405162461bcd60e51b815260040161051190615ca0565b8051825114613c555760405162461bcd60e51b815260040161051190615ce3565b6000339050613c788185600086866040518060200160405280600081525061466b565b60005b8351811015613d3d576000848281518110613c9857613c9861585c565b602002602001015190506000848381518110613cb657613cb661585c565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015613d065760405162461bcd60e51b815260040161051190615d2b565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580613d35816158c1565b915050613c7b565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613d8e929190615d6f565b60405180910390a461184a818560008686604051806020016040528060008152506147b7565b6000826001600160401b03811115613dce57613dce614de3565b604051908082528060200260200182016040528015613df7578160200160208202803683370190505b5090506000836001600160401b03811115613e1457613e14614de3565b604051908082528060200260200182016040528015613e3d578160200160208202803683370190505b50905060005b84811015613f3d57600060208581548110613e6057613e6061585c565b90600052602060002001549050613e798160018761332b565b613e955760405162461bcd60e51b81526004016105119061599a565b613e9f8186613980565b60208581548110613eb257613eb261585c565b9060005260206000200154848381518110613ecf57613ecf61585c565b6020026020010181815250506001838381518110613eef57613eef61585c565b60200260200101818152505060208581548110613f0e57613f0e61585c565b60009182526020822001805491613f24836158c1565b9190505550508080613f35906158c1565b915050613e43565b50611848858383604051806020016040528060008152506141d4565b816001600160a01b0316836001600160a01b031603613fcc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610511565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03831661405f5760405162461bcd60e51b815260040161051190615ca0565b33600061406b84614620565b9050600061407884614620565b90506140988387600085856040518060200160405280600081525061466b565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156140d95760405162461bcd60e51b815260040161051190615d2b565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612ceb848860008686604051806020016040528060008152506147b7565b6000805b84518110156135ce57600085828151811061417c5761417c61585c565b60200260200101519050600085838151811061419a5761419a61585c565b602002602001015190506141af82828761332b565b6141bf5760009350505050613310565b505080806141cc906158c1565b91505061415f565b6001600160a01b0384166141fa5760405162461bcd60e51b815260040161051190615c5f565b815183511461421b5760405162461bcd60e51b815260040161051190615ce3565b3361422b8160008787878761466b565b60005b84518110156142c6578381815181106142495761424961585c565b60200260200101516000808784815181106142665761426661585c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546142ae91906159ff565b909155508190506142be816158c1565b91505061422e565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051614317929190615d6f565b60405180910390a461432e816000878787876147b7565b6118488160008787878761499d565b60008261434a8584614a58565b14949350505050565b6001600160a01b03851633148061436f575061436f8533611092565b61438b5760405162461bcd60e51b815260040161051190615b97565b6118488585858585614a9d565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106143d75772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614403576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061442157662386f26fc10000830492506010015b6305f5e1008310614439576305f5e100830492506008015b612710831061444d57612710830492506004015b6064831061445f576064830492506002015b600a83106111f05760010192915050565b81518351146144915760405162461bcd60e51b815260040161051190615ce3565b6001600160a01b0384166144b75760405162461bcd60e51b815260040161051190615d94565b336144c681878787878761466b565b60005b84518110156145ac5760008582815181106144e6576144e661585c565b6020026020010151905060008583815181106145045761450461585c565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156145545760405162461bcd60e51b815260040161051190615dd9565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906145919084906159ff565b92505081905550505050806145a5906158c1565b90506144c9565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516145fc929190615d6f565b60405180910390a46146128187878787876147b7565b611ea081878787878761499d565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061465a5761465a61585c565b602090810291909101015292915050565b6001600160a01b03861660009081526032602052604090205460ff161580156146ad57506001600160a01b03851660009081526032602052604090205460ff16155b80156146d257506001600160a01b03841660009081526032602052604090205460ff16155b6147325760405162461bcd60e51b815260206004820152602b60248201527f4f70657261746f722c2046726f6d2c206f7220546f204164647265737320697360448201526a08149154d5149250d5115160aa1b6064820152608401610511565b60005b8351811015612ceb57603160008583815181106147545761475461585c565b60209081029190910181015182528101919091526040016000205460ff16156147a55760405162461bcd60e51b815260206004820152600360248201526211925160ea1b6044820152606401610511565b806147af816158c1565b915050614735565b60005b8351811015612ceb576147e58482815181106147d8576147d861585c565b602002602001015161168e565b15614830576001603160008684815181106148025761480261585c565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061483a816158c1565b9150506147ba565b6001600160a01b0384163b15611ea05760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906148869089908990889088908890600401615e23565b6020604051808303816000875af19250505080156148c1575060408051601f3d908101601f191682019092526148be91810190615e5b565b60015b61496d576148cd615e78565b806308c379a00361490657506148e1615e94565b806148ec5750614908565b8060405162461bcd60e51b81526004016105119190614da9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610511565b6001600160e01b0319811663f23a6e6160e01b14612ceb5760405162461bcd60e51b815260040161051190615f1d565b6001600160a01b0384163b15611ea05760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906149e19089908990889088908890600401615f65565b6020604051808303816000875af1925050508015614a1c575060408051601f3d908101601f19168201909252614a1991810190615e5b565b60015b614a28576148cd615e78565b6001600160e01b0319811663bc197c8160e01b14612ceb5760405162461bcd60e51b815260040161051190615f1d565b600081815b8451811015611d1f57614a8982868381518110614a7c57614a7c61585c565b6020026020010151614be3565b915080614a95816158c1565b915050614a5d565b6001600160a01b038416614ac35760405162461bcd60e51b815260040161051190615d94565b336000614acf85614620565b90506000614adc85614620565b9050614aec83898985858961466b565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015614b2d5760405162461bcd60e51b815260040161051190615dd9565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290614b6a9084906159ff565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4614bca848a8a86868a6147b7565b614bd8848a8a8a8a8a614842565b505050505050505050565b6000818310614bff576000828152602084905260409020613310565b5060009182526020526040902090565b828054828255906000526020600020908101928215614c4a579160200282015b82811115614c4a578251825591602001919060010190614c2f565b50614c56929150614ccb565b5090565b50805460008255906000526020600020908101906130aa9190614ccb565b828054828255906000526020600020908101928215614c4a579160200282015b82811115614c4a5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614c98565b5b80821115614c565760008155600101614ccc565b80356001600160a01b0381168114614cf757600080fd5b919050565b60008060408385031215614d0f57600080fd5b614d1883614ce0565b946020939093013593505050565b6001600160e01b0319811681146130aa57600080fd5b600060208284031215614d4e57600080fd5b813561331081614d26565b60005b83811015614d74578181015183820152602001614d5c565b50506000910152565b60008151808452614d95816020860160208601614d59565b601f01601f19169290920160200192915050565b6020815260006133106020830184614d7d565b600060208284031215614dce57600080fd5b5035919050565b80151581146130aa57600080fd5b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614e1e57614e1e614de3565b6040525050565b60006001600160401b03821115614e3e57614e3e614de3565b5060051b60200190565b600082601f830112614e5957600080fd5b81356020614e6682614e25565b604051614e738282614df9565b83815260059390931b8501820192828101915086841115614e9357600080fd5b8286015b84811015614eae5780358352918301918301614e97565b509695505050505050565b60008060008060808587031215614ecf57600080fd5b843593506020850135614ee181614dd5565b925060408501356001600160401b0380821115614efd57600080fd5b614f0988838901614e48565b93506060870135915080821115614f1f57600080fd5b50614f2c87828801614e48565b91505092959194509250565b60008060408385031215614f4b57600080fd5b823591506020830135614f5d81614dd5565b809150509250929050565b60008060008060808587031215614f7e57600080fd5b8435614f8981614dd5565b93506020850135925060408501359150614fa560608601614ce0565b905092959194509250565b600082601f830112614fc157600080fd5b81356001600160401b03811115614fda57614fda614de3565b604051614ff1601f8301601f191660200182614df9565b81815284602083860101111561500657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561503b57600080fd5b61504486614ce0565b945061505260208701614ce0565b935060408601356001600160401b038082111561506e57600080fd5b61507a89838a01614e48565b9450606088013591508082111561509057600080fd5b61509c89838a01614e48565b935060808801359150808211156150b257600080fd5b506150bf88828901614fb0565b9150509295509295909350565b6000602082840312156150de57600080fd5b61331082614ce0565b6000806000606084860312156150fc57600080fd5b83356001600160401b038082111561511357600080fd5b61511f87838801614e48565b9450602086013591508082111561513557600080fd5b5061514286828701614e48565b925050604084013561515381614dd5565b809150509250925092565b6000806040838503121561517157600080fd5b82356001600160401b038082111561518857600080fd5b818501915085601f83011261519c57600080fd5b813560206151a982614e25565b6040516151b68282614df9565b83815260059390931b85018201928281019150898411156151d657600080fd5b948201945b838610156151fb576151ec86614ce0565b825294820194908201906151db565b9650508601359250508082111561521157600080fd5b5061521e85828601614e48565b9150509250929050565b600081518084526020808501945080840160005b838110156152585781518752958201959082019060010161523c565b509495945050505050565b6020815260006133106020830184615228565b60008083601f84011261528857600080fd5b5081356001600160401b0381111561529f57600080fd5b6020830191508360208260051b85010111156152ba57600080fd5b9250929050565b60008060008060008060a087890312156152da57600080fd5b6152e387614ce0565b955060208701359450604087013593506060870135925060808701356001600160401b0381111561531357600080fd5b61531f89828a01615276565b979a9699509497509295939492505050565b6000806040838503121561534457600080fd5b50508035926020909101359150565b60008060006060848603121561536857600080fd5b505081359360208301359350604090920135919050565b600080600080600060a0868803121561539757600080fd5b85356153a281614dd5565b945060208601356153b281614dd5565b93506040860135925060608601356001600160401b038111156153d457600080fd5b6153e088828901614fb0565b92505060808601356153f181614dd5565b809150509295509295909350565b6000806040838503121561541257600080fd5b82356001600160401b038082111561542957600080fd5b61543586838701614e48565b9350602085013591508082111561521157600080fd5b60008060006060848603121561546057600080fd5b83359250602084013561547281614dd5565b929592945050506040919091013590565b60008060008060006080868803121561549b57600080fd5b6154a486614ce0565b9450602086013593506040860135925060608601356001600160401b038111156154cd57600080fd5b6154d988828901615276565b969995985093965092949392505050565b600080600080600060a0868803121561550257600080fd5b853594506020860135935060408601356001600160401b0381111561552657600080fd5b61553288828901614fb0565b935050606086013561554381614dd5565b915060808601356153f181614dd5565b6000806040838503121561556657600080fd5b61556f83614ce0565b91506020830135614f5d81614dd5565b60008060006060848603121561559457600080fd5b833561559f81614dd5565b95602085013595506040909401359392505050565b600080602083850312156155c757600080fd5b82356001600160401b038111156155dd57600080fd5b6155e985828601615276565b90969095509350505050565b60008060008060008060a0878903121561560e57600080fd5b61561787614ce0565b955060208701356001600160401b038082111561563357600080fd5b61563f8a838b01614e48565b9650604089013591508082111561565557600080fd5b6156618a838b01614e48565b955060608901359450608089013591508082111561567e57600080fd5b5061531f89828a01615276565b600080600080606085870312156156a157600080fd5b84356001600160401b038111156156b757600080fd5b6156c387828801615276565b90989097506020870135966040013595509350505050565b600080604083850312156156ee57600080fd5b6156f783614ce0565b915061570560208401614ce0565b90509250929050565b600080600080600060a0868803121561572657600080fd5b61572f86614ce0565b945061573d60208701614ce0565b9350604086013592506060860135915060808601356001600160401b0381111561576657600080fd5b6150bf88828901614fb0565b60008060006060848603121561578757600080fd5b833561579281614dd5565b925060208401359150604084013561515381614dd5565b600181811c908216806157bd57607f821691505b60208210810361332557634e487b7160e01b600052602260045260246000fd5b600081546157ea816157a9565b60018281168015615802576001811461581757615846565b60ff1984168752821515830287019450615846565b8560005260208060002060005b8581101561583d5781548a820152908401908201615824565b50505082870194505b5050505092915050565b600061331082846157dd565b634e487b7160e01b600052603260045260246000fd5b66697066733a2f2f60c81b8152600061588e60078301846157dd565b602f60f81b81526001019392505050565b600061588e82846157dd565b634e487b7160e01b600052601160045260246000fd5b6000600182016158d3576158d36158ab565b5060010190565b818103818111156111f0576111f06158ab565b600083516158ff818460208801614d59565b835190830190615913818360208801614d59565b64173539b7b760d91b9101908152600501949350505050565b6000835161593e818460208801614d59565b61594a818401856157dd565b64173539b7b760d91b815260050195945050505050565b60208082526002908201526110a160f11b604082015260600190565b60006020828403121561598f57600080fd5b815161331081614dd5565b602080825260059082015264085352539560da1b604082015260600190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252600c908201526b0a0c2eae6cac84084c2e8c6d60a31b604082015260600190565b808201808211156111f0576111f06158ab565b601f821115611bee57600081815260208120601f850160051c81016020861015615a395750805b601f850160051c820191505b81811015611ea057828155600101615a45565b81516001600160401b03811115615a7157615a71614de3565b615a8581615a7f84546157a9565b84615a12565b602080601f831160018114615aba5760008415615aa25750858301515b600019600386901b1c1916600185901b178555611ea0565b600085815260208120601f198616915b82811015615ae957888601518255948401946001909101908401615aca565b5085821015615b075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b66697066733a2f2f60c81b815260008351615b39816007850160208801614d59565b602f60f81b6007918401918201528351615b5a816008840160208801614d59565b64173539b7b760d91b60089290910191820152600d01949350505050565b6020808252600590820152641393dbd41360da1b604082015260600190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b8581528460208201526bffffffffffffffffffffffff198460601b1660408201528260548201526000615c1b60748301846157dd565b979650505050505050565b600082615c4357634e487b7160e01b600052601260045260246000fd5b500690565b80820281158282048414176111f0576111f06158ab565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081526000615d826040830185615228565b8281036020840152612e248185615228565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615c1b60a0830184614d7d565b600060208284031215615e6d57600080fd5b815161331081614d26565b600060033d1115615e915760046000803e5060005160e01c5b90565b600060443d1015615ea25790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615ed157505050505090565b8285019150815181811115615ee95750505050505090565b843d8701016020828501011115615f035750505050505090565b615f1260208286010187614df9565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60006001600160a01b03808816835280871660208401525060a06040830152615f9160a0830186615228565b8281036060840152615fa38186615228565b90508281036080840152615fb78185614d7d565b9897505050505050505056fea264697066735822122024fe714d32a1ba01e8a3328f360de54b1093f27c4a5ee82bd6c7ade359fe585064736f6c63430008130033

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.