ETH Price: $3,322.81 (-2.81%)

Token

Rags Trinity Protocol (RAGSTRINITY)
 

Overview

Max Total Supply

1,047 RAGSTRINITY

Holders

462

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
0xcd75281aab13da6fd25d3f04a17fa1f769859edc
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:
Commerce

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 22 : Commerce.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import './Abstract1155Factory.sol';
import './Utils.sol';
contract Commerce is Abstract1155Factory, ReentrancyGuard  {
    using SafeMath for uint256;

    mapping(uint256 => Token) public tokens;
    event Purchased(uint[] index, address indexed account, uint[] amount);
    struct Token {
        string ipfsMetadataHash;
        string extraDataUri;
        mapping(address => uint256) claimedTokens;
        mapping(uint => address) redeemableContracts;
        uint256 numRedeemableContracts;
        mapping(uint => Whitelist) whitelistData;
        uint256 numTokenWhitelists;
        MintingConfig mintingConfig;
        WhiteListConfig whiteListConfig;
        bool isTokenPack;
        TokenPackConfig tokenPackConfig;
    }
    struct MintingConfig {
        bool saleIsOpen;
        uint256 windowOpens;
        uint256 windowCloses;
        uint256 mintPrice;
        uint256 maxSupply;
        uint256 maxPerWallet;
        uint256 maxMintPerTxn;
        uint256 numMinted;
    }
    struct WhiteListConfig {
        bool maxQuantityMappedByWhitelistHoldings;
        bool requireAllWhiteLists;
        bool hasMerkleRoot;
        bytes32 merkleRoot;
    }
    struct TokenPackConfig {
        uint256[] packTokens;
        bool isRandomPack;
        uint numRandom;
        uint numWhiteListBonus;
        bool allotOwnedTokenQuantity;
        bool isWhiteListBonusAggregatedAcrossAllWhiteLists;
    }
    struct Whitelist {
        string tokenType;
        address tokenAddress;
        uint mustOwnQuantity;
        uint256 tokenId;
        bool active;
    }

    string public _contractURI;
   
    constructor(
        string memory _name, 
        string memory _symbol,
        address[] memory _admins,
        string memory _contract_URI
    ) ERC1155("ipfs://") {
        name_ = _name;
        symbol_ = _symbol;
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        for (uint i=0; i< _admins.length; i++) {
            _setupRole(DEFAULT_ADMIN_ROLE, _admins[i]);
        }
        _contractURI = _contract_URI;
    }

     function getOpenSaleTokens() public view returns (string memory){
        string memory open = "";
        uint256 numTokens = 0;
        while(!Utils.compareStrings(tokens[numTokens].ipfsMetadataHash, "")) {
           if(isSaleOpen(numTokens)){
                open = string(abi.encodePacked(open, Strings.toString(numTokens), ","));
            }
            numTokens++;
        }
        return open;
    }

     function editToken(
        uint256 _tokenIndex,
        string memory _ipfsMetadataHash,
        string memory _extraDataUri,
        uint256 _windowOpens, 
        uint256 _windowCloses, 
        uint256 _mintPrice, 
        uint256 _maxSupply,
        uint256 _maxMintPerTxn,
        uint256 _maxPerWallet,
        bool _maxQuantityMappedByWhitelistHoldings,
        bool _requireAllWhiteLists,
        address[] memory _redeemableContracts
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        Token storage token = tokens[_tokenIndex];
        token.mintingConfig.windowOpens = _windowOpens;
        token.mintingConfig.windowCloses = _windowCloses;
        token.mintingConfig.mintPrice = _mintPrice;
        token.mintingConfig.maxSupply = _maxSupply;
        token.mintingConfig.maxMintPerTxn = _maxMintPerTxn;
        token.mintingConfig.maxPerWallet = _maxPerWallet;
        token.ipfsMetadataHash = _ipfsMetadataHash;
        token.extraDataUri = _extraDataUri;
        for (uint i=0; i<_redeemableContracts.length; i++) {
            token.redeemableContracts[i] = _redeemableContracts[i];
        }
        token.numRedeemableContracts = _redeemableContracts.length;
        token.whiteListConfig.maxQuantityMappedByWhitelistHoldings = _maxQuantityMappedByWhitelistHoldings;
        token.whiteListConfig.requireAllWhiteLists = _requireAllWhiteLists;
    }   


    function configTokenPack(
        uint256 _tokenIndex,
        bool _isTokenPack,
        uint256[] memory _packTokens,
        bool _isRandomPack,
        uint _numRandom,
        uint _numWhiteListBonus,
        bool _allotOwnedTokenQuantity,
        bool _isWhiteListBonusAggregatedAcrossAllWhiteLists
    )external onlyRole(DEFAULT_ADMIN_ROLE) {
        TokenPackConfig storage tokenPackConfig = tokens[_tokenIndex].tokenPackConfig;
        tokens[_tokenIndex].isTokenPack = _isTokenPack;
        tokenPackConfig.packTokens = _packTokens;
        tokenPackConfig.isRandomPack = _isRandomPack;
        tokenPackConfig.numRandom = _numRandom;
        tokenPackConfig.numWhiteListBonus = _numWhiteListBonus;
        tokenPackConfig.allotOwnedTokenQuantity = _allotOwnedTokenQuantity;
        tokenPackConfig.isWhiteListBonusAggregatedAcrossAllWhiteLists = _isWhiteListBonusAggregatedAcrossAllWhiteLists;
        
    }

    function addWhiteList(
         uint256 _tokenIndex,
         string memory _tokenType,
         address _tokenAddress,
         uint _tokenId,
         uint _mustOwnQuantity
    )external onlyRole(DEFAULT_ADMIN_ROLE) {
        Whitelist storage whitelist = tokens[_tokenIndex].whitelistData[tokens[_tokenIndex].numTokenWhitelists];
        whitelist.tokenType = _tokenType;
        whitelist.tokenId = _tokenId;
        whitelist.active = true;
        whitelist.tokenAddress = _tokenAddress;
        whitelist.mustOwnQuantity = _mustOwnQuantity;
        tokens[_tokenIndex].numTokenWhitelists = tokens[_tokenIndex].numTokenWhitelists + 1;
    }

     function disableWhiteList(
       uint256 _tokenIndex,
       uint _whiteListIndexToRemove
    )external onlyRole(DEFAULT_ADMIN_ROLE) {
        tokens[_tokenIndex].whitelistData[_whiteListIndexToRemove].active = false;
    }

   function editTokenWhiteListMerkleRoot(
       uint256 _tokenIndex,
        bytes32 _merkleRoot,
        bool enabled
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        tokens[_tokenIndex].whiteListConfig.merkleRoot = _merkleRoot;
        tokens[_tokenIndex].whiteListConfig.hasMerkleRoot = enabled;
    } 

   
     function burnFromRedeem(
        address account, 
        uint256 tokenIndex, 
        uint256 amount
    ) external {
        Token storage token = tokens[tokenIndex];
        bool hasValidRedemptionContract = false;
         if(token.numRedeemableContracts > 0){
            for (uint i=0; i < token.numRedeemableContracts; i++) {
                if(token.redeemableContracts[i] == msg.sender){
                    hasValidRedemptionContract = true;
                }
            }
        }
        require(hasValidRedemptionContract, "1");
        _burn(account, tokenIndex, amount);
    }  

    function purchase(
        uint256[] calldata _quantities,
        uint256[] calldata _tokenIndexes,
        uint256[] calldata _merkleAmounts,
        bytes32[][] calldata _merkleProofs
    ) external payable nonReentrant {
        uint256 totalPrice = 0;
        for (uint i=0; i< _tokenIndexes.length; i++) {
            require(isSaleOpen(_tokenIndexes[i]), "5");
            require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= _merkleAmounts[i], "8");
            require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet, "9");
            require(_quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn, "10");
            require(getTokenSupply(_tokenIndexes[i]) + _quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxSupply, "11");
            totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice));
        }
        require(!paused() && msg.value >= totalPrice, "3");
        for (uint i=0; i< _tokenIndexes.length; i++) {
            
            uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); 
            require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4");
        
            uint256[] memory idsToMint;
            uint256[] memory quantitiesToMint;
            if(tokens[_tokenIndexes[i]].isTokenPack){
                quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], false); 
                for (uint j=0; j < _quantities[i]; j++) {
                    uint256[] memory inStockTokens = filterInStockTokensFromPack(tokens[_tokenIndexes[i]].tokenPackConfig, j);
                    if(tokens[_tokenIndexes[i]].tokenPackConfig.isRandomPack){
                        idsToMint = new uint256[](quantityToMint);
                        quantitiesToMint = new uint256[](quantityToMint);
                        uint startingIndex = 0;
                        uint q = 0;
                        while(q < quantityToMint) {
                            idsToMint[q] = inStockTokens[startingIndex];
                            quantitiesToMint[q] = 1;
                            
                            if(startingIndex < inStockTokens.length - 1){
                                startingIndex = startingIndex + 1;
                            }
                            else{
                                startingIndex = 0;
                            }
                            q = q + 1;
                        }     

                    
                    }
                    else{
                        idsToMint = new uint256[](inStockTokens.length);
                        for (uint q=0; q < inStockTokens.length; q++) {
                            idsToMint[q] = inStockTokens[q];
                            quantitiesToMint[q] = 1;
                        }  
                    }
                    _mintBatch(msg.sender, idsToMint, quantitiesToMint, "");
                    emit Purchased(idsToMint, msg.sender, quantitiesToMint);
                    tokens[_tokenIndexes[i]].mintingConfig.numMinted = tokens[_tokenIndexes[i]].mintingConfig.numMinted + 1;

                    
                }
            }
            else{
                idsToMint = new uint256[](1);
                idsToMint[0] =  _tokenIndexes[i];
                quantitiesToMint = new uint256[](1);
                quantitiesToMint[0] = _quantities[i];
                _mintBatch(msg.sender, idsToMint, quantitiesToMint, "");
                emit Purchased(idsToMint, msg.sender, quantitiesToMint);
            }
            tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]);
            
        }
    }
     function filterInStockTokensFromPack(TokenPackConfig memory tokenPackConfig, uint seed) internal view returns(uint256[] memory){
        tokenPackConfig.packTokens = Utils.shuffle(tokenPackConfig.packTokens, false, seed);
        uint256[] memory inStockTokens;
        uint totalInStock = 0;
        for (uint i=0; i < tokenPackConfig.packTokens.length; i++) {
              if(getTokenSupply(tokenPackConfig.packTokens[i]) < tokens[tokenPackConfig.packTokens[i]].mintingConfig.maxSupply){
                 totalInStock++;
             }
         }
        inStockTokens = new uint256[](totalInStock);
        uint startingIndex = 0;
        for (uint i=0; i < tokenPackConfig.packTokens.length; i++) {
            if(getTokenSupply(tokenPackConfig.packTokens[i]) < tokens[tokenPackConfig.packTokens[i]].mintingConfig.maxSupply){
                inStockTokens[startingIndex] = tokenPackConfig.packTokens[i];
                startingIndex++;
            }
         }
        return inStockTokens;
    }

    
    function mintBatch(
        address to,
        uint256[] calldata qty,
        uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _mintBatch(to, _tokens, qty, "");
    }

     function getQualifiedAllocation(address sender, 
        uint256 tokenIndex,
        uint256 quantity,
        uint256 amount,
        bytes32[] calldata merkleProof,
        bool returnAllocationOnly) public view returns (uint256) {
        
        Token storage token = tokens[tokenIndex];

        uint256 totalAllowed = token.mintingConfig.maxPerWallet;
        if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){
            totalAllowed = 0;
        }

        uint256 whiteListsValidAmounts = 0;
        if(token.numTokenWhitelists > 0){
            uint256 balance = 0;
            uint256 _wl_amount = 0;
            for (uint i=0; i < token.numTokenWhitelists; i++) {
                if(token.whitelistData[i].active){
                
                    _wl_amount = verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly);
                    
                    if(token.whiteListConfig.requireAllWhiteLists){
                        require( verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly) > 0, "12");
                    }
                    
                    if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){
                        Whitelist memory balanceRequest;
                        balanceRequest.tokenType = token.whitelistData[i].tokenType;
                        balanceRequest.tokenAddress = token.whitelistData[i].tokenAddress;
                        balanceRequest.tokenId = token.whitelistData[i].tokenId;
                        balance = getExternalTokenBalance(sender, balanceRequest);
                        totalAllowed += balance;
                        whiteListsValidAmounts += balance;
                        
                    }
                    else{
                        whiteListsValidAmounts = _wl_amount;
                    }
                }
               
            }
        }
        else{
            whiteListsValidAmounts = token.mintingConfig.maxMintPerTxn;
        }

        if(!returnAllocationOnly){
            require(whiteListsValidAmounts > 0, "13");

            if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){
            require(token.claimedTokens[sender].add(quantity) <= totalAllowed, "14");
            }
        }
       

        if(token.whiteListConfig.hasMerkleRoot){
             require(
                verifyMerkleProof(merkleProof, tokenIndex, amount),
                "15" 
            ); 
            //whiteListsValidAmounts += quantity;
        }
        
        if(returnAllocationOnly){
            return whiteListsValidAmounts < quantity ? whiteListsValidAmounts : quantity;
        }
        else{
            return whiteListsValidAmounts;
        }
       
         

    }

    function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) {
       
       uint256 isValid = 0;
       uint256 balanceOf = 0;
       Token storage token = tokens[tokenIndex];
       Whitelist memory balanceRequest;
       balanceRequest.tokenType = token.whitelistData[whitelistIndex].tokenType;
       balanceRequest.tokenAddress = token.whitelistData[whitelistIndex].tokenAddress;
       balanceRequest.tokenId = token.whitelistData[whitelistIndex].tokenId;
       balanceOf = getExternalTokenBalance(sender, balanceRequest);
       bool meetsWhiteListReqs = (balanceOf >= token.whitelistData[whitelistIndex].mustOwnQuantity);
        if(token.isTokenPack && !returnAllocationOnly){
            if(token.tokenPackConfig.isRandomPack){
                isValid = isValid + token.tokenPackConfig.numRandom;
            }
            else{
                isValid = isValid + token.tokenPackConfig.packTokens.length;
            }

            if(token.tokenPackConfig.numWhiteListBonus > 0 && meetsWhiteListReqs){
                isValid = isValid + token.tokenPackConfig.numWhiteListBonus;
            }
            
        }
        else if(token.isTokenPack && token.tokenPackConfig.allotOwnedTokenQuantity && meetsWhiteListReqs){
            isValid = balanceOf;
            
        }
        else if(!token.isTokenPack && token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){
            isValid = balanceOf;
        
        }
        else if( meetsWhiteListReqs){
            isValid = token.mintingConfig.maxMintPerTxn;
        }

        if(isValid == 0 && !token.whiteListConfig.requireAllWhiteLists){
            isValid = token.mintingConfig.maxMintPerTxn;
        }
        return isValid;
    }


    function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) {
        if(Utils.compareStrings(balanceRequest.tokenType, "ERC721")){
            WhitelistContract721 _contract = WhitelistContract721(balanceRequest.tokenAddress);
            return _contract.balanceOf(sender);
        }
        else if(Utils.compareStrings(balanceRequest.tokenType, "ERC1155")){
            WhitelistContract1155 _contract = WhitelistContract1155(balanceRequest.tokenAddress);
            return _contract.balanceOf(sender, balanceRequest.tokenId);
        }
    }

    function isSaleOpen(uint256 tokenIndex) public view returns (bool) {
        Token storage token = tokens[tokenIndex];
        if(paused()){
            return false;
        }
        if(block.timestamp > token.mintingConfig.windowOpens && block.timestamp < token.mintingConfig.windowCloses){
            return token.mintingConfig.saleIsOpen;
        }
        return false;
        
    }

    function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) {
        tokens[mpIndex].mintingConfig.saleIsOpen = on;
    }


    function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) {
        if(!tokens[mpIndex].whiteListConfig.hasMerkleRoot){
            return true;
        }
        string memory leaf = Utils.makeLeaf(msg.sender, amount);
        bytes32 node = keccak256(abi.encode(leaf));
        return MerkleProof.verify(merkleProof, tokens[mpIndex].whiteListConfig.merkleRoot, node);
    }


    function char(bytes1 b) internal view returns (bytes1 c) {
        if (uint8(b) < 10) return bytes1(uint8(b) + 0x30);
        else return bytes1(uint8(b) + 0x57);
    }
    
    function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
    {
        _to.transfer(_amount);
    }

    function uri(uint256 _id) public view override returns (string memory) {
        require(getTokenSupply(_id) > 0, "16");
        if(Utils.compareStrings(tokens[_id].ipfsMetadataHash, "")){
            return string(abi.encodePacked(super.uri(_id), Strings.toString(_id)));
        }
        else{
            return string(abi.encodePacked(tokens[_id].ipfsMetadataHash));
        }   
    } 

    

     function getTokenSupply(uint256 tokenIndex) public view returns (uint256) {
         Token storage token = tokens[tokenIndex];
        return token.isTokenPack ? token.mintingConfig.numMinted : totalSupply(tokenIndex);
    }
}
contract WhitelistContract1155 {
    function balanceOf(address account, uint256 id) external view returns (uint256) {}
}
contract WhitelistContract721 {
    function balanceOf(address account) external view returns (uint256) {}
 }

