ETH Price: $3,576.14 (-0.99%)

Token

ERC-20: The Moon Band (TMB)
 

Overview

Max Total Supply

669 TMB

Holders

162

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
nftstrong.eth
0x144757a24b61cee2e593ade64da776759d786d73
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
TheMoonBand

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 40 : TheMoonBand.sol
// ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
// ─██████──────────██████─██████████████─██████████─██████████████████────────██████████████─██████████████─██████──██████─
// ─██░░██──────────██░░██─██░░░░░░░░░░██─██░░░░░░██─██░░░░░░░░░░░░░░██────────██░░░░░░░░░░██─██░░░░░░░░░░██─██░░██──██░░██─
// ─██░░██──────────██░░██─██░░██████████─████░░████─████████████░░░░██────────██░░██████████─██████░░██████─██░░██──██░░██─
// ─██░░██──────────██░░██─██░░██───────────██░░██───────────████░░████────────██░░██─────────────██░░██─────██░░██──██░░██─
// ─██░░██──██████──██░░██─██░░██████████───██░░██─────────████░░████──────────██░░██████████─────██░░██─────██░░██████░░██─
// ─██░░██──██░░██──██░░██─██░░░░░░░░░░██───██░░██───────████░░████────────────██░░░░░░░░░░██─────██░░██─────██░░░░░░░░░░██─
// ─██░░██──██░░██──██░░██─██░░██████████───██░░██─────████░░████──────────────██░░██████████─────██░░██─────██░░██████░░██─
// ─██░░██████░░██████░░██─██░░██───────────██░░██───████░░████────────────────██░░██─────────────██░░██─────██░░██──██░░██─
// ─██░░░░░░░░░░░░░░░░░░██─██░░██████████─████░░████─██░░░░████████████─██████─██░░██████████─────██░░██─────██░░██──██░░██─
// ─██░░██████░░██████░░██─██░░░░░░░░░░██─██░░░░░░██─██░░░░░░░░░░░░░░██─██░░██─██░░░░░░░░░░██─────██░░██─────██░░██──██░░██─
// ─██████──██████──██████─██████████████─██████████─██████████████████─██████─██████████████─────██████─────██████──██████─
// ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/base/ERC1155Drop.sol";
import "@thirdweb-dev/contracts/extension/Permissions.sol";

contract TheMoonBand is ERC1155Drop, Permissions {

    address private SUPER_ADMIN = 0xD06D855652A73E61Bfe26A3427Dfe51f3b827fe3;
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    constructor()
        ERC1155Drop(
            "The Moon Band",
            "TMB",
            0xA12a3ac253F8a16155BDe85802F4ecB5647F3C5F,
            1000,
            0xA12a3ac253F8a16155BDe85802F4ecB5647F3C5F
        )
    {
        _setupRole(ADMIN_ROLE, msg.sender);
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        grantRole(DEFAULT_ADMIN_ROLE, SUPER_ADMIN);
        grantRole(ADMIN_ROLE, SUPER_ADMIN);
    }

    /// @dev Lets an admin airdrop tokens to a list of recipients.
    function airdrop(
        address[] calldata _receivers,
        uint256[] calldata _tokenIds,
        uint256[] calldata _quantities
    ) external payable virtual onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_receivers.length == _tokenIds.length, "Mismatched input lengths");
        require(_tokenIds.length == _quantities.length, "Mismatched input lengths");

        for (uint256 i = 0; i < _tokenIds.length; i++) {
            uint256 tokenId = _tokenIds[i];
            address receiver = _receivers[i];
            uint256 quantity = _quantities[i];

            if (tokenId >= nextTokenIdToLazyMint) {
                revert("Not enough minted tokens");
            }

            // Mint the relevant NFTs to claimer.
            _transferTokensOnClaim(receiver, tokenId, quantity);

            emit TokensClaimed(_dropMsgSender(), receiver, tokenId, quantity);
        }
    }

    /// @dev Sets the base URI for the batch of tokens with the given batchId.
    function setBaseURI(uint256 _tokenId, string memory _baseURI) external onlyRole(DEFAULT_ADMIN_ROLE) {
        (uint256 _batchId, ) = _getBatchId(_tokenId);
        _setBaseURI(_batchId, _baseURI);
    }

    /// @dev Checks whether primary sale recipient can be set in the given execution context.
    function _canSetPrimarySaleRecipient() internal view virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev Checks whether owner can be set in the given execution context.
    function _canSetOwner() internal view virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev Checks whether royalty info can be set in the given execution context.
    function _canSetRoyaltyInfo() internal view virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev Checks whether contract metadata can be set in the given execution context.
    function _canSetContractURI() internal view virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev Checks whether platform fee info can be set in the given execution context.
    function _canSetClaimConditions() internal view virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev Returns whether lazy minting can be done in the given execution context.
    function _canLazyMint() internal view virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }

    /// @dev Returns whether operator restriction can be set in the given execution context.
    function _canSetOperatorRestriction() internal virtual override returns (bool) {
        return hasRole(ADMIN_ROLE, msg.sender);
    }
}

File 2 of 40 : ERC1155Drop.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import { ERC1155 } from "../eip/ERC1155.sol";

import "../extension/ContractMetadata.sol";
import "../extension/Multicall.sol";
import "../extension/Ownable.sol";
import "../extension/Royalty.sol";
import "../extension/BatchMintMetadata.sol";
import "../extension/PrimarySale.sol";
import "../extension/DropSinglePhase1155.sol";
import "../extension/LazyMint.sol";
import "../extension/DelayedReveal.sol";
import "../extension/DefaultOperatorFilterer.sol";

import "../lib/CurrencyTransferLib.sol";
import "../lib/TWStrings.sol";

/**
 *      BASE:      ERC1155Base
 *      EXTENSION: DropSinglePhase1155
 *
 *  The `ERC1155Base` smart contract implements the ERC1155 NFT standard.
 *  It includes the following additions to standard ERC1155 logic:
 *
 *      - Contract metadata for royalty support on platforms such as OpenSea that use
 *        off-chain information to distribute roaylties.
 *
 *      - Ownership of the contract, with the ability to restrict certain functions to
 *        only be called by the contract's owner.
 *
 *      - Multicall capability to perform multiple actions atomically
 *
 *      - EIP 2981 compliance for royalty support on NFT marketplaces.
 *
 *  The `drop` mechanism in the `DropSinglePhase1155` extension is a distribution mechanism for lazy minted tokens. It lets
 *  you set restrictions such as a price to charge, an allowlist etc. when an address atttempts to mint lazy minted tokens.
 *
 *  The `ERC721Drop` contract lets you lazy mint tokens, and distribute those lazy minted tokens via the drop mechanism.
 */

contract ERC1155Drop is
    ERC1155,
    ContractMetadata,
    Ownable,
    Royalty,
    Multicall,
    BatchMintMetadata,
    PrimarySale,
    LazyMint,
    DelayedReveal,
    DropSinglePhase1155,
    DefaultOperatorFilterer
{
    using TWStrings for uint256;

    /*//////////////////////////////////////////////////////////////
                        Mappings
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice Returns the total supply of NFTs of a given tokenId
     *  @dev Mapping from tokenId => total circulating supply of NFTs of that tokenId.
     */
    mapping(uint256 => uint256) public totalSupply;

    /*///////////////////////////////////////////////////////////////
                            Constructor
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        address _royaltyRecipient,
        uint128 _royaltyBps,
        address _primarySaleRecipient
    ) ERC1155(_name, _symbol) {
        _setupOwner(msg.sender);
        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);
        _setupPrimarySaleRecipient(_primarySaleRecipient);
        _setOperatorRestriction(true);
    }

    /*//////////////////////////////////////////////////////////////
                            ERC165 Logic
    //////////////////////////////////////////////////////////////*/

    /// @notice Returns whether this contract supports the given interface.
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, IERC165) returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
            interfaceId == 0x0e89341c || // ERC165 Interface ID for ERC1155MetadataURI
            interfaceId == type(IERC2981).interfaceId; // ERC165 ID for ERC2981
    }

    /*//////////////////////////////////////////////////////////////
                        Minting/burning logic
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice         Lets an owner or approved operator burn NFTs of the given tokenId.
     *
     *  @param _owner   The owner of the NFT to burn.
     *  @param _tokenId The tokenId of the NFT to burn.
     *  @param _amount  The amount of the NFT to burn.
     */
    function burn(
        address _owner,
        uint256 _tokenId,
        uint256 _amount
    ) external virtual {
        address caller = msg.sender;

        require(caller == _owner || isApprovedForAll[_owner][caller], "Unapproved caller");
        require(balanceOf[_owner][_tokenId] >= _amount, "Not enough tokens owned");

        _burn(_owner, _tokenId, _amount);
    }

    /**
     *  @notice         Lets an owner or approved operator burn NFTs of the given tokenIds.
     *
     *  @param _owner    The owner of the NFTs to burn.
     *  @param _tokenIds The tokenIds of the NFTs to burn.
     *  @param _amounts  The amounts of the NFTs to burn.
     */
    function burnBatch(
        address _owner,
        uint256[] memory _tokenIds,
        uint256[] memory _amounts
    ) external virtual {
        address caller = msg.sender;

        require(caller == _owner || isApprovedForAll[_owner][caller], "Unapproved caller");
        require(_tokenIds.length == _amounts.length, "Length mismatch");

        for (uint256 i = 0; i < _tokenIds.length; i += 1) {
            require(balanceOf[_owner][_tokenIds[i]] >= _amounts[i], "Not enough tokens owned");
        }

        _burnBatch(_owner, _tokenIds, _amounts);
    }

    /*///////////////////////////////////////////////////////////////
                    Overriden metadata logic
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice         Returns the metadata URI for an NFT.
     *  @dev            See `BatchMintMetadata` for handling of metadata in this contract.
     *
     *  @param _tokenId The tokenId of an NFT.
     */
    function uri(uint256 _tokenId) public view virtual override returns (string memory) {
        (uint256 batchId, ) = _getBatchId(_tokenId);
        string memory batchUri = _getBaseURI(_tokenId);

        if (isEncryptedBatch(batchId)) {
            return string(abi.encodePacked(batchUri, "0"));
        } else {
            return string(abi.encodePacked(batchUri, _tokenId.toString()));
        }
    }

    /*///////////////////////////////////////////////////////////////
                        Delayed reveal logic
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice       Lets an authorized address reveal a batch of delayed reveal NFTs.
     *
     *  @param _index The ID for the batch of delayed-reveal NFTs to reveal.
     *  @param _key   The key with which the base URI for the relevant batch of NFTs was encrypted.
     */
    function reveal(uint256 _index, bytes calldata _key) public virtual override returns (string memory revealedURI) {
        require(_canReveal(), "Not authorized");

        uint256 batchId = getBatchIdAtIndex(_index);
        revealedURI = getRevealURI(batchId, _key);

        _setEncryptedData(batchId, "");
        _setBaseURI(batchId, revealedURI);

        emit TokenURIRevealed(_index, revealedURI);
    }

    /*///////////////////////////////////////////////////////////////
                    Overriden lazy minting logic
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice                  Lets an authorized address lazy mint a given amount of NFTs.
     *
     *  @param _amount           The number of NFTs to lazy mint.
     *  @param _baseURIForTokens The placeholder base URI for the 'n' number of NFTs being lazy minted, where the
     *                           metadata for each of those NFTs is `${baseURIForTokens}/${tokenId}`.
     *  @param _data             The encrypted base URI + provenance hash for the batch of NFTs being lazy minted.
     *  @return batchId          A unique integer identifier for the batch of NFTs lazy minted together.
     */
    function lazyMint(
        uint256 _amount,
        string calldata _baseURIForTokens,
        bytes calldata _data
    ) public virtual override returns (uint256 batchId) {
        if (_data.length > 0) {
            (bytes memory encryptedURI, bytes32 provenanceHash) = abi.decode(_data, (bytes, bytes32));
            if (encryptedURI.length != 0 && provenanceHash != "") {
                _setEncryptedData(nextTokenIdToLazyMint + _amount, _data);
            }
        }

        return LazyMint.lazyMint(_amount, _baseURIForTokens, _data);
    }

    /// @notice The tokenId assigned to the next new NFT to be lazy minted.
    function nextTokenIdToMint() public view virtual returns (uint256) {
        return nextTokenIdToLazyMint;
    }

    /*//////////////////////////////////////////////////////////////
                        ERC-1155 overrides
    //////////////////////////////////////////////////////////////*/

    /// @dev See {ERC1155-setApprovalForAll}
    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override(ERC1155)
        onlyAllowedOperatorApproval(operator)
    {
        super.setApprovalForAll(operator, approved);
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override(ERC1155) onlyAllowedOperator(from) {
        super.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(ERC1155) onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /*///////////////////////////////////////////////////////////////
                        Internal functions
    //////////////////////////////////////////////////////////////*/

    /// @dev Runs before every `claim` function call.
    function _beforeClaim(
        uint256 _tokenId,
        address,
        uint256,
        address,
        uint256,
        AllowlistProof calldata,
        bytes memory
    ) internal view virtual override {
        if (_tokenId >= nextTokenIdToLazyMint) {
            revert("Not enough minted tokens");
        }
    }

    /// @dev Collects and distributes the primary sale value of NFTs being claimed.
    function _collectPriceOnClaim(
        address _primarySaleRecipient,
        uint256 _quantityToClaim,
        address _currency,
        uint256 _pricePerToken
    ) internal virtual override {
        if (_pricePerToken == 0) {
            return;
        }

        uint256 totalPrice = _quantityToClaim * _pricePerToken;

        if (_currency == CurrencyTransferLib.NATIVE_TOKEN) {
            if (msg.value != totalPrice) {
                revert("Must send total price.");
            }
        }

        address saleRecipient = _primarySaleRecipient == address(0) ? primarySaleRecipient() : _primarySaleRecipient;
        CurrencyTransferLib.transferCurrency(_currency, msg.sender, saleRecipient, totalPrice);
    }

    /// @dev Transfers the NFTs being claimed.
    function _transferTokensOnClaim(
        address _to,
        uint256 _tokenId,
        uint256 _quantityBeingClaimed
    ) internal virtual override {
        _mint(_to, _tokenId, _quantityBeingClaimed, "");
    }

    /// @dev Runs before every token transfer / mint / burn.
    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);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                totalSupply[ids[i]] -= amounts[i];
            }
        }
    }

    /// @dev Checks whether primary sale recipient can be set in the given execution context.
    function _canSetPrimarySaleRecipient() internal view virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Checks whether owner can be set in the given execution context.
    function _canSetOwner() internal view virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Checks whether royalty info can be set in the given execution context.
    function _canSetRoyaltyInfo() internal view virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Checks whether contract metadata can be set in the given execution context.
    function _canSetContractURI() internal view virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Checks whether platform fee info can be set in the given execution context.
    function _canSetClaimConditions() internal view virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Returns whether lazy minting can be done in the given execution context.
    function _canLazyMint() internal view virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Returns whether operator restriction can be set in the given execution context.
    function _canSetOperatorRestriction() internal virtual override returns (bool) {
        return msg.sender == owner();
    }

    /// @dev Checks whether NFTs can be revealed in the given execution context.
    function _canReveal() internal view virtual returns (bool) {
        return msg.sender == owner();
    }
}

File 3 of 40 : ERC1155.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

import "./interface/IERC1155.sol";
import "./interface/IERC1155Metadata.sol";
import "./interface/IERC1155Receiver.sol";

contract ERC1155 is IERC1155, IERC1155Metadata {
    /*//////////////////////////////////////////////////////////////
                        State variables
    //////////////////////////////////////////////////////////////*/

    string public name;
    string public symbol;

    /*//////////////////////////////////////////////////////////////
                            Mappings
    //////////////////////////////////////////////////////////////*/

    mapping(address => mapping(uint256 => uint256)) public balanceOf;

    mapping(address => mapping(address => bool)) public isApprovedForAll;

    mapping(uint256 => string) internal _uri;

    /*//////////////////////////////////////////////////////////////
                            Constructor
    //////////////////////////////////////////////////////////////*/

    constructor(string memory _name, string memory _symbol) {
        name = _name;
        symbol = _symbol;
    }

    /*//////////////////////////////////////////////////////////////
                            View functions
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
            interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI
    }

    function uri(uint256 tokenId) public view virtual override returns (string memory) {
        return _uri[tokenId];
    }

    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "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;
    }

    /*//////////////////////////////////////////////////////////////
                            ERC1155 logic
    //////////////////////////////////////////////////////////////*/

    function setApprovalForAll(address operator, bool approved) public virtual override {
        address owner = msg.sender;
        require(owner != operator, "APPROVING_SELF");
        isApprovedForAll[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(from == msg.sender || isApprovedForAll[from][msg.sender], "!OWNER_OR_APPROVED");
        _safeTransferFrom(from, to, id, amount, data);
    }

    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(from == msg.sender || isApprovedForAll[from][msg.sender], "!OWNER_OR_APPROVED");
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /*//////////////////////////////////////////////////////////////
                            Internal logic
    //////////////////////////////////////////////////////////////*/

    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "TO_ZERO_ADDR");

        address operator = msg.sender;

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = balanceOf[from][id];
        require(fromBalance >= amount, "INSUFFICIENT_BAL");
        unchecked {
            balanceOf[from][id] = fromBalance - amount;
        }
        balanceOf[to][id] += amount;

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

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

    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "LENGTH_MISMATCH");
        require(to != address(0), "TO_ZERO_ADDR");

        address operator = msg.sender;

        _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 = balanceOf[from][id];
            require(fromBalance >= amount, "INSUFFICIENT_BAL");
            unchecked {
                balanceOf[from][id] = fromBalance - amount;
            }
            balanceOf[to][id] += amount;
        }

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

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

    function _setTokenURI(uint256 tokenId, string memory newuri) internal virtual {
        _uri[tokenId] = newuri;
    }

    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "TO_ZERO_ADDR");

        address operator = msg.sender;

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

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

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

    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "TO_ZERO_ADDR");
        require(ids.length == amounts.length, "LENGTH_MISMATCH");

        address operator = msg.sender;

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

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

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

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

    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "FROM_ZERO_ADDR");

        address operator = msg.sender;

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

        uint256 fromBalance = balanceOf[from][id];
        require(fromBalance >= amount, "INSUFFICIENT_BAL");
        unchecked {
            balanceOf[from][id] = fromBalance - amount;
        }

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

    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "FROM_ZERO_ADDR");
        require(ids.length == amounts.length, "LENGTH_MISMATCH");

        address operator = msg.sender;

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

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

            uint256 fromBalance = balanceOf[from][id];
            require(fromBalance >= amount, "INSUFFICIENT_BAL");
            unchecked {
                balanceOf[from][id] = fromBalance - amount;
            }
        }

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

    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.code.length > 0) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("TOKENS_REJECTED");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("!ERC1155RECEIVER");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("TOKENS_REJECTED");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("!ERC1155RECEIVER");
            }
        }
    }

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

        return array;
    }
}