File 2 of 22 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 22 : ERC1155.sol
// SPDX-License-Identifier: MIT

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: balance query for the zero address");
        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 {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 owner nor 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: transfer caller is not owner nor 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();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), 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);

        _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);

        _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 `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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);

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

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

        emit TransferSingle(operator, account, address(0), id, amount);
    }

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

        address operator = _msgSender();

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

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

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

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @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 `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 _beforeTokenTransfer(
        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 4 of 22 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
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) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 5 of 22 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 6 of 22 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 7 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 22 : Abstract1155Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol';
import '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol';
import '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol';


abstract contract Abstract1155Factory is AccessControl, ERC1155Pausable, ERC1155Supply, ERC1155Burnable, Ownable {
    
    string public name_;
    string public symbol_;

    
    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }    

    function setURI(string memory baseURI) external onlyOwner {
        _setURI(baseURI);
    }    

    function name() public view returns (string memory) {
        return name_;
    }

    function symbol() public view returns (string memory) {
        return symbol_;
    }          

    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual override(ERC1155, ERC1155Supply) {
        super._mint(account, id, amount, data);
    }

    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override(ERC1155, ERC1155Supply) {
        super._mintBatch(to, ids, amounts, data);
    }

    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual override(ERC1155, ERC1155Supply) {
        super._burn(account, id, amount);
    }

    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual override(ERC1155, ERC1155Supply) {
        super._burnBatch(account, ids, amounts);
    }  

    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override(ERC1155Pausable, ERC1155) {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
    }  

    function setOwner(address _addr) public onlyOwner {
        transferOwnership(_addr);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
   function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

}

File 9 of 22 : Utils.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @author: @props

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


/**
 * @title Library of utility functions.
 */
library Utils {

  /**
  * @notice isUnique iterates over all elements in an array to determine whether or 
  * not it contains repeated values. Returns false if a repeated value is found.
  * @param items the array of items to evaluate
  * @return true if the array does not contain repeated items, false if not
  * @dev We use for loops instead of storage based constructs because doing so
  * allows comparison to be run entirely in memory and therefore saves gas.
  */
  function isUnique(uint256[] memory items) internal pure returns (bool) {
      for (uint i = 0; i < items.length; i++) {
          for (uint k = i + 1; k < items.length; k++) {
              if (items[i] == items[k]) {
                  return false;
              }
          }
      }
      return true;
  }


    function compareStrings(string memory a, string memory b) internal view returns (bool) {
        return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));
    }

  function makeLeaf(address _addr, uint amount) internal pure returns (string memory) {
      return string(abi.encodePacked(toAsciiString(_addr), "_", Strings.toString(amount)));
  }

  function toAsciiString(address x) internal pure returns (string memory) {
      bytes memory s = new bytes(40);
      for (uint i = 0; i < 20; i++) {
          bytes1 b = bytes1(uint8(uint(uint160(x)) / (2**(8*(19 - i)))));
          bytes1 hi = bytes1(uint8(b) / 16);
          bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));
          s[2*i] = toChar(hi);
          s[2*i+1] = toChar(lo);            
      }
      return string(s);
  }

  function shuffle(uint256[] memory numberArr, bool returnRandomIndex, uint seed) internal view returns(uint256[] memory){
        if(!returnRandomIndex){
             for (uint256 i = 0; i < numberArr.length; i++) {
                uint256 n = i + uint256(keccak256(abi.encodePacked(block.timestamp, msg.sender, seed))) % (numberArr.length - i);
                uint256 temp = numberArr[n];
                numberArr[n] = numberArr[i];
                numberArr[i] = temp;
            }
        }
        else{
            uint randomHash = uint(keccak256(abi.encodePacked(block.timestamp, msg.sender, seed))) % numberArr.length;
            uint256[] memory retNumberArr = new uint256[](1);
            retNumberArr[0] = numberArr[randomHash];
            numberArr = retNumberArr;
        }
       
        return numberArr;
    }

  /**
  * @notice toChar converts a byte array to characters.
  * @param b bytes to convert characters
  * @return bytes character
  * @dev We use for loops instead of storage based constructs because doing so
  * allows comparison to be run entirely in memory and therefore saves gas.
  */
  function toChar(bytes1 b) internal pure returns (bytes1) {
      if (uint8(b) < 10) return bytes1(uint8(b) + 0x30);
      else return bytes1(uint8(b) + 0x57);
  }


}

File 10 of 22 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 11 of 22 : Context.sol
// SPDX-License-Identifier: MIT

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 12 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT

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 13 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT

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 14 of 22 : IERC1155.sol
// SPDX-License-Identifier: MIT

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 be 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 22 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

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.
        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. 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 16 of 22 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

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 17 of 22 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 18 of 22 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 19 of 22 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 20 of 22 : ERC1155Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC1155.sol";
import "../../../security/Pausable.sol";