File 4 of 40 : IERC1155.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/**
    @title ERC-1155 Multi Token Standard
    @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md
    Note: The ERC-165 identifier for this interface is 0xd9b67a26.
 */
interface IERC1155 {
    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_id` argument MUST be the token type being transferred.
        The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferSingle(
        address indexed _operator,
        address indexed _from,
        address indexed _to,
        uint256 _id,
        uint256 _value
    );

    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_ids` argument MUST be the list of tokens being transferred.
        The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferBatch(
        address indexed _operator,
        address indexed _from,
        address indexed _to,
        uint256[] _ids,
        uint256[] _values
    );

    /**
        @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absense of an event assumes disabled).
    */
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /**
        @dev MUST emit when the URI is updated for a token ID.
        URIs are defined in RFC 3986.
        The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
    */
    event URI(string _value, uint256 indexed _id);

    /**
        @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
        MUST revert on any other error.
        MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
        After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _id      ID of the token type
        @param _value   Transfer amount
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
    */
    function safeTransferFrom(
        address _from,
        address _to,
        uint256 _id,
        uint256 _value,
        bytes calldata _data
    ) external;

    /**
        @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if length of `_ids` is not the same as length of `_values`.
        MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
        MUST revert on any other error.
        MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
        Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
        After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _ids     IDs of each token type (order and length must match _values array)
        @param _values  Transfer amounts per token type (order and length must match _ids array)
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
    */
    function safeBatchTransferFrom(
        address _from,
        address _to,
        uint256[] calldata _ids,
        uint256[] calldata _values,
        bytes calldata _data
    ) external;

    /**
        @notice Get the balance of an account's Tokens.
        @param _owner  The address of the token holder
        @param _id     ID of the Token
        @return        The _owner's balance of the Token type requested
     */
    function balanceOf(address _owner, uint256 _id) external view returns (uint256);

    /**
        @notice Get the balance of multiple account/token pairs
        @param _owners The addresses of the token holders
        @param _ids    ID of the Tokens
        @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
     */
    function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids)
        external
        view
        returns (uint256[] memory);

    /**
        @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
        @dev MUST emit the ApprovalForAll event on success.
        @param _operator  Address to add to the set of authorized operators
        @param _approved  True if the operator is approved, false to revoke approval
    */
    function setApprovalForAll(address _operator, bool _approved) external;

    /**
        @notice Queries the approval status of an operator for a given owner.
        @param _owner     The owner of the Tokens
        @param _operator  Address of authorized operator
        @return           True if the operator is approved, false if not
    */
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

File 5 of 40 : IERC1155Metadata.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/**
    Note: The ERC-165 identifier for this interface is 0x0e89341c.
*/
interface IERC1155Metadata {
    /**
        @notice A distinct Uniform Resource Identifier (URI) for a given token.
        @dev URIs are defined in RFC 3986.
        The URI may point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
        @return URI string
    */
    function uri(uint256 _id) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * [EIP](https://eips.ethereum.org/EIPS/eip-165).
 *
 * 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
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * 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 8 of 40 : IERC20.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 9 of 40 : IERC2981.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 10 of 40 : BatchMintMetadata.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  @title   Batch-mint Metadata
 *  @notice  The `BatchMintMetadata` is a contract extension for any base NFT contract. It lets the smart contract
 *           using this extension set metadata for `n` number of NFTs all at once. This is enabled by storing a single
 *           base URI for a batch of `n` NFTs, where the metadata for each NFT in a relevant batch is `baseURI/tokenId`.
 */

contract BatchMintMetadata {
    /// @dev Largest tokenId of each batch of tokens with the same baseURI.
    uint256[] private batchIds;

    /// @dev Mapping from id of a batch of tokens => to base URI for the respective batch of tokens.
    mapping(uint256 => string) private baseURI;

    /**
     *  @notice         Returns the count of batches of NFTs.
     *  @dev            Each batch of tokens has an in ID and an associated `baseURI`.
     *                  See {batchIds}.
     */
    function getBaseURICount() public view returns (uint256) {
        return batchIds.length;
    }

    /**
     *  @notice         Returns the ID for the batch of tokens the given tokenId belongs to.
     *  @dev            See {getBaseURICount}.
     *  @param _index   ID of a token.
     */
    function getBatchIdAtIndex(uint256 _index) public view returns (uint256) {
        if (_index >= getBaseURICount()) {
            revert("Invalid index");
        }
        return batchIds[_index];
    }

    /// @dev Returns the id for the batch of tokens the given tokenId belongs to.
    function _getBatchId(uint256 _tokenId) internal view returns (uint256 batchId, uint256 index) {
        uint256 numOfTokenBatches = getBaseURICount();
        uint256[] memory indices = batchIds;

        for (uint256 i = 0; i < numOfTokenBatches; i += 1) {
            if (_tokenId < indices[i]) {
                index = i;
                batchId = indices[i];

                return (batchId, index);
            }
        }

        revert("Invalid tokenId");
    }

    /// @dev Returns the baseURI for a token. The intended metadata URI for the token is baseURI + tokenId.
    function _getBaseURI(uint256 _tokenId) internal view returns (string memory) {
        uint256 numOfTokenBatches = getBaseURICount();
        uint256[] memory indices = batchIds;

        for (uint256 i = 0; i < numOfTokenBatches; i += 1) {
            if (_tokenId < indices[i]) {
                return baseURI[indices[i]];
            }
        }
        revert("Invalid tokenId");
    }

    /// @dev Sets the base URI for the batch of tokens with the given batchId.
    function _setBaseURI(uint256 _batchId, string memory _baseURI) internal {
        baseURI[_batchId] = _baseURI;
    }

    /// @dev Mints a batch of tokenIds and associates a common baseURI to all those Ids.
    function _batchMintMetadata(
        uint256 _startId,
        uint256 _amountToMint,
        string memory _baseURIForTokens
    ) internal returns (uint256 nextTokenIdToMint, uint256 batchId) {
        batchId = _startId + _amountToMint;
        nextTokenIdToMint = batchId;

        batchIds.push(batchId);

        baseURI[batchId] = _baseURIForTokens;
    }
}

File 11 of 40 : ContractMetadata.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IContractMetadata.sol";

/**
 *  @title   Contract Metadata
 *  @notice  Thirdweb's `ContractMetadata` is a contract extension for any base contracts. It lets you set a metadata URI
 *           for you contract.
 *           Additionally, `ContractMetadata` is necessary for NFT contracts that want royalties to get distributed on OpenSea.
 */

abstract contract ContractMetadata is IContractMetadata {
    /// @notice Returns the contract metadata URI.
    string public override contractURI;

    /**
     *  @notice         Lets a contract admin set the URI for contract-level metadata.
     *  @dev            Caller should be authorized to setup contractURI, e.g. contract admin.
     *                  See {_canSetContractURI}.
     *                  Emits {ContractURIUpdated Event}.
     *
     *  @param _uri     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     */
    function setContractURI(string memory _uri) external override {
        if (!_canSetContractURI()) {
            revert("Not authorized");
        }

        _setupContractURI(_uri);
    }

    /// @dev Lets a contract admin set the URI for contract-level metadata.
    function _setupContractURI(string memory _uri) internal {
        string memory prevURI = contractURI;
        contractURI = _uri;

        emit ContractURIUpdated(prevURI, _uri);
    }

    /// @dev Returns whether contract metadata can be set in the given execution context.
    function _canSetContractURI() internal view virtual returns (bool);
}

File 12 of 40 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

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

/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}

    function subscribeToRegistry(address _subscription) external {
        require(_canSetOperatorRestriction(), "Not authorized to subscribe to registry.");
        _register(_subscription, true);
    }
}

File 13 of 40 : DelayedReveal.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IDelayedReveal.sol";

/**
 *  @title   Delayed Reveal
 *  @notice  Thirdweb's `DelayedReveal` is a contract extension for base NFT contracts. It lets you create batches of
 *           'delayed-reveal' NFTs. You can learn more about the usage of delayed reveal NFTs here - https://blog.thirdweb.com/delayed-reveal-nfts
 */

abstract contract DelayedReveal is IDelayedReveal {
    /// @dev Mapping from tokenId of a batch of tokens => to delayed reveal data.
    mapping(uint256 => bytes) public encryptedData;

    /// @dev Sets the delayed reveal data for a batchId.
    function _setEncryptedData(uint256 _batchId, bytes memory _encryptedData) internal {
        encryptedData[_batchId] = _encryptedData;
    }

    /**
     *  @notice             Returns revealed URI for a batch of NFTs.
     *  @dev                Reveal encrypted base URI for `_batchId` with caller/admin's `_key` used for encryption.
     *                      Reverts if there's no encrypted URI for `_batchId`.
     *                      See {encryptDecrypt}.
     *
     *  @param _batchId     ID of the batch for which URI is being revealed.
     *  @param _key         Secure key used by caller/admin for encryption of baseURI.
     *
     *  @return revealedURI Decrypted base URI.
     */
    function getRevealURI(uint256 _batchId, bytes calldata _key) public view returns (string memory revealedURI) {
        bytes memory data = encryptedData[_batchId];
        if (data.length == 0) {
            revert("Nothing to reveal");
        }

        (bytes memory encryptedURI, bytes32 provenanceHash) = abi.decode(data, (bytes, bytes32));

        revealedURI = string(encryptDecrypt(encryptedURI, _key));

        require(keccak256(abi.encodePacked(revealedURI, _key, block.chainid)) == provenanceHash, "Incorrect key");
    }

    /**
     *  @notice         Encrypt/decrypt data on chain.
     *  @dev            Encrypt/decrypt given `data` with `key`. Uses inline assembly.
     *                  See: https://ethereum.stackexchange.com/questions/69825/decrypt-message-on-chain
     *
     *  @param data     Bytes of data to encrypt/decrypt.
     *  @param key      Secure key used by caller for encryption/decryption.
     *
     *  @return result  Output after encryption/decryption of given data.
     */
    function encryptDecrypt(bytes memory data, bytes calldata key) public pure override returns (bytes memory result) {
        // Store data length on stack for later use
        uint256 length = data.length;

        // solhint-disable-next-line no-inline-assembly
        assembly {
            // Set result to free memory pointer
            result := mload(0x40)
            // Increase free memory pointer by lenght + 32
            mstore(0x40, add(add(result, length), 32))
            // Set result length
            mstore(result, length)
        }

        // Iterate over the data stepping by 32 bytes
        for (uint256 i = 0; i < length; i += 32) {
            // Generate hash of the key and offset
            bytes32 hash = keccak256(abi.encodePacked(key, i));

            bytes32 chunk;
            // solhint-disable-next-line no-inline-assembly
            assembly {
                // Read 32-bytes data chunk
                chunk := mload(add(data, add(i, 32)))
            }
            // XOR the chunk with hash
            chunk ^= hash;
            // solhint-disable-next-line no-inline-assembly
            assembly {
                // Write 32-byte encrypted chunk
                mstore(add(result, add(i, 32)), chunk)
            }
        }
    }

    /**
     *  @notice         Returns whether the relvant batch of NFTs is subject to a delayed reveal.
     *  @dev            Returns `true` if `_batchId`'s base URI is encrypted.
     *  @param _batchId ID of a batch of NFTs.
     */
    function isEncryptedBatch(uint256 _batchId) public view returns (bool) {
        return encryptedData[_batchId].length > 0;
    }
}

File 14 of 40 : DropSinglePhase1155.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IDropSinglePhase1155.sol";
import "../lib/MerkleProof.sol";

abstract contract DropSinglePhase1155 is IDropSinglePhase1155 {
    /*///////////////////////////////////////////////////////////////
                                Mappings
    //////////////////////////////////////////////////////////////*/

    /// @dev Mapping from tokenId => active claim condition for the tokenId.
    mapping(uint256 => ClaimCondition) public claimCondition;

    /// @dev Mapping from tokenId => active claim condition's UID.
    mapping(uint256 => bytes32) private conditionId;

    /**
     *  @dev Map from a claim condition uid and account to supply claimed by account.
     */
    mapping(bytes32 => mapping(address => uint256)) private supplyClaimedByWallet;

    /*///////////////////////////////////////////////////////////////
                            Drop logic
    //////////////////////////////////////////////////////////////*/

    /// @dev Lets an account claim tokens.
    function claim(
        address _receiver,
        uint256 _tokenId,
        uint256 _quantity,
        address _currency,
        uint256 _pricePerToken,
        AllowlistProof calldata _allowlistProof,
        bytes memory _data
    ) public payable virtual override {
        _beforeClaim(_tokenId, _receiver, _quantity, _currency, _pricePerToken, _allowlistProof, _data);

        ClaimCondition memory condition = claimCondition[_tokenId];
        bytes32 activeConditionId = conditionId[_tokenId];

        verifyClaim(_tokenId, _dropMsgSender(), _quantity, _currency, _pricePerToken, _allowlistProof);

        // Update contract state.
        condition.supplyClaimed += _quantity;
        supplyClaimedByWallet[activeConditionId][_dropMsgSender()] += _quantity;
        claimCondition[_tokenId] = condition;

        // If there's a price, collect price.
        _collectPriceOnClaim(address(0), _quantity, _currency, _pricePerToken);

        // Mint the relevant NFTs to claimer.
        _transferTokensOnClaim(_receiver, _tokenId, _quantity);

        emit TokensClaimed(_dropMsgSender(), _receiver, _tokenId, _quantity);

        _afterClaim(_tokenId, _receiver, _quantity, _currency, _pricePerToken, _allowlistProof, _data);
    }

    /// @dev Lets a contract admin set claim conditions.
    function setClaimConditions(
        uint256 _tokenId,
        ClaimCondition calldata _condition,
        bool _resetClaimEligibility
    ) external override {
        if (!_canSetClaimConditions()) {
            revert("Not authorized");
        }

        ClaimCondition memory condition = claimCondition[_tokenId];
        bytes32 targetConditionId = conditionId[_tokenId];

        uint256 supplyClaimedAlready = condition.supplyClaimed;

        if (targetConditionId == bytes32(0) || _resetClaimEligibility) {
            supplyClaimedAlready = 0;
            targetConditionId = keccak256(abi.encodePacked(_dropMsgSender(), block.number, _tokenId));
        }

        if (supplyClaimedAlready > _condition.maxClaimableSupply) {
            revert("max supply claimed");
        }

        ClaimCondition memory updatedCondition = ClaimCondition({
            startTimestamp: _condition.startTimestamp,
            maxClaimableSupply: _condition.maxClaimableSupply,
            supplyClaimed: supplyClaimedAlready,
            quantityLimitPerWallet: _condition.quantityLimitPerWallet,
            merkleRoot: _condition.merkleRoot,
            pricePerToken: _condition.pricePerToken,
            currency: _condition.currency,
            metadata: _condition.metadata
        });

        claimCondition[_tokenId] = updatedCondition;
        conditionId[_tokenId] = targetConditionId;

        emit ClaimConditionUpdated(_tokenId, _condition, _resetClaimEligibility);
    }

    /// @dev Checks a request to claim NFTs against the active claim condition's criteria.
    function verifyClaim(
        uint256 _tokenId,
        address _claimer,
        uint256 _quantity,
        address _currency,
        uint256 _pricePerToken,
        AllowlistProof calldata _allowlistProof
    ) public view returns (bool isOverride) {
        ClaimCondition memory currentClaimPhase = claimCondition[_tokenId];
        uint256 claimLimit = currentClaimPhase.quantityLimitPerWallet;
        uint256 claimPrice = currentClaimPhase.pricePerToken;
        address claimCurrency = currentClaimPhase.currency;

        if (currentClaimPhase.merkleRoot != bytes32(0)) {
            (isOverride, ) = MerkleProof.verify(
                _allowlistProof.proof,
                currentClaimPhase.merkleRoot,
                keccak256(
                    abi.encodePacked(
                        _claimer,
                        _allowlistProof.quantityLimitPerWallet,
                        _allowlistProof.pricePerToken,
                        _allowlistProof.currency
                    )
                )
            );
        }

        if (isOverride) {
            claimLimit = _allowlistProof.quantityLimitPerWallet != 0
                ? _allowlistProof.quantityLimitPerWallet
                : claimLimit;
            claimPrice = _allowlistProof.pricePerToken != type(uint256).max
                ? _allowlistProof.pricePerToken
                : claimPrice;
            claimCurrency = _allowlistProof.pricePerToken != type(uint256).max && _allowlistProof.currency != address(0)
                ? _allowlistProof.currency
                : claimCurrency;
        }

        uint256 _supplyClaimedByWallet = supplyClaimedByWallet[conditionId[_tokenId]][_claimer];

        if (_currency != claimCurrency || _pricePerToken != claimPrice) {
            revert("!PriceOrCurrency");
        }

        if (_quantity == 0 || (_quantity + _supplyClaimedByWallet > claimLimit)) {
            revert("!Qty");
        }

        if (currentClaimPhase.supplyClaimed + _quantity > currentClaimPhase.maxClaimableSupply) {
            revert("!MaxSupply");
        }

        if (currentClaimPhase.startTimestamp > block.timestamp) {
            revert("cant claim yet");
        }
    }

    /// @dev Returns the supply claimed by claimer for active conditionId.
    function getSupplyClaimedByWallet(uint256 _tokenId, address _claimer) public view returns (uint256) {
        return supplyClaimedByWallet[conditionId[_tokenId]][_claimer];
    }

    /*////////////////////////////////////////////////////////////////////
        Optional hooks that can be implemented in the derived contract
    ///////////////////////////////////////////////////////////////////*/

    /// @dev Exposes the ability to override the msg sender.
    function _dropMsgSender() internal virtual returns (address) {
        return msg.sender;
    }

    /// @dev Runs before every `claim` function call.
    function _beforeClaim(
        uint256 _tokenId,
        address _receiver,
        uint256 _quantity,
        address _currency,
        uint256 _pricePerToken,
        AllowlistProof calldata _allowlistProof,
        bytes memory _data
    ) internal virtual {}

    /// @dev Runs after every `claim` function call.
    function _afterClaim(
        uint256 _tokenId,
        address _receiver,
        uint256 _quantity,
        address _currency,
        uint256 _pricePerToken,
        AllowlistProof calldata _allowlistProof,
        bytes memory _data
    ) internal virtual {}

    /// @dev Collects and distributes the primary sale value of NFTs being claimed.
    function _collectPriceOnClaim(
        address _primarySaleRecipient,
        uint256 _quantityToClaim,
        address _currency,
        uint256 _pricePerToken
    ) internal virtual;

    /// @dev Transfers the NFTs being claimed.
    function _transferTokensOnClaim(
        address _to,
        uint256 _tokenId,
        uint256 _quantityBeingClaimed
    ) internal virtual;

    function _canSetClaimConditions() internal view virtual returns (bool);
}

File 15 of 40 : LazyMint.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/ILazyMint.sol";
import "./BatchMintMetadata.sol";

/**
 *  The `LazyMint` is a contract extension for any base NFT contract. It lets you 'lazy mint' any number of NFTs
 *  at once. Here, 'lazy mint' means defining the metadata for particular tokenIds of your NFT contract, without actually
 *  minting a non-zero balance of NFTs of those tokenIds.
 */

abstract contract LazyMint is ILazyMint, BatchMintMetadata {
    /// @notice The tokenId assigned to the next new NFT to be lazy minted.
    uint256 internal nextTokenIdToLazyMint;

    /**
     *  @notice                  Lets an authorized address lazy mint a given amount of NFTs.
     *
     *  @param _amount           The number of NFTs to lazy mint.
     *  @param _baseURIForTokens The base URI for the 'n' number of NFTs being lazy minted, where the metadata for each
     *                           of those NFTs is `${baseURIForTokens}/${tokenId}`.
     *  @param _data             Additional bytes data to be used at the discretion of the consumer of the contract.
     *  @return batchId          A unique integer identifier for the batch of NFTs lazy minted together.
     */
    function lazyMint(
        uint256 _amount,
        string calldata _baseURIForTokens,
        bytes calldata _data
    ) public virtual override returns (uint256 batchId) {
        if (!_canLazyMint()) {
            revert("Not authorized");
        }

        if (_amount == 0) {
            revert("0 amt");
        }

        uint256 startId = nextTokenIdToLazyMint;

        (nextTokenIdToLazyMint, batchId) = _batchMintMetadata(startId, _amount, _baseURIForTokens);

        emit TokensLazyMinted(startId, startId + _amount - 1, _baseURIForTokens, _data);

        return batchId;
    }

    /// @dev Returns whether lazy minting can be performed in the given execution context.
    function _canLazyMint() internal view virtual returns (bool);
}

File 16 of 40 : Multicall.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "../lib/TWAddress.sol";
import "./interface/IMulticall.sol";

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * _Available since v4.1._
 */
contract Multicall is IMulticall {
    /**
     *  @notice Receives and executes a batch of function calls on this contract.
     *  @dev Receives and executes a batch of function calls on this contract.
     *
     *  @param data The bytes data that makes up the batch of function calls to execute.
     *  @return results The bytes data that makes up the result of the batch of function calls executed.
     */
    function multicall(bytes[] calldata data) external virtual override returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            results[i] = TWAddress.functionDelegateCall(address(this), data[i]);
        }
        return results;
    }
}

File 17 of 40 : OperatorFilterToggle.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IOperatorFilterToggle.sol";

abstract contract OperatorFilterToggle is IOperatorFilterToggle {
    bool public operatorRestriction;

    function setOperatorRestriction(bool _restriction) external {
        require(_canSetOperatorRestriction(), "Not authorized to set operator restriction.");
        _setOperatorRestriction(_restriction);
    }

    function _setOperatorRestriction(bool _restriction) internal {
        operatorRestriction = _restriction;
        emit OperatorRestriction(_restriction);
    }

    function _canSetOperatorRestriction() internal virtual returns (bool);
}

File 18 of 40 : OperatorFilterer.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IOperatorFilterRegistry.sol";
import "./OperatorFilterToggle.sol";

/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */

abstract contract OperatorFilterer is OperatorFilterToggle {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        _register(subscriptionOrRegistrantToCopy, subscribe);
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (operatorRestriction) {
            if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
                if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                    revert OperatorNotAllowed(operator);
                }
            }
        }
    }

    function _register(address subscriptionOrRegistrantToCopy, bool subscribe) internal {
        // Is the registry deployed?
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // Is the subscription contract deployed?
            if (address(subscriptionOrRegistrantToCopy).code.length > 0) {
                // Do we want to subscribe?
                if (subscribe) {
                    OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                }
            } else {
                OPERATOR_FILTER_REGISTRY.register(address(this));
            }
        }
    }
}

File 19 of 40 : Ownable.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IOwnable.sol";

/**
 *  @title   Ownable
 *  @notice  Thirdweb's `Ownable` is a contract extension to be used with any base contract. It exposes functions for setting and reading
 *           who the 'owner' of the inheriting smart contract is, and lets the inheriting contract perform conditional logic that uses
 *           information about who the contract's owner is.
 */

abstract contract Ownable is IOwnable {
    /// @dev Owner of the contract (purpose: OpenSea compatibility)
    address private _owner;

    /// @dev Reverts if caller is not the owner.
    modifier onlyOwner() {
        if (msg.sender != _owner) {
            revert("Not authorized");
        }
        _;
    }

    /**
     *  @notice Returns the owner of the contract.
     */
    function owner() public view override returns (address) {
        return _owner;
    }

    /**
     *  @notice Lets an authorized wallet set a new owner for the contract.
     *  @param _newOwner The address to set as the new owner of the contract.
     */
    function setOwner(address _newOwner) external override {
        if (!_canSetOwner()) {
            revert("Not authorized");
        }
        _setupOwner(_newOwner);
    }

    /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin.
    function _setupOwner(address _newOwner) internal {
        address _prevOwner = _owner;
        _owner = _newOwner;

        emit OwnerUpdated(_prevOwner, _newOwner);
    }

    /// @dev Returns whether owner can be set in the given execution context.
    function _canSetOwner() internal view virtual returns (bool);
}

File 20 of 40 : Permissions.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IPermissions.sol";
import "../lib/TWStrings.sol";

/**
 *  @title   Permissions
 *  @dev     This contracts provides extending-contracts with role-based access control mechanisms
 */
contract Permissions is IPermissions {
    /// @dev Map from keccak256 hash of a role => a map from address => whether address has role.
    mapping(bytes32 => mapping(address => bool)) private _hasRole;

    /// @dev Map from keccak256 hash of a role to role admin. See {getRoleAdmin}.
    mapping(bytes32 => bytes32) private _getRoleAdmin;

    /// @dev Default admin role for all roles. Only accounts with this role can grant/revoke other roles.
    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /// @dev Modifier that checks if an account has the specified role; reverts otherwise.
    modifier onlyRole(bytes32 role) {
        _checkRole(role, msg.sender);
        _;
    }

    /**
     *  @notice         Checks whether an account has a particular role.
     *  @dev            Returns `true` if `account` has been granted `role`.
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *  @param account  Address of the account for which the role is being checked.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _hasRole[role][account];
    }

    /**
     *  @notice         Checks whether an account has a particular role;
     *                  role restrictions can be swtiched on and off.
     *
     *  @dev            Returns `true` if `account` has been granted `role`.
     *                  Role restrictions can be swtiched on and off:
     *                      - If address(0) has ROLE, then the ROLE restrictions
     *                        don't apply.
     *                      - If address(0) does not have ROLE, then the ROLE
     *                        restrictions will apply.
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *  @param account  Address of the account for which the role is being checked.
     */
    function hasRoleWithSwitch(bytes32 role, address account) public view returns (bool) {
        if (!_hasRole[role][address(0)]) {
            return _hasRole[role][account];
        }

        return true;
    }

    /**
     *  @notice         Returns the admin role that controls the specified role.
     *  @dev            See {grantRole} and {revokeRole}.
     *                  To change a role's admin, use {_setRoleAdmin}.
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     */
    function getRoleAdmin(bytes32 role) external view override returns (bytes32) {
        return _getRoleAdmin[role];
    }

    /**
     *  @notice         Grants a role to an account, if not previously granted.
     *  @dev            Caller must have admin role for the `role`.
     *                  Emits {RoleGranted Event}.
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *  @param account  Address of the account to which the role is being granted.
     */
    function grantRole(bytes32 role, address account) public virtual override {
        _checkRole(_getRoleAdmin[role], msg.sender);
        if (_hasRole[role][account]) {
            revert("Can only grant to non holders");
        }
        _setupRole(role, account);
    }

    /**
     *  @notice         Revokes role from an account.
     *  @dev            Caller must have admin role for the `role`.
     *                  Emits {RoleRevoked Event}.
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *  @param account  Address of the account from which the role is being revoked.
     */
    function revokeRole(bytes32 role, address account) public virtual override {
        _checkRole(_getRoleAdmin[role], msg.sender);
        _revokeRole(role, account);
    }

    /**
     *  @notice         Revokes role from the account.
     *  @dev            Caller must have the `role`, with caller being the same as `account`.
     *                  Emits {RoleRevoked Event}.
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *  @param account  Address of the account from which the role is being revoked.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        if (msg.sender != account) {
            revert("Can only renounce for self");
        }
        _revokeRole(role, account);
    }

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

    /// @dev Sets up `role` for `account`
    function _setupRole(bytes32 role, address account) internal virtual {
        _hasRole[role][account] = true;
        emit RoleGranted(role, account, msg.sender);
    }

    /// @dev Revokes `role` from `account`
    function _revokeRole(bytes32 role, address account) internal virtual {
        _checkRole(role, account);
        delete _hasRole[role][account];
        emit RoleRevoked(role, account, msg.sender);
    }

    /// @dev Checks `role` for `account`. Reverts with a message including the required role.
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!_hasRole[role][account]) {
            revert(
                string(
                    abi.encodePacked(
                        "Permissions: account ",
                        TWStrings.toHexString(uint160(account), 20),
                        " is missing role ",
                        TWStrings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /// @dev Checks `role` for `account`. Reverts with a message including the required role.
    function _checkRoleWithSwitch(bytes32 role, address account) internal view virtual {
        if (!hasRoleWithSwitch(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "Permissions: account ",
                        TWStrings.toHexString(uint160(account), 20),
                        " is missing role ",
                        TWStrings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }
}

File 21 of 40 : PrimarySale.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IPrimarySale.sol";

/**
 *  @title   Primary Sale
 *  @notice  Thirdweb's `PrimarySale` is a contract extension to be used with any base contract. It exposes functions for setting and reading
 *           the recipient of primary sales, and lets the inheriting contract perform conditional logic that uses information about
 *           primary sales, if desired.
 */

abstract contract PrimarySale is IPrimarySale {
    /// @dev The address that receives all primary sales value.
    address private recipient;

    /// @dev Returns primary sale recipient address.
    function primarySaleRecipient() public view override returns (address) {
        return recipient;
    }

    /**
     *  @notice         Updates primary sale recipient.
     *  @dev            Caller should be authorized to set primary sales info.
     *                  See {_canSetPrimarySaleRecipient}.
     *                  Emits {PrimarySaleRecipientUpdated Event}; See {_setupPrimarySaleRecipient}.
     *
     *  @param _saleRecipient   Address to be set as new recipient of primary sales.
     */
    function setPrimarySaleRecipient(address _saleRecipient) external override {
        if (!_canSetPrimarySaleRecipient()) {
            revert("Not authorized");
        }
        _setupPrimarySaleRecipient(_saleRecipient);
    }

    /// @dev Lets a contract admin set the recipient for all primary sales.
    function _setupPrimarySaleRecipient(address _saleRecipient) internal {
        recipient = _saleRecipient;
        emit PrimarySaleRecipientUpdated(_saleRecipient);
    }

    /// @dev Returns whether primary sale recipient can be set in the given execution context.
    function _canSetPrimarySaleRecipient() internal view virtual returns (bool);
}

File 22 of 40 : Royalty.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IRoyalty.sol";

/**
 *  @title   Royalty
 *  @notice  Thirdweb's `Royalty` is a contract extension to be used with any base contract. It exposes functions for setting and reading
 *           the recipient of royalty fee and the royalty fee basis points, and lets the inheriting contract perform conditional logic
 *           that uses information about royalty fees, if desired.
 *
 *  @dev     The `Royalty` contract is ERC2981 compliant.
 */

abstract contract Royalty is IRoyalty {
    /// @dev The (default) address that receives all royalty value.
    address private royaltyRecipient;

    /// @dev The (default) % of a sale to take as royalty (in basis points).
    uint16 private royaltyBps;

    /// @dev Token ID => royalty recipient and bps for token
    mapping(uint256 => RoyaltyInfo) private royaltyInfoForToken;

    /**
     *  @notice   View royalty info for a given token and sale price.
     *  @dev      Returns royalty amount and recipient for `tokenId` and `salePrice`.
     *  @param tokenId          The tokenID of the NFT for which to query royalty info.
     *  @param salePrice        Sale price of the token.
     *
     *  @return receiver        Address of royalty recipient account.
     *  @return royaltyAmount   Royalty amount calculated at current royaltyBps value.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        virtual
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        (address recipient, uint256 bps) = getRoyaltyInfoForToken(tokenId);
        receiver = recipient;
        royaltyAmount = (salePrice * bps) / 10_000;
    }

    /**
     *  @notice          View royalty info for a given token.
     *  @dev             Returns royalty recipient and bps for `_tokenId`.
     *  @param _tokenId  The tokenID of the NFT for which to query royalty info.
     */
    function getRoyaltyInfoForToken(uint256 _tokenId) public view override returns (address, uint16) {
        RoyaltyInfo memory royaltyForToken = royaltyInfoForToken[_tokenId];

        return
            royaltyForToken.recipient == address(0)
                ? (royaltyRecipient, uint16(royaltyBps))
                : (royaltyForToken.recipient, uint16(royaltyForToken.bps));
    }

    /**
     *  @notice Returns the defualt royalty recipient and BPS for this contract's NFTs.
     */
    function getDefaultRoyaltyInfo() external view override returns (address, uint16) {
        return (royaltyRecipient, uint16(royaltyBps));
    }

    /**
     *  @notice         Updates default royalty recipient and bps.
     *  @dev            Caller should be authorized to set royalty info.
     *                  See {_canSetRoyaltyInfo}.
     *                  Emits {DefaultRoyalty Event}; See {_setupDefaultRoyaltyInfo}.
     *
     *  @param _royaltyRecipient   Address to be set as default royalty recipient.
     *  @param _royaltyBps         Updated royalty bps.
     */
    function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external override {
        if (!_canSetRoyaltyInfo()) {
            revert("Not authorized");
        }

        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);
    }

    /// @dev Lets a contract admin update the default royalty recipient and bps.
    function _setupDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) internal {
        if (_royaltyBps > 10_000) {
            revert("Exceeds max bps");
        }

        royaltyRecipient = _royaltyRecipient;
        royaltyBps = uint16(_royaltyBps);

        emit DefaultRoyalty(_royaltyRecipient, _royaltyBps);
    }

    /**
     *  @notice         Updates default royalty recipient and bps for a particular token.
     *  @dev            Sets royalty info for `_tokenId`. Caller should be authorized to set royalty info.
     *                  See {_canSetRoyaltyInfo}.
     *                  Emits {RoyaltyForToken Event}; See {_setupRoyaltyInfoForToken}.
     *
     *  @param _recipient   Address to be set as royalty recipient for given token Id.
     *  @param _bps         Updated royalty bps for the token Id.
     */
    function setRoyaltyInfoForToken(
        uint256 _tokenId,
        address _recipient,
        uint256 _bps
    ) external override {
        if (!_canSetRoyaltyInfo()) {
            revert("Not authorized");
        }

        _setupRoyaltyInfoForToken(_tokenId, _recipient, _bps);
    }

    /// @dev Lets a contract admin set the royalty recipient and bps for a particular token Id.
    function _setupRoyaltyInfoForToken(
        uint256 _tokenId,
        address _recipient,
        uint256 _bps
    ) internal {
        if (_bps > 10_000) {
            revert("Exceeds max bps");
        }

        royaltyInfoForToken[_tokenId] = RoyaltyInfo({ recipient: _recipient, bps: _bps });

        emit RoyaltyForToken(_tokenId, _recipient, _bps);
    }

    /// @dev Returns whether royalty info can be set in the given execution context.
    function _canSetRoyaltyInfo() internal view virtual returns (bool);
}

File 23 of 40 : IClaimCondition.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  The interface `IClaimCondition` is written for thirdweb's 'Drop' contracts, which are distribution mechanisms for tokens.
 *
 *  A claim condition defines criteria under which accounts can mint tokens. Claim conditions can be overwritten
 *  or added to by the contract admin. At any moment, there is only one active claim condition.
 */

interface IClaimCondition {
    /**
     *  @notice The criteria that make up a claim condition.
     *
     *  @param startTimestamp                 The unix timestamp after which the claim condition applies.
     *                                        The same claim condition applies until the `startTimestamp`
     *                                        of the next claim condition.
     *
     *  @param maxClaimableSupply             The maximum total number of tokens that can be claimed under
     *                                        the claim condition.
     *
     *  @param supplyClaimed                  At any given point, the number of tokens that have been claimed
     *                                        under the claim condition.
     *
     *  @param quantityLimitPerWallet         The maximum number of tokens that can be claimed by a wallet.
     *
     *  @param merkleRoot                     The allowlist of addresses that can claim tokens under the claim
     *                                        condition.
     *
     *  @param pricePerToken                  The price required to pay per token claimed.
     *
     *  @param currency                       The currency in which the `pricePerToken` must be paid.
     *
     *  @param metadata                       Claim condition metadata.
     */
    struct ClaimCondition {
        uint256 startTimestamp;
        uint256 maxClaimableSupply;
        uint256 supplyClaimed;
        uint256 quantityLimitPerWallet;
        bytes32 merkleRoot;
        uint256 pricePerToken;
        address currency;
        string metadata;
    }
}

File 24 of 40 : IContractMetadata.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  Thirdweb's `ContractMetadata` is a contract extension for any base contracts. It lets you set a metadata URI
 *  for you contract.
 *
 *  Additionally, `ContractMetadata` is necessary for NFT contracts that want royalties to get distributed on OpenSea.
 */

interface IContractMetadata {
    /// @dev Returns the metadata URI of the contract.
    function contractURI() external view returns (string memory);

    /**
     *  @dev Sets contract URI for the storefront-level metadata of the contract.
     *       Only module admin can call this function.
     */
    function setContractURI(string calldata _uri) external;

    /// @dev Emitted when the contract URI is updated.
    event ContractURIUpdated(string prevURI, string newURI);
}

File 25 of 40 : IDelayedReveal.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  Thirdweb's `DelayedReveal` is a contract extension for base NFT contracts. It lets you create batches of
 *  'delayed-reveal' NFTs. You can learn more about the usage of delayed reveal NFTs here - https://blog.thirdweb.com/delayed-reveal-nfts
 */

interface IDelayedReveal {
    /// @dev Emitted when tokens are revealed.
    event TokenURIRevealed(uint256 indexed index, string revealedURI);

    /**
     *  @notice Reveals a batch of delayed reveal NFTs.
     *
     *  @param identifier The ID for the batch of delayed-reveal NFTs to reveal.
     *
     *  @param key        The key with which the base URI for the relevant batch of NFTs was encrypted.
     */
    function reveal(uint256 identifier, bytes calldata key) external returns (string memory revealedURI);

    /**
     *  @notice Performs XOR encryption/decryption.
     *
     *  @param data The data to encrypt. In the case of delayed-reveal NFTs, this is the "revealed" state
     *              base URI of the relevant batch of NFTs.
     *
     *  @param key  The key with which to encrypt data
     */
    function encryptDecrypt(bytes memory data, bytes calldata key) external pure returns (bytes memory result);
}