/**
 * @dev ERC1155 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Pausable is ERC1155, Pausable {
    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    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);

        require(!paused(), "ERC1155Pausable: token transfer while paused");
    }
}

File 21 of 22 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates weither any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_mint}.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual override {
        super._mint(account, id, amount, data);
        _totalSupply[id] += amount;
    }

    /**
     * @dev See {ERC1155-_mintBatch}.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._mintBatch(to, ids, amounts, data);
        for (uint256 i = 0; i < ids.length; ++i) {
            _totalSupply[ids[i]] += amounts[i];
        }
    }

    /**
     * @dev See {ERC1155-_burn}.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual override {
        super._burn(account, id, amount);
        _totalSupply[id] -= amount;
    }

    /**
     * @dev See {ERC1155-_burnBatch}.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual override {
        super._burnBatch(account, ids, amounts);
        for (uint256 i = 0; i < ids.length; ++i) {
            _totalSupply[ids[i]] -= amounts[i];
        }
    }
}

File 22 of 22 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address[]","name":"_admins","type":"address[]"},{"internalType":"string","name":"_contract_URI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"index","type":"uint256[]"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"Purchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"string","name":"_tokenType","type":"string"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_mustOwnQuantity","type":"uint256"}],"name":"addWhiteList","outputs":[],"stateMutability":"nonpayable","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":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenIndex","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFromRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"bool","name":"_isTokenPack","type":"bool"},{"internalType":"uint256[]","name":"_packTokens","type":"uint256[]"},{"internalType":"bool","name":"_isRandomPack","type":"bool"},{"internalType":"uint256","name":"_numRandom","type":"uint256"},{"internalType":"uint256","name":"_numWhiteListBonus","type":"uint256"},{"internalType":"bool","name":"_allotOwnedTokenQuantity","type":"bool"},{"internalType":"bool","name":"_isWhiteListBonusAggregatedAcrossAllWhiteLists","type":"bool"}],"name":"configTokenPack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"uint256","name":"_whiteListIndexToRemove","type":"uint256"}],"name":"disableWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"string","name":"_ipfsMetadataHash","type":"string"},{"internalType":"string","name":"_extraDataUri","type":"string"},{"internalType":"uint256","name":"_windowOpens","type":"uint256"},{"internalType":"uint256","name":"_windowCloses","type":"uint256"},{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxMintPerTxn","type":"uint256"},{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"},{"internalType":"bool","name":"_maxQuantityMappedByWhitelistHoldings","type":"bool"},{"internalType":"bool","name":"_requireAllWhiteLists","type":"bool"},{"internalType":"address[]","name":"_redeemableContracts","type":"address[]"}],"name":"editToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"editTokenWhiteListMerkleRoot","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":"address","name":"sender","type":"address"},{"components":[{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"mustOwnQuantity","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct Commerce.Whitelist","name":"balanceRequest","type":"tuple"}],"name":"getExternalTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOpenSaleTokens","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenIndex","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"bool","name":"returnAllocationOnly","type":"bool"}],"name":"getQualifiedAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"name":"getTokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"uint256","name":"tokenIndex","type":"uint256"}],"name":"isSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"qty","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokenIndexes","type":"uint256[]"},{"internalType":"uint256[]","name":"_merkleAmounts","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_merkleProofs","type":"bytes32[][]"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","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":"id","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":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"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":[],"name":"symbol_","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mpIndex","type":"uint256"},{"internalType":"bool","name":"on","type":"bool"}],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"string","name":"ipfsMetadataHash","type":"string"},{"internalType":"string","name":"extraDataUri","type":"string"},{"internalType":"uint256","name":"numRedeemableContracts","type":"uint256"},{"internalType":"uint256","name":"numTokenWhitelists","type":"uint256"},{"components":[{"internalType":"bool","name":"saleIsOpen","type":"bool"},{"internalType":"uint256","name":"windowOpens","type":"uint256"},{"internalType":"uint256","name":"windowCloses","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"uint256","name":"maxMintPerTxn","type":"uint256"},{"internalType":"uint256","name":"numMinted","type":"uint256"}],"internalType":"struct Commerce.MintingConfig","name":"mintingConfig","type":"tuple"},{"components":[{"internalType":"bool","name":"maxQuantityMappedByWhitelistHoldings","type":"bool"},{"internalType":"bool","name":"requireAllWhiteLists","type":"bool"},{"internalType":"bool","name":"hasMerkleRoot","type":"bool"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct Commerce.WhiteListConfig","name":"whiteListConfig","type":"tuple"},{"internalType":"bool","name":"isTokenPack","type":"bool"},{"components":[{"internalType":"uint256[]","name":"packTokens","type":"uint256[]"},{"internalType":"bool","name":"isRandomPack","type":"bool"},{"internalType":"uint256","name":"numRandom","type":"uint256"},{"internalType":"uint256","name":"numWhiteListBonus","type":"uint256"},{"internalType":"bool","name":"allotOwnedTokenQuantity","type":"bool"},{"internalType":"bool","name":"isWhiteListBonusAggregatedAcrossAllWhiteLists","type":"bool"}],"internalType":"struct Commerce.TokenPackConfig","name":"tokenPackConfig","type":"tuple"}],"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":[],"name":"unpause","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":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"mpIndex","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"verifyMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200652b3803806200652b83398101604081905262000034916200037c565b604080518082019091526007815266697066733a2f2f60c81b60208201526200005d8162000131565b506004805460ff1916905562000073336200014a565b600160095583516200008d90600790602087019062000245565b508251620000a390600890602086019062000245565b50620000b16000336200019c565b60005b82518110156200011057620000fb6000801b848381518110620000e757634e487b7160e01b600052603260045260246000fd5b60200260200101516200019c60201b60201c565b80620001078162000527565b915050620000b4565b5080516200012690600b90602084019062000245565b505050505062000565565b80516200014690600390602084019062000245565b5050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828152602081815260408083206001600160a01b038516845290915290205462000146908390839060ff1662000146576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280546200025390620004ea565b90600052602060002090601f016020900481019282620002775760008555620002c2565b82601f106200029257805160ff1916838001178555620002c2565b82800160010185558215620002c2579182015b82811115620002c2578251825591602001919060010190620002a5565b50620002d0929150620002d4565b5090565b5b80821115620002d05760008155600101620002d5565b600082601f830112620002fc578081fd5b81516001600160401b038111156200031857620003186200054f565b60206200032e601f8301601f19168201620004b7565b828152858284870101111562000342578384fd5b835b838110156200036157858101830151828201840152820162000344565b838111156200037257848385840101525b5095945050505050565b6000806000806080858703121562000392578384fd5b84516001600160401b0380821115620003a9578586fd5b620003b788838901620002eb565b9550602091508187015181811115620003ce578586fd5b620003dc89828a01620002eb565b955050604087015181811115620003f1578485fd5b8701601f8101891362000402578485fd5b8051828111156200041757620004176200054f565b8060051b62000428858201620004b7565b8281528581019084870183860188018e10156200044357898afd5b8995505b848610156200047f57805193506001600160a01b03841684146200046957898afd5b8383526001959095019491870191870162000447565b50809850505050505060608701519150808211156200049c578283fd5b50620004ab87828801620002eb565b91505092959194509250565b604051601f8201601f191681016001600160401b0381118282101715620004e257620004e26200054f565b604052919050565b600181811c90821680620004ff57607f821691505b602082108114156200052157634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200054857634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b615fb680620005756000396000f3fe6080604052600436106102925760003560e01c80636b20c4541161015a578063bd85b039116100c1578063dd66489e1161007a578063dd66489e146107e6578063e2b9e18614610806578063e985e9c51461081b578063f242432a14610864578063f2fde38b14610884578063f5298aca146108a457600080fd5b8063bd85b03914610724578063c0e7274014610751578063d547741f14610766578063d5ebd78814610786578063d6b15c4c146107a6578063d81d0a15146107c657600080fd5b806391d148541161011357806391d148541461068557806395d89b41146106a5578063a217fddf146106ba578063a22cb465146106cf578063a8afbca1146106ef578063af17dea61461070f57600080fd5b80636b20c454146105e05780637076574614610600578063715018a6146106135780637d737203146106285780638456cb59146106485780638da5cb5b1461065d57600080fd5b806336568abe116101fe5780634e1273f4116101b75780634e1273f4146105035780634f558e79146105305780634f64b2be1461055f578063522f681514610593578063589b2162146105b35780635c975abb146105c857600080fd5b806336568abe1461044e5780633a4da7291461046e5780633aeca2101461048e5780633c70c771146104ae5780633f4ba83a146104ce5780634044556d146104e357600080fd5b806313af40351161025057806313af40351461037e57806319b88edb1461039e578063227f951c146103be578063248a9ca3146103de5780632eb2c2d61461040e5780632f2ff15d1461042e57600080fd5b8062fdd58e1461029757806301ffc9a7146102ca57806302fe5305146102fa578063065eb1171461031c57806306fdde031461033c5780630e89341c1461035e575b600080fd5b3480156102a357600080fd5b506102b76102b2366004614f48565b6108c4565b6040519081526020015b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046151b7565b610960565b60405190151581526020016102c1565b34801561030657600080fd5b5061031a6103153660046151ef565b61096b565b005b34801561032857600080fd5b5061031a610337366004615239565b6109a1565b34801561034857600080fd5b506103516109d1565b6040516102c19190615818565b34801561036a57600080fd5b5061035161037936600461517b565b610a63565b34801561038a57600080fd5b5061031a610399366004614bd9565b610bb5565b3480156103aa57600080fd5b506102b76103b936600461517b565b610be8565b3480156103ca57600080fd5b506102b76103d9366004614e8c565b610c23565b3480156103ea57600080fd5b506102b76103f936600461517b565b60009081526020819052604090206001015490565b34801561041a57600080fd5b5061031a610429366004614c58565b610d4e565b34801561043a57600080fd5b5061031a610449366004615193565b610de5565b34801561045a57600080fd5b5061031a610469366004615193565b610e10565b34801561047a57600080fd5b5061031a61048936600461525b565b610e8e565b34801561049a57600080fd5b5061031a6104a9366004614f5a565b610f21565b3480156104ba57600080fd5b506102ea6104c936600461506f565b610fc1565b3480156104da57600080fd5b5061031a61107c565b3480156104ef57600080fd5b506102ea6104fe36600461517b565b6110b0565b34801561050f57600080fd5b5061052361051e36600461500f565b611103565b6040516102c191906157d7565b34801561053c57600080fd5b506102ea61054b36600461517b565b600090815260056020526040902054151590565b34801561056b57600080fd5b5061057f61057a36600461517b565b611264565b6040516102c198979695949392919061582b565b34801561059f57600080fd5b5061031a6105ae366004614bf5565b6114f6565b3480156105bf57600080fd5b50610351611556565b3480156105d457600080fd5b5060045460ff166102ea565b3480156105ec57600080fd5b5061031a6105fb366004614de6565b6115e0565b61031a61060e3660046150bd565b611623565b34801561061f57600080fd5b5061031a6123a5565b34801561063457600080fd5b5061031a61064336600461548d565b6123d9565b34801561065457600080fd5b5061031a612410565b34801561066957600080fd5b506006546040516001600160a01b0390911681526020016102c1565b34801561069157600080fd5b506102ea6106a0366004615193565b612442565b3480156106b157600080fd5b5061035161246b565b3480156106c657600080fd5b506102b7600081565b3480156106db57600080fd5b5061031a6106ea366004614e58565b61247a565b3480156106fb57600080fd5b5061031a61070a366004615391565b612551565b34801561071b57600080fd5b5061035161269a565b34801561073057600080fd5b506102b761073f36600461517b565b60009081526005602052604090205490565b34801561075d57600080fd5b50610351612728565b34801561077257600080fd5b5061031a610781366004615193565b612735565b34801561079257600080fd5b5061031a6107a13660046152f5565b61275b565b3480156107b257600080fd5b506102b76107c1366004614f8e565b61279c565b3480156107d257600080fd5b5061031a6107e1366004614d67565b612aa5565b3480156107f257600080fd5b5061031a610801366004615329565b612b35565b34801561081257600080fd5b50610351612bea565b34801561082757600080fd5b506102ea610836366004614c20565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b34801561087057600080fd5b5061031a61087f366004614d01565b612bf7565b34801561089057600080fd5b5061031a61089f366004614bd9565b612c3c565b3480156108b057600080fd5b5061031a6108bf366004614f5a565b612cd4565b60006001600160a01b0383166109355760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b600061095a82612d17565b6006546001600160a01b031633146109955760405162461bcd60e51b815260040161092c90615abb565b61099e81612d57565b50565b60006109ad8133612d6a565b506000918252600a6020526040909120600701805460ff1916911515919091179055565b6060600780546109e090615dbd565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0c90615dbd565b8015610a595780601f10610a2e57610100808354040283529160200191610a59565b820191906000526020600020905b815481529060010190602001808311610a3c57829003601f168201915b5050505050905090565b60606000610a7083610be8565b11610aa25760405162461bcd60e51b8152602060048201526002602482015261189b60f11b604482015260640161092c565b6000828152600a602052604090208054610b539190610ac090615dbd565b80601f0160208091040260200160405190810160405280929190818152602001828054610aec90615dbd565b8015610b395780601f10610b0e57610100808354040283529160200191610b39565b820191906000526020600020905b815481529060010190602001808311610b1c57829003601f168201915b505050505060405180602001604052806000815250612dce565b15610b9157610b6182612e27565b610b6a83612ebb565b604051602001610b7b929190615589565b6040516020818303038152906040529050919050565b6000828152600a60209081526040918290209151610b7b92910161562f565b919050565b6006546001600160a01b03163314610bdf5760405162461bcd60e51b815260040161092c90615abb565b61099e81612c3c565b6000818152600a60205260408120601181015460ff16610c1657600083815260056020526040902054610c1c565b600e8101545b9392505050565b6000610c5182600001516040518060400160405280600681526020016545524337323160d01b815250612dce565b15610cdd5760208201516040516370a0823160e01b81526001600160a01b0385811660048301528216906370a08231906024015b60206040518083038186803b158015610c9d57600080fd5b505afa158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd59190615221565b91505061095a565b610d0a8260000151604051806040016040528060078152602001664552433131353560c81b815250612dce565b1561095a5760208201516060830151604051627eeac760e11b81526001600160a01b03868116600483015260248201929092529082169062fdd58e90604401610c85565b6001600160a01b038516331480610d6a5750610d6a8533610836565b610dd15760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161092c565b610dde8585858585612fd4565b5050505050565b600082815260208190526040902060010154610e018133612d6a565b610e0b8383613195565b505050565b6001600160a01b0381163314610e805760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161092c565b610e8a8282613219565b5050565b6000610e9a8133612d6a565b6000898152600a6020908152604090912060118101805460ff19168b15151790558851601290910191610ed19183918b0190614921565b5060018101805460ff19169715159790971790965550600285019390935560038401919091556004909201805461ffff191692151561ff0019169290921761010091151591909102179055505050565b6000828152600a60205260408120600481015490919015610f855760005b8260040154811015610f835760008181526003840160205260409020546001600160a01b0316331415610f7157600191505b80610f7b81615e43565b915050610f3f565b505b80610fb65760405162461bcd60e51b81526020600482015260016024820152603160f81b604482015260640161092c565b610dde85858561327e565b6000828152600a60205260408120600f015462010000900460ff16610fe857506001611074565b6000610ff43384613289565b90506000816040516020016110099190615818565b60405160208183030381529060405280519060200120905061106f87878080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152600a602052604090206010015492508591506132c59050565b925050505b949350505050565b6006546001600160a01b031633146110a65760405162461bcd60e51b815260040161092c90615abb565b6110ae613382565b565b6000818152600a6020526040812060045460ff16156110d25750600092915050565b6008810154421180156110e85750600981015442105b156110fa576007015460ff1692915050565b50600092915050565b606081518351146111685760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161092c565b600083516001600160401b0381111561119157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111ba578160200160208202803683370190505b50905060005b845181101561125c576112218582815181106111ec57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061121457634e487b7160e01b600052603260045260246000fd5b60200260200101516108c4565b82828151811061124157634e487b7160e01b600052603260045260246000fd5b602090810291909101015261125581615e43565b90506111c0565b509392505050565b600a6020526000908152604090208054819061127f90615dbd565b80601f01602080910402602001604051908101604052809291908181526020018280546112ab90615dbd565b80156112f85780601f106112cd576101008083540402835291602001916112f8565b820191906000526020600020905b8154815290600101906020018083116112db57829003601f168201915b50505050509080600101805461130d90615dbd565b80601f016020809104026020016040519081016040528092919081815260200182805461133990615dbd565b80156113865780601f1061135b57610100808354040283529160200191611386565b820191906000526020600020905b81548152906001019060200180831161136957829003601f168201915b5050505060048301546006840154604080516101008082018352600788015460ff90811615158352600889015460208085019190915260098a015484860152600a8a0154606080860191909152600b8b0154608080870191909152600c8c015460a0870152600d8c015460c080880191909152600e8d015460e08089019190915288519283018952600f8e015480871615158452968704861615158386015262010000909604851615158289015260108d01549282019290925260118c0154875160128e018054958602820188019099529283018481529b9c999b989a5095989097959093169592949093849284918401828280156114a457602002820191906000526020600020905b815481526020019060010190808311611490575b5050509183525050600182015460ff908116151560208301526002830154604083015260038301546060830152600490920154808316151560808301526101009004909116151560a090910152905088565b6006546001600160a01b031633146115205760405162461bcd60e51b815260040161092c90615abb565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610e0b573d6000803e3d6000fd5b60408051602081019091526000808252606091905b6000818152600a6020526040902080546115899190610ac090615dbd565b6115da57611596816110b0565b156115c857816115a582612ebb565b6040516020016115b69291906155b8565b60405160208183030381529060405291505b806115d281615e43565b91505061156b565b50919050565b6001600160a01b0383163314806115fc57506115fc8333610836565b6116185760405162461bcd60e51b815260040161092c906159a0565b610e0b838383613415565b600260095414156116765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161092c565b60026009556000805b86811015611a55576116b68888838181106116aa57634e487b7160e01b600052603260045260246000fd5b905060200201356110b0565b6116e65760405162461bcd60e51b81526020600482015260016024820152603560f81b604482015260640161092c565b85858281811061170657634e487b7160e01b600052603260045260246000fd5b9050602002013561178b8b8b8481811061173057634e487b7160e01b600052603260045260246000fd5b90506020020135600a60008c8c8781811061175b57634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250818101929092526040908101600090812033825260020190925290205490613420565b11156117bd5760405162461bcd60e51b81526020600482015260016024820152600760fb1b604482015260640161092c565b600a60008989848181106117e157634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600501546118208b8b8481811061173057634e487b7160e01b600052603260045260246000fd5b11156118525760405162461bcd60e51b81526020600482015260016024820152603960f81b604482015260640161092c565b600a600089898481811061187657634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600601548a8a838181106118b257634e487b7160e01b600052603260045260246000fd5b9050602002013511156118ec5760405162461bcd60e51b8152602060048201526002602482015261031360f41b604482015260640161092c565b600a600089898481811061191057634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600401548a8a8381811061194c57634e487b7160e01b600052603260045260246000fd5b905060200201356119828a8a8581811061197657634e487b7160e01b600052603260045260246000fd5b90506020020135610be8565b61198c9190615ba2565b11156119bf5760405162461bcd60e51b8152602060048201526002602482015261313160f01b604482015260640161092c565b611a41611a3a600a60008b8b868181106119e957634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600301548c8c85818110611a2557634e487b7160e01b600052603260045260246000fd5b9050602002013561342c90919063ffffffff16565b8390613420565b915080611a4d81615e43565b91505061167f565b5060045460ff16158015611a695750803410155b611a995760405162461bcd60e51b81526020600482015260016024820152603360f81b604482015260640161092c565b60005b86811015612394576000611b58338a8a85818110611aca57634e487b7160e01b600052603260045260246000fd5b905060200201358d8d86818110611af157634e487b7160e01b600052603260045260246000fd5b905060200201358a8a87818110611b1857634e487b7160e01b600052603260045260246000fd5b90506020020135898988818110611b3f57634e487b7160e01b600052603260045260246000fd5b9050602002810190611b519190615b38565b600161279c565b9050600081118015611b9057508a8a83818110611b8557634e487b7160e01b600052603260045260246000fd5b905060200201358110155b611bc05760405162461bcd60e51b81526020600482015260016024820152600d60fa1b604482015260640161092c565b606080600a60008c8c87818110611be757634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000206011015460ff161561219957611cbe338c8c87818110611c3057634e487b7160e01b600052603260045260246000fd5b905060200201358f8f88818110611c5757634e487b7160e01b600052603260045260246000fd5b905060200201358c8c89818110611c7e57634e487b7160e01b600052603260045260246000fd5b905060200201358b8b8a818110611ca557634e487b7160e01b600052603260045260246000fd5b9050602002810190611cb79190615b38565b600061279c565b925060005b8d8d86818110611ce357634e487b7160e01b600052603260045260246000fd5b90506020020135811015612193576000611ddf600a60008f8f8a818110611d1a57634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000206012016040518060c001604052908160008201805480602002602001604051908101604052809291908181526020018280548015611d8c57602002820191906000526020600020905b815481526020019060010190808311611d78575b5050509183525050600182015460ff908116151560208301526002830154604083015260038301546060830152600490920154808316151560808301526101009004909116151560a09091015283613438565b9050600a60008e8e89818110611e0557634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000206013015460ff1615611fa157846001600160401b03811115611e5057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e79578160200160208202803683370190505b509350846001600160401b03811115611ea257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ecb578160200160208202803683370190505b5092506000805b86811015611f9a57828281518110611efa57634e487b7160e01b600052603260045260246000fd5b6020026020010151868281518110611f2257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506001858281518110611f5057634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060018351611f6a9190615d40565b821015611f8357611f7c826001615ba2565b9150611f88565b600091505b611f93816001615ba2565b9050611ed2565b5050612095565b80516001600160401b03811115611fc857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ff1578160200160208202803683370190505b50935060005b81518110156120935781818151811061202057634e487b7160e01b600052603260045260246000fd5b602002602001015185828151811061204857634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600184828151811061207657634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061208b81615e43565b915050611ff7565b505b6120b03385856040518060200160405280600081525061364e565b336001600160a01b03167fb19a0e54a0d12c649f962287d12e0573df3d188f5fcad44083dd0a11e759bcc585856040516120eb9291906157ea565b60405180910390a2600a60008e8e8981811061211757634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002060070160070154600161213f9190615ba2565b600a60008f8f8a81811061216357634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250810191909152604001600020600e0155508061218b81615e43565b915050611cc3565b506122e1565b60408051600180825281830190925290602080830190803683370190505091508a8a858181106121d957634e487b7160e01b600052603260045260246000fd5b905060200201358260008151811061220157634e487b7160e01b600052603260045260246000fd5b6020908102919091010152604080516001808252818301909252908160200160208202803683370190505090508c8c8581811061224e57634e487b7160e01b600052603260045260246000fd5b905060200201358160008151811061227657634e487b7160e01b600052603260045260246000fd5b60200260200101818152505061229d3383836040518060200160405280600081525061364e565b336001600160a01b03167fb19a0e54a0d12c649f962287d12e0573df3d188f5fcad44083dd0a11e759bcc583836040516122d89291906157ea565b60405180910390a25b61232f8d8d8681811061230457634e487b7160e01b600052603260045260246000fd5b90506020020135600a60008e8e8981811061175b57634e487b7160e01b600052603260045260246000fd5b600a60008d8d8881811061235357634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081810192909252604090810160009081203382526002019092529020555082915061238c905081615e43565b915050611a9c565b505060016009555050505050505050565b6006546001600160a01b031633146123cf5760405162461bcd60e51b815260040161092c90615abb565b6110ae6000613660565b60006123e58133612d6a565b506000918252600a60209081526040808420928452600590920190529020600401805460ff19169055565b6006546001600160a01b0316331461243a5760405162461bcd60e51b815260040161092c90615abb565b6110ae6136b2565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600880546109e090615dbd565b336001600160a01b03831614156124e55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161092c565b3360008181526002602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061255d8133612d6a565b6000600a60008f815260200190815260200160002090508a81600701600101819055508981600701600201819055508881600701600301819055508781600701600401819055508681600701600601819055508581600701600501819055508c8160000190805190602001906125d492919061496c565b508b516125ea90600183019060208f019061496c565b5060005b83518110156126635783818151811061261757634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600083815260038501909252604090912080546001600160a01b0319166001600160a01b039092169190911790558061265b81615e43565b9150506125ee565b509151600483015550600f01805461ffff191692151561ff0019169290921761010091151591909102179055505050505050505050565b600880546126a790615dbd565b80601f01602080910402602001604051908101604052809291908181526020018280546126d390615dbd565b80156127205780601f106126f557610100808354040283529160200191612720565b820191906000526020600020905b81548152906001019060200180831161270357829003601f168201915b505050505081565b600b80546126a790615dbd565b6000828152602081905260409020600101546127518133612d6a565b610e0b8383613219565b60006127678133612d6a565b506000928352600a60205260409092206010810191909155600f018054911515620100000262ff000019909216919091179055565b6000868152600a60205260408120600c810154600f82015460ff16156127c0575060005b6006820154600090156129875760008060005b856006015481101561297f57600081815260058701602052604090206004015460ff161561296d576128078e8e838b61372d565b600f870154909250610100900460ff161561285c57600061282a8f8f848c61372d565b1161285c5760405162461bcd60e51b8152602060048201526002602482015261189960f11b604482015260640161092c565b600f86015460ff1615612969576128716149df565b60008281526005880160205260409020805461288c90615dbd565b80601f01602080910402602001604051908101604052809291908181526020018280546128b890615dbd565b80156129055780601f106128da57610100808354040283529160200191612905565b820191906000526020600020905b8154815290600101906020018083116128e857829003601f168201915b505050918352505060008281526005880160208181526040832060018101546001600160a01b03168286015292859052526003015460608201526129498f82610c23565b93506129558487615ba2565b95506129618486615ba2565b94505061296d565b8193505b8061297781615e43565b9150506127d3565b50505061298e565b50600d8201545b84612a2f57600081116129c85760405162461bcd60e51b8152602060048201526002602482015261313360f01b604482015260640161092c565b600f83015460ff1615612a2f576001600160a01b038b16600090815260028401602052604090205482906129fc908b613420565b1115612a2f5760405162461bcd60e51b81526020600482015260026024820152610c4d60f21b604482015260640161092c565b600f83015462010000900460ff1615612a7f57612a4e87878c8b610fc1565b612a7f5760405162461bcd60e51b8152602060048201526002602482015261313560f01b604482015260640161092c565b8415612a9257888110612a925788612a94565b805b93505050505b979650505050505050565b6000612ab18133612d6a565b612b2d8684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201829052506040805160208101909152908152925061364e915050565b505050505050565b6000612b418133612d6a565b6000868152600a6020908152604080832060068101548452600501825290912086519091612b7391839189019061496c565b5060038101849055600481018054600160ff19909116811790915580820180546001600160a01b0319166001600160a01b038816179055600282018490556000888152600a6020526040902060060154612bcc91615ba2565b6000978852600a602052604090972060060196909655505050505050565b600780546126a790615dbd565b6001600160a01b038516331480612c135750612c138533610836565b612c2f5760405162461bcd60e51b815260040161092c906159a0565b610dde8585858585613947565b6006546001600160a01b03163314612c665760405162461bcd60e51b815260040161092c90615abb565b6001600160a01b038116612ccb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161092c565b61099e81613660565b6001600160a01b038316331480612cf05750612cf08333610836565b612d0c5760405162461bcd60e51b815260040161092c906159a0565b610e0b83838361327e565b60006001600160e01b03198216636cdb3d1360e11b1480612d4857506001600160e01b031982166303a24d0760e21b145b8061095a575061095a82613a77565b8051610e8a90600390602084019061496c565b612d748282612442565b610e8a57612d8c816001600160a01b03166014613aac565b612d97836020613aac565b604051602001612da89291906156ca565b60408051601f198184030181529082905262461bcd60e51b825261092c91600401615818565b600081604051602001612de1919061556d565b6040516020818303038152906040528051906020012083604051602001612e08919061556d565b6040516020818303038152906040528051906020012014905092915050565b606060038054612e3690615dbd565b80601f0160208091040260200160405190810160405280929190818152602001828054612e6290615dbd565b8015612eaf5780601f10612e8457610100808354040283529160200191612eaf565b820191906000526020600020905b815481529060010190602001808311612e9257829003601f168201915b50505050509050919050565b606081612edf5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612f095780612ef381615e43565b9150612f029050600a83615bdf565b9150612ee3565b6000816001600160401b03811115612f3157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612f5b576020820181803683370190505b5090505b841561107457612f70600183615d40565b9150612f7d600a86615e5e565b612f88906030615ba2565b60f81b818381518110612fab57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612fcd600a86615bdf565b9450612f5f565b8151835114612ff55760405162461bcd60e51b815260040161092c90615af0565b6001600160a01b03841661301b5760405162461bcd60e51b815260040161092c906159e9565b3361302a818787878787613c8d565b60005b845181101561312f57600085828151811061305857634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061308457634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156130d55760405162461bcd60e51b815260040161092c90615a71565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290613114908490615ba2565b925050819055505050508061312890615e43565b905061302d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161317f9291906157ea565b60405180910390a4612b2d818787878787613c9b565b61319f8282612442565b610e8a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556131d53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6132238282612442565b15610e8a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610e0b838383613e06565b606061329483613e39565b61329d83612ebb565b6040516020016132ae9291906155f3565b604051602081830303815290604052905092915050565b600081815b85518110156133775760008682815181106132f557634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613337576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250613364565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061336f81615e43565b9150506132ca565b509092149392505050565b60045460ff166133cb5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161092c565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610e0b838383613f9c565b6000610c1c8284615ba2565b6000610c1c8284615d00565b606061344a836000015160008461403a565b835260606000805b8551518110156134fb57600a60008760000151838151811061348457634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600701600401546134d5876000015183815181106134c857634e487b7160e01b600052603260045260246000fd5b6020026020010151610be8565b10156134e957816134e581615e43565b9250505b806134f381615e43565b915050613452565b50806001600160401b0381111561352257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561354b578160200160208202803683370190505b5091506000805b86515181101561364357600a60008860000151838151811061358457634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600701600401546135c8886000015183815181106134c857634e487b7160e01b600052603260045260246000fd5b10156136315786518051829081106135f057634e487b7160e01b600052603260045260246000fd5b602002602001015184838151811061361857634e487b7160e01b600052603260045260246000fd5b60209081029190910101528161362d81615e43565b9250505b8061363b81615e43565b915050613552565b509195945050505050565b61365a8484848461425e565b50505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60045460ff16156136f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161092c565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586133f83390565b6000838152600a60205260408120819081906137476149df565b60008781526005830160205260409020805461376290615dbd565b80601f016020809104026020016040519081016040528092919081815260200182805461378e90615dbd565b80156137db5780601f106137b0576101008083540402835291602001916137db565b820191906000526020600020905b8154815290600101906020018083116137be57829003601f168201915b505050918352505060008781526005830160208181526040832060018101546001600160a01b031682860152928a90525260030154606082015261381f8982610c23565b600088815260058401602052604090206002015460118401549194508410159060ff16801561384c575086155b156138b257601383015460ff161561387457601483015461386d9086615ba2565b9450613886565b60128301546138839086615ba2565b94505b6015830154158015906138965750805b156138ad5760158301546138aa9086615ba2565b94505b613914565b601183015460ff1680156138ca5750601683015460ff165b80156138d35750805b156138e057839450613914565b601183015460ff161580156138f95750600f83015460ff165b1561390657839450613914565b801561391457600d83015494505b8415801561392c5750600f830154610100900460ff16155b1561393957600d83015494505b509298975050505050505050565b6001600160a01b03841661396d5760405162461bcd60e51b815260040161092c906159e9565b3361398c81878761397d886142fd565b613986886142fd565b87613c8d565b60008481526001602090815260408083206001600160a01b038a168452909152902054838110156139cf5760405162461bcd60e51b815260040161092c90615a71565b60008581526001602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613a0e908490615ba2565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613a6e828888888888614356565b50505050505050565b60006001600160e01b03198216637965db0b60e01b148061095a57506301ffc9a760e01b6001600160e01b031983161461095a565b60606000613abb836002615d00565b613ac6906002615ba2565b6001600160401b03811115613aeb57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613b15576020820181803683370190505b509050600360fc1b81600081518110613b3e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b7b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613b9f846002615d00565b613baa906001615ba2565b90505b6001811115613c3e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613bec57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613c1057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613c3781615da6565b9050613bad565b508315610c1c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161092c565b612b2d868686868686614420565b6001600160a01b0384163b15612b2d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613cdf908990899088908890889060040161573f565b602060405180830381600087803b158015613cf957600080fd5b505af1925050508015613d29575060408051601f3d908101601f19168201909252613d26918101906151d3565b60015b613dd657613d35615eb4565b806308c379a01415613d6f5750613d4a615ecc565b80613d555750613d71565b8060405162461bcd60e51b815260040161092c9190615818565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161092c565b6001600160e01b0319811663bc197c8160e01b14613a6e5760405162461bcd60e51b815260040161092c90615914565b613e11838383614488565b60008281526005602052604081208054839290613e2f908490615d40565b9091555050505050565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015613f95576000613e76826013615d40565b613e81906008615d00565b613e8c906002615c58565b613e9f906001600160a01b038716615bdf565b60f81b9050600060108260f81c613eb69190615bf3565b60f81b905060008160f81c6010613ecd9190615d1f565b8360f81c613edb9190615d57565b60f81b9050613ee98261458d565b85613ef5866002615d00565b81518110613f1357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613f338161458d565b85613f3f866002615d00565b613f4a906001615ba2565b81518110613f6857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505050508080613f8d90615e43565b915050613e60565b5092915050565b613fa78383836145c3565b60005b825181101561365a57818181518110613fd357634e487b7160e01b600052603260045260246000fd5b602002602001015160056000858481518110613fff57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546140249190615d40565b90915550614033905081615e43565b9050613faa565b6060826141815760005b845181101561417b57600081865161405c9190615d40565b604080514260208201526bffffffffffffffffffffffff193360601b1691810191909152605481018690526074016040516020818303038152906040528051906020012060001c6140ad9190615e5e565b6140b79083615ba2565b905060008682815181106140db57634e487b7160e01b600052603260045260246000fd5b6020026020010151905086838151811061410557634e487b7160e01b600052603260045260246000fd5b602002602001015187838151811061412d57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508087848151811061415a57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505050808061417390615e43565b915050614044565b50614256565b8351604080514260208201526bffffffffffffffffffffffff193360601b169181019190915260548101849052600091906074016040516020818303038152906040528051906020012060001c6141d89190615e5e565b604080516001808252818301909252919250600091906020808301908036833701905050905085828151811061421e57634e487b7160e01b600052603260045260246000fd5b60200260200101518160008151811061424757634e487b7160e01b600052603260045260246000fd5b60209081029190910101529450505b509192915050565b61426a84848484614770565b60005b8351811015610dde5782818151811061429657634e487b7160e01b600052603260045260246000fd5b6020026020010151600560008684815181106142c257634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546142e79190615ba2565b909155506142f6905081615e43565b905061426d565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061434557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b15612b2d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061439a908990899088908890889060040161579d565b602060405180830381600087803b1580156143b457600080fd5b505af19250505080156143e4575060408051601f3d908101601f191682019092526143e1918101906151d3565b60015b6143f057613d35615eb4565b6001600160e01b0319811663f23a6e6160e01b14613a6e5760405162461bcd60e51b815260040161092c90615914565b60045460ff1615612b2d5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b606482015260840161092c565b6001600160a01b0383166144ae5760405162461bcd60e51b815260040161092c90615a2e565b336144dd818560006144bf876142fd565b6144c8876142fd565b60405180602001604052806000815250613c8d565b60008381526001602090815260408083206001600160a01b0388168452909152902054828110156145205760405162461bcd60e51b815260040161092c9061595c565b60008481526001602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6000600a60f883901c10156145b4576145ab60f883901c6030615bba565b60f81b92915050565b6145ab60f883901c6057615bba565b6001600160a01b0383166145e95760405162461bcd60e51b815260040161092c90615a2e565b805182511461460a5760405162461bcd60e51b815260040161092c90615af0565b600033905061462d81856000868660405180602001604052806000815250613c8d565b60005b835181101561471157600084828151811061465b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061468757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526001835260408082206001600160a01b038c1683529093529190912054909150818110156146d85760405162461bcd60e51b815260040161092c9061595c565b60009283526001602090815260408085206001600160a01b038b168652909152909220910390558061470981615e43565b915050614630565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516147629291906157ea565b60405180910390a450505050565b6001600160a01b0384166147d05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161092c565b81518351146147f15760405162461bcd60e51b815260040161092c90615af0565b3361480181600087878787613c8d565b60005b84518110156148b95783818151811061482d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600087848151811061485957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546148a19190615ba2565b909155508190506148b181615e43565b915050614804565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161490a9291906157ea565b60405180910390a4610dde81600087878787613c9b565b82805482825590600052602060002090810192821561495c579160200282015b8281111561495c578251825591602001919060010190614941565b50614968929150614a19565b5090565b82805461497890615dbd565b90600052602060002090601f01602090048101928261499a576000855561495c565b82601f106149b357805160ff191683800117855561495c565b8280016001018555821561495c579182018281111561495c578251825591602001919060010190614941565b6040518060a001604052806060815260200160006001600160a01b0316815260200160008152602001600081526020016000151581525090565b5b808211156149685760008155600101614a1a565b600082601f830112614a3e578081fd5b81356020614a4b82615b7f565b604051614a588282615e17565b8381528281019150858301600585901b87018401881015614a77578586fd5b855b85811015614a9e578135614a8c81615f55565b84529284019290840190600101614a79565b5090979650505050505050565b60008083601f840112614abc578182fd5b5081356001600160401b03811115614ad2578182fd5b6020830191508360208260051b8501011115614aed57600080fd5b9250929050565b600082601f830112614b04578081fd5b81356020614b1182615b7f565b604051614b1e8282615e17565b8381528281019150858301600585901b87018401881015614b3d578586fd5b855b85811015614a9e57813584529284019290840190600101614b3f565b80358015158114610bb057600080fd5b600082601f830112614b7b578081fd5b81356001600160401b03811115614b9457614b94615e9e565b604051614bab601f8301601f191660200182615e17565b818152846020838601011115614bbf578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215614bea578081fd5b8135610c1c81615f55565b60008060408385031215614c07578081fd5b8235614c1281615f55565b946020939093013593505050565b60008060408385031215614c32578182fd5b8235614c3d81615f55565b91506020830135614c4d81615f55565b809150509250929050565b600080600080600060a08688031215614c6f578081fd5b8535614c7a81615f55565b94506020860135614c8a81615f55565b935060408601356001600160401b0380821115614ca5578283fd5b614cb189838a01614af4565b94506060880135915080821115614cc6578283fd5b614cd289838a01614af4565b93506080880135915080821115614ce7578283fd5b50614cf488828901614b6b565b9150509295509295909350565b600080600080600060a08688031215614d18578283fd5b8535614d2381615f55565b94506020860135614d3381615f55565b9350604086013592506060860135915060808601356001600160401b03811115614d5b578182fd5b614cf488828901614b6b565b600080600080600060608688031215614d7e578283fd5b8535614d8981615f55565b945060208601356001600160401b0380821115614da4578485fd5b614db089838a01614aab565b90965094506040880135915080821115614dc8578283fd5b50614dd588828901614aab565b969995985093965092949392505050565b600080600060608486031215614dfa578081fd5b8335614e0581615f55565b925060208401356001600160401b0380821115614e20578283fd5b614e2c87838801614af4565b93506040860135915080821115614e41578283fd5b50614e4e86828701614af4565b9150509250925092565b60008060408385031215614e6a578182fd5b8235614e7581615f55565b9150614e8360208401614b5b565b90509250929050565b60008060408385031215614e9e578182fd5b8235614ea981615f55565b915060208301356001600160401b0380821115614ec4578283fd5b9084019060a08287031215614ed7578283fd5b604051614ee381615df2565b823582811115614ef1578485fd5b614efd88828601614b6b565b82525060208301359150614f1082615f55565b8160208201526040830135604082015260608301356060820152614f3660808401614b5b565b60808201528093505050509250929050565b60008060408385031215614c07578182fd5b600080600060608486031215614f6e578081fd5b8335614f7981615f55565b95602085013595506040909401359392505050565b600080600080600080600060c0888a031215614fa8578485fd5b8735614fb381615f55565b965060208801359550604088013594506060880135935060808801356001600160401b03811115614fe2578283fd5b614fee8a828b01614aab565b9094509250615001905060a08901614b5b565b905092959891949750929550565b60008060408385031215615021578182fd5b82356001600160401b0380821115615037578384fd5b61504386838701614a2e565b93506020850135915080821115615058578283fd5b5061506585828601614af4565b9150509250929050565b60008060008060608587031215615084578182fd5b84356001600160401b03811115615099578283fd5b6150a587828801614aab565b90989097506020870135966040013595509350505050565b6000806000806000806000806080898b0312156150d8578182fd5b88356001600160401b03808211156150ee578384fd5b6150fa8c838d01614aab565b909a50985060208b0135915080821115615112578384fd5b61511e8c838d01614aab565b909850965060408b0135915080821115615136578384fd5b6151428c838d01614aab565b909650945060608b013591508082111561515a578384fd5b506151678b828c01614aab565b999c989b5096995094979396929594505050565b60006020828403121561518c578081fd5b5035919050565b600080604083850312156151a5578182fd5b823591506020830135614c4d81615f55565b6000602082840312156151c8578081fd5b8135610c1c81615f6a565b6000602082840312156151e4578081fd5b8151610c1c81615f6a565b600060208284031215615200578081fd5b81356001600160401b03811115615215578182fd5b61107484828501614b6b565b600060208284031215615232578081fd5b5051919050565b6000806040838503121561524b578182fd5b82359150614e8360208401614b5b565b600080600080600080600080610100898b031215615277578182fd5b8835975061528760208a01614b5b565b965060408901356001600160401b038111156152a1578283fd5b6152ad8b828c01614af4565b9650506152bc60608a01614b5b565b94506080890135935060a089013592506152d860c08a01614b5b565b91506152e660e08a01614b5b565b90509295985092959890939650565b600080600060608486031215615309578081fd5b833592506020840135915061532060408501614b5b565b90509250925092565b600080600080600060a08688031215615340578283fd5b8535945060208601356001600160401b0381111561535c578384fd5b61536888828901614b6b565b945050604086013561537981615f55565b94979396509394606081013594506080013592915050565b6000806000806000806000806000806000806101808d8f0312156153b3578586fd5b8c359b506001600160401b0360208e013511156153ce578586fd5b6153de8e60208f01358f01614b6b565b9a506001600160401b0360408e013511156153f7578586fd5b6154078e60408f01358f01614b6b565b995060608d0135985060808d0135975060a08d0135965060c08d0135955060e08d013594506101008d013593506154416101208e01614b5b565b92506154506101408e01614b5b565b91506001600160401b036101608e0135111561546a578081fd5b61547b8e6101608f01358f01614a2e565b90509295989b509295989b509295989b565b6000806040838503121561549f578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156154dd578151875295820195908201906001016154c1565b509495945050505050565b60008151808452615500816020860160208601615d7a565b601f01601f19169290920160200192915050565b6000815160c0845261552960c08501826154ae565b9050602083015115156020850152604083015160408501526060830151606085015260808301511515608085015260a0830151151560a08501528091505092915050565b6000825161557f818460208701615d7a565b9190910192915050565b6000835161559b818460208801615d7a565b8351908301906155af818360208801615d7a565b01949350505050565b600083516155ca818460208801615d7a565b8351908301906155de818360208801615d7a565b600b60fa1b9101908152600101949350505050565b60008351615605818460208801615d7a565b605f60f81b9083019081528351615623816001840160208801615d7a565b01600101949350505050565b600080835482600182811c91508083168061564b57607f831692505b602080841082141561566b57634e487b7160e01b87526022600452602487fd5b81801561567f5760018114615690576156bc565b60ff198616895284890196506156bc565b60008a815260209020885b868110156156b45781548b82015290850190830161569b565b505084890196505b509498975050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615702816017850160208801615d7a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615733816028840160208801615d7a565b01602801949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061576b908301866154ae565b828103606084015261577d81866154ae565b9050828103608084015261579181856154e8565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612a9a908301846154e8565b602081526000610c1c60208301846154ae565b6040815260006157fd60408301856154ae565b828103602084015261580f81856154ae565b95945050505050565b602081526000610c1c60208301846154e8565b600061024080835261583f8184018c6154e8565b90508281036020840152615853818b6154e8565b9050886040840152876060840152865115156080840152602087015160a0840152604087015160c0840152606087015160e0840152608087015161010084015260a087015161012084015260c087015161014084015260e08701516101608401526158e9610180840187805115158252602081015115156020830152604081015115156040830152606081015160608301525050565b8415156102008401528281036102208401526159058185615514565b9b9a5050505050505050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000808335601e19843603018112615b4e578283fd5b8301803591506001600160401b03821115615b67578283fd5b6020019150600581901b3603821315614aed57600080fd5b60006001600160401b03821115615b9857615b98615e9e565b5060051b60200190565b60008219821115615bb557615bb5615e72565b500190565b600060ff821660ff84168060ff03821115615bd757615bd7615e72565b019392505050565b600082615bee57615bee615e88565b500490565b600060ff831680615c0657615c06615e88565b8060ff84160491505092915050565b600181815b80851115615c50578160001904821115615c3657615c36615e72565b80851615615c4357918102915b93841c9390800290615c1a565b509250929050565b6000610c1c8383600082615c6e5750600161095a565b81615c7b5750600061095a565b8160018114615c915760028114615c9b57615cb7565b600191505061095a565b60ff841115615cac57615cac615e72565b50506001821b61095a565b5060208310610133831016604e8410600b8410161715615cda575081810a61095a565b615ce48383615c15565b8060001904821115615cf857615cf8615e72565b029392505050565b6000816000190483118215151615615d1a57615d1a615e72565b500290565b600060ff821660ff84168160ff0481118215151615615cf857615cf8615e72565b600082821015615d5257615d52615e72565b500390565b600060ff821660ff841680821015615d7157615d71615e72565b90039392505050565b60005b83811015615d95578181015183820152602001615d7d565b8381111561365a5750506000910152565b600081615db557615db5615e72565b506000190190565b600181811c90821680615dd157607f821691505b602082108114156115da57634e487b7160e01b600052602260045260246000fd5b60a081018181106001600160401b0382111715615e1157615e11615e9e565b60405250565b601f8201601f191681016001600160401b0381118282101715615e3c57615e3c615e9e565b6040525050565b6000600019821415615e5757615e57615e72565b5060010190565b600082615e6d57615e6d615e88565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115615ec957600481823e5160e01c5b90565b600060443d1015615eda5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615f0957505050505090565b8285019150815181811115615f215750505050505090565b843d8701016020828501011115615f3b5750505050505090565b615f4a60208286010187615e17565b509095945050505050565b6001600160a01b038116811461099e57600080fd5b6001600160e01b03198116811461099e57600080fdfea26469706673582212202fe80cb2da2676fe9d7dd9c38625171557bb70f551ea1464d52fd8ca0b28774b64736f6c63430008040033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000001552616773205472696e6974792050726f746f636f6c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000b524147535452494e495459000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000081745b7339d5067e82b93ca6bbad125f214525d3000000000000000000000000110d0c8b5a06c0367053938eedf10131ac9725930000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d636947356636565344646d6835396b77586e6b7334343246436845566956476b33464134754148797a546a580000000000000000000000

Deployed Bytecode

0x6080604052600436106102925760003560e01c80636b20c4541161015a578063bd85b039116100c1578063dd66489e1161007a578063dd66489e146107e6578063e2b9e18614610806578063e985e9c51461081b578063f242432a14610864578063f2fde38b14610884578063f5298aca146108a457600080fd5b8063bd85b03914610724578063c0e7274014610751578063d547741f14610766578063d5ebd78814610786578063d6b15c4c146107a6578063d81d0a15146107c657600080fd5b806391d148541161011357806391d148541461068557806395d89b41146106a5578063a217fddf146106ba578063a22cb465146106cf578063a8afbca1146106ef578063af17dea61461070f57600080fd5b80636b20c454146105e05780637076574614610600578063715018a6146106135780637d737203146106285780638456cb59146106485780638da5cb5b1461065d57600080fd5b806336568abe116101fe5780634e1273f4116101b75780634e1273f4146105035780634f558e79146105305780634f64b2be1461055f578063522f681514610593578063589b2162146105b35780635c975abb146105c857600080fd5b806336568abe1461044e5780633a4da7291461046e5780633aeca2101461048e5780633c70c771146104ae5780633f4ba83a146104ce5780634044556d146104e357600080fd5b806313af40351161025057806313af40351461037e57806319b88edb1461039e578063227f951c146103be578063248a9ca3146103de5780632eb2c2d61461040e5780632f2ff15d1461042e57600080fd5b8062fdd58e1461029757806301ffc9a7146102ca57806302fe5305146102fa578063065eb1171461031c57806306fdde031461033c5780630e89341c1461035e575b600080fd5b3480156102a357600080fd5b506102b76102b2366004614f48565b6108c4565b6040519081526020015b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046151b7565b610960565b60405190151581526020016102c1565b34801561030657600080fd5b5061031a6103153660046151ef565b61096b565b005b34801561032857600080fd5b5061031a610337366004615239565b6109a1565b34801561034857600080fd5b506103516109d1565b6040516102c19190615818565b34801561036a57600080fd5b5061035161037936600461517b565b610a63565b34801561038a57600080fd5b5061031a610399366004614bd9565b610bb5565b3480156103aa57600080fd5b506102b76103b936600461517b565b610be8565b3480156103ca57600080fd5b506102b76103d9366004614e8c565b610c23565b3480156103ea57600080fd5b506102b76103f936600461517b565b60009081526020819052604090206001015490565b34801561041a57600080fd5b5061031a610429366004614c58565b610d4e565b34801561043a57600080fd5b5061031a610449366004615193565b610de5565b34801561045a57600080fd5b5061031a610469366004615193565b610e10565b34801561047a57600080fd5b5061031a61048936600461525b565b610e8e565b34801561049a57600080fd5b5061031a6104a9366004614f5a565b610f21565b3480156104ba57600080fd5b506102ea6104c936600461506f565b610fc1565b3480156104da57600080fd5b5061031a61107c565b3480156104ef57600080fd5b506102ea6104fe36600461517b565b6110b0565b34801561050f57600080fd5b5061052361051e36600461500f565b611103565b6040516102c191906157d7565b34801561053c57600080fd5b506102ea61054b36600461517b565b600090815260056020526040902054151590565b34801561056b57600080fd5b5061057f61057a36600461517b565b611264565b6040516102c198979695949392919061582b565b34801561059f57600080fd5b5061031a6105ae366004614bf5565b6114f6565b3480156105bf57600080fd5b50610351611556565b3480156105d457600080fd5b5060045460ff166102ea565b3480156105ec57600080fd5b5061031a6105fb366004614de6565b6115e0565b61031a61060e3660046150bd565b611623565b34801561061f57600080fd5b5061031a6123a5565b34801561063457600080fd5b5061031a61064336600461548d565b6123d9565b34801561065457600080fd5b5061031a612410565b34801561066957600080fd5b506006546040516001600160a01b0390911681526020016102c1565b34801561069157600080fd5b506102ea6106a0366004615193565b612442565b3480156106b157600080fd5b5061035161246b565b3480156106c657600080fd5b506102b7600081565b3480156106db57600080fd5b5061031a6106ea366004614e58565b61247a565b3480156106fb57600080fd5b5061031a61070a366004615391565b612551565b34801561071b57600080fd5b5061035161269a565b34801561073057600080fd5b506102b761073f36600461517b565b60009081526005602052604090205490565b34801561075d57600080fd5b50610351612728565b34801561077257600080fd5b5061031a610781366004615193565b612735565b34801561079257600080fd5b5061031a6107a13660046152f5565b61275b565b3480156107b257600080fd5b506102b76107c1366004614f8e565b61279c565b3480156107d257600080fd5b5061031a6107e1366004614d67565b612aa5565b3480156107f257600080fd5b5061031a610801366004615329565b612b35565b34801561081257600080fd5b50610351612bea565b34801561082757600080fd5b506102ea610836366004614c20565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b34801561087057600080fd5b5061031a61087f366004614d01565b612bf7565b34801561089057600080fd5b5061031a61089f366004614bd9565b612c3c565b3480156108b057600080fd5b5061031a6108bf366004614f5a565b612cd4565b60006001600160a01b0383166109355760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b600061095a82612d17565b6006546001600160a01b031633146109955760405162461bcd60e51b815260040161092c90615abb565b61099e81612d57565b50565b60006109ad8133612d6a565b506000918252600a6020526040909120600701805460ff1916911515919091179055565b6060600780546109e090615dbd565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0c90615dbd565b8015610a595780601f10610a2e57610100808354040283529160200191610a59565b820191906000526020600020905b815481529060010190602001808311610a3c57829003601f168201915b5050505050905090565b60606000610a7083610be8565b11610aa25760405162461bcd60e51b8152602060048201526002602482015261189b60f11b604482015260640161092c565b6000828152600a602052604090208054610b539190610ac090615dbd565b80601f0160208091040260200160405190810160405280929190818152602001828054610aec90615dbd565b8015610b395780601f10610b0e57610100808354040283529160200191610b39565b820191906000526020600020905b815481529060010190602001808311610b1c57829003601f168201915b505050505060405180602001604052806000815250612dce565b15610b9157610b6182612e27565b610b6a83612ebb565b604051602001610b7b929190615589565b6040516020818303038152906040529050919050565b6000828152600a60209081526040918290209151610b7b92910161562f565b919050565b6006546001600160a01b03163314610bdf5760405162461bcd60e51b815260040161092c90615abb565b61099e81612c3c565b6000818152600a60205260408120601181015460ff16610c1657600083815260056020526040902054610c1c565b600e8101545b9392505050565b6000610c5182600001516040518060400160405280600681526020016545524337323160d01b815250612dce565b15610cdd5760208201516040516370a0823160e01b81526001600160a01b0385811660048301528216906370a08231906024015b60206040518083038186803b158015610c9d57600080fd5b505afa158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd59190615221565b91505061095a565b610d0a8260000151604051806040016040528060078152602001664552433131353560c81b815250612dce565b1561095a5760208201516060830151604051627eeac760e11b81526001600160a01b03868116600483015260248201929092529082169062fdd58e90604401610c85565b6001600160a01b038516331480610d6a5750610d6a8533610836565b610dd15760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161092c565b610dde8585858585612fd4565b5050505050565b600082815260208190526040902060010154610e018133612d6a565b610e0b8383613195565b505050565b6001600160a01b0381163314610e805760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161092c565b610e8a8282613219565b5050565b6000610e9a8133612d6a565b6000898152600a6020908152604090912060118101805460ff19168b15151790558851601290910191610ed19183918b0190614921565b5060018101805460ff19169715159790971790965550600285019390935560038401919091556004909201805461ffff191692151561ff0019169290921761010091151591909102179055505050565b6000828152600a60205260408120600481015490919015610f855760005b8260040154811015610f835760008181526003840160205260409020546001600160a01b0316331415610f7157600191505b80610f7b81615e43565b915050610f3f565b505b80610fb65760405162461bcd60e51b81526020600482015260016024820152603160f81b604482015260640161092c565b610dde85858561327e565b6000828152600a60205260408120600f015462010000900460ff16610fe857506001611074565b6000610ff43384613289565b90506000816040516020016110099190615818565b60405160208183030381529060405280519060200120905061106f87878080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152600a602052604090206010015492508591506132c59050565b925050505b949350505050565b6006546001600160a01b031633146110a65760405162461bcd60e51b815260040161092c90615abb565b6110ae613382565b565b6000818152600a6020526040812060045460ff16156110d25750600092915050565b6008810154421180156110e85750600981015442105b156110fa576007015460ff1692915050565b50600092915050565b606081518351146111685760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161092c565b600083516001600160401b0381111561119157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111ba578160200160208202803683370190505b50905060005b845181101561125c576112218582815181106111ec57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061121457634e487b7160e01b600052603260045260246000fd5b60200260200101516108c4565b82828151811061124157634e487b7160e01b600052603260045260246000fd5b602090810291909101015261125581615e43565b90506111c0565b509392505050565b600a6020526000908152604090208054819061127f90615dbd565b80601f01602080910402602001604051908101604052809291908181526020018280546112ab90615dbd565b80156112f85780601f106112cd576101008083540402835291602001916112f8565b820191906000526020600020905b8154815290600101906020018083116112db57829003601f168201915b50505050509080600101805461130d90615dbd565b80601f016020809104026020016040519081016040528092919081815260200182805461133990615dbd565b80156113865780601f1061135b57610100808354040283529160200191611386565b820191906000526020600020905b81548152906001019060200180831161136957829003601f168201915b5050505060048301546006840154604080516101008082018352600788015460ff90811615158352600889015460208085019190915260098a015484860152600a8a0154606080860191909152600b8b0154608080870191909152600c8c015460a0870152600d8c015460c080880191909152600e8d015460e08089019190915288519283018952600f8e015480871615158452968704861615158386015262010000909604851615158289015260108d01549282019290925260118c0154875160128e018054958602820188019099529283018481529b9c999b989a5095989097959093169592949093849284918401828280156114a457602002820191906000526020600020905b815481526020019060010190808311611490575b5050509183525050600182015460ff908116151560208301526002830154604083015260038301546060830152600490920154808316151560808301526101009004909116151560a090910152905088565b6006546001600160a01b031633146115205760405162461bcd60e51b815260040161092c90615abb565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610e0b573d6000803e3d6000fd5b60408051602081019091526000808252606091905b6000818152600a6020526040902080546115899190610ac090615dbd565b6115da57611596816110b0565b156115c857816115a582612ebb565b6040516020016115b69291906155b8565b60405160208183030381529060405291505b806115d281615e43565b91505061156b565b50919050565b6001600160a01b0383163314806115fc57506115fc8333610836565b6116185760405162461bcd60e51b815260040161092c906159a0565b610e0b838383613415565b600260095414156116765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161092c565b60026009556000805b86811015611a55576116b68888838181106116aa57634e487b7160e01b600052603260045260246000fd5b905060200201356110b0565b6116e65760405162461bcd60e51b81526020600482015260016024820152603560f81b604482015260640161092c565b85858281811061170657634e487b7160e01b600052603260045260246000fd5b9050602002013561178b8b8b8481811061173057634e487b7160e01b600052603260045260246000fd5b90506020020135600a60008c8c8781811061175b57634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250818101929092526040908101600090812033825260020190925290205490613420565b11156117bd5760405162461bcd60e51b81526020600482015260016024820152600760fb1b604482015260640161092c565b600a60008989848181106117e157634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600501546118208b8b8481811061173057634e487b7160e01b600052603260045260246000fd5b11156118525760405162461bcd60e51b81526020600482015260016024820152603960f81b604482015260640161092c565b600a600089898481811061187657634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600601548a8a838181106118b257634e487b7160e01b600052603260045260246000fd5b9050602002013511156118ec5760405162461bcd60e51b8152602060048201526002602482015261031360f41b604482015260640161092c565b600a600089898481811061191057634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600401548a8a8381811061194c57634e487b7160e01b600052603260045260246000fd5b905060200201356119828a8a8581811061197657634e487b7160e01b600052603260045260246000fd5b90506020020135610be8565b61198c9190615ba2565b11156119bf5760405162461bcd60e51b8152602060048201526002602482015261313160f01b604482015260640161092c565b611a41611a3a600a60008b8b868181106119e957634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600701600301548c8c85818110611a2557634e487b7160e01b600052603260045260246000fd5b9050602002013561342c90919063ffffffff16565b8390613420565b915080611a4d81615e43565b91505061167f565b5060045460ff16158015611a695750803410155b611a995760405162461bcd60e51b81526020600482015260016024820152603360f81b604482015260640161092c565b60005b86811015612394576000611b58338a8a85818110611aca57634e487b7160e01b600052603260045260246000fd5b905060200201358d8d86818110611af157634e487b7160e01b600052603260045260246000fd5b905060200201358a8a87818110611b1857634e487b7160e01b600052603260045260246000fd5b90506020020135898988818110611b3f57634e487b7160e01b600052603260045260246000fd5b9050602002810190611b519190615b38565b600161279c565b9050600081118015611b9057508a8a83818110611b8557634e487b7160e01b600052603260045260246000fd5b905060200201358110155b611bc05760405162461bcd60e51b81526020600482015260016024820152600d60fa1b604482015260640161092c565b606080600a60008c8c87818110611be757634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000206011015460ff161561219957611cbe338c8c87818110611c3057634e487b7160e01b600052603260045260246000fd5b905060200201358f8f88818110611c5757634e487b7160e01b600052603260045260246000fd5b905060200201358c8c89818110611c7e57634e487b7160e01b600052603260045260246000fd5b905060200201358b8b8a818110611ca557634e487b7160e01b600052603260045260246000fd5b9050602002810190611cb79190615b38565b600061279c565b925060005b8d8d86818110611ce357634e487b7160e01b600052603260045260246000fd5b90506020020135811015612193576000611ddf600a60008f8f8a818110611d1a57634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000206012016040518060c001604052908160008201805480602002602001604051908101604052809291908181526020018280548015611d8c57602002820191906000526020600020905b815481526020019060010190808311611d78575b5050509183525050600182015460ff908116151560208301526002830154604083015260038301546060830152600490920154808316151560808301526101009004909116151560a09091015283613438565b9050600a60008e8e89818110611e0557634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000206013015460ff1615611fa157846001600160401b03811115611e5057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e79578160200160208202803683370190505b509350846001600160401b03811115611ea257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ecb578160200160208202803683370190505b5092506000805b86811015611f9a57828281518110611efa57634e487b7160e01b600052603260045260246000fd5b6020026020010151868281518110611f2257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506001858281518110611f5057634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060018351611f6a9190615d40565b821015611f8357611f7c826001615ba2565b9150611f88565b600091505b611f93816001615ba2565b9050611ed2565b5050612095565b80516001600160401b03811115611fc857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ff1578160200160208202803683370190505b50935060005b81518110156120935781818151811061202057634e487b7160e01b600052603260045260246000fd5b602002602001015185828151811061204857634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600184828151811061207657634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061208b81615e43565b915050611ff7565b505b6120b03385856040518060200160405280600081525061364e565b336001600160a01b03167fb19a0e54a0d12c649f962287d12e0573df3d188f5fcad44083dd0a11e759bcc585856040516120eb9291906157ea565b60405180910390a2600a60008e8e8981811061211757634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002060070160070154600161213f9190615ba2565b600a60008f8f8a81811061216357634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250810191909152604001600020600e0155508061218b81615e43565b915050611cc3565b506122e1565b60408051600180825281830190925290602080830190803683370190505091508a8a858181106121d957634e487b7160e01b600052603260045260246000fd5b905060200201358260008151811061220157634e487b7160e01b600052603260045260246000fd5b6020908102919091010152604080516001808252818301909252908160200160208202803683370190505090508c8c8581811061224e57634e487b7160e01b600052603260045260246000fd5b905060200201358160008151811061227657634e487b7160e01b600052603260045260246000fd5b60200260200101818152505061229d3383836040518060200160405280600081525061364e565b336001600160a01b03167fb19a0e54a0d12c649f962287d12e0573df3d188f5fcad44083dd0a11e759bcc583836040516122d89291906157ea565b60405180910390a25b61232f8d8d8681811061230457634e487b7160e01b600052603260045260246000fd5b90506020020135600a60008e8e8981811061175b57634e487b7160e01b600052603260045260246000fd5b600a60008d8d8881811061235357634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081810192909252604090810160009081203382526002019092529020555082915061238c905081615e43565b915050611a9c565b505060016009555050505050505050565b6006546001600160a01b031633146123cf5760405162461bcd60e51b815260040161092c90615abb565b6110ae6000613660565b60006123e58133612d6a565b506000918252600a60209081526040808420928452600590920190529020600401805460ff19169055565b6006546001600160a01b0316331461243a5760405162461bcd60e51b815260040161092c90615abb565b6110ae6136b2565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600880546109e090615dbd565b336001600160a01b03831614156124e55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161092c565b3360008181526002602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061255d8133612d6a565b6000600a60008f815260200190815260200160002090508a81600701600101819055508981600701600201819055508881600701600301819055508781600701600401819055508681600701600601819055508581600701600501819055508c8160000190805190602001906125d492919061496c565b508b516125ea90600183019060208f019061496c565b5060005b83518110156126635783818151811061261757634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600083815260038501909252604090912080546001600160a01b0319166001600160a01b039092169190911790558061265b81615e43565b9150506125ee565b509151600483015550600f01805461ffff191692151561ff0019169290921761010091151591909102179055505050505050505050565b600880546126a790615dbd565b80601f01602080910402602001604051908101604052809291908181526020018280546126d390615dbd565b80156127205780601f106126f557610100808354040283529160200191612720565b820191906000526020600020905b81548152906001019060200180831161270357829003601f168201915b505050505081565b600b80546126a790615dbd565b6000828152602081905260409020600101546127518133612d6a565b610e0b8383613219565b60006127678133612d6a565b506000928352600a60205260409092206010810191909155600f018054911515620100000262ff000019909216919091179055565b6000868152600a60205260408120600c810154600f82015460ff16156127c0575060005b6006820154600090156129875760008060005b856006015481101561297f57600081815260058701602052604090206004015460ff161561296d576128078e8e838b61372d565b600f870154909250610100900460ff161561285c57600061282a8f8f848c61372d565b1161285c5760405162461bcd60e51b8152602060048201526002602482015261189960f11b604482015260640161092c565b600f86015460ff1615612969576128716149df565b60008281526005880160205260409020805461288c90615dbd565b80601f01602080910402602001604051908101604052809291908181526020018280546128b890615dbd565b80156129055780601f106128da57610100808354040283529160200191612905565b820191906000526020600020905b8154815290600101906020018083116128e857829003601f168201915b505050918352505060008281526005880160208181526040832060018101546001600160a01b03168286015292859052526003015460608201526129498f82610c23565b93506129558487615ba2565b95506129618486615ba2565b94505061296d565b8193505b8061297781615e43565b9150506127d3565b50505061298e565b50600d8201545b84612a2f57600081116129c85760405162461bcd60e51b8152602060048201526002602482015261313360f01b604482015260640161092c565b600f83015460ff1615612a2f576001600160a01b038b16600090815260028401602052604090205482906129fc908b613420565b1115612a2f5760405162461bcd60e51b81526020600482015260026024820152610c4d60f21b604482015260640161092c565b600f83015462010000900460ff1615612a7f57612a4e87878c8b610fc1565b612a7f5760405162461bcd60e51b8152602060048201526002602482015261313560f01b604482015260640161092c565b8415612a9257888110612a925788612a94565b805b93505050505b979650505050505050565b6000612ab18133612d6a565b612b2d8684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201829052506040805160208101909152908152925061364e915050565b505050505050565b6000612b418133612d6a565b6000868152600a6020908152604080832060068101548452600501825290912086519091612b7391839189019061496c565b5060038101849055600481018054600160ff19909116811790915580820180546001600160a01b0319166001600160a01b038816179055600282018490556000888152600a6020526040902060060154612bcc91615ba2565b6000978852600a602052604090972060060196909655505050505050565b600780546126a790615dbd565b6001600160a01b038516331480612c135750612c138533610836565b612c2f5760405162461bcd60e51b815260040161092c906159a0565b610dde8585858585613947565b6006546001600160a01b03163314612c665760405162461bcd60e51b815260040161092c90615abb565b6001600160a01b038116612ccb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161092c565b61099e81613660565b6001600160a01b038316331480612cf05750612cf08333610836565b612d0c5760405162461bcd60e51b815260040161092c906159a0565b610e0b83838361327e565b60006001600160e01b03198216636cdb3d1360e11b1480612d4857506001600160e01b031982166303a24d0760e21b145b8061095a575061095a82613a77565b8051610e8a90600390602084019061496c565b612d748282612442565b610e8a57612d8c816001600160a01b03166014613aac565b612d97836020613aac565b604051602001612da89291906156ca565b60408051601f198184030181529082905262461bcd60e51b825261092c91600401615818565b600081604051602001612de1919061556d565b6040516020818303038152906040528051906020012083604051602001612e08919061556d565b6040516020818303038152906040528051906020012014905092915050565b606060038054612e3690615dbd565b80601f0160208091040260200160405190810160405280929190818152602001828054612e6290615dbd565b8015612eaf5780601f10612e8457610100808354040283529160200191612eaf565b820191906000526020600020905b815481529060010190602001808311612e9257829003601f168201915b50505050509050919050565b606081612edf5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612f095780612ef381615e43565b9150612f029050600a83615bdf565b9150612ee3565b6000816001600160401b03811115612f3157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612f5b576020820181803683370190505b5090505b841561107457612f70600183615d40565b9150612f7d600a86615e5e565b612f88906030615ba2565b60f81b818381518110612fab57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612fcd600a86615bdf565b9450612f5f565b8151835114612ff55760405162461bcd60e51b815260040161092c90615af0565b6001600160a01b03841661301b5760405162461bcd60e51b815260040161092c906159e9565b3361302a818787878787613c8d565b60005b845181101561312f57600085828151811061305857634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061308457634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156130d55760405162461bcd60e51b815260040161092c90615a71565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290613114908490615ba2565b925050819055505050508061312890615e43565b905061302d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161317f9291906157ea565b60405180910390a4612b2d818787878787613c9b565b61319f8282612442565b610e8a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556131d53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6132238282612442565b15610e8a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610e0b838383613e06565b606061329483613e39565b61329d83612ebb565b6040516020016132ae9291906155f3565b604051602081830303815290604052905092915050565b600081815b85518110156133775760008682815181106132f557634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613337576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250613364565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061336f81615e43565b9150506132ca565b509092149392505050565b60045460ff166133cb5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161092c565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610e0b838383613f9c565b6000610c1c8284615ba2565b6000610c1c8284615d00565b606061344a836000015160008461403a565b835260606000805b8551518110156134fb57600a60008760000151838151811061348457634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600701600401546134d5876000015183815181106134c857634e487b7160e01b600052603260045260246000fd5b6020026020010151610be8565b10156134e957816134e581615e43565b9250505b806134f381615e43565b915050613452565b50806001600160401b0381111561352257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561354b578160200160208202803683370190505b5091506000805b86515181101561364357600a60008860000151838151811061358457634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020600701600401546135c8886000015183815181106134c857634e487b7160e01b600052603260045260246000fd5b10156136315786518051829081106135f057634e487b7160e01b600052603260045260246000fd5b602002602001015184838151811061361857634e487b7160e01b600052603260045260246000fd5b60209081029190910101528161362d81615e43565b9250505b8061363b81615e43565b915050613552565b509195945050505050565b61365a8484848461425e565b50505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60045460ff16156136f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161092c565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586133f83390565b6000838152600a60205260408120819081906137476149df565b60008781526005830160205260409020805461376290615dbd565b80601f016020809104026020016040519081016040528092919081815260200182805461378e90615dbd565b80156137db5780601f106137b0576101008083540402835291602001916137db565b820191906000526020600020905b8154815290600101906020018083116137be57829003601f168201915b505050918352505060008781526005830160208181526040832060018101546001600160a01b031682860152928a90525260030154606082015261381f8982610c23565b600088815260058401602052604090206002015460118401549194508410159060ff16801561384c575086155b156138b257601383015460ff161561387457601483015461386d9086615ba2565b9450613886565b60128301546138839086615ba2565b94505b6015830154158015906138965750805b156138ad5760158301546138aa9086615ba2565b94505b613914565b601183015460ff1680156138ca5750601683015460ff165b80156138d35750805b156138e057839450613914565b601183015460ff161580156138f95750600f83015460ff165b1561390657839450613914565b801561391457600d83015494505b8415801561392c5750600f830154610100900460ff16155b1561393957600d83015494505b509298975050505050505050565b6001600160a01b03841661396d5760405162461bcd60e51b815260040161092c906159e9565b3361398c81878761397d886142fd565b613986886142fd565b87613c8d565b60008481526001602090815260408083206001600160a01b038a168452909152902054838110156139cf5760405162461bcd60e51b815260040161092c90615a71565b60008581526001602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613a0e908490615ba2565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613a6e828888888888614356565b50505050505050565b60006001600160e01b03198216637965db0b60e01b148061095a57506301ffc9a760e01b6001600160e01b031983161461095a565b60606000613abb836002615d00565b613ac6906002615ba2565b6001600160401b03811115613aeb57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613b15576020820181803683370190505b509050600360fc1b81600081518110613b3e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b7b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613b9f846002615d00565b613baa906001615ba2565b90505b6001811115613c3e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613bec57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613c1057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613c3781615da6565b9050613bad565b508315610c1c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161092c565b612b2d868686868686614420565b6001600160a01b0384163b15612b2d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613cdf908990899088908890889060040161573f565b602060405180830381600087803b158015613cf957600080fd5b505af1925050508015613d29575060408051601f3d908101601f19168201909252613d26918101906151d3565b60015b613dd657613d35615eb4565b806308c379a01415613d6f5750613d4a615ecc565b80613d555750613d71565b8060405162461bcd60e51b815260040161092c9190615818565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161092c565b6001600160e01b0319811663bc197c8160e01b14613a6e5760405162461bcd60e51b815260040161092c90615914565b613e11838383614488565b60008281526005602052604081208054839290613e2f908490615d40565b9091555050505050565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015613f95576000613e76826013615d40565b613e81906008615d00565b613e8c906002615c58565b613e9f906001600160a01b038716615bdf565b60f81b9050600060108260f81c613eb69190615bf3565b60f81b905060008160f81c6010613ecd9190615d1f565b8360f81c613edb9190615d57565b60f81b9050613ee98261458d565b85613ef5866002615d00565b81518110613f1357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613f338161458d565b85613f3f866002615d00565b613f4a906001615ba2565b81518110613f6857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505050508080613f8d90615e43565b915050613e60565b5092915050565b613fa78383836145c3565b60005b825181101561365a57818181518110613fd357634e487b7160e01b600052603260045260246000fd5b602002602001015160056000858481518110613fff57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546140249190615d40565b90915550614033905081615e43565b9050613faa565b6060826141815760005b845181101561417b57600081865161405c9190615d40565b604080514260208201526bffffffffffffffffffffffff193360601b1691810191909152605481018690526074016040516020818303038152906040528051906020012060001c6140ad9190615e5e565b6140b79083615ba2565b905060008682815181106140db57634e487b7160e01b600052603260045260246000fd5b6020026020010151905086838151811061410557634e487b7160e01b600052603260045260246000fd5b602002602001015187838151811061412d57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508087848151811061415a57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505050808061417390615e43565b915050614044565b50614256565b8351604080514260208201526bffffffffffffffffffffffff193360601b169181019190915260548101849052600091906074016040516020818303038152906040528051906020012060001c6141d89190615e5e565b604080516001808252818301909252919250600091906020808301908036833701905050905085828151811061421e57634e487b7160e01b600052603260045260246000fd5b60200260200101518160008151811061424757634e487b7160e01b600052603260045260246000fd5b60209081029190910101529450505b509192915050565b61426a84848484614770565b60005b8351811015610dde5782818151811061429657634e487b7160e01b600052603260045260246000fd5b6020026020010151600560008684815181106142c257634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546142e79190615ba2565b909155506142f6905081615e43565b905061426d565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061434557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b15612b2d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061439a908990899088908890889060040161579d565b602060405180830381600087803b1580156143b457600080fd5b505af19250505080156143e4575060408051601f3d908101601f191682019092526143e1918101906151d3565b60015b6143f057613d35615eb4565b6001600160e01b0319811663f23a6e6160e01b14613a6e5760405162461bcd60e51b815260040161092c90615914565b60045460ff1615612b2d5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b606482015260840161092c565b6001600160a01b0383166144ae5760405162461bcd60e51b815260040161092c90615a2e565b336144dd818560006144bf876142fd565b6144c8876142fd565b60405180602001604052806000815250613c8d565b60008381526001602090815260408083206001600160a01b0388168452909152902054828110156145205760405162461bcd60e51b815260040161092c9061595c565b60008481526001602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6000600a60f883901c10156145b4576145ab60f883901c6030615bba565b60f81b92915050565b6145ab60f883901c6057615bba565b6001600160a01b0383166145e95760405162461bcd60e51b815260040161092c90615a2e565b805182511461460a5760405162461bcd60e51b815260040161092c90615af0565b600033905061462d81856000868660405180602001604052806000815250613c8d565b60005b835181101561471157600084828151811061465b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061468757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526001835260408082206001600160a01b038c1683529093529190912054909150818110156146d85760405162461bcd60e51b815260040161092c9061595c565b60009283526001602090815260408085206001600160a01b038b168652909152909220910390558061470981615e43565b915050614630565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516147629291906157ea565b60405180910390a450505050565b6001600160a01b0384166147d05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161092c565b81518351146147f15760405162461bcd60e51b815260040161092c90615af0565b3361480181600087878787613c8d565b60005b84518110156148b95783818151811061482d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600087848151811061485957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546148a19190615ba2565b909155508190506148b181615e43565b915050614804565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161490a9291906157ea565b60405180910390a4610dde81600087878787613c9b565b82805482825590600052602060002090810192821561495c579160200282015b8281111561495c578251825591602001919060010190614941565b50614968929150614a19565b5090565b82805461497890615dbd565b90600052602060002090601f01602090048101928261499a576000855561495c565b82601f106149b357805160ff191683800117855561495c565b8280016001018555821561495c579182018281111561495c578251825591602001919060010190614941565b6040518060a001604052806060815260200160006001600160a01b0316815260200160008152602001600081526020016000151581525090565b5b808211156149685760008155600101614a1a565b600082601f830112614a3e578081fd5b81356020614a4b82615b7f565b604051614a588282615e17565b8381528281019150858301600585901b87018401881015614a77578586fd5b855b85811015614a9e578135614a8c81615f55565b84529284019290840190600101614a79565b5090979650505050505050565b60008083601f840112614abc578182fd5b5081356001600160401b03811115614ad2578182fd5b6020830191508360208260051b8501011115614aed57600080fd5b9250929050565b600082601f830112614b04578081fd5b81356020614b1182615b7f565b604051614b1e8282615e17565b8381528281019150858301600585901b87018401881015614b3d578586fd5b855b85811015614a9e57813584529284019290840190600101614b3f565b80358015158114610bb057600080fd5b600082601f830112614b7b578081fd5b81356001600160401b03811115614b9457614b94615e9e565b604051614bab601f8301601f191660200182615e17565b818152846020838601011115614bbf578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215614bea578081fd5b8135610c1c81615f55565b60008060408385031215614c07578081fd5b8235614c1281615f55565b946020939093013593505050565b60008060408385031215614c32578182fd5b8235614c3d81615f55565b91506020830135614c4d81615f55565b809150509250929050565b600080600080600060a08688031215614c6f578081fd5b8535614c7a81615f55565b94506020860135614c8a81615f55565b935060408601356001600160401b0380821115614ca5578283fd5b614cb189838a01614af4565b94506060880135915080821115614cc6578283fd5b614cd289838a01614af4565b93506080880135915080821115614ce7578283fd5b50614cf488828901614b6b565b9150509295509295909350565b600080600080600060a08688031215614d18578283fd5b8535614d2381615f55565b94506020860135614d3381615f55565b9350604086013592506060860135915060808601356001600160401b03811115614d5b578182fd5b614cf488828901614b6b565b600080600080600060608688031215614d7e578283fd5b8535614d8981615f55565b945060208601356001600160401b0380821115614da4578485fd5b614db089838a01614aab565b90965094506040880135915080821115614dc8578283fd5b50614dd588828901614aab565b969995985093965092949392505050565b600080600060608486031215614dfa578081fd5b8335614e0581615f55565b925060208401356001600160401b0380821115614e20578283fd5b614e2c87838801614af4565b93506040860135915080821115614e41578283fd5b50614e4e86828701614af4565b9150509250925092565b60008060408385031215614e6a578182fd5b8235614e7581615f55565b9150614e8360208401614b5b565b90509250929050565b60008060408385031215614e9e578182fd5b8235614ea981615f55565b915060208301356001600160401b0380821115614ec4578283fd5b9084019060a08287031215614ed7578283fd5b604051614ee381615df2565b823582811115614ef1578485fd5b614efd88828601614b6b565b82525060208301359150614f1082615f55565b8160208201526040830135604082015260608301356060820152614f3660808401614b5b565b60808201528093505050509250929050565b60008060408385031215614c07578182fd5b600080600060608486031215614f6e578081fd5b8335614f7981615f55565b95602085013595506040909401359392505050565b600080600080600080600060c0888a031215614fa8578485fd5b8735614fb381615f55565b965060208801359550604088013594506060880135935060808801356001600160401b03811115614fe2578283fd5b614fee8a828b01614aab565b9094509250615001905060a08901614b5b565b905092959891949750929550565b60008060408385031215615021578182fd5b82356001600160401b0380821115615037578384fd5b61504386838701614a2e565b93506020850135915080821115615058578283fd5b5061506585828601614af4565b9150509250929050565b60008060008060608587031215615084578182fd5b84356001600160401b03811115615099578283fd5b6150a587828801614aab565b90989097506020870135966040013595509350505050565b6000806000806000806000806080898b0312156150d8578182fd5b88356001600160401b03808211156150ee578384fd5b6150fa8c838d01614aab565b909a50985060208b0135915080821115615112578384fd5b61511e8c838d01614aab565b909850965060408b0135915080821115615136578384fd5b6151428c838d01614aab565b909650945060608b013591508082111561515a578384fd5b506151678b828c01614aab565b999c989b5096995094979396929594505050565b60006020828403121561518c578081fd5b5035919050565b600080604083850312156151a5578182fd5b823591506020830135614c4d81615f55565b6000602082840312156151c8578081fd5b8135610c1c81615f6a565b6000602082840312156151e4578081fd5b8151610c1c81615f6a565b600060208284031215615200578081fd5b81356001600160401b03811115615215578182fd5b61107484828501614b6b565b600060208284031215615232578081fd5b5051919050565b6000806040838503121561524b578182fd5b82359150614e8360208401614b5b565b600080600080600080600080610100898b031215615277578182fd5b8835975061528760208a01614b5b565b965060408901356001600160401b038111156152a1578283fd5b6152ad8b828c01614af4565b9650506152bc60608a01614b5b565b94506080890135935060a089013592506152d860c08a01614b5b565b91506152e660e08a01614b5b565b90509295985092959890939650565b600080600060608486031215615309578081fd5b833592506020840135915061532060408501614b5b565b90509250925092565b600080600080600060a08688031215615340578283fd5b8535945060208601356001600160401b0381111561535c578384fd5b61536888828901614b6b565b945050604086013561537981615f55565b94979396509394606081013594506080013592915050565b6000806000806000806000806000806000806101808d8f0312156153b3578586fd5b8c359b506001600160401b0360208e013511156153ce578586fd5b6153de8e60208f01358f01614b6b565b9a506001600160401b0360408e013511156153f7578586fd5b6154078e60408f01358f01614b6b565b995060608d0135985060808d0135975060a08d0135965060c08d0135955060e08d013594506101008d013593506154416101208e01614b5b565b92506154506101408e01614b5b565b91506001600160401b036101608e0135111561546a578081fd5b61547b8e6101608f01358f01614a2e565b90509295989b509295989b509295989b565b6000806040838503121561549f578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156154dd578151875295820195908201906001016154c1565b509495945050505050565b60008151808452615500816020860160208601615d7a565b601f01601f19169290920160200192915050565b6000815160c0845261552960c08501826154ae565b9050602083015115156020850152604083015160408501526060830151606085015260808301511515608085015260a0830151151560a08501528091505092915050565b6000825161557f818460208701615d7a565b9190910192915050565b6000835161559b818460208801615d7a565b8351908301906155af818360208801615d7a565b01949350505050565b600083516155ca818460208801615d7a565b8351908301906155de818360208801615d7a565b600b60fa1b9101908152600101949350505050565b60008351615605818460208801615d7a565b605f60f81b9083019081528351615623816001840160208801615d7a565b01600101949350505050565b600080835482600182811c91508083168061564b57607f831692505b602080841082141561566b57634e487b7160e01b87526022600452602487fd5b81801561567f5760018114615690576156bc565b60ff198616895284890196506156bc565b60008a815260209020885b868110156156b45781548b82015290850190830161569b565b505084890196505b509498975050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615702816017850160208801615d7a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615733816028840160208801615d7a565b01602801949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061576b908301866154ae565b828103606084015261577d81866154ae565b9050828103608084015261579181856154e8565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612a9a908301846154e8565b602081526000610c1c60208301846154ae565b6040815260006157fd60408301856154ae565b828103602084015261580f81856154ae565b95945050505050565b602081526000610c1c60208301846154e8565b600061024080835261583f8184018c6154e8565b90508281036020840152615853818b6154e8565b9050886040840152876060840152865115156080840152602087015160a0840152604087015160c0840152606087015160e0840152608087015161010084015260a087015161012084015260c087015161014084015260e08701516101608401526158e9610180840187805115158252602081015115156020830152604081015115156040830152606081015160608301525050565b8415156102008401528281036102208401526159058185615514565b9b9a5050505050505050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000808335601e19843603018112615b4e578283fd5b8301803591506001600160401b03821115615b67578283fd5b6020019150600581901b3603821315614aed57600080fd5b60006001600160401b03821115615b9857615b98615e9e565b5060051b60200190565b60008219821115615bb557615bb5615e72565b500190565b600060ff821660ff84168060ff03821115615bd757615bd7615e72565b019392505050565b600082615bee57615bee615e88565b500490565b600060ff831680615c0657615c06615e88565b8060ff84160491505092915050565b600181815b80851115615c50578160001904821115615c3657615c36615e72565b80851615615c4357918102915b93841c9390800290615c1a565b509250929050565b6000610c1c8383600082615c6e5750600161095a565b81615c7b5750600061095a565b8160018114615c915760028114615c9b57615cb7565b600191505061095a565b60ff841115615cac57615cac615e72565b50506001821b61095a565b5060208310610133831016604e8410600b8410161715615cda575081810a61095a565b615ce48383615c15565b8060001904821115615cf857615cf8615e72565b029392505050565b6000816000190483118215151615615d1a57615d1a615e72565b500290565b600060ff821660ff84168160ff0481118215151615615cf857615cf8615e72565b600082821015615d5257615d52615e72565b500390565b600060ff821660ff841680821015615d7157615d71615e72565b90039392505050565b60005b83811015615d95578181015183820152602001615d7d565b8381111561365a5750506000910152565b600081615db557615db5615e72565b506000190190565b600181811c90821680615dd157607f821691505b602082108114156115da57634e487b7160e01b600052602260045260246000fd5b60a081018181106001600160401b0382111715615e1157615e11615e9e565b60405250565b601f8201601f191681016001600160401b0381118282101715615e3c57615e3c615e9e565b6040525050565b6000600019821415615e5757615e57615e72565b5060010190565b600082615e6d57615e6d615e88565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115615ec957600481823e5160e01c5b90565b600060443d1015615eda5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615f0957505050505090565b8285019150815181811115615f215750505050505090565b843d8701016020828501011115615f3b5750505050505090565b615f4a60208286010187615e17565b509095945050505050565b6001600160a01b038116811461099e57600080fd5b6001600160e01b03198116811461099e57600080fdfea26469706673582212202fe80cb2da2676fe9d7dd9c38625171557bb70f551ea1464d52fd8ca0b28774b64736f6c63430008040033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000001552616773205472696e6974792050726f746f636f6c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000b524147535452494e495459000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000081745b7339d5067e82b93ca6bbad125f214525d3000000000000000000000000110d0c8b5a06c0367053938eedf10131ac9725930000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d636947356636565344646d6835396b77586e6b7334343246436845566956476b33464134754148797a546a580000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Rags Trinity Protocol
Arg [1] : _symbol (string): RAGSTRINITY
Arg [2] : _admins (address[]): 0x81745b7339D5067E82B93ca6BBAd125F214525d3,0x110d0C8b5A06c0367053938eeDF10131ac972593
Arg [3] : _contract_URI (string): ipfs://QmciG5f6VSDdmh59kwXnks442FChEViVGk3FA4uAHyzTjX

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [5] : 52616773205472696e6974792050726f746f636f6c0000000000000000000000
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [7] : 524147535452494e495459000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 00000000000000000000000081745b7339d5067e82b93ca6bbad125f214525d3
Arg [10] : 000000000000000000000000110d0c8b5a06c0367053938eedf10131ac972593
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [12] : 697066733a2f2f516d636947356636565344646d6835396b77586e6b73343432
Arg [13] : 46436845566956476b33464134754148797a546a580000000000000000000000


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.