File 26 of 40 : IDropSinglePhase1155.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./IClaimCondition.sol";

/**
 *  The interface `IDropSinglePhase1155` is written for thirdweb's 'DropSinglePhase' contracts, which are distribution mechanisms for tokens.
 *
 *  An authorized wallet can set a claim condition for the distribution of the contract's tokens.
 *  A claim condition defines criteria under which accounts can mint tokens. Claim conditions can be overwritten
 *  or added to by the contract admin. At any moment, there is only one active claim condition.
 */

interface IDropSinglePhase1155 is IClaimCondition {
    /**
     *  @param proof Prood of concerned wallet's inclusion in an allowlist.
     *  @param quantityLimitPerWallet The total quantity of tokens the allowlisted wallet is eligible to claim over time.
     *  @param pricePerToken The price per token the allowlisted wallet must pay to claim tokens.
     *  @param currency The currency in which the allowlisted wallet must pay the price for claiming tokens.
     */
    struct AllowlistProof {
        bytes32[] proof;
        uint256 quantityLimitPerWallet;
        uint256 pricePerToken;
        address currency;
    }

    /// @notice Emitted when tokens are claimed via `claim`.
    event TokensClaimed(
        address indexed claimer,
        address indexed receiver,
        uint256 indexed tokenId,
        uint256 quantityClaimed
    );

    /// @notice Emitted when the contract's claim conditions are updated.
    event ClaimConditionUpdated(uint256 indexed tokenId, ClaimCondition condition, bool resetEligibility);

    /**
     *  @notice Lets an account claim a given quantity of NFTs.
     *
     *  @param receiver                       The receiver of the NFT to claim.
     *  @param tokenId                        The tokenId of the NFT to claim.
     *  @param quantity                       The quantity of the NFT to claim.
     *  @param currency                       The currency in which to pay for the claim.
     *  @param pricePerToken                  The price per token to pay for the claim.
     *  @param allowlistProof                 The proof of the claimer's inclusion in the merkle root allowlist
     *                                        of the claim conditions that apply.
     *  @param data                           Arbitrary bytes data that can be leveraged in the implementation of this interface.
     */
    function claim(
        address receiver,
        uint256 tokenId,
        uint256 quantity,
        address currency,
        uint256 pricePerToken,
        AllowlistProof calldata allowlistProof,
        bytes memory data
    ) external payable;

    /**
     *  @notice Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions.
     *
     *  @param phase                    Claim condition to set.
     *
     *  @param resetClaimEligibility    Whether to honor the restrictions applied to wallets who have claimed tokens in the current conditions,
     *                                  in the new claim conditions being set.
     *
     *  @param tokenId                  The tokenId for which to set the relevant claim condition.
     */
    function setClaimConditions(
        uint256 tokenId,
        ClaimCondition calldata phase,
        bool resetClaimEligibility
    ) external;
}

File 27 of 40 : ILazyMint.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  Thirdweb's `LazyMint` is a contract extension for any base NFT contract. It lets you 'lazy mint' any number of NFTs
 *  at once. Here, 'lazy mint' means defining the metadata for particular tokenIds of your NFT contract, without actually
 *  minting a non-zero balance of NFTs of those tokenIds.
 */

interface ILazyMint {
    /// @dev Emitted when tokens are lazy minted.
    event TokensLazyMinted(uint256 indexed startTokenId, uint256 endTokenId, string baseURI, bytes encryptedBaseURI);

    /**
     *  @notice Lazy mints a given amount of NFTs.
     *
     *  @param amount           The number of NFTs to lazy mint.
     *
     *  @param baseURIForTokens The base URI for the 'n' number of NFTs being lazy minted, where the metadata for each
     *                          of those NFTs is `${baseURIForTokens}/${tokenId}`.
     *
     *  @param extraData        Additional bytes data to be used at the discretion of the consumer of the contract.
     *
     *  @return batchId         A unique integer identifier for the batch of NFTs lazy minted together.
     */
    function lazyMint(
        uint256 amount,
        string calldata baseURIForTokens,
        bytes calldata extraData
    ) external returns (uint256 batchId);
}

File 28 of 40 : IMulticall.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * _Available since v4.1._
 */
interface IMulticall {
    /**
     * @dev Receives and executes a batch of function calls on this contract.
     */
    function multicall(bytes[] calldata data) external returns (bytes[] memory results);
}

File 29 of 40 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    function register(address registrant) external;

    function registerAndSubscribe(address registrant, address subscription) external;

    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    function unregister(address addr) external;

    function updateOperator(
        address registrant,
        address operator,
        bool filtered
    ) external;

    function updateOperators(
        address registrant,
        address[] calldata operators,
        bool filtered
    ) external;

    function updateCodeHash(
        address registrant,
        bytes32 codehash,
        bool filtered
    ) external;

    function updateCodeHashes(
        address registrant,
        bytes32[] calldata codeHashes,
        bool filtered
    ) external;

    function subscribe(address registrant, address registrantToSubscribe) external;

    function unsubscribe(address registrant, bool copyExistingEntries) external;

    function subscriptionOf(address addr) external returns (address registrant);

    function subscribers(address registrant) external returns (address[] memory);

    function subscriberAt(address registrant, uint256 index) external returns (address);

    function copyEntriesOf(address registrant, address registrantToCopy) external;

    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    function filteredOperators(address addr) external returns (address[] memory);

    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    function isRegistered(address addr) external returns (bool);

    function codeHashOf(address addr) external returns (bytes32);
}

File 30 of 40 : IOperatorFilterToggle.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

interface IOperatorFilterToggle {
    event OperatorRestriction(bool restriction);

    function operatorRestriction() external view returns (bool);

    function setOperatorRestriction(bool restriction) external;
}

File 31 of 40 : IOwnable.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  Thirdweb's `Ownable` is a contract extension to be used with any base contract. It exposes functions for setting and reading
 *  who the 'owner' of the inheriting smart contract is, and lets the inheriting contract perform conditional logic that uses
 *  information about who the contract's owner is.
 */

interface IOwnable {
    /// @dev Returns the owner of the contract.
    function owner() external view returns (address);

    /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin.
    function setOwner(address _newOwner) external;

    /// @dev Emitted when a new Owner is set.
    event OwnerUpdated(address indexed prevOwner, address indexed newOwner);
}

File 32 of 40 : IPermissions.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IPermissions {
    /**
     * @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 33 of 40 : IPrimarySale.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  Thirdweb's `Primary` is a contract extension to be used with any base contract. It exposes functions for setting and reading
 *  the recipient of primary sales, and lets the inheriting contract perform conditional logic that uses information about
 *  primary sales, if desired.
 */

interface IPrimarySale {
    /// @dev The adress that receives all primary sales value.
    function primarySaleRecipient() external view returns (address);

    /// @dev Lets a module admin set the default recipient of all primary sales.
    function setPrimarySaleRecipient(address _saleRecipient) external;

    /// @dev Emitted when a new sale recipient is set.
    event PrimarySaleRecipientUpdated(address indexed recipient);
}

File 34 of 40 : IRoyalty.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "../../eip/interface/IERC2981.sol";

/**
 *  Thirdweb's `Royalty` is a contract extension to be used with any base contract. It exposes functions for setting and reading
 *  the recipient of royalty fee and the royalty fee basis points, and lets the inheriting contract perform conditional logic
 *  that uses information about royalty fees, if desired.
 *
 *  The `Royalty` contract is ERC2981 compliant.
 */

interface IRoyalty is IERC2981 {
    struct RoyaltyInfo {
        address recipient;
        uint256 bps;
    }

    /// @dev Returns the royalty recipient and fee bps.
    function getDefaultRoyaltyInfo() external view returns (address, uint16);

    /// @dev Lets a module admin update the royalty bps and recipient.
    function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external;

    /// @dev Lets a module admin set the royalty recipient for a particular token Id.
    function setRoyaltyInfoForToken(
        uint256 tokenId,
        address recipient,
        uint256 bps
    ) external;

    /// @dev Returns the royalty recipient for a particular token Id.
    function getRoyaltyInfoForToken(uint256 tokenId) external view returns (address, uint16);

    /// @dev Emitted when royalty info is updated.
    event DefaultRoyalty(address indexed newRoyaltyRecipient, uint256 newRoyaltyBps);

    /// @dev Emitted when royalty recipient for tokenId is set
    event RoyaltyForToken(uint256 indexed tokenId, address indexed royaltyRecipient, uint256 royaltyBps);
}

File 35 of 40 : IWETH.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

interface IWETH {
    function deposit() external payable;

    function withdraw(uint256 amount) external;

    function transfer(address to, uint256 value) external returns (bool);
}

File 36 of 40 : CurrencyTransferLib.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

// Helper interfaces
import { IWETH } from "../interfaces/IWETH.sol";

import "../openzeppelin-presets/token/ERC20/utils/SafeERC20.sol";

library CurrencyTransferLib {
    using SafeERC20 for IERC20;

    /// @dev The address interpreted as native token of the chain.
    address public constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /// @dev Transfers a given amount of currency.
    function transferCurrency(
        address _currency,
        address _from,
        address _to,
        uint256 _amount
    ) internal {
        if (_amount == 0) {
            return;
        }

        if (_currency == NATIVE_TOKEN) {
            safeTransferNativeToken(_to, _amount);
        } else {
            safeTransferERC20(_currency, _from, _to, _amount);
        }
    }

    /// @dev Transfers a given amount of currency. (With native token wrapping)
    function transferCurrencyWithWrapper(
        address _currency,
        address _from,
        address _to,
        uint256 _amount,
        address _nativeTokenWrapper
    ) internal {
        if (_amount == 0) {
            return;
        }

        if (_currency == NATIVE_TOKEN) {
            if (_from == address(this)) {
                // withdraw from weth then transfer withdrawn native token to recipient
                IWETH(_nativeTokenWrapper).withdraw(_amount);
                safeTransferNativeTokenWithWrapper(_to, _amount, _nativeTokenWrapper);
            } else if (_to == address(this)) {
                // store native currency in weth
                require(_amount == msg.value, "msg.value != amount");
                IWETH(_nativeTokenWrapper).deposit{ value: _amount }();
            } else {
                safeTransferNativeTokenWithWrapper(_to, _amount, _nativeTokenWrapper);
            }
        } else {
            safeTransferERC20(_currency, _from, _to, _amount);
        }
    }

    /// @dev Transfer `amount` of ERC20 token from `from` to `to`.
    function safeTransferERC20(
        address _currency,
        address _from,
        address _to,
        uint256 _amount
    ) internal {
        if (_from == _to) {
            return;
        }

        if (_from == address(this)) {
            IERC20(_currency).safeTransfer(_to, _amount);
        } else {
            IERC20(_currency).safeTransferFrom(_from, _to, _amount);
        }
    }

    /// @dev Transfers `amount` of native token to `to`.
    function safeTransferNativeToken(address to, uint256 value) internal {
        // solhint-disable avoid-low-level-calls
        // slither-disable-next-line low-level-calls
        (bool success, ) = to.call{ value: value }("");
        require(success, "native token transfer failed");
    }

    /// @dev Transfers `amount` of native token to `to`. (With native token wrapping)
    function safeTransferNativeTokenWithWrapper(
        address to,
        uint256 value,
        address _nativeTokenWrapper
    ) internal {
        // solhint-disable avoid-low-level-calls
        // slither-disable-next-line low-level-calls
        (bool success, ) = to.call{ value: value }("");
        if (!success) {
            IWETH(_nativeTokenWrapper).deposit{ value: value }();
            IERC20(_nativeTokenWrapper).safeTransfer(to, value);
        }
    }
}

File 37 of 40 : MerkleProof.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 * @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.
 *
 * Source: https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol
 */
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, uint256) {
        bytes32 computedHash = leaf;
        uint256 index = 0;

        for (uint256 i = 0; i < proof.length; i++) {
            index *= 2;
            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));
                index += 1;
            }
        }

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

File 38 of 40 : TWAddress.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * [EIP1884](https://eips.ethereum.org/EIPS/eip-1884) 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 39 of 40 : TWStrings.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 * @dev String operations.
 */
library TWStrings {
    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 40 of 40 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../../../../eip/interface/IERC20.sol";
import "../../../../lib/TWAddress.sol";

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerWallet","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"string","name":"metadata","type":"string"}],"indexed":false,"internalType":"struct IClaimCondition.ClaimCondition","name":"condition","type":"tuple"},{"indexed":false,"internalType":"bool","name":"resetEligibility","type":"bool"}],"name":"ClaimConditionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"prevURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRoyaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRoyaltyBps","type":"uint256"}],"name":"DefaultRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"restriction","type":"bool"}],"name":"OperatorRestriction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"PrimarySaleRecipientUpdated","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBps","type":"uint256"}],"name":"RoyaltyForToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"string","name":"revealedURI","type":"string"}],"name":"TokenURIRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantityClaimed","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"},{"indexed":false,"internalType":"bytes","name":"encryptedBaseURI","type":"bytes"}],"name":"TokensLazyMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_receivers","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","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":"_owner","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"components":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"quantityLimitPerWallet","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IDropSinglePhase1155.AllowlistProof","name":"_allowlistProof","type":"tuple"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimCondition","outputs":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerWallet","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"string","name":"metadata","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"key","type":"bytes"}],"name":"encryptDecrypt","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"encryptedData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseURICount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getBatchIdAtIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batchId","type":"uint256"},{"internalType":"bytes","name":"_key","type":"bytes"}],"name":"getRevealURI","outputs":[{"internalType":"string","name":"revealedURI","type":"string"}],"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":"_tokenId","type":"uint256"}],"name":"getRoyaltyInfoForToken","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"}],"name":"getSupplyClaimedByWallet","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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRoleWithSwitch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batchId","type":"uint256"}],"name":"isEncryptedBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_baseURIForTokens","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"lazyMint","outputs":[{"internalType":"uint256","name":"batchId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenIdToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorRestriction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primarySaleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"bytes","name":"_key","type":"bytes"}],"name":"reveal","outputs":[{"internalType":"string","name":"revealedURI","type":"string"}],"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":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerWallet","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"string","name":"metadata","type":"string"}],"internalType":"struct IClaimCondition.ClaimCondition","name":"_condition","type":"tuple"},{"internalType":"bool","name":"_resetClaimEligibility","type":"bool"}],"name":"setClaimConditions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint256","name":"_royaltyBps","type":"uint256"}],"name":"setDefaultRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_restriction","type":"bool"}],"name":"setOperatorRestriction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_saleRecipient","type":"address"}],"name":"setPrimarySaleRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_bps","type":"uint256"}],"name":"setRoyaltyInfoForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_subscription","type":"address"}],"name":"subscribeToRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"components":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"quantityLimitPerWallet","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IDropSinglePhase1155.AllowlistProof","name":"_allowlistProof","type":"tuple"}],"name":"verifyClaim","outputs":[{"internalType":"bool","name":"isOverride","type":"bool"}],"stateMutability":"view","type":"function"}]

6080604052601580546001600160a01b03191673d06d855652a73e61bfe26a3427dfe51f3b827fe31790553480156200003757600080fd5b506040518060400160405280600d81526020016c151a1948135bdbdb8810985b99609a1b815250604051806040016040528060038152602001622a26a160e91b81525073a12a3ac253f8a16155bde85802f4ecb5647f3c5f6103e873a12a3ac253f8a16155bde85802f4ecb5647f3c5f733cc6cdda760b79bafa08df41ecfa224f810dceb6600186868160009081620000d191906200085e565b506001620000e082826200085e565b505050620000f58282620001aa60201b60201c565b5062000103905033620002d8565b62000118836001600160801b0384166200032a565b6200012381620003d6565b6200012f600162000420565b505050505062000155600080516020620063d4833981519152336200046760201b60201c565b6200016260003362000467565b6015546200017c906000906001600160a01b0316620004c2565b601554620001a490600080516020620063d4833981519152906001600160a01b0316620004c2565b62000a74565b6daaeb6d7670e522a718067333cd4e3b15620002d4576001600160a01b0382163b156200028d5780156200024c57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200022f57600080fd5b505af115801562000244573d6000803e3d6000fd5b505050505050565b60405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000214565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200022f57600080fd5b5050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b612710811115620003745760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b60448201526064015b60405180910390fd5b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b600b80546001600160a01b0319166001600160a01b0383169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a250565b6011805460ff19168215159081179091556040519081527f38475885990d8dfe9ca01f0ef160a1b5514426eab9ddbc953a3353410ba780969060200160405180910390a150565b60008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600082815260146020526040902054620004dd90336200055e565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff1615620005525760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c79206772616e7420746f206e6f6e20686f6c6465727300000060448201526064016200036b565b620002d4828262000467565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff16620002d457620005aa816001600160a01b03166014620005fb60201b620025961760201c565b620005c083602062002596620005fb821b17811c565b604051602001620005d392919062000950565b60408051601f198184030181529082905262461bcd60e51b82526200036b91600401620009c9565b606060006200060c83600262000a14565b6200061990600262000a2e565b6001600160401b03811115620006335762000633620007bd565b6040519080825280601f01601f1916602001820160405280156200065e576020820181803683370190505b509050600360fc1b816000815181106200067c576200067c62000a44565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620006ae57620006ae62000a44565b60200101906001600160f81b031916908160001a9053506000620006d484600262000a14565b620006e190600162000a2e565b90505b600181111562000763576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000719576200071962000a44565b1a60f81b82828151811062000732576200073262000a44565b60200101906001600160f81b031916908160001a90535060049490941c936200075b8162000a5a565b9050620006e4565b508315620007b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200036b565b90505b92915050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620007e857607f821691505b6020821081036200080957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200085957600081815260208120601f850160051c81016020861015620008385750805b601f850160051c820191505b81811015620002445782815560010162000844565b505050565b81516001600160401b038111156200087a576200087a620007bd565b62000892816200088b8454620007d3565b846200080f565b602080601f831160018114620008ca5760008415620008b15750858301515b600019600386901b1c1916600185901b17855562000244565b600085815260208120601f198616915b82811015620008fb57888601518255948401946001909101908401620008da565b50858210156200091a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60005b83811015620009475781810151838201526020016200092d565b50506000910152565b7f5065726d697373696f6e733a206163636f756e742000000000000000000000008152600083516200098a8160158501602088016200092a565b7001034b99036b4b9b9b4b733903937b6329607d1b6015918401918201528351620009bd8160268401602088016200092a565b01602601949350505050565b6020815260008251806020840152620009ea8160408501602087016200092a565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620007b757620007b7620009fe565b80820180821115620007b757620007b7620009fe565b634e487b7160e01b600052603260045260246000fd5b60008162000a6c5762000a6c620009fe565b506000190190565b6159508062000a846000396000f3fe6080604052600436106103195760003560e01c80636b20c454116101ab578063a32fa5b3116100f7578063d547741f11610095578063e9703d251161006f578063e9703d2514610a1f578063e985e9c514610a53578063f242432a14610a8e578063f5298aca14610aae57600080fd5b8063d547741f146109ca578063e7150322146109ea578063e8a3d48514610a0a57600080fd5b8063b24f2d39116100d1578063b24f2d3914610932578063bd85b0391461095d578063ce8056421461098a578063d37c353b146109aa57600080fd5b8063a32fa5b314610898578063ac9650d8146108b8578063ad1eefc5146108e557600080fd5b8063938e3d7b116101645780639fc4d68f1161013e5780639fc4d68f14610823578063a05112fc14610843578063a217fddf14610863578063a22cb4651461087857600080fd5b8063938e3d7b146107ce57806395d89b41146107ee5780639bcf7a151461080357600080fd5b80636b20c454146106d65780636f4f2837146106f657806375b238fc146107165780638affb89f1461074a5780638da5cb5b1461076a57806391d148541461078857600080fd5b806332f0cd641161026a5780634cc157df1161022357806357bc3d78116101fd57806357bc3d781461066e57806357fd845514610681578063600dd5ea146106a157806363b45e2d146106c157600080fd5b80634cc157df146105e55780634e1273f414610627578063504c6e011461065457600080fd5b806332f0cd641461052e57806333cfcb9f1461054e57806336568abe1461056e5780633b1475a71461058e57806341f43434146105a3578063492e224b146105c557600080fd5b80631bf2907b116102d7578063248a9ca3116102b1578063248a9ca3146104825780632a55205a146104af5780632eb2c2d6146104ee5780632f2ff15d1461050e57600080fd5b80631bf2907b1461042f57806323a2902b146104425780632419f51b1461046257600080fd5b8062fdd58e1461031e57806301ffc9a71461036957806306fdde0314610399578063079fe40e146103bb5780630e89341c146103ed57806313af40351461040d575b600080fd5b34801561032a57600080fd5b5061035661033936600461457a565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561037557600080fd5b506103896103843660046145ba565b610ace565b6040519015158152602001610360565b3480156103a557600080fd5b506103ae610b3b565b6040516103609190614627565b3480156103c757600080fd5b50600b546001600160a01b03165b6040516001600160a01b039091168152602001610360565b3480156103f957600080fd5b506103ae61040836600461463a565b610bc9565b34801561041957600080fd5b5061042d610428366004614653565b610c38565b005b61042d61043d3660046146b9565b610c71565b34801561044e57600080fd5b5061038961045d36600461476a565b610e46565b34801561046e57600080fd5b5061035661047d36600461463a565b611218565b34801561048e57600080fd5b5061035661049d36600461463a565b60009081526014602052604090205490565b3480156104bb57600080fd5b506104cf6104ca3660046147e3565b611286565b604080516001600160a01b039093168352602083019190915201610360565b3480156104fa57600080fd5b5061042d61050936600461495e565b6112c3565b34801561051a57600080fd5b5061042d610529366004614a07565b6112f2565b34801561053a57600080fd5b5061042d610549366004614a41565b61138c565b34801561055a57600080fd5b5061042d610569366004614a5e565b6113fd565b34801561057a57600080fd5b5061042d610589366004614a07565b611427565b34801561059a57600080fd5b50600c54610356565b3480156105af57600080fd5b506103d56daaeb6d7670e522a718067333cd4e81565b3480156105d157600080fd5b506103896105e036600461463a565b611489565b3480156105f157600080fd5b5061060561060036600461463a565b6114af565b604080516001600160a01b03909316835261ffff909116602083015201610360565b34801561063357600080fd5b50610647610642366004614aa4565b61151a565b6040516103609190614b9f565b34801561066057600080fd5b506011546103899060ff1681565b61042d61067c366004614bb2565b61162e565b34801561068d57600080fd5b5061042d61069c366004614653565b611898565b3480156106ad57600080fd5b5061042d6106bc36600461457a565b611908565b3480156106cd57600080fd5b50600954610356565b3480156106e257600080fd5b5061042d6106f1366004614c53565b611936565b34801561070257600080fd5b5061042d610711366004614653565b611ad2565b34801561072257600080fd5b506103567fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561075657600080fd5b5061042d610765366004614cc6565b611aff565b34801561077657600080fd5b506006546001600160a01b03166103d5565b34801561079457600080fd5b506103896107a3366004614a07565b60009182526013602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156107da57600080fd5b5061042d6107e9366004614d26565b611e66565b3480156107fa57600080fd5b506103ae611e93565b34801561080f57600080fd5b5061042d61081e366004614d5a565b611ea0565b34801561082f57600080fd5b506103ae61083e366004614dd0565b611ed4565b34801561084f57600080fd5b506103ae61085e36600461463a565b612054565b34801561086f57600080fd5b50610356600081565b34801561088457600080fd5b5061042d610893366004614e1b565b61206d565b3480156108a457600080fd5b506103896108b3366004614a07565b612081565b3480156108c457600080fd5b506108d86108d3366004614e52565b6120d7565b6040516103609190614e93565b3480156108f157600080fd5b50610356610900366004614a07565b6000918252600f60209081526040808420548452601082528084206001600160a01b0393909316845291905290205490565b34801561093e57600080fd5b506007546001600160a01b03811690600160a01b900461ffff16610605565b34801561096957600080fd5b5061035661097836600461463a565b60126020526000908152604090205481565b34801561099657600080fd5b506103ae6109a5366004614dd0565b6121cb565b3480156109b657600080fd5b506103566109c5366004614ef5565b61226e565b3480156109d657600080fd5b5061042d6109e5366004614a07565b612306565b3480156109f657600080fd5b506103ae610a05366004614f6e565b61231f565b348015610a1657600080fd5b506103ae612394565b348015610a2b57600080fd5b50610a3f610a3a36600461463a565b6123a1565b604051610360989796959493929190614fc9565b348015610a5f57600080fd5b50610389610a6e36600461501e565b600360209081526000928352604080842090915290825290205460ff1681565b348015610a9a57600080fd5b5061042d610aa9366004615048565b61247a565b348015610aba57600080fd5b5061042d610ac93660046150ac565b6124a1565b60006301ffc9a760e01b6001600160e01b031983161480610aff5750636cdb3d1360e11b6001600160e01b03198316145b80610b1a57506303a24d0760e21b6001600160e01b03198316145b80610b3557506001600160e01b0319821663152a902d60e11b145b92915050565b60008054610b48906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054610b74906150df565b8015610bc15780601f10610b9657610100808354040283529160200191610bc1565b820191906000526020600020905b815481529060010190602001808311610ba457829003601f168201915b505050505081565b60606000610bd683612738565b5090506000610be48461283d565b9050610bef82611489565b15610c1d5780604051602001610c059190615113565b60405160208183030381529060405292505050919050565b80610c278561299e565b604051602001610c05929190615138565b610c40612aa6565b610c655760405162461bcd60e51b8152600401610c5c90615167565b60405180910390fd5b610c6e81612adb565b50565b6000610c7d8133612b2d565b858414610cc75760405162461bcd60e51b81526020600482015260186024820152774d69736d61746368656420696e707574206c656e6774687360401b6044820152606401610c5c565b838214610d115760405162461bcd60e51b81526020600482015260186024820152774d69736d61746368656420696e707574206c656e6774687360401b6044820152606401610c5c565b60005b84811015610e3c576000868683818110610d3057610d3061518f565b9050602002013590506000898984818110610d4d57610d4d61518f565b9050602002016020810190610d629190614653565b90506000868685818110610d7857610d7861518f565b905060200201359050600c548310610dcd5760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610c5c565b610dd8828483612bad565b826001600160a01b038316336001600160a01b03167fff097c7d8b1957a4ff09ef1361b5fb54dcede3941ba836d0beb9d10bec725de684604051610e1e91815260200190565b60405180910390a45050508080610e34906151bb565b915050610d14565b5050505050505050565b6000868152600e60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c08301526007810180548493929160e0840191610ec5906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef1906150df565b8015610f3e5780601f10610f1357610100808354040283529160200191610f3e565b820191906000526020600020905b815481529060010190602001808311610f2157829003601f168201915b50505091909252505050606081015160a082015160c083015160808401519394509192909190156110235761101f610f7687806151d4565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505060808088015191508d9060208b01359060408c013590610fcb908d0160608e01614653565b6040516bffffffffffffffffffffffff19606095861b811660208301526034820194909452605481019290925290921b16607482015260880160405160208183030381529060405280519060200120612bc8565b5094505b84156110aa57856020013560000361103b5782611041565b85602001355b9250600019866040013503611056578161105c565b85604001355b915060001986604001351415801561108d575060006110816080880160608901614653565b6001600160a01b031614155b61109757806110a7565b6110a76080870160608801614653565b90505b60008b8152600f60209081526040808320548352601082528083206001600160a01b03808f168552925290912054908981169083161415806110ec5750828814155b1561112c5760405162461bcd60e51b815260206004820152601060248201526f2150726963654f7243757272656e637960801b6044820152606401610c5c565b89158061114157508361113f828c61521d565b115b156111775760405162461bcd60e51b8152600401610c5c906020808252600490820152632151747960e01b604082015260600190565b84602001518a866040015161118c919061521d565b11156111c75760405162461bcd60e51b815260206004820152600a602482015269214d6178537570706c7960b01b6044820152606401610c5c565b84514210156112095760405162461bcd60e51b815260206004820152600e60248201526d18d85b9d0818db185a5b481e595d60921b6044820152606401610c5c565b50505050509695505050505050565b600061122360095490565b82106112615760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610c5c565b600982815481106112745761127461518f565b90600052602060002001549050919050565b600080600080611295866114af565b90945084925061ffff1690506127106112ae8287615230565b6112b8919061525d565b925050509250929050565b846001600160a01b03811633146112dd576112dd33612c96565b6112ea8686868686612d5a565b505050505050565b60008281526014602052604090205461130b9033612b2d565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff161561137e5760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c79206772616e7420746f206e6f6e20686f6c646572730000006044820152606401610c5c565b6113888282612de9565b5050565b611394612aa6565b6113f45760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420617574686f72697a656420746f20736574206f70657261746f72207260448201526a32b9ba3934b1ba34b7b71760a91b6064820152608401610c5c565b610c6e81612e44565b60006114098133612b2d565b600061141484612738565b5090506114218184612e8b565b50505050565b336001600160a01b0382161461147f5760405162461bcd60e51b815260206004820152601a60248201527f43616e206f6e6c792072656e6f756e636520666f722073656c660000000000006044820152606401610c5c565b6113888282612ea3565b6000818152600d6020526040812080548291906114a5906150df565b9050119050919050565b6000818152600860209081526040808320815180830190925280546001600160a01b0316808352600190910154928201929092528291156114f65780516020820151611510565b6007546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b6060815183511461153d5760405162461bcd60e51b8152600401610c5c90615271565b600083516001600160401b0381111561155857611558614805565b604051908082528060200260200182016040528015611581578160200160208202803683370190505b50905060005b845181101561162657600260008683815181106115a6576115a661518f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008583815181106115e2576115e261518f565b602002602001015181526020019081526020016000205482828151811061160b5761160b61518f565b602090810291909101015261161f816151bb565b9050611587565b509392505050565b61163d86888787878787612f05565b6000868152600e60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e0840191906116b9906150df565b80601f01602080910402602001604051908101604052809291908181526020018280546116e5906150df565b80156117325780601f1061170757610100808354040283529160200191611732565b820191906000526020600020905b81548152906001019060200180831161171557829003601f168201915b505050919092525050506000888152600f602052604090205490915061175c883389898989610e46565b50868260400181815161176f919061521d565b90525060008181526010602090815260408083203384529091528120805489929061179b90849061521d565b90915550506000888152600e602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e0830151839190600782019061182390826152e0565b509050506118346000888888612f5a565b61183f898989612bad565b876001600160a01b038a16336001600160a01b03167fff097c7d8b1957a4ff09ef1361b5fb54dcede3941ba836d0beb9d10bec725de68a60405161188591815260200190565b60405180910390a4505050505050505050565b6118a0612aa6565b6118fd5760405162461bcd60e51b815260206004820152602860248201527f4e6f7420617574686f72697a656420746f2073756273637269626520746f207260448201526732b3b4b9ba393c9760c11b6064820152608401610c5c565b610c6e81600161300d565b611910612aa6565b61192c5760405162461bcd60e51b8152600401610c5c90615167565b6113888282613113565b336001600160a01b03841681148061197357506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b6119b35760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c5c565b81518351146119f65760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610c5c565b60005b8351811015611ac657828181518110611a1457611a1461518f565b602002602001015160026000876001600160a01b03166001600160a01b031681526020019081526020016000206000868481518110611a5557611a5561518f565b60200260200101518152602001908152602001600020541015611ab45760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c5c565b611abf60018261521d565b90506119f9565b506114218484846131b9565b611ada612aa6565b611af65760405162461bcd60e51b8152600401610c5c90615167565b610c6e8161336e565b611b07612aa6565b611b235760405162461bcd60e51b8152600401610c5c90615167565b6000838152600e60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e084019190611b9f906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054611bcb906150df565b8015611c185780601f10611bed57610100808354040283529160200191611c18565b820191906000526020600020905b815481529060010190602001808311611bfb57829003601f168201915b505050919092525050506000858152600f602052604090819020549082015191925090811580611c455750835b15611c94575060003360405160609190911b6bffffffffffffffffffffffff19166020820152436034820152605481018790526074016040516020818303038152906040528051906020012091505b8460200135811115611cdd5760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e4818db185a5b595960721b6044820152606401610c5c565b6000604051806101000160405280876000013581526020018760200135815260200183815260200187606001358152602001876080013581526020018760a0013581526020018760c0016020810190611d369190614653565b6001600160a01b03168152602001611d5160e089018961539f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050898152600e602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e083015192935083929091506007820190611e0d90826152e0565b5050506000878152600f6020526040908190208490555187907f81039d5ecdbb4bd2d72eda132d34c127e1136763fef04b3ab1a1ed1e109eb69a90611e55908990899061540e565b60405180910390a250505050505050565b611e6e612aa6565b611e8a5760405162461bcd60e51b8152600401610c5c90615167565b610c6e816133b8565b60018054610b48906150df565b611ea8612aa6565b611ec45760405162461bcd60e51b8152600401610c5c90615167565b611ecf838383613494565b505050565b6000838152600d6020526040812080546060929190611ef2906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054611f1e906150df565b8015611f6b5780601f10611f4057610100808354040283529160200191611f6b565b820191906000526020600020905b815481529060010190602001808311611f4e57829003601f168201915b505050505090508051600003611fb75760405162461bcd60e51b8152602060048201526011602482015270139bdd1a1a5b99c81d1bc81c995d99585b607a1b6044820152606401610c5c565b60008082806020019051810190611fce91906154db565b91509150611fdd82878761231f565b93508084878746604051602001611ff79493929190615566565b604051602081830303815290604052805190602001201461204a5760405162461bcd60e51b815260206004820152600d60248201526c496e636f7272656374206b657960981b6044820152606401610c5c565b5050509392505050565b600d6020526000908152604090208054610b48906150df565b8161207781612c96565b611ecf838361355e565b600082815260136020908152604080832083805290915281205460ff166120ce575060008281526013602090815260408083206001600160a01b038516845290915290205460ff16610b35565b50600192915050565b6060816001600160401b038111156120f1576120f1614805565b60405190808252806020026020018201604052801561212457816020015b606081526020019060019003908161210f5790505b50905060005b828110156121c457612194308585848181106121485761214861518f565b905060200281019061215a919061539f565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061360d92505050565b8282815181106121a6576121a661518f565b602002602001018190525080806121bc906151bb565b91505061212a565b5092915050565b60606121d5613632565b6121f15760405162461bcd60e51b8152600401610c5c90615167565b60006121fc85611218565b9050612209818585611ed4565b9150612224816040518060200160405280600081525061365f565b61222e8183612e8b565b847f6df1d8db2a036436ffe0b2d1833f2c5f1e624818dfce2578c0faa4b83ef9998d8360405161225e9190614627565b60405180910390a2509392505050565b600081156122ef576000806122858486018661558f565b91509150815160001415801561229a57508015155b156122ec576122ec88600c546122b0919061521d565b86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061365f92505050565b50505b6122fc8686868686613677565b9695505050505050565b60008281526014602052604090205461147f9033612b2d565b8251604080518083016020019091528181529060005b8181101561238b576000858583604051602001612354939291906155d3565b60408051601f1981840301815291905280516020918201208884018201511885840182015261238491508261521d565b9050612335565b50509392505050565b60058054610b48906150df565b600e60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880180549798969795969495939492936001600160a01b0390921692916123f7906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054612423906150df565b80156124705780601f1061244557610100808354040283529160200191612470565b820191906000526020600020905b81548152906001019060200180831161245357829003601f168201915b5050505050905088565b846001600160a01b03811633146124945761249433612c96565b6112ea8686868686613784565b336001600160a01b0384168114806124de57506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b61251e5760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c5c565b6001600160a01b038416600090815260026020908152604080832086845290915290205482111561258b5760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c5c565b61142184848461380c565b606060006125a5836002615230565b6125b090600261521d565b6001600160401b038111156125c7576125c7614805565b6040519080825280601f01601f1916602001820160405280156125f1576020820181803683370190505b509050600360fc1b8160008151811061260c5761260c61518f565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061263b5761263b61518f565b60200101906001600160f81b031916908160001a905350600061265f846002615230565b61266a90600161521d565b90505b60018111156126e2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061269e5761269e61518f565b1a60f81b8282815181106126b4576126b461518f565b60200101906001600160f81b031916908160001a90535060049490941c936126db816155e5565b905061266d565b5083156127315760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5c565b9392505050565b600080600061274660095490565b90506000600980548060200260200160405190810160405280929190818152602001828054801561279657602002820191906000526020600020905b815481526020019060010190808311612782575b5050505050905060005b82811015612802578181815181106127ba576127ba61518f565b60200260200101518610156127f0578093508181815181106127de576127de61518f565b60200260200101519450505050915091565b6127fb60018261521d565b90506127a0565b5060405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610c5c565b6060600061284a60095490565b90506000600980548060200260200160405190810160405280929190818152602001828054801561289a57602002820191906000526020600020905b815481526020019060010190808311612886575b5050505050905060005b82811015612802578181815181106128be576128be61518f565b602002602001015185101561298c57600a60008383815181106128e3576128e361518f565b602002602001015181526020019081526020016000208054612904906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054612930906150df565b801561297d5780601f106129525761010080835404028352916020019161297d565b820191906000526020600020905b81548152906001019060200180831161296057829003601f168201915b50505050509350505050919050565b61299760018261521d565b90506128a4565b6060816000036129c55750506040805180820190915260018152600360fc1b602082015290565b8160005b81156129ef57806129d9816151bb565b91506129e89050600a8361525d565b91506129c9565b6000816001600160401b03811115612a0957612a09614805565b6040519080825280601f01601f191660200182016040528015612a33576020820181803683370190505b5090505b8415612a9e57612a486001836155fc565b9150612a55600a8661560f565b612a6090603061521d565b60f81b818381518110612a7557612a7561518f565b60200101906001600160f81b031916908160001a905350612a97600a8661525d565b9450612a37565b949350505050565b3360009081527fd7625fba02ecfd31206738ceab8366752ce5e5fbdbd826fda6054a1dd84f6ef0602052604090205460ff1690565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff1661138857612b6b816001600160a01b03166014612596565b612b76836020612596565b604051602001612b87929190615623565b60408051601f198184030181529082905262461bcd60e51b8252610c5c91600401614627565b611ecf83838360405180602001604052806000815250613931565b6000808281805b8751811015612c8a57612be3600283615230565b91506000888281518110612bf957612bf961518f565b60200260200101519050808411612c3b576040805160208101869052908101829052606001604051602081830303815290604052805190602001209350612c77565b6040805160208101839052908101859052606001604051602081830303815290604052805190602001209350600183612c74919061521d565b92505b5080612c82816151bb565b915050612bcf565b50941495939450505050565b60115460ff1615610c6e576daaeb6d7670e522a718067333cd4e3b15610c6e57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612d0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d329190615690565b610c6e57604051633b79c77360e21b81526001600160a01b0382166004820152602401610c5c565b6001600160a01b038516331480612d9457506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b612dd55760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c5c565b612de28585858585613a0a565b5050505050565b60008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6011805460ff19168215159081179091556040519081527f38475885990d8dfe9ca01f0ef160a1b5514426eab9ddbc953a3353410ba780969060200160405180910390a150565b6000828152600a60205260409020611ecf82826152e0565b612ead8282612b2d565b60008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600c548710612f515760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610c5c565b50505050505050565b8015611421576000612f6c8285615230565b905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601612fdb57803414612fdb5760405162461bcd60e51b815260206004820152601660248201527526bab9ba1039b2b732103a37ba30b610383934b1b29760511b6044820152606401610c5c565b60006001600160a01b03861615612ff25785612fff565b600b546001600160a01b03165b90506112ea84338385613bbd565b6daaeb6d7670e522a718067333cd4e3b15611388576001600160a01b0382163b156130e25780156130a257604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561308e57600080fd5b505af11580156112ea573d6000803e3d6000fd5b60405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401613074565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401613074565b6127108111156131575760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610c5c565b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0383166132005760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c5c565b80518251146132215760405162461bcd60e51b8152600401610c5c90615271565b600033905061324481856000868660405180602001604052806000815250613c03565b60005b835181101561330f5760008482815181106132645761326461518f565b6020026020010151905060008483815181106132825761328261518f565b6020908102919091018101516001600160a01b03891660009081526002835260408082208683529093529190912054909150818110156132d45760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b0388166000908152600260209081526040808320958352949052929092209103905580613307816151bb565b915050613247565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516133609291906156d7565b60405180910390a450505050565b600b80546001600160a01b0319166001600160a01b0383169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a250565b6000600580546133c7906150df565b80601f01602080910402602001604051908101604052809291908181526020018280546133f3906150df565b80156134405780601f1061341557610100808354040283529160200191613440565b820191906000526020600020905b81548152906001019060200180831161342357829003601f168201915b50505050509050816005908161345691906152e0565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a168183604051613488929190615705565b60405180910390a15050565b6127108111156134d85760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610c5c565b6040805180820182526001600160a01b038481168083526020808401868152600089815260088352869020945185546001600160a01b031916941693909317845591516001909301929092559151838152909185917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d91015b60405180910390a3505050565b336001600160a01b03831681036135a85760405162461bcd60e51b815260206004820152600e60248201526d20a8282927ab24a723afa9a2a62360911b6044820152606401610c5c565b6001600160a01b03818116600081815260036020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101613551565b606061273183836040518060600160405280602781526020016158f460279139613d0f565b60006136466006546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b6000828152600d60205260409020611ecf82826152e0565b6000613681612aa6565b61369d5760405162461bcd60e51b8152600401610c5c90615167565b856000036136d55760405162461bcd60e51b81526020600482015260056024820152640c08185b5d60da1b6044820152606401610c5c565b6000600c54905061371d818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613de292505050565b600c919091559150807f2a0365091ef1a40953c670dce28177e37520648a6fdc91506bffac0ab045570d60016137538a8461521d565b61375d91906155fc565b8888888860405161377295949392919061572a565b60405180910390a25095945050505050565b6001600160a01b0385163314806137be57506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b6137ff5760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c5c565b612de28585858585613e46565b6001600160a01b0383166138535760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c5c565b336138828185600061386487613f6c565b61386d87613f6c565b60405180602001604052806000815250613c03565b6001600160a01b0384166000908152600260209081526040808320868452909152902054828110156138c65760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b03858116600081815260026020908152604080832089845282528083208887039055805189815291820188905291938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0384166139575760405162461bcd60e51b8152600401610c5c90615763565b336139778160008761396888613f6c565b61397188613f6c565b87613c03565b6001600160a01b0385166000908152600260209081526040808320878452909152812080548592906139aa90849061521d565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612de281600087878787613fb7565b8151835114613a2b5760405162461bcd60e51b8152600401610c5c90615271565b6001600160a01b038416613a515760405162461bcd60e51b8152600401610c5c90615763565b33613a60818787878787613c03565b60005b8451811015613b57576000858281518110613a8057613a8061518f565b602002602001015190506000858381518110613a9e57613a9e61518f565b6020908102919091018101516001600160a01b038b166000908152600283526040808220868352909352919091205490915081811015613af05760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b03808b16600090815260026020818152604080842088855282528084208787039055938d16835290815282822086835290529081208054849290613b3c90849061521d565b9250508190555050505080613b50906151bb565b9050613a63565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613ba79291906156d7565b60405180910390a46112ea81878787878761410a565b80156114215773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03851601613bf757613bf282826141e7565b611421565b6114218484848461428a565b6001600160a01b038516613c8a5760005b8351811015613c8857828181518110613c2f57613c2f61518f565b602002602001015160126000868481518110613c4d57613c4d61518f565b602002602001015181526020019081526020016000206000828254613c72919061521d565b90915550613c819050816151bb565b9050613c14565b505b6001600160a01b0384166112ea5760005b8351811015612f5157828181518110613cb657613cb661518f565b602002602001015160126000868481518110613cd457613cd461518f565b602002602001015181526020019081526020016000206000828254613cf991906155fc565b90915550613d089050816151bb565b9050613c9b565b60606001600160a01b0384163b613d775760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c5c565b600080856001600160a01b031685604051613d929190615789565b600060405180830381855af49150503d8060008114613dcd576040519150601f19603f3d011682016040523d82523d6000602084013e613dd2565b606091505b50915091506122fc8282866142dd565b600080613def848661521d565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af018190556000818152600a60205260409020909250829150613e3d84826152e0565b50935093915050565b6001600160a01b038416613e6c5760405162461bcd60e51b8152600401610c5c90615763565b33613e7c81878761396888613f6c565b6001600160a01b038616600090815260026020908152604080832087845290915290205483811015613ec05760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b0380881660009081526002602081815260408084208a855282528084208987039055938a16835290815282822088835290529081208054869290613f0c90849061521d565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f51828888888888613fb7565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613fa657613fa661518f565b602090810291909101015292915050565b6001600160a01b0384163b156112ea5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613ffb90899089908890889088906004016157a5565b6020604051808303816000875af1925050508015614036575060408051601f3d908101601f19168201909252614033918101906157df565b60015b6140b8576140426157fc565b806308c379a00361407b5750614056615818565b80614061575061407d565b8060405162461bcd60e51b8152600401610c5c9190614627565b505b60405162461bcd60e51b815260206004820152601060248201526f10a2a92198989a9aa922a1a2a4ab22a960811b6044820152606401610c5c565b6001600160e01b0319811663f23a6e6160e01b14612f515760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c5c565b6001600160a01b0384163b156112ea5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061414e90899089908890889088906004016158a1565b6020604051808303816000875af1925050508015614189575060408051601f3d908101601f19168201909252614186918101906157df565b60015b614195576140426157fc565b6001600160e01b0319811663bc197c8160e01b14612f515760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c5c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614234576040519150601f19603f3d011682016040523d82523d6000602084013e614239565b606091505b5050905080611ecf5760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606401610c5c565b816001600160a01b0316836001600160a01b0316031561142157306001600160a01b038416036142c857613bf26001600160a01b0385168383614316565b6114216001600160a01b038516848484614379565b606083156142ec575081612731565b8251156142fc5782518084602001fd5b8160405162461bcd60e51b8152600401610c5c9190614627565b6040516001600160a01b038316602482015260448101829052611ecf90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526143b1565b6040516001600160a01b03808516602483015283166044820152606481018290526114219085906323b872dd60e01b90608401614342565b6000614406826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166144839092919063ffffffff16565b805190915015611ecf57808060200190518101906144249190615690565b611ecf5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c5c565b6060612a9e8484600085856001600160a01b0385163b6144e55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c5c565b600080866001600160a01b031685876040516145019190615789565b60006040518083038185875af1925050503d806000811461453e576040519150601f19603f3d011682016040523d82523d6000602084013e614543565b606091505b50915091506145538282866142dd565b979650505050505050565b80356001600160a01b038116811461457557600080fd5b919050565b6000806040838503121561458d57600080fd5b6145968361455e565b946020939093013593505050565b6001600160e01b031981168114610c6e57600080fd5b6000602082840312156145cc57600080fd5b8135612731816145a4565b60005b838110156145f25781810151838201526020016145da565b50506000910152565b600081518084526146138160208601602086016145d7565b601f01601f19169290920160200192915050565b60208152600061273160208301846145fb565b60006020828403121561464c57600080fd5b5035919050565b60006020828403121561466557600080fd5b6127318261455e565b60008083601f84011261468057600080fd5b5081356001600160401b0381111561469757600080fd5b6020830191508360208260051b85010111156146b257600080fd5b9250929050565b600080600080600080606087890312156146d257600080fd5b86356001600160401b03808211156146e957600080fd5b6146f58a838b0161466e565b9098509650602089013591508082111561470e57600080fd5b61471a8a838b0161466e565b9096509450604089013591508082111561473357600080fd5b5061474089828a0161466e565b979a9699509497509295939492505050565b60006080828403121561476457600080fd5b50919050565b60008060008060008060c0878903121561478357600080fd5b863595506147936020880161455e565b9450604087013593506147a86060880161455e565b92506080870135915060a08701356001600160401b038111156147ca57600080fd5b6147d689828a01614752565b9150509295509295509295565b600080604083850312156147f657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561484057614840614805565b6040525050565b60006001600160401b0382111561486057614860614805565b5060051b60200190565b600082601f83011261487b57600080fd5b8135602061488882614847565b604051614895828261481b565b83815260059390931b85018201928281019150868411156148b557600080fd5b8286015b848110156148d057803583529183019183016148b9565b509695505050505050565b60006001600160401b038211156148f4576148f4614805565b50601f01601f191660200190565b600082601f83011261491357600080fd5b813561491e816148db565b60405161492b828261481b565b82815285602084870101111561494057600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a0868803121561497657600080fd5b61497f8661455e565b945061498d6020870161455e565b935060408601356001600160401b03808211156149a957600080fd5b6149b589838a0161486a565b945060608801359150808211156149cb57600080fd5b6149d789838a0161486a565b935060808801359150808211156149ed57600080fd5b506149fa88828901614902565b9150509295509295909350565b60008060408385031215614a1a57600080fd5b82359150614a2a6020840161455e565b90509250929050565b8015158114610c6e57600080fd5b600060208284031215614a5357600080fd5b813561273181614a33565b60008060408385031215614a7157600080fd5b8235915060208301356001600160401b03811115614a8e57600080fd5b614a9a85828601614902565b9150509250929050565b60008060408385031215614ab757600080fd5b82356001600160401b0380821115614ace57600080fd5b818501915085601f830112614ae257600080fd5b81356020614aef82614847565b604051614afc828261481b565b83815260059390931b8501820192828101915089841115614b1c57600080fd5b948201945b83861015614b4157614b328661455e565b82529482019490820190614b21565b96505086013592505080821115614b5757600080fd5b50614a9a8582860161486a565b600081518084526020808501945080840160005b83811015614b9457815187529582019590820190600101614b78565b509495945050505050565b6020815260006127316020830184614b64565b600080600080600080600060e0888a031215614bcd57600080fd5b614bd68861455e565b96506020880135955060408801359450614bf26060890161455e565b93506080880135925060a08801356001600160401b0380821115614c1557600080fd5b614c218b838c01614752565b935060c08a0135915080821115614c3757600080fd5b50614c448a828b01614902565b91505092959891949750929550565b600080600060608486031215614c6857600080fd5b614c718461455e565b925060208401356001600160401b0380821115614c8d57600080fd5b614c998783880161486a565b93506040860135915080821115614caf57600080fd5b50614cbc8682870161486a565b9150509250925092565b600080600060608486031215614cdb57600080fd5b8335925060208401356001600160401b03811115614cf857600080fd5b84016101008187031215614d0b57600080fd5b91506040840135614d1b81614a33565b809150509250925092565b600060208284031215614d3857600080fd5b81356001600160401b03811115614d4e57600080fd5b612a9e84828501614902565b600080600060608486031215614d6f57600080fd5b83359250614d7f6020850161455e565b9150604084013590509250925092565b60008083601f840112614da157600080fd5b5081356001600160401b03811115614db857600080fd5b6020830191508360208285010111156146b257600080fd5b600080600060408486031215614de557600080fd5b8335925060208401356001600160401b03811115614e0257600080fd5b614e0e86828701614d8f565b9497909650939450505050565b60008060408385031215614e2e57600080fd5b614e378361455e565b91506020830135614e4781614a33565b809150509250929050565b60008060208385031215614e6557600080fd5b82356001600160401b03811115614e7b57600080fd5b614e878582860161466e565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015614ee857603f19888603018452614ed68583516145fb565b94509285019290850190600101614eba565b5092979650505050505050565b600080600080600060608688031215614f0d57600080fd5b8535945060208601356001600160401b0380821115614f2b57600080fd5b614f3789838a01614d8f565b90965094506040880135915080821115614f5057600080fd5b50614f5d88828901614d8f565b969995985093965092949392505050565b600080600060408486031215614f8357600080fd5b83356001600160401b0380821115614f9a57600080fd5b614fa687838801614902565b94506020860135915080821115614fbc57600080fd5b50614e0e86828701614d8f565b60006101008a83528960208401528860408401528760608401528660808401528560a084015260018060a01b03851660c08401528060e084015261500f818401856145fb565b9b9a5050505050505050505050565b6000806040838503121561503157600080fd5b61503a8361455e565b9150614a2a6020840161455e565b600080600080600060a0868803121561506057600080fd5b6150698661455e565b94506150776020870161455e565b9350604086013592506060860135915060808601356001600160401b038111156150a057600080fd5b6149fa88828901614902565b6000806000606084860312156150c157600080fd5b6150ca8461455e565b95602085013595506040909401359392505050565b600181811c908216806150f357607f821691505b60208210810361476457634e487b7160e01b600052602260045260246000fd5b600082516151258184602087016145d7565b600360fc1b920191825250600101919050565b6000835161514a8184602088016145d7565b83519083019061515e8183602088016145d7565b01949350505050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016151cd576151cd6151a5565b5060010190565b6000808335601e198436030181126151eb57600080fd5b8301803591506001600160401b0382111561520557600080fd5b6020019150600581901b36038213156146b257600080fd5b80820180821115610b3557610b356151a5565b8082028115828204841417610b3557610b356151a5565b634e487b7160e01b600052601260045260246000fd5b60008261526c5761526c615247565b500490565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b601f821115611ecf57600081815260208120601f850160051c810160208610156152c15750805b601f850160051c820191505b818110156112ea578281556001016152cd565b81516001600160401b038111156152f9576152f9614805565b61530d8161530784546150df565b8461529a565b602080601f831160018114615342576000841561532a5750858301515b600019600386901b1c1916600185901b1785556112ea565b600085815260208120601f198616915b8281101561537157888601518255948401946001909101908401615352565b508582101561538f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000808335601e198436030181126153b657600080fd5b8301803591506001600160401b038211156153d057600080fd5b6020019150368190038213156146b257600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152823560408201526020830135606082015260408301356080820152606083013560a0820152608083013560c082015260a083013560e0820152600061545960c0850161455e565b6001600160a01b03166101008381019190915260e08501359036869003601e1901821261548557600080fd5b602091860191820191356001600160401b038111156154a357600080fd5b8036038313156154b257600080fd5b816101208601526154c8610140860182856153e5565b9350505050612731602083018415159052565b600080604083850312156154ee57600080fd5b82516001600160401b0381111561550457600080fd5b8301601f8101851361551557600080fd5b8051615520816148db565b60405161552d828261481b565b82815287602084860101111561554257600080fd5b6155538360208301602087016145d7565b6020969096015195979596505050505050565b60008551615578818460208a016145d7565b820184868237909301918252506020019392505050565b600080604083850312156155a257600080fd5b82356001600160401b038111156155b857600080fd5b6155c485828601614902565b95602094909401359450505050565b82848237909101908152602001919050565b6000816155f4576155f46151a5565b506000190190565b81810381811115610b3557610b356151a5565b60008261561e5761561e615247565b500690565b7402832b936b4b9b9b4b7b7399d1030b1b1b7bab73a1605d1b8152600083516156538160158501602088016145d7565b7001034b99036b4b9b9b4b733903937b6329607d1b60159184019182015283516156848160268401602088016145d7565b01602601949350505050565b6000602082840312156156a257600080fd5b815161273181614a33565b60208082526010908201526f125394d551919250d251539517d0905360821b604082015260600190565b6040815260006156ea6040830185614b64565b82810360208401526156fc8185614b64565b95945050505050565b60408152600061571860408301856145fb565b82810360208401526156fc81856145fb565b8581526060602082015260006157446060830186886153e5565b82810360408401526157578185876153e5565b98975050505050505050565b6020808252600c908201526b2a27afad22a927afa0a2222960a11b604082015260600190565b6000825161579b8184602087016145d7565b9190910192915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614553908301846145fb565b6000602082840312156157f157600080fd5b8151612731816145a4565b600060033d11156158155760046000803e5060005160e01c5b90565b600060443d10156158265790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561585557505050505090565b828501915081518181111561586d5750505050505090565b843d87010160208285010111156158875750505050505090565b6158966020828601018761481b565b509095945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906158cd90830186614b64565b82810360608401526158df8186614b64565b9050828103608084015261575781856145fb56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220768913f04e7590729bf08727bf7c3e2e1f4fd006263cac3ef5788501ddf0793f64736f6c63430008110033a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775

Deployed Bytecode

0x6080604052600436106103195760003560e01c80636b20c454116101ab578063a32fa5b3116100f7578063d547741f11610095578063e9703d251161006f578063e9703d2514610a1f578063e985e9c514610a53578063f242432a14610a8e578063f5298aca14610aae57600080fd5b8063d547741f146109ca578063e7150322146109ea578063e8a3d48514610a0a57600080fd5b8063b24f2d39116100d1578063b24f2d3914610932578063bd85b0391461095d578063ce8056421461098a578063d37c353b146109aa57600080fd5b8063a32fa5b314610898578063ac9650d8146108b8578063ad1eefc5146108e557600080fd5b8063938e3d7b116101645780639fc4d68f1161013e5780639fc4d68f14610823578063a05112fc14610843578063a217fddf14610863578063a22cb4651461087857600080fd5b8063938e3d7b146107ce57806395d89b41146107ee5780639bcf7a151461080357600080fd5b80636b20c454146106d65780636f4f2837146106f657806375b238fc146107165780638affb89f1461074a5780638da5cb5b1461076a57806391d148541461078857600080fd5b806332f0cd641161026a5780634cc157df1161022357806357bc3d78116101fd57806357bc3d781461066e57806357fd845514610681578063600dd5ea146106a157806363b45e2d146106c157600080fd5b80634cc157df146105e55780634e1273f414610627578063504c6e011461065457600080fd5b806332f0cd641461052e57806333cfcb9f1461054e57806336568abe1461056e5780633b1475a71461058e57806341f43434146105a3578063492e224b146105c557600080fd5b80631bf2907b116102d7578063248a9ca3116102b1578063248a9ca3146104825780632a55205a146104af5780632eb2c2d6146104ee5780632f2ff15d1461050e57600080fd5b80631bf2907b1461042f57806323a2902b146104425780632419f51b1461046257600080fd5b8062fdd58e1461031e57806301ffc9a71461036957806306fdde0314610399578063079fe40e146103bb5780630e89341c146103ed57806313af40351461040d575b600080fd5b34801561032a57600080fd5b5061035661033936600461457a565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561037557600080fd5b506103896103843660046145ba565b610ace565b6040519015158152602001610360565b3480156103a557600080fd5b506103ae610b3b565b6040516103609190614627565b3480156103c757600080fd5b50600b546001600160a01b03165b6040516001600160a01b039091168152602001610360565b3480156103f957600080fd5b506103ae61040836600461463a565b610bc9565b34801561041957600080fd5b5061042d610428366004614653565b610c38565b005b61042d61043d3660046146b9565b610c71565b34801561044e57600080fd5b5061038961045d36600461476a565b610e46565b34801561046e57600080fd5b5061035661047d36600461463a565b611218565b34801561048e57600080fd5b5061035661049d36600461463a565b60009081526014602052604090205490565b3480156104bb57600080fd5b506104cf6104ca3660046147e3565b611286565b604080516001600160a01b039093168352602083019190915201610360565b3480156104fa57600080fd5b5061042d61050936600461495e565b6112c3565b34801561051a57600080fd5b5061042d610529366004614a07565b6112f2565b34801561053a57600080fd5b5061042d610549366004614a41565b61138c565b34801561055a57600080fd5b5061042d610569366004614a5e565b6113fd565b34801561057a57600080fd5b5061042d610589366004614a07565b611427565b34801561059a57600080fd5b50600c54610356565b3480156105af57600080fd5b506103d56daaeb6d7670e522a718067333cd4e81565b3480156105d157600080fd5b506103896105e036600461463a565b611489565b3480156105f157600080fd5b5061060561060036600461463a565b6114af565b604080516001600160a01b03909316835261ffff909116602083015201610360565b34801561063357600080fd5b50610647610642366004614aa4565b61151a565b6040516103609190614b9f565b34801561066057600080fd5b506011546103899060ff1681565b61042d61067c366004614bb2565b61162e565b34801561068d57600080fd5b5061042d61069c366004614653565b611898565b3480156106ad57600080fd5b5061042d6106bc36600461457a565b611908565b3480156106cd57600080fd5b50600954610356565b3480156106e257600080fd5b5061042d6106f1366004614c53565b611936565b34801561070257600080fd5b5061042d610711366004614653565b611ad2565b34801561072257600080fd5b506103567fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561075657600080fd5b5061042d610765366004614cc6565b611aff565b34801561077657600080fd5b506006546001600160a01b03166103d5565b34801561079457600080fd5b506103896107a3366004614a07565b60009182526013602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156107da57600080fd5b5061042d6107e9366004614d26565b611e66565b3480156107fa57600080fd5b506103ae611e93565b34801561080f57600080fd5b5061042d61081e366004614d5a565b611ea0565b34801561082f57600080fd5b506103ae61083e366004614dd0565b611ed4565b34801561084f57600080fd5b506103ae61085e36600461463a565b612054565b34801561086f57600080fd5b50610356600081565b34801561088457600080fd5b5061042d610893366004614e1b565b61206d565b3480156108a457600080fd5b506103896108b3366004614a07565b612081565b3480156108c457600080fd5b506108d86108d3366004614e52565b6120d7565b6040516103609190614e93565b3480156108f157600080fd5b50610356610900366004614a07565b6000918252600f60209081526040808420548452601082528084206001600160a01b0393909316845291905290205490565b34801561093e57600080fd5b506007546001600160a01b03811690600160a01b900461ffff16610605565b34801561096957600080fd5b5061035661097836600461463a565b60126020526000908152604090205481565b34801561099657600080fd5b506103ae6109a5366004614dd0565b6121cb565b3480156109b657600080fd5b506103566109c5366004614ef5565b61226e565b3480156109d657600080fd5b5061042d6109e5366004614a07565b612306565b3480156109f657600080fd5b506103ae610a05366004614f6e565b61231f565b348015610a1657600080fd5b506103ae612394565b348015610a2b57600080fd5b50610a3f610a3a36600461463a565b6123a1565b604051610360989796959493929190614fc9565b348015610a5f57600080fd5b50610389610a6e36600461501e565b600360209081526000928352604080842090915290825290205460ff1681565b348015610a9a57600080fd5b5061042d610aa9366004615048565b61247a565b348015610aba57600080fd5b5061042d610ac93660046150ac565b6124a1565b60006301ffc9a760e01b6001600160e01b031983161480610aff5750636cdb3d1360e11b6001600160e01b03198316145b80610b1a57506303a24d0760e21b6001600160e01b03198316145b80610b3557506001600160e01b0319821663152a902d60e11b145b92915050565b60008054610b48906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054610b74906150df565b8015610bc15780601f10610b9657610100808354040283529160200191610bc1565b820191906000526020600020905b815481529060010190602001808311610ba457829003601f168201915b505050505081565b60606000610bd683612738565b5090506000610be48461283d565b9050610bef82611489565b15610c1d5780604051602001610c059190615113565b60405160208183030381529060405292505050919050565b80610c278561299e565b604051602001610c05929190615138565b610c40612aa6565b610c655760405162461bcd60e51b8152600401610c5c90615167565b60405180910390fd5b610c6e81612adb565b50565b6000610c7d8133612b2d565b858414610cc75760405162461bcd60e51b81526020600482015260186024820152774d69736d61746368656420696e707574206c656e6774687360401b6044820152606401610c5c565b838214610d115760405162461bcd60e51b81526020600482015260186024820152774d69736d61746368656420696e707574206c656e6774687360401b6044820152606401610c5c565b60005b84811015610e3c576000868683818110610d3057610d3061518f565b9050602002013590506000898984818110610d4d57610d4d61518f565b9050602002016020810190610d629190614653565b90506000868685818110610d7857610d7861518f565b905060200201359050600c548310610dcd5760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610c5c565b610dd8828483612bad565b826001600160a01b038316336001600160a01b03167fff097c7d8b1957a4ff09ef1361b5fb54dcede3941ba836d0beb9d10bec725de684604051610e1e91815260200190565b60405180910390a45050508080610e34906151bb565b915050610d14565b5050505050505050565b6000868152600e60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c08301526007810180548493929160e0840191610ec5906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef1906150df565b8015610f3e5780601f10610f1357610100808354040283529160200191610f3e565b820191906000526020600020905b815481529060010190602001808311610f2157829003601f168201915b50505091909252505050606081015160a082015160c083015160808401519394509192909190156110235761101f610f7687806151d4565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505060808088015191508d9060208b01359060408c013590610fcb908d0160608e01614653565b6040516bffffffffffffffffffffffff19606095861b811660208301526034820194909452605481019290925290921b16607482015260880160405160208183030381529060405280519060200120612bc8565b5094505b84156110aa57856020013560000361103b5782611041565b85602001355b9250600019866040013503611056578161105c565b85604001355b915060001986604001351415801561108d575060006110816080880160608901614653565b6001600160a01b031614155b61109757806110a7565b6110a76080870160608801614653565b90505b60008b8152600f60209081526040808320548352601082528083206001600160a01b03808f168552925290912054908981169083161415806110ec5750828814155b1561112c5760405162461bcd60e51b815260206004820152601060248201526f2150726963654f7243757272656e637960801b6044820152606401610c5c565b89158061114157508361113f828c61521d565b115b156111775760405162461bcd60e51b8152600401610c5c906020808252600490820152632151747960e01b604082015260600190565b84602001518a866040015161118c919061521d565b11156111c75760405162461bcd60e51b815260206004820152600a602482015269214d6178537570706c7960b01b6044820152606401610c5c565b84514210156112095760405162461bcd60e51b815260206004820152600e60248201526d18d85b9d0818db185a5b481e595d60921b6044820152606401610c5c565b50505050509695505050505050565b600061122360095490565b82106112615760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610c5c565b600982815481106112745761127461518f565b90600052602060002001549050919050565b600080600080611295866114af565b90945084925061ffff1690506127106112ae8287615230565b6112b8919061525d565b925050509250929050565b846001600160a01b03811633146112dd576112dd33612c96565b6112ea8686868686612d5a565b505050505050565b60008281526014602052604090205461130b9033612b2d565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff161561137e5760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c79206772616e7420746f206e6f6e20686f6c646572730000006044820152606401610c5c565b6113888282612de9565b5050565b611394612aa6565b6113f45760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420617574686f72697a656420746f20736574206f70657261746f72207260448201526a32b9ba3934b1ba34b7b71760a91b6064820152608401610c5c565b610c6e81612e44565b60006114098133612b2d565b600061141484612738565b5090506114218184612e8b565b50505050565b336001600160a01b0382161461147f5760405162461bcd60e51b815260206004820152601a60248201527f43616e206f6e6c792072656e6f756e636520666f722073656c660000000000006044820152606401610c5c565b6113888282612ea3565b6000818152600d6020526040812080548291906114a5906150df565b9050119050919050565b6000818152600860209081526040808320815180830190925280546001600160a01b0316808352600190910154928201929092528291156114f65780516020820151611510565b6007546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b6060815183511461153d5760405162461bcd60e51b8152600401610c5c90615271565b600083516001600160401b0381111561155857611558614805565b604051908082528060200260200182016040528015611581578160200160208202803683370190505b50905060005b845181101561162657600260008683815181106115a6576115a661518f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008583815181106115e2576115e261518f565b602002602001015181526020019081526020016000205482828151811061160b5761160b61518f565b602090810291909101015261161f816151bb565b9050611587565b509392505050565b61163d86888787878787612f05565b6000868152600e60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e0840191906116b9906150df565b80601f01602080910402602001604051908101604052809291908181526020018280546116e5906150df565b80156117325780601f1061170757610100808354040283529160200191611732565b820191906000526020600020905b81548152906001019060200180831161171557829003601f168201915b505050919092525050506000888152600f602052604090205490915061175c883389898989610e46565b50868260400181815161176f919061521d565b90525060008181526010602090815260408083203384529091528120805489929061179b90849061521d565b90915550506000888152600e602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e0830151839190600782019061182390826152e0565b509050506118346000888888612f5a565b61183f898989612bad565b876001600160a01b038a16336001600160a01b03167fff097c7d8b1957a4ff09ef1361b5fb54dcede3941ba836d0beb9d10bec725de68a60405161188591815260200190565b60405180910390a4505050505050505050565b6118a0612aa6565b6118fd5760405162461bcd60e51b815260206004820152602860248201527f4e6f7420617574686f72697a656420746f2073756273637269626520746f207260448201526732b3b4b9ba393c9760c11b6064820152608401610c5c565b610c6e81600161300d565b611910612aa6565b61192c5760405162461bcd60e51b8152600401610c5c90615167565b6113888282613113565b336001600160a01b03841681148061197357506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b6119b35760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c5c565b81518351146119f65760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610c5c565b60005b8351811015611ac657828181518110611a1457611a1461518f565b602002602001015160026000876001600160a01b03166001600160a01b031681526020019081526020016000206000868481518110611a5557611a5561518f565b60200260200101518152602001908152602001600020541015611ab45760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c5c565b611abf60018261521d565b90506119f9565b506114218484846131b9565b611ada612aa6565b611af65760405162461bcd60e51b8152600401610c5c90615167565b610c6e8161336e565b611b07612aa6565b611b235760405162461bcd60e51b8152600401610c5c90615167565b6000838152600e60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e084019190611b9f906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054611bcb906150df565b8015611c185780601f10611bed57610100808354040283529160200191611c18565b820191906000526020600020905b815481529060010190602001808311611bfb57829003601f168201915b505050919092525050506000858152600f602052604090819020549082015191925090811580611c455750835b15611c94575060003360405160609190911b6bffffffffffffffffffffffff19166020820152436034820152605481018790526074016040516020818303038152906040528051906020012091505b8460200135811115611cdd5760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e4818db185a5b595960721b6044820152606401610c5c565b6000604051806101000160405280876000013581526020018760200135815260200183815260200187606001358152602001876080013581526020018760a0013581526020018760c0016020810190611d369190614653565b6001600160a01b03168152602001611d5160e089018961539f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050898152600e602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e083015192935083929091506007820190611e0d90826152e0565b5050506000878152600f6020526040908190208490555187907f81039d5ecdbb4bd2d72eda132d34c127e1136763fef04b3ab1a1ed1e109eb69a90611e55908990899061540e565b60405180910390a250505050505050565b611e6e612aa6565b611e8a5760405162461bcd60e51b8152600401610c5c90615167565b610c6e816133b8565b60018054610b48906150df565b611ea8612aa6565b611ec45760405162461bcd60e51b8152600401610c5c90615167565b611ecf838383613494565b505050565b6000838152600d6020526040812080546060929190611ef2906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054611f1e906150df565b8015611f6b5780601f10611f4057610100808354040283529160200191611f6b565b820191906000526020600020905b815481529060010190602001808311611f4e57829003601f168201915b505050505090508051600003611fb75760405162461bcd60e51b8152602060048201526011602482015270139bdd1a1a5b99c81d1bc81c995d99585b607a1b6044820152606401610c5c565b60008082806020019051810190611fce91906154db565b91509150611fdd82878761231f565b93508084878746604051602001611ff79493929190615566565b604051602081830303815290604052805190602001201461204a5760405162461bcd60e51b815260206004820152600d60248201526c496e636f7272656374206b657960981b6044820152606401610c5c565b5050509392505050565b600d6020526000908152604090208054610b48906150df565b8161207781612c96565b611ecf838361355e565b600082815260136020908152604080832083805290915281205460ff166120ce575060008281526013602090815260408083206001600160a01b038516845290915290205460ff16610b35565b50600192915050565b6060816001600160401b038111156120f1576120f1614805565b60405190808252806020026020018201604052801561212457816020015b606081526020019060019003908161210f5790505b50905060005b828110156121c457612194308585848181106121485761214861518f565b905060200281019061215a919061539f565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061360d92505050565b8282815181106121a6576121a661518f565b602002602001018190525080806121bc906151bb565b91505061212a565b5092915050565b60606121d5613632565b6121f15760405162461bcd60e51b8152600401610c5c90615167565b60006121fc85611218565b9050612209818585611ed4565b9150612224816040518060200160405280600081525061365f565b61222e8183612e8b565b847f6df1d8db2a036436ffe0b2d1833f2c5f1e624818dfce2578c0faa4b83ef9998d8360405161225e9190614627565b60405180910390a2509392505050565b600081156122ef576000806122858486018661558f565b91509150815160001415801561229a57508015155b156122ec576122ec88600c546122b0919061521d565b86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061365f92505050565b50505b6122fc8686868686613677565b9695505050505050565b60008281526014602052604090205461147f9033612b2d565b8251604080518083016020019091528181529060005b8181101561238b576000858583604051602001612354939291906155d3565b60408051601f1981840301815291905280516020918201208884018201511885840182015261238491508261521d565b9050612335565b50509392505050565b60058054610b48906150df565b600e60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880180549798969795969495939492936001600160a01b0390921692916123f7906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054612423906150df565b80156124705780601f1061244557610100808354040283529160200191612470565b820191906000526020600020905b81548152906001019060200180831161245357829003601f168201915b5050505050905088565b846001600160a01b03811633146124945761249433612c96565b6112ea8686868686613784565b336001600160a01b0384168114806124de57506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b61251e5760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c5c565b6001600160a01b038416600090815260026020908152604080832086845290915290205482111561258b5760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c5c565b61142184848461380c565b606060006125a5836002615230565b6125b090600261521d565b6001600160401b038111156125c7576125c7614805565b6040519080825280601f01601f1916602001820160405280156125f1576020820181803683370190505b509050600360fc1b8160008151811061260c5761260c61518f565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061263b5761263b61518f565b60200101906001600160f81b031916908160001a905350600061265f846002615230565b61266a90600161521d565b90505b60018111156126e2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061269e5761269e61518f565b1a60f81b8282815181106126b4576126b461518f565b60200101906001600160f81b031916908160001a90535060049490941c936126db816155e5565b905061266d565b5083156127315760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5c565b9392505050565b600080600061274660095490565b90506000600980548060200260200160405190810160405280929190818152602001828054801561279657602002820191906000526020600020905b815481526020019060010190808311612782575b5050505050905060005b82811015612802578181815181106127ba576127ba61518f565b60200260200101518610156127f0578093508181815181106127de576127de61518f565b60200260200101519450505050915091565b6127fb60018261521d565b90506127a0565b5060405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610c5c565b6060600061284a60095490565b90506000600980548060200260200160405190810160405280929190818152602001828054801561289a57602002820191906000526020600020905b815481526020019060010190808311612886575b5050505050905060005b82811015612802578181815181106128be576128be61518f565b602002602001015185101561298c57600a60008383815181106128e3576128e361518f565b602002602001015181526020019081526020016000208054612904906150df565b80601f0160208091040260200160405190810160405280929190818152602001828054612930906150df565b801561297d5780601f106129525761010080835404028352916020019161297d565b820191906000526020600020905b81548152906001019060200180831161296057829003601f168201915b50505050509350505050919050565b61299760018261521d565b90506128a4565b6060816000036129c55750506040805180820190915260018152600360fc1b602082015290565b8160005b81156129ef57806129d9816151bb565b91506129e89050600a8361525d565b91506129c9565b6000816001600160401b03811115612a0957612a09614805565b6040519080825280601f01601f191660200182016040528015612a33576020820181803683370190505b5090505b8415612a9e57612a486001836155fc565b9150612a55600a8661560f565b612a6090603061521d565b60f81b818381518110612a7557612a7561518f565b60200101906001600160f81b031916908160001a905350612a97600a8661525d565b9450612a37565b949350505050565b3360009081527fd7625fba02ecfd31206738ceab8366752ce5e5fbdbd826fda6054a1dd84f6ef0602052604090205460ff1690565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff1661138857612b6b816001600160a01b03166014612596565b612b76836020612596565b604051602001612b87929190615623565b60408051601f198184030181529082905262461bcd60e51b8252610c5c91600401614627565b611ecf83838360405180602001604052806000815250613931565b6000808281805b8751811015612c8a57612be3600283615230565b91506000888281518110612bf957612bf961518f565b60200260200101519050808411612c3b576040805160208101869052908101829052606001604051602081830303815290604052805190602001209350612c77565b6040805160208101839052908101859052606001604051602081830303815290604052805190602001209350600183612c74919061521d565b92505b5080612c82816151bb565b915050612bcf565b50941495939450505050565b60115460ff1615610c6e576daaeb6d7670e522a718067333cd4e3b15610c6e57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612d0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d329190615690565b610c6e57604051633b79c77360e21b81526001600160a01b0382166004820152602401610c5c565b6001600160a01b038516331480612d9457506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b612dd55760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c5c565b612de28585858585613a0a565b5050505050565b60008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6011805460ff19168215159081179091556040519081527f38475885990d8dfe9ca01f0ef160a1b5514426eab9ddbc953a3353410ba780969060200160405180910390a150565b6000828152600a60205260409020611ecf82826152e0565b612ead8282612b2d565b60008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600c548710612f515760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610c5c565b50505050505050565b8015611421576000612f6c8285615230565b905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03841601612fdb57803414612fdb5760405162461bcd60e51b815260206004820152601660248201527526bab9ba1039b2b732103a37ba30b610383934b1b29760511b6044820152606401610c5c565b60006001600160a01b03861615612ff25785612fff565b600b546001600160a01b03165b90506112ea84338385613bbd565b6daaeb6d7670e522a718067333cd4e3b15611388576001600160a01b0382163b156130e25780156130a257604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561308e57600080fd5b505af11580156112ea573d6000803e3d6000fd5b60405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401613074565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401613074565b6127108111156131575760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610c5c565b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0383166132005760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c5c565b80518251146132215760405162461bcd60e51b8152600401610c5c90615271565b600033905061324481856000868660405180602001604052806000815250613c03565b60005b835181101561330f5760008482815181106132645761326461518f565b6020026020010151905060008483815181106132825761328261518f565b6020908102919091018101516001600160a01b03891660009081526002835260408082208683529093529190912054909150818110156132d45760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b0388166000908152600260209081526040808320958352949052929092209103905580613307816151bb565b915050613247565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516133609291906156d7565b60405180910390a450505050565b600b80546001600160a01b0319166001600160a01b0383169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a250565b6000600580546133c7906150df565b80601f01602080910402602001604051908101604052809291908181526020018280546133f3906150df565b80156134405780601f1061341557610100808354040283529160200191613440565b820191906000526020600020905b81548152906001019060200180831161342357829003601f168201915b50505050509050816005908161345691906152e0565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a168183604051613488929190615705565b60405180910390a15050565b6127108111156134d85760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610c5c565b6040805180820182526001600160a01b038481168083526020808401868152600089815260088352869020945185546001600160a01b031916941693909317845591516001909301929092559151838152909185917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d91015b60405180910390a3505050565b336001600160a01b03831681036135a85760405162461bcd60e51b815260206004820152600e60248201526d20a8282927ab24a723afa9a2a62360911b6044820152606401610c5c565b6001600160a01b03818116600081815260036020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101613551565b606061273183836040518060600160405280602781526020016158f460279139613d0f565b60006136466006546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b6000828152600d60205260409020611ecf82826152e0565b6000613681612aa6565b61369d5760405162461bcd60e51b8152600401610c5c90615167565b856000036136d55760405162461bcd60e51b81526020600482015260056024820152640c08185b5d60da1b6044820152606401610c5c565b6000600c54905061371d818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613de292505050565b600c919091559150807f2a0365091ef1a40953c670dce28177e37520648a6fdc91506bffac0ab045570d60016137538a8461521d565b61375d91906155fc565b8888888860405161377295949392919061572a565b60405180910390a25095945050505050565b6001600160a01b0385163314806137be57506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b6137ff5760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c5c565b612de28585858585613e46565b6001600160a01b0383166138535760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c5c565b336138828185600061386487613f6c565b61386d87613f6c565b60405180602001604052806000815250613c03565b6001600160a01b0384166000908152600260209081526040808320868452909152902054828110156138c65760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b03858116600081815260026020908152604080832089845282528083208887039055805189815291820188905291938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0384166139575760405162461bcd60e51b8152600401610c5c90615763565b336139778160008761396888613f6c565b61397188613f6c565b87613c03565b6001600160a01b0385166000908152600260209081526040808320878452909152812080548592906139aa90849061521d565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612de281600087878787613fb7565b8151835114613a2b5760405162461bcd60e51b8152600401610c5c90615271565b6001600160a01b038416613a515760405162461bcd60e51b8152600401610c5c90615763565b33613a60818787878787613c03565b60005b8451811015613b57576000858281518110613a8057613a8061518f565b602002602001015190506000858381518110613a9e57613a9e61518f565b6020908102919091018101516001600160a01b038b166000908152600283526040808220868352909352919091205490915081811015613af05760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b03808b16600090815260026020818152604080842088855282528084208787039055938d16835290815282822086835290529081208054849290613b3c90849061521d565b9250508190555050505080613b50906151bb565b9050613a63565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613ba79291906156d7565b60405180910390a46112ea81878787878761410a565b80156114215773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03851601613bf757613bf282826141e7565b611421565b6114218484848461428a565b6001600160a01b038516613c8a5760005b8351811015613c8857828181518110613c2f57613c2f61518f565b602002602001015160126000868481518110613c4d57613c4d61518f565b602002602001015181526020019081526020016000206000828254613c72919061521d565b90915550613c819050816151bb565b9050613c14565b505b6001600160a01b0384166112ea5760005b8351811015612f5157828181518110613cb657613cb661518f565b602002602001015160126000868481518110613cd457613cd461518f565b602002602001015181526020019081526020016000206000828254613cf991906155fc565b90915550613d089050816151bb565b9050613c9b565b60606001600160a01b0384163b613d775760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c5c565b600080856001600160a01b031685604051613d929190615789565b600060405180830381855af49150503d8060008114613dcd576040519150601f19603f3d011682016040523d82523d6000602084013e613dd2565b606091505b50915091506122fc8282866142dd565b600080613def848661521d565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af018190556000818152600a60205260409020909250829150613e3d84826152e0565b50935093915050565b6001600160a01b038416613e6c5760405162461bcd60e51b8152600401610c5c90615763565b33613e7c81878761396888613f6c565b6001600160a01b038616600090815260026020908152604080832087845290915290205483811015613ec05760405162461bcd60e51b8152600401610c5c906156ad565b6001600160a01b0380881660009081526002602081815260408084208a855282528084208987039055938a16835290815282822088835290529081208054869290613f0c90849061521d565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f51828888888888613fb7565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613fa657613fa661518f565b602090810291909101015292915050565b6001600160a01b0384163b156112ea5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613ffb90899089908890889088906004016157a5565b6020604051808303816000875af1925050508015614036575060408051601f3d908101601f19168201909252614033918101906157df565b60015b6140b8576140426157fc565b806308c379a00361407b5750614056615818565b80614061575061407d565b8060405162461bcd60e51b8152600401610c5c9190614627565b505b60405162461bcd60e51b815260206004820152601060248201526f10a2a92198989a9aa922a1a2a4ab22a960811b6044820152606401610c5c565b6001600160e01b0319811663f23a6e6160e01b14612f515760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c5c565b6001600160a01b0384163b156112ea5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061414e90899089908890889088906004016158a1565b6020604051808303816000875af1925050508015614189575060408051601f3d908101601f19168201909252614186918101906157df565b60015b614195576140426157fc565b6001600160e01b0319811663bc197c8160e01b14612f515760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c5c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614234576040519150601f19603f3d011682016040523d82523d6000602084013e614239565b606091505b5050905080611ecf5760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606401610c5c565b816001600160a01b0316836001600160a01b0316031561142157306001600160a01b038416036142c857613bf26001600160a01b0385168383614316565b6114216001600160a01b038516848484614379565b606083156142ec575081612731565b8251156142fc5782518084602001fd5b8160405162461bcd60e51b8152600401610c5c9190614627565b6040516001600160a01b038316602482015260448101829052611ecf90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526143b1565b6040516001600160a01b03808516602483015283166044820152606481018290526114219085906323b872dd60e01b90608401614342565b6000614406826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166144839092919063ffffffff16565b805190915015611ecf57808060200190518101906144249190615690565b611ecf5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c5c565b6060612a9e8484600085856001600160a01b0385163b6144e55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c5c565b600080866001600160a01b031685876040516145019190615789565b60006040518083038185875af1925050503d806000811461453e576040519150601f19603f3d011682016040523d82523d6000602084013e614543565b606091505b50915091506145538282866142dd565b979650505050505050565b80356001600160a01b038116811461457557600080fd5b919050565b6000806040838503121561458d57600080fd5b6145968361455e565b946020939093013593505050565b6001600160e01b031981168114610c6e57600080fd5b6000602082840312156145cc57600080fd5b8135612731816145a4565b60005b838110156145f25781810151838201526020016145da565b50506000910152565b600081518084526146138160208601602086016145d7565b601f01601f19169290920160200192915050565b60208152600061273160208301846145fb565b60006020828403121561464c57600080fd5b5035919050565b60006020828403121561466557600080fd5b6127318261455e565b60008083601f84011261468057600080fd5b5081356001600160401b0381111561469757600080fd5b6020830191508360208260051b85010111156146b257600080fd5b9250929050565b600080600080600080606087890312156146d257600080fd5b86356001600160401b03808211156146e957600080fd5b6146f58a838b0161466e565b9098509650602089013591508082111561470e57600080fd5b61471a8a838b0161466e565b9096509450604089013591508082111561473357600080fd5b5061474089828a0161466e565b979a9699509497509295939492505050565b60006080828403121561476457600080fd5b50919050565b60008060008060008060c0878903121561478357600080fd5b863595506147936020880161455e565b9450604087013593506147a86060880161455e565b92506080870135915060a08701356001600160401b038111156147ca57600080fd5b6147d689828a01614752565b9150509295509295509295565b600080604083850312156147f657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561484057614840614805565b6040525050565b60006001600160401b0382111561486057614860614805565b5060051b60200190565b600082601f83011261487b57600080fd5b8135602061488882614847565b604051614895828261481b565b83815260059390931b85018201928281019150868411156148b557600080fd5b8286015b848110156148d057803583529183019183016148b9565b509695505050505050565b60006001600160401b038211156148f4576148f4614805565b50601f01601f191660200190565b600082601f83011261491357600080fd5b813561491e816148db565b60405161492b828261481b565b82815285602084870101111561494057600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a0868803121561497657600080fd5b61497f8661455e565b945061498d6020870161455e565b935060408601356001600160401b03808211156149a957600080fd5b6149b589838a0161486a565b945060608801359150808211156149cb57600080fd5b6149d789838a0161486a565b935060808801359150808211156149ed57600080fd5b506149fa88828901614902565b9150509295509295909350565b60008060408385031215614a1a57600080fd5b82359150614a2a6020840161455e565b90509250929050565b8015158114610c6e57600080fd5b600060208284031215614a5357600080fd5b813561273181614a33565b60008060408385031215614a7157600080fd5b8235915060208301356001600160401b03811115614a8e57600080fd5b614a9a85828601614902565b9150509250929050565b60008060408385031215614ab757600080fd5b82356001600160401b0380821115614ace57600080fd5b818501915085601f830112614ae257600080fd5b81356020614aef82614847565b604051614afc828261481b565b83815260059390931b8501820192828101915089841115614b1c57600080fd5b948201945b83861015614b4157614b328661455e565b82529482019490820190614b21565b96505086013592505080821115614b5757600080fd5b50614a9a8582860161486a565b600081518084526020808501945080840160005b83811015614b9457815187529582019590820190600101614b78565b509495945050505050565b6020815260006127316020830184614b64565b600080600080600080600060e0888a031215614bcd57600080fd5b614bd68861455e565b96506020880135955060408801359450614bf26060890161455e565b93506080880135925060a08801356001600160401b0380821115614c1557600080fd5b614c218b838c01614752565b935060c08a0135915080821115614c3757600080fd5b50614c448a828b01614902565b91505092959891949750929550565b600080600060608486031215614c6857600080fd5b614c718461455e565b925060208401356001600160401b0380821115614c8d57600080fd5b614c998783880161486a565b93506040860135915080821115614caf57600080fd5b50614cbc8682870161486a565b9150509250925092565b600080600060608486031215614cdb57600080fd5b8335925060208401356001600160401b03811115614cf857600080fd5b84016101008187031215614d0b57600080fd5b91506040840135614d1b81614a33565b809150509250925092565b600060208284031215614d3857600080fd5b81356001600160401b03811115614d4e57600080fd5b612a9e84828501614902565b600080600060608486031215614d6f57600080fd5b83359250614d7f6020850161455e565b9150604084013590509250925092565b60008083601f840112614da157600080fd5b5081356001600160401b03811115614db857600080fd5b6020830191508360208285010111156146b257600080fd5b600080600060408486031215614de557600080fd5b8335925060208401356001600160401b03811115614e0257600080fd5b614e0e86828701614d8f565b9497909650939450505050565b60008060408385031215614e2e57600080fd5b614e378361455e565b91506020830135614e4781614a33565b809150509250929050565b60008060208385031215614e6557600080fd5b82356001600160401b03811115614e7b57600080fd5b614e878582860161466e565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015614ee857603f19888603018452614ed68583516145fb565b94509285019290850190600101614eba565b5092979650505050505050565b600080600080600060608688031215614f0d57600080fd5b8535945060208601356001600160401b0380821115614f2b57600080fd5b614f3789838a01614d8f565b90965094506040880135915080821115614f5057600080fd5b50614f5d88828901614d8f565b969995985093965092949392505050565b600080600060408486031215614f8357600080fd5b83356001600160401b0380821115614f9a57600080fd5b614fa687838801614902565b94506020860135915080821115614fbc57600080fd5b50614e0e86828701614d8f565b60006101008a83528960208401528860408401528760608401528660808401528560a084015260018060a01b03851660c08401528060e084015261500f818401856145fb565b9b9a5050505050505050505050565b6000806040838503121561503157600080fd5b61503a8361455e565b9150614a2a6020840161455e565b600080600080600060a0868803121561506057600080fd5b6150698661455e565b94506150776020870161455e565b9350604086013592506060860135915060808601356001600160401b038111156150a057600080fd5b6149fa88828901614902565b6000806000606084860312156150c157600080fd5b6150ca8461455e565b95602085013595506040909401359392505050565b600181811c908216806150f357607f821691505b60208210810361476457634e487b7160e01b600052602260045260246000fd5b600082516151258184602087016145d7565b600360fc1b920191825250600101919050565b6000835161514a8184602088016145d7565b83519083019061515e8183602088016145d7565b01949350505050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016151cd576151cd6151a5565b5060010190565b6000808335601e198436030181126151eb57600080fd5b8301803591506001600160401b0382111561520557600080fd5b6020019150600581901b36038213156146b257600080fd5b80820180821115610b3557610b356151a5565b8082028115828204841417610b3557610b356151a5565b634e487b7160e01b600052601260045260246000fd5b60008261526c5761526c615247565b500490565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b601f821115611ecf57600081815260208120601f850160051c810160208610156152c15750805b601f850160051c820191505b818110156112ea578281556001016152cd565b81516001600160401b038111156152f9576152f9614805565b61530d8161530784546150df565b8461529a565b602080601f831160018114615342576000841561532a5750858301515b600019600386901b1c1916600185901b1785556112ea565b600085815260208120601f198616915b8281101561537157888601518255948401946001909101908401615352565b508582101561538f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000808335601e198436030181126153b657600080fd5b8301803591506001600160401b038211156153d057600080fd5b6020019150368190038213156146b257600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152823560408201526020830135606082015260408301356080820152606083013560a0820152608083013560c082015260a083013560e0820152600061545960c0850161455e565b6001600160a01b03166101008381019190915260e08501359036869003601e1901821261548557600080fd5b602091860191820191356001600160401b038111156154a357600080fd5b8036038313156154b257600080fd5b816101208601526154c8610140860182856153e5565b9350505050612731602083018415159052565b600080604083850312156154ee57600080fd5b82516001600160401b0381111561550457600080fd5b8301601f8101851361551557600080fd5b8051615520816148db565b60405161552d828261481b565b82815287602084860101111561554257600080fd5b6155538360208301602087016145d7565b6020969096015195979596505050505050565b60008551615578818460208a016145d7565b820184868237909301918252506020019392505050565b600080604083850312156155a257600080fd5b82356001600160401b038111156155b857600080fd5b6155c485828601614902565b95602094909401359450505050565b82848237909101908152602001919050565b6000816155f4576155f46151a5565b506000190190565b81810381811115610b3557610b356151a5565b60008261561e5761561e615247565b500690565b7402832b936b4b9b9b4b7b7399d1030b1b1b7bab73a1605d1b8152600083516156538160158501602088016145d7565b7001034b99036b4b9b9b4b733903937b6329607d1b60159184019182015283516156848160268401602088016145d7565b01602601949350505050565b6000602082840312156156a257600080fd5b815161273181614a33565b60208082526010908201526f125394d551919250d251539517d0905360821b604082015260600190565b6040815260006156ea6040830185614b64565b82810360208401526156fc8185614b64565b95945050505050565b60408152600061571860408301856145fb565b82810360208401526156fc81856145fb565b8581526060602082015260006157446060830186886153e5565b82810360408401526157578185876153e5565b98975050505050505050565b6020808252600c908201526b2a27afad22a927afa0a2222960a11b604082015260600190565b6000825161579b8184602087016145d7565b9190910192915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614553908301846145fb565b6000602082840312156157f157600080fd5b8151612731816145a4565b600060033d11156158155760046000803e5060005160e01c5b90565b600060443d10156158265790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561585557505050505090565b828501915081518181111561586d5750505050505090565b843d87010160208285010111156158875750505050505090565b6158966020828601018761481b565b509095945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906158cd90830186614b64565b82810360608401526158df8186614b64565b9050828103608084015261575781856145fb56fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220768913f04e7590729bf08727bf7c3e2e1f4fd006263cac3ef5788501ddf0793f64736f6c63430008110033

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.