ETH Price: $3,324.47 (+6.94%)
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...342351752025-08-15 12:08:17116 days ago1755259697IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000030.0013569
Set Approval For...328252252025-07-13 20:49:57149 days ago1752439797IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000090.00199945
Set Approval For...326136972025-07-08 23:19:01154 days ago1752016741IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000050.00110434
Set Approval For...314141812025-06-11 4:55:09182 days ago1749617709IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000030.00070165
Safe Transfer Fr...314137972025-06-11 4:42:21182 days ago1749616941IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000030.00056203
Set Approval For...304776702025-05-20 12:38:07203 days ago1747744687IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000050.00116725
Set Approval For...289288152025-04-14 16:09:37239 days ago1744646977IN
0x4C3De014...Ef7fF78fB
0 ETH0.000002130.00716747
Safe Transfer Fr...284710292025-04-04 1:50:05250 days ago1743731405IN
0x4C3De014...Ef7fF78fB
0 ETH0.00000010.00205302
Set Approval For...284563082025-04-03 17:39:23250 days ago1743701963IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000160.00236867
Set Approval For...282252582025-03-29 9:17:43255 days ago1743239863IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000060.00148586
Safe Transfer Fr...282033112025-03-28 21:06:09256 days ago1743195969IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000090.00173886
Set Approval For...279340452025-03-22 15:30:37262 days ago1742657437IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000090.00368789
Set Approval For...277467842025-03-18 7:28:35266 days ago1742282915IN
0x4C3De014...Ef7fF78fB
0 ETH0.00000020.00410666
Set Approval For...275345832025-03-13 9:35:13271 days ago1741858513IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000330.00397339
Set Approval For...268986032025-02-26 16:15:53286 days ago1740586553IN
0x4C3De014...Ef7fF78fB
0 ETH0.000001180.00591718
Set Approval For...268165752025-02-24 18:41:37288 days ago1740422497IN
0x4C3De014...Ef7fF78fB
0 ETH0.00000360.06857058
Safe Transfer Fr...267901952025-02-24 4:02:17289 days ago1740369737IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000150.00280738
Set Approval For...267592522025-02-23 10:50:51289 days ago1740307851IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000150.0033352
Set Approval For...267345472025-02-22 21:07:21290 days ago1740258441IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000150.00302757
Set Approval For...266040172025-02-19 20:36:21293 days ago1739997381IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000080.00290767
Set Approval For...266040062025-02-19 20:35:59293 days ago1739997359IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000070.00289926
Set Approval For...266039962025-02-19 20:35:39293 days ago1739997339IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000070.00289658
Set Approval For...264114072025-02-15 9:36:01297 days ago1739612161IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000120.00261156
Set Approval For...263212472025-02-13 7:30:41299 days ago1739431841IN
0x4C3De014...Ef7fF78fB
0 ETH0.000002510.01994749
Set Approval For...261110582025-02-08 10:44:23304 days ago1739011463IN
0x4C3De014...Ef7fF78fB
0 ETH0.000000190.00407489
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
196163092024-09-11 2:32:45455 days ago1726021965
0x4C3De014...Ef7fF78fB
0.0015 ETH
188615782024-08-24 15:15:03472 days ago1724512503
0x4C3De014...Ef7fF78fB
0.0015 ETH
188247372024-08-23 18:47:01473 days ago1724438821
0x4C3De014...Ef7fF78fB
0.0015 ETH
188224962024-08-23 17:32:19473 days ago1724434339
0x4C3De014...Ef7fF78fB
0.0015 ETH
187618512024-08-22 7:50:49474 days ago1724313049
0x4C3De014...Ef7fF78fB
0.0015 ETH
187613242024-08-22 7:33:15474 days ago1724311995
0x4C3De014...Ef7fF78fB
0.0015 ETH
186954172024-08-20 18:56:21476 days ago1724180181
0x4C3De014...Ef7fF78fB
0.0015 ETH
186879952024-08-20 14:48:57476 days ago1724165337
0x4C3De014...Ef7fF78fB
0.0015 ETH
186864522024-08-20 13:57:31476 days ago1724162251
0x4C3De014...Ef7fF78fB
0.0015 ETH
186864042024-08-20 13:55:55476 days ago1724162155
0x4C3De014...Ef7fF78fB
0.0015 ETH
186863062024-08-20 13:52:39476 days ago1724161959
0x4C3De014...Ef7fF78fB
0.0015 ETH
186791632024-08-20 9:54:33476 days ago1724147673
0x4C3De014...Ef7fF78fB
0.0015 ETH
186735292024-08-20 6:46:45476 days ago1724136405
0x4C3De014...Ef7fF78fB
0.0015 ETH
186616472024-08-20 0:10:41477 days ago1724112641
0x4C3De014...Ef7fF78fB
0.0015 ETH
186606262024-08-19 23:36:39477 days ago1724110599
0x4C3De014...Ef7fF78fB
0.0015 ETH
186575492024-08-19 21:54:05477 days ago1724104445
0x4C3De014...Ef7fF78fB
0.0015 ETH
184683312024-08-15 12:46:49481 days ago1723726009
0x4C3De014...Ef7fF78fB
0.0015 ETH
181123122024-08-07 6:59:31489 days ago1723013971
0x4C3De014...Ef7fF78fB
0.0015 ETH
178784942024-08-01 21:05:35495 days ago1722546335
0x4C3De014...Ef7fF78fB
0.0015 ETH
177075332024-07-28 22:06:53499 days ago1722204413
0x4C3De014...Ef7fF78fB
0.0015 ETH
176780802024-07-28 5:45:07500 days ago1722145507
0x4C3De014...Ef7fF78fB
0.0015 ETH
175471282024-07-25 5:00:03503 days ago1721883603
0x4C3De014...Ef7fF78fB
0.0015 ETH
175471162024-07-25 4:59:39503 days ago1721883579
0x4C3De014...Ef7fF78fB
0.0015 ETH
175200682024-07-24 13:58:03503 days ago1721829483
0x4C3De014...Ef7fF78fB
0.0015 ETH
175163162024-07-24 11:52:59503 days ago1721821979
0x4C3De014...Ef7fF78fB
0.0015 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BerryLabMuseum

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 33 : BerryLabMuseum.sol
// SPDX-License-Identifier: Apache-2.0

// ██████  ███████ ██████  ██████  ██    ██ ██       █████  ██████  
// ██   ██ ██      ██   ██ ██   ██  ██  ██  ██      ██   ██ ██   ██ 
// ██████  █████   ██████  ██████    ████   ██      ███████ ██████  
// ██   ██ ██      ██   ██ ██   ██    ██    ██      ██   ██ ██   ██ 
// ██████  ███████ ██   ██ ██   ██    ██    ███████ ██   ██ ██████ 


pragma solidity ^0.8.0;

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

contract BerryLabMuseum is ERC1155Drop {
    constructor(
        address _defaultAdmin,
        string memory _name,
        string memory _symbol,
        address _royaltyRecipient,
        uint128 _royaltyBps,
        address _primarySaleRecipient
    )
        ERC1155Drop(
            _defaultAdmin,
            _name,
            _symbol,
            _royaltyRecipient,
            _royaltyBps,
            _primarySaleRecipient
        )
    {}
}

// 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 { CurrencyTransferLib } from "../lib/CurrencyTransferLib.sol";
import "../lib/Strings.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
{
    using Strings 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
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Initializes the contract with the given parameters.
     *
     * @param _defaultAdmin         The default admin for the contract.
     * @param _name                 The name of the contract.
     * @param _symbol               The symbol of the contract.
     * @param _royaltyRecipient     The address to which royalties should be sent.
     * @param _royaltyBps           The royalty basis points to be charged. Max = 10000 (10000 = 100%, 1000 = 10%)
     * @param _primarySaleRecipient The address to which primary sale revenue should be sent.
     */
    constructor(
        address _defaultAdmin,
        string memory _name,
        string memory _symbol,
        address _royaltyRecipient,
        uint128 _royaltyBps,
        address _primarySaleRecipient
    ) ERC1155(_name, _symbol) {
        _setupOwner(_defaultAdmin);
        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);
        _setupPrimarySaleRecipient(_primarySaleRecipient);
    }

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

    /**
     * @dev See ERC165: https://eips.ethereum.org/EIPS/eip-165
     * @inheritdoc IERC165
     */
    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.
     * @return         The metadata URI for the given 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.
     *  @return revealedURI The revealed URI for the batch of NFTs.
     */
    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;
    }

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

    /**
     * @dev Runs before every `claim` function call.
     *
     * @param _tokenId The tokenId of the NFT being claimed.
     */
    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.
     *
     * @param _primarySaleRecipient The address to which primary sale revenue should be sent.
     * @param _quantityToClaim      The quantity of NFTs being claimed.
     * @param _currency             The currency in which the NFTs are being sold.
     * @param _pricePerToken        The price per NFT being claimed.
     */

    function _collectPriceOnClaim(
        address _primarySaleRecipient,
        uint256 _quantityToClaim,
        address _currency,
        uint256 _pricePerToken
    ) internal virtual override {
        if (_pricePerToken == 0) {
            require(msg.value == 0, "!Value");
            return;
        }

        uint256 totalPrice = _quantityToClaim * _pricePerToken;

        bool validMsgValue;
        if (_currency == CurrencyTransferLib.NATIVE_TOKEN) {
            validMsgValue = msg.value == totalPrice;
        } else {
            validMsgValue = msg.value == 0;
        }
        require(validMsgValue, "Invalid msg value");

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

    /**
     * @dev Transfers the NFTs being claimed.
     *
     * @param _to                    The address to which the NFTs are being transferred.
     * @param _tokenId               The tokenId of the NFTs being claimed.
     * @param _quantityBeingClaimed  The quantity of 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.
     *
     * @param operator The address performing the token transfer.
     * @param from     The address from which the token is being transferred.
     * @param to       The address to which the token is being transferred.
     * @param ids      The tokenIds of the tokens being transferred.
     * @param amounts  The amounts of the tokens being transferred.
     * @param data     Any additional data being passed in the token transfer.
     */
    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 Checks whether NFTs can be revealed in the given execution context.
    function _canReveal() internal view virtual returns (bool) {
        return msg.sender == owner();
    }
}

// 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;
    }
}

// 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 33 : 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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 Invalid index for batch
    error BatchMintInvalidBatchId(uint256 index);

    /// @dev Invalid token
    error BatchMintInvalidTokenId(uint256 tokenId);

    /// @dev Metadata frozen
    error BatchMintMetadataFrozen(uint256 batchId);

    /// @dev Largest tokenId of each batch of tokens with the same baseURI + 1 {ex: batchId 100 at position 0 includes tokens 0-99}
    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;

    /// @dev Mapping from id of a batch of tokens => to whether the base URI for the respective batch of tokens is frozen.
    mapping(uint256 => bool) public batchFrozen;

    /// @dev This event emits when the metadata of all tokens are frozen.
    /// While not currently supported by marketplaces, this event allows
    /// future indexing if desired.
    event MetadataFrozen();

    // @dev This event emits when the metadata of a range of tokens is updated.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFTs.
    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);

    /**
     *  @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 at the given index.
     *  @dev            See {getBaseURICount}.
     *  @param _index   Index of the desired batch in batchIds array.
     */
    function getBatchIdAtIndex(uint256 _index) public view returns (uint256) {
        if (_index >= getBaseURICount()) {
            revert BatchMintInvalidBatchId(_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 BatchMintInvalidTokenId(_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 BatchMintInvalidTokenId(_tokenId);
    }

    /// @dev returns the starting tokenId of a given batchId.
    function _getBatchStartId(uint256 _batchID) internal view returns (uint256) {
        uint256 numOfTokenBatches = getBaseURICount();
        uint256[] memory indices = batchIds;

        for (uint256 i = 0; i < numOfTokenBatches; i++) {
            if (_batchID == indices[i]) {
                if (i > 0) {
                    return indices[i - 1];
                }
                return 0;
            }
        }

        revert BatchMintInvalidBatchId(_batchID);
    }

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

    /// @dev Freezes the base URI for the batch of tokens with the given batchId.
    function _freezeBaseURI(uint256 _batchId) internal {
        string memory baseURIForBatch = baseURI[_batchId];
        if (bytes(baseURIForBatch).length == 0) {
            revert BatchMintInvalidBatchId(_batchId);
        }
        batchFrozen[_batchId] = true;
        emit MetadataFrozen();
    }

    /// @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;
    }
}

// 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 {
    /// @dev The sender is not authorized to perform the action
    error ContractMetadataUnauthorized();

    /// @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 ContractMetadataUnauthorized();
        }

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

// 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 The contract doesn't have any url to be delayed revealed
    error DelayedRevealNothingToReveal();

    /// @dev The result of the returned an incorrect hash
    error DelayedRevealIncorrectResultHash(bytes32 expected, bytes32 actual);

    /// @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 DelayedRevealNothingToReveal();
        }

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

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

        if (keccak256(abi.encodePacked(revealedURI, _key, block.chainid)) != provenanceHash) {
            revert DelayedRevealIncorrectResultHash(
                provenanceHash,
                keccak256(abi.encodePacked(revealedURI, _key, block.chainid))
            );
        }
    }

    /**
     *  @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;
    }
}

// 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 virtual returns (bool isOverride) {
        ClaimCondition memory currentClaimPhase = claimCondition[_tokenId];
        uint256 claimLimit = currentClaimPhase.quantityLimitPerWallet;
        uint256 claimPrice = currentClaimPhase.pricePerToken;
        address claimCurrency = currentClaimPhase.currency;

        /*
         * Here `isOverride` implies that if the merkle proof verification fails,
         * the claimer would claim through open claim limit instead of allowlisted limit.
         */
        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);
}

// 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 {
    /// @dev The sender is not authorized to perform the action
    error LazyMintUnauthorized();
    error LazyMintInvalidAmount();

    /// @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 LazyMintUnauthorized();
        }

        if (_amount == 0) {
            revert LazyMintInvalidAmount();
        }

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

// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "../lib/Address.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 returns (bytes[] memory results) {
        results = new bytes[](data.length);
        address sender = _msgSender();
        bool isForwarder = msg.sender != sender;
        for (uint256 i = 0; i < data.length; i++) {
            if (isForwarder) {
                results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], sender));
            } else {
                results[i] = Address.functionDelegateCall(address(this), data[i]);
            }
        }
        return results;
    }

    /// @notice Returns the sender in the given execution context.
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
}

// 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 The sender is not authorized to perform the action
    error OwnableUnauthorized();

    /// @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 OwnableUnauthorized();
        }
        _;
    }

    /**
     *  @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 OwnableUnauthorized();
        }
        _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);
}

// 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 sender is not authorized to perform the action
    error PrimarySaleUnauthorized();

    /// @dev The recipient is invalid
    error PrimarySaleInvalidRecipient(address recipient);

    /// @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 PrimarySaleUnauthorized();
        }
        _setupPrimarySaleRecipient(_saleRecipient);
    }

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

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

// 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 sender is not authorized to perform the action
    error RoyaltyUnauthorized();

    /// @dev The recipient is invalid
    error RoyaltyInvalidRecipient(address recipient);

    /// @dev The fee bps exceeded the max value
    error RoyaltyExceededMaxFeeBps(uint256 max, uint256 actual);

    /// @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 RoyaltyUnauthorized();
        }

        _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 RoyaltyExceededMaxFeeBps(10_000, _royaltyBps);
        }

        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 RoyaltyUnauthorized();
        }

        _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 RoyaltyExceededMaxFeeBps(10_000, _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 19 of 33 : 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;
    }
}

// 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);
}

// 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);
}

// 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 Proof 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 23 of 33 : 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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 { Address } from "../../../../../lib/Address.sol";

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

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

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

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

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

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

    /**
     * @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");
        }
    }
}

// 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);
}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.1;

/// @author thirdweb, OpenZeppelin Contracts (v4.9.0)

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

// Helper interfaces
import { IWETH } from "../infra/interface/IWETH.sol";
import { SafeERC20, IERC20 } from "../external-deps/openzeppelin/token/ERC20/utils/SafeERC20.sol";

library CurrencyTransferLib {
    using SafeERC20 for IERC20;

    error CurrencyTransferLibMismatchedValue(uint256 expected, uint256 actual);
    error CurrencyTransferLibFailedNativeTransfer(address recipient, uint256 value);

    /// @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
                if (_amount != msg.value) {
                    revert CurrencyTransferLibMismatchedValue(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 }("");
        if (!success) {
            revert CurrencyTransferLibFailedNativeTransfer(to, value);
        }
    }

    /// @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);
        }
    }
}

// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.0;

/// @author OpenZeppelin, thirdweb

library MerkleProof {
    function verify(bytes32[] calldata 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 = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
                index += 1;
            }
        }

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

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

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

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

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

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

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

    /// @dev Returns the hexadecimal representation of `value`.
    /// The output is prefixed with "0x", encoded using 2 hexadecimal digits per byte,
    /// and the alphabets are capitalized conditionally according to
    /// https://eips.ethereum.org/EIPS/eip-55
    function toHexStringChecksummed(address value) internal pure returns (string memory str) {
        str = toHexString(value);
        /// @solidity memory-safe-assembly
        assembly {
            let mask := shl(6, div(not(0), 255)) // `0b010000000100000000 ...`
            let o := add(str, 0x22)
            let hashed := and(keccak256(o, 40), mul(34, mask)) // `0b10001000 ... `
            let t := shl(240, 136) // `0b10001000 << 240`
            for {
                let i := 0
            } 1 {

            } {
                mstore(add(i, i), mul(t, byte(i, hashed)))
                i := add(i, 1)
                if eq(i, 20) {
                    break
                }
            }
            mstore(o, xor(mload(o), shr(1, and(mload(0x00), and(mload(o), mask)))))
            o := add(o, 0x20)
            mstore(o, xor(mload(o), shr(1, and(mload(0x20), and(mload(o), mask)))))
        }
    }

    /// @dev Returns the hexadecimal representation of `value`.
    /// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte.
    function toHexString(address value) internal pure returns (string memory str) {
        str = toHexStringNoPrefix(value);
        /// @solidity memory-safe-assembly
        assembly {
            let strLength := add(mload(str), 2) // Compute the length.
            mstore(str, 0x3078) // Write the "0x" prefix.
            str := sub(str, 2) // Move the pointer.
            mstore(str, strLength) // Write the length.
        }
    }

    /// @dev Returns the hexadecimal representation of `value`.
    /// The output is encoded using 2 hexadecimal digits per byte.
    function toHexStringNoPrefix(address value) internal pure returns (string memory str) {
        /// @solidity memory-safe-assembly
        assembly {
            str := mload(0x40)

            // Allocate the memory.
            // We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length,
            // 0x02 bytes for the prefix, and 0x28 bytes for the digits.
            // The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x28) is 0x80.
            mstore(0x40, add(str, 0x80))

            // Store "0123456789abcdef" in scratch space.
            mstore(0x0f, 0x30313233343536373839616263646566)

            str := add(str, 2)
            mstore(str, 40)

            let o := add(str, 0x20)
            mstore(add(o, 40), 0)

            value := shl(96, value)

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            for {
                let i := 0
            } 1 {

            } {
                let p := add(o, add(i, i))
                let temp := byte(i, value)
                mstore8(add(p, 1), mload(and(temp, 15)))
                mstore8(p, mload(shr(4, temp)))
                i := add(i, 1)
                if eq(i, 20) {
                    break
                }
            }
        }
    }

    /// @dev Returns the hex encoded string from the raw bytes.
    /// The output is encoded using 2 hexadecimal digits per byte.
    function toHexString(bytes memory raw) internal pure returns (string memory str) {
        str = toHexStringNoPrefix(raw);
        /// @solidity memory-safe-assembly
        assembly {
            let strLength := add(mload(str), 2) // Compute the length.
            mstore(str, 0x3078) // Write the "0x" prefix.
            str := sub(str, 2) // Move the pointer.
            mstore(str, strLength) // Write the length.
        }
    }

    /// @dev Returns the hex encoded string from the raw bytes.
    /// The output is encoded using 2 hexadecimal digits per byte.
    function toHexStringNoPrefix(bytes memory raw) internal pure returns (string memory str) {
        /// @solidity memory-safe-assembly
        assembly {
            let length := mload(raw)
            str := add(mload(0x40), 2) // Skip 2 bytes for the optional prefix.
            mstore(str, add(length, length)) // Store the length of the output.

            // Store "0123456789abcdef" in scratch space.
            mstore(0x0f, 0x30313233343536373839616263646566)

            let o := add(str, 0x20)
            let end := add(raw, length)

            for {

            } iszero(eq(raw, end)) {

            } {
                raw := add(raw, 1)
                mstore8(add(o, 1), mload(and(mload(raw), 15)))
                mstore8(o, mload(and(shr(4, mload(raw)), 15)))
                o := add(o, 2)
            }
            mstore(o, 0) // Zeroize the slot after the string.
            mstore(0x40, add(o, 0x20)) // Allocate the memory.
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "remappings": [
    ":@thirdweb-dev/=node_modules/@thirdweb-dev/",
    ":forge-std/=lib/forge-std/src/"
  ],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_defaultAdmin","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint128","name":"_royaltyBps","type":"uint128"},{"internalType":"address","name":"_primarySaleRecipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"BatchMintInvalidBatchId","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BatchMintInvalidTokenId","type":"error"},{"inputs":[{"internalType":"uint256","name":"batchId","type":"uint256"}],"name":"BatchMintMetadataFrozen","type":"error"},{"inputs":[],"name":"ContractMetadataUnauthorized","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"CurrencyTransferLibFailedNativeTransfer","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"DelayedRevealIncorrectResultHash","type":"error"},{"inputs":[],"name":"DelayedRevealNothingToReveal","type":"error"},{"inputs":[],"name":"LazyMintInvalidAmount","type":"error"},{"inputs":[],"name":"LazyMintUnauthorized","type":"error"},{"inputs":[],"name":"OwnableUnauthorized","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"PrimarySaleInvalidRecipient","type":"error"},{"inputs":[],"name":"PrimarySaleUnauthorized","type":"error"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"RoyaltyExceededMaxFeeBps","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"RoyaltyInvalidRecipient","type":"error"},{"inputs":[],"name":"RoyaltyUnauthorized","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":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","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":[],"name":"MetadataFrozen","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":"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":[{"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":"uint256","name":"","type":"uint256"}],"name":"batchFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"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":"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":"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":"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":"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"},{"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":"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":"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"}]

608060405234801561001057600080fd5b5060405161515e38038061515e83398101604081905261002f916102c7565b85858585858584846000610043838261040a565b506001610050828261040a565b5050506100628661008f60201b60201c565b610075836001600160801b0384166100e1565b61007e81610176565b5050505050505050505050506104c8565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b61271081111561011457604051630a4930ad60e31b81526127106004820152602481018290526044015b60405180910390fd5b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0381166101a857604051630f7cac3760e21b81526001600160a01b038216600482015260240161010b565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a250565b80516001600160a01b038116811461020957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261023557600080fd5b81516001600160401b0381111561024e5761024e61020e565b604051601f8201601f19908116603f011681016001600160401b038111828210171561027c5761027c61020e565b60405281815283820160200185101561029457600080fd5b60005b828110156102b357602081860181015183830182015201610297565b506000918101602001919091529392505050565b60008060008060008060c087890312156102e057600080fd5b6102e9876101f2565b60208801519096506001600160401b0381111561030557600080fd5b61031189828a01610224565b604089015190965090506001600160401b0381111561032f57600080fd5b61033b89828a01610224565b94505061034a606088016101f2565b60808801519093506001600160801b038116811461036757600080fd5b915061037560a088016101f2565b90509295509295509295565b600181811c9082168061039557607f821691505b6020821081036103b557634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040557806000526020600020601f840160051c810160208510156103e25750805b601f840160051c820191505b8181101561040257600081556001016103ee565b50505b505050565b81516001600160401b038111156104235761042361020e565b610437816104318454610381565b846103bb565b6020601f82116001811461046b57600083156104535750848201515b600019600385901b1c1916600184901b178455610402565b600084815260208120601f198516915b8281101561049b578785015182556020948501946001909201910161047b565b50848210156104b95786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b614c87806104d76000396000f3fe60806040526004361061023a5760003560e01c80638affb89f1161012e578063b24f2d39116100ab578063e8a3d4851161006f578063e8a3d48514610770578063e9703d2514610785578063e985e9c5146107b9578063f242432a146107f4578063f5298aca1461081457600080fd5b8063b24f2d39146106b8578063bd85b039146106e3578063ce80564214610710578063d37c353b14610730578063e71503221461075057600080fd5b80639fc4d68f116100f25780639fc4d68f146105de578063a05112fc146105fe578063a22cb4651461061e578063ac9650d81461063e578063ad1eefc51461066b57600080fd5b80638affb89f1461054b5780638da5cb5b1461056b578063938e3d7b1461058957806395d89b41146105a95780639bcf7a15146105be57600080fd5b80633b1475a7116101bc578063600dd5ea11610180578063600dd5ea146104a657806363b45e2d146104c65780636b20c454146104db5780636f4f2837146104fb578063830405321461051b57600080fd5b80633b1475a7146103ef578063492e224b146104045780634cc157df146104245780634e1273f41461046657806357bc3d781461049357600080fd5b806313af40351161020357806313af40351461032e57806323a2902b146103505780632419f51b146103705780632a55205a146103905780632eb2c2d6146103cf57600080fd5b8062fdd58e1461023f57806301ffc9a71461028a57806306fdde03146102ba578063079fe40e146102dc5780630e89341c1461030e575b600080fd5b34801561024b57600080fd5b5061027761025a366004613a15565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561029657600080fd5b506102aa6102a5366004613a55565b610834565b6040519015158152602001610281565b3480156102c657600080fd5b506102cf6108a1565b6040516102819190613ac2565b3480156102e857600080fd5b50600c546001600160a01b03165b6040516001600160a01b039091168152602001610281565b34801561031a57600080fd5b506102cf610329366004613ad5565b61092f565b34801561033a57600080fd5b5061034e610349366004613aee565b61099e565b005b34801561035c57600080fd5b506102aa61036b366004613b21565b6109cf565b34801561037c57600080fd5b5061027761038b366004613ad5565b610d6f565b34801561039c57600080fd5b506103b06103ab366004613b9a565b610dc1565b604080516001600160a01b039093168352602083019190915201610281565b3480156103db57600080fd5b5061034e6103ea366004613d22565b610dfe565b3480156103fb57600080fd5b50600d54610277565b34801561041057600080fd5b506102aa61041f366004613ad5565b610e8d565b34801561043057600080fd5b5061044461043f366004613ad5565b610eb3565b604080516001600160a01b03909316835261ffff909116602083015201610281565b34801561047257600080fd5b50610486610481366004613dd5565b610f1e565b6040516102819190613ee4565b61034e6104a1366004613ef7565b61102a565b3480156104b257600080fd5b5061034e6104c1366004613a15565b611294565b3480156104d257600080fd5b50600954610277565b3480156104e757600080fd5b5061034e6104f6366004613f9c565b6112c7565b34801561050757600080fd5b5061034e610516366004613aee565b611469565b34801561052757600080fd5b506102aa610536366004613ad5565b600b6020526000908152604090205460ff1681565b34801561055757600080fd5b5061034e610566366004614021565b611497565b34801561057757600080fd5b506006546001600160a01b03166102f6565b34801561059557600080fd5b5061034e6105a4366004614081565b61181a565b3480156105b557600080fd5b506102cf611848565b3480156105ca57600080fd5b5061034e6105d93660046140c9565b611855565b3480156105ea57600080fd5b506102cf6105f9366004614147565b61188a565b34801561060a57600080fd5b506102cf610619366004613ad5565b611a01565b34801561062a57600080fd5b5061034e610639366004614192565b611a1a565b34801561064a57600080fd5b5061065e6106593660046141c9565b611ad2565b604051610281919061423e565b34801561067757600080fd5b506102776106863660046142a3565b6000918252601060209081526040808420548452601182528084206001600160a01b0393909316845291905290205490565b3480156106c457600080fd5b506007546001600160a01b03811690600160a01b900461ffff16610444565b3480156106ef57600080fd5b506102776106fe366004613ad5565b60126020526000908152604090205481565b34801561071c57600080fd5b506102cf61072b366004614147565b611c37565b34801561073c57600080fd5b5061027761074b3660046142cf565b611cfb565b34801561075c57600080fd5b506102cf61076b36600461434c565b611d93565b34801561077c57600080fd5b506102cf611e08565b34801561079157600080fd5b506107a56107a0366004613ad5565b611e15565b60405161028198979695949392919061439f565b3480156107c557600080fd5b506102aa6107d43660046143f4565b600360209081526000928352604080842090915290825290205460ff1681565b34801561080057600080fd5b5061034e61080f36600461441e565b611eee565b34801561082057600080fd5b5061034e61082f366004614476565b611f76565b60006301ffc9a760e01b6001600160e01b0319831614806108655750636cdb3d1360e11b6001600160e01b03198316145b8061088057506303a24d0760e21b6001600160e01b03198316145b8061089b57506001600160e01b0319821663152a902d60e11b145b92915050565b600080546108ae906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546108da906144a9565b80156109275780601f106108fc57610100808354040283529160200191610927565b820191906000526020600020905b81548152906001019060200180831161090a57829003601f168201915b505050505081565b6060600061093c8361206b565b509050600061094a84612152565b905061095582610e8d565b15610983578060405160200161096b91906144dd565b60405160208183030381529060405292505050919050565b8061098d856122d0565b60405160200161096b929190614502565b6109a66123d8565b6109c3576040516316ccb9cb60e11b815260040160405180910390fd5b6109cc81612405565b50565b6000868152600f60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c08301526007810180548493929160e0840191610a4e906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7a906144a9565b8015610ac75780601f10610a9c57610100808354040283529160200191610ac7565b820191906000526020600020905b815481529060010190602001808311610aaa57829003601f168201915b50505091909252505050606081015160a082015160c08301516080840151939450919290919015610b7557610b71610aff8780614531565b86608001518d8a602001358b604001358c6060016020810190610b229190613aee565b6040516001600160601b0319606095861b811660208301526034820194909452605481019290925290921b16607482015260880160405160208183030381529060405280519060200120612457565b5094505b8415610bfc578560200135600003610b8d5782610b93565b85602001355b9250600019866040013503610ba85781610bae565b85604001355b9150600019866040013514158015610bdf57506000610bd36080880160608901613aee565b6001600160a01b031614155b610be95780610bf9565b610bf96080870160608801613aee565b90505b60008b8152601060209081526040808320548352601182528083206001600160a01b03808f16855292529091205490898116908316141580610c3e5750828814155b15610c835760405162461bcd60e51b815260206004820152601060248201526f2150726963654f7243757272656e637960801b60448201526064015b60405180910390fd5b891580610c98575083610c96828c614590565b115b15610cce5760405162461bcd60e51b8152600401610c7a906020808252600490820152632151747960e01b604082015260600190565b84602001518a8660400151610ce39190614590565b1115610d1e5760405162461bcd60e51b815260206004820152600a602482015269214d6178537570706c7960b01b6044820152606401610c7a565b8451421015610d605760405162461bcd60e51b815260206004820152600e60248201526d18d85b9d0818db185a5b481e595d60921b6044820152606401610c7a565b50505050509695505050505050565b6000610d7a60095490565b8210610d9c57604051630793127760e11b815260048101839052602401610c7a565b60098281548110610daf57610daf6145a3565b90600052602060002001549050919050565b600080600080610dd086610eb3565b90945084925061ffff169050612710610de982876145b9565b610df391906145e6565b925050509250929050565b6001600160a01b038516331480610e3857506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b610e795760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c7a565b610e8685858585856124e2565b5050505050565b6000818152600e602052604081208054829190610ea9906144a9565b9050119050919050565b6000818152600860209081526040808320815180830190925280546001600160a01b031680835260019091015492820192909252829115610efa5780516020820151610f14565b6007546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b60608151835114610f415760405162461bcd60e51b8152600401610c7a906145fa565b600083516001600160401b03811115610f5c57610f5c613bbc565b604051908082528060200260200182016040528015610f85578160200160208202803683370190505b50905060005b84518110156110225760026000868381518110610faa57610faa6145a3565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000858381518110610fe657610fe66145a3565b602002602001015181526020019081526020016000205482828151811061100f5761100f6145a3565b6020908102919091010152600101610f8b565b509392505050565b61103986888787878787612696565b6000868152600f60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e0840191906110b5906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546110e1906144a9565b801561112e5780601f106111035761010080835404028352916020019161112e565b820191906000526020600020905b81548152906001019060200180831161111157829003601f168201915b505050919092525050506000888152601060205260409020549091506111588833898989896109cf565b50868260400181815161116b9190614590565b905250600081815260116020908152604080832033845290915281208054899290611197908490614590565b90915550506000888152600f602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e0830151839190600782019061121f908261466a565b5090505061123060008888886126f0565b61123b8989896127e9565b876001600160a01b038a16336001600160a01b03167fff097c7d8b1957a4ff09ef1361b5fb54dcede3941ba836d0beb9d10bec725de68a60405161128191815260200190565b60405180910390a4505050505050505050565b61129c6123d8565b6112b957604051636fae358160e11b815260040160405180910390fd5b6112c38282612804565b5050565b336001600160a01b03841681148061130457506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b6113445760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c7a565b81518351146113875760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610c7a565b60005b8351811015611457578281815181106113a5576113a56145a3565b602002602001015160026000876001600160a01b03166001600160a01b0316815260200190815260200160002060008684815181106113e6576113e66145a3565b602002602001015181526020019081526020016000205410156114455760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c7a565b611450600182614590565b905061138a565b50611463848484612894565b50505050565b6114716123d8565b61148e57604051631c98210f60e21b815260040160405180910390fd5b6109cc81612a3f565b61149f6123d8565b6114dc5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610c7a565b6000838152600f60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e084019190611558906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611584906144a9565b80156115d15780601f106115a6576101008083540402835291602001916115d1565b820191906000526020600020905b8154815290600101906020018083116115b457829003601f168201915b50505091909252505050600085815260106020526040908190205490820151919250908115806115fe5750835b15611648575060003360405160609190911b6001600160601b0319166020820152436034820152605481018790526074016040516020818303038152906040528051906020012091505b84602001358111156116915760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e4818db185a5b595960721b6044820152606401610c7a565b6000604051806101000160405280876000013581526020018760200135815260200183815260200187606001358152602001876080013581526020018760a0013581526020018760c00160208101906116ea9190613aee565b6001600160a01b0316815260200161170560e0890189614728565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050898152600f602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e0830151929350839290915060078201906117c1908261466a565b505050600087815260106020526040908190208490555187907f81039d5ecdbb4bd2d72eda132d34c127e1136763fef04b3ab1a1ed1e109eb69a906118099089908990614797565b60405180910390a250505050505050565b6118226123d8565b61183f57604051639f7f092560e01b815260040160405180910390fd5b6109cc81612abb565b600180546108ae906144a9565b61185d6123d8565b61187a57604051636fae358160e11b815260040160405180910390fd5b611885838383612b97565b505050565b6000838152600e60205260408120805460609291906118a8906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546118d4906144a9565b80156119215780601f106118f657610100808354040283529160200191611921565b820191906000526020600020905b81548152906001019060200180831161190457829003601f168201915b50505050509050805160000361194a57604051635d0580b360e01b815260040160405180910390fd5b60008082806020019051810190611961919061486a565b91509150611970828787611d93565b9350808487874660405160200161198a94939291906148f5565b60405160208183030381529060405280519060200120146119f75780848787466040516020016119bd94939291906148f5565b60405160208183030381529060405280519060200120604051633364574f60e21b8152600401610c7a929190918252602082015260400190565b5050509392505050565b600e60205260009081526040902080546108ae906144a9565b336001600160a01b0383168103611a645760405162461bcd60e51b815260206004820152600e60248201526d20a8282927ab24a723afa9a2a62360911b6044820152606401610c7a565b6001600160a01b03818116600081815260036020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b6060816001600160401b03811115611aec57611aec613bbc565b604051908082528060200260200182016040528015611b1f57816020015b6060815260200190600190039081611b0a5790505b509050336000805b84811015611c2e578115611ba657611b8430878784818110611b4b57611b4b6145a3565b9050602002810190611b5d9190614728565b86604051602001611b709392919061491e565b604051602081830303815290604052612c42565b848281518110611b9657611b966145a3565b6020026020010181905250611c26565b611c0830878784818110611bbc57611bbc6145a3565b9050602002810190611bce9190614728565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c4292505050565b848281518110611c1a57611c1a6145a3565b60200260200101819052505b600101611b27565b50505092915050565b6060611c416123d8565b611c7e5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610c7a565b6000611c8985610d6f565b9050611c9681858561188a565b9150611cb18160405180602001604052806000815250612c6e565b611cbb8183612c86565b847f6df1d8db2a036436ffe0b2d1833f2c5f1e624818dfce2578c0faa4b83ef9998d83604051611ceb9190613ac2565b60405180910390a2509392505050565b60008115611d7c57600080611d128486018661493f565b915091508151600014158015611d2757508015155b15611d7957611d7988600d54611d3d9190614590565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c6e92505050565b50505b611d898686868686612d10565b9695505050505050565b8251604080518083016020019091528181529060005b81811015611dff576000858583604051602001611dc893929190614983565b60408051601f19818403018152919052805160209182012088840182015118858401820152611df8915082614590565b9050611da9565b50509392505050565b600580546108ae906144a9565b600f60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880180549798969795969495939492936001600160a01b039092169291611e6b906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611e97906144a9565b8015611ee45780601f10611eb957610100808354040283529160200191611ee4565b820191906000526020600020905b815481529060010190602001808311611ec757829003601f168201915b5050505050905088565b6001600160a01b038516331480611f2857506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b611f695760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c7a565b610e868585858585612e07565b336001600160a01b038416811480611fb357506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b611ff35760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c7a565b6001600160a01b03841660009081526002602090815260408083208684529091529020548211156120605760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c7a565b611463848484612f3c565b600080600061207960095490565b9050600060098054806020026020016040519081016040528092919081815260200182805480156120c957602002820191906000526020600020905b8154815260200190600101908083116120b5575b5050505050905060005b82811015612135578181815181106120ed576120ed6145a3565b602002602001015186101561212357809350818181518110612111576121116145a3565b60200260200101519450505050915091565b61212e600182614590565b90506120d3565b506040516309797f6960e21b815260048101869052602401610c7a565b6060600061215f60095490565b9050600060098054806020026020016040519081016040528092919081815260200182805480156121af57602002820191906000526020600020905b81548152602001906001019080831161219b575b5050505050905060005b828110156122b3578181815181106121d3576121d36145a3565b60200260200101518510156122a157600a60008383815181106121f8576121f86145a3565b602002602001015181526020019081526020016000208054612219906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054612245906144a9565b80156122925780601f1061226757610100808354040283529160200191612292565b820191906000526020600020905b81548152906001019060200180831161227557829003601f168201915b50505050509350505050919050565b6122ac600182614590565b90506121b9565b506040516309797f6960e21b815260048101859052602401610c7a565b6060816000036122f75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612321578061230b81614995565b915061231a9050600a836145e6565b91506122fb565b6000816001600160401b0381111561233b5761233b613bbc565b6040519080825280601f01601f191660200182016040528015612365576020820181803683370190505b5090505b84156123d05761237a6001836149ae565b9150612387600a866149c1565b612392906030614590565b60f81b8183815181106123a7576123a76145a3565b60200101906001600160f81b031916908160001a9053506123c9600a866145e6565b9450612369565b949350505050565b60006123ec6006546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b6000808281805b878110156124d3576124716002836145b9565b91506000898983818110612487576124876145a3565b9050602002013590508084116124ac57600084815260208290526040902093506124ca565b600081815260208590526040902093506124c7600184614590565b92505b5060010161245e565b50941496939550929350505050565b81518351146125035760405162461bcd60e51b8152600401610c7a906145fa565b6001600160a01b0384166125295760405162461bcd60e51b8152600401610c7a906149d5565b33612538818787878787613061565b60005b8451811015612628576000858281518110612558576125586145a3565b602002602001015190506000858381518110612576576125766145a3565b6020908102919091018101516001600160a01b038b1660009081526002835260408082208683529093529190912054909150818110156125c85760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b03808b16600090815260026020818152604080842088855282528084208787039055938d16835290815282822086835290529081208054849290612614908490614590565b90915550506001909301925061253b915050565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612678929190614a25565b60405180910390a461268e81878787878761315b565b505050505050565b600d5487106126e75760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768206d696e74656420746f6b656e7300000000000000006044820152606401610c7a565b50505050505050565b8060000361273457341561272f5760405162461bcd60e51b81526020600482015260066024820152652156616c756560d01b6044820152606401610c7a565b611463565b600061274082856145b9565b9050600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038516016127725750348114612776565b5034155b806127b75760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964206d73672076616c756560781b6044820152606401610c7a565b60006001600160a01b038716156127ce57866127db565b600c546001600160a01b03165b90506126e7853383866132ae565b611885838383604051806020016040528060008152506132ef565b61271081111561283257604051630a4930ad60e31b8152612710600482015260248101829052604401610c7a565b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0383166128db5760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c7a565b80518251146128fc5760405162461bcd60e51b8152600401610c7a906145fa565b600033905061291f81856000868660405180602001604052806000815250613061565b60005b83518110156129e057600084828151811061293f5761293f6145a3565b60200260200101519050600084838151811061295d5761295d6145a3565b6020908102919091018101516001600160a01b03891660009081526002835260408082208683529093529190912054909150818110156129af5760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b03881660009081526002602090815260408083209583529490529290922091039055600101612922565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612a31929190614a25565b60405180910390a450505050565b6001600160a01b038116612a7157604051630f7cac3760e21b81526001600160a01b0382166004820152602401610c7a565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a250565b600060058054612aca906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054612af6906144a9565b8015612b435780601f10612b1857610100808354040283529160200191612b43565b820191906000526020600020905b815481529060010190602001808311612b2657829003601f168201915b505050505090508160059081612b59919061466a565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a168183604051612b8b929190614a53565b60405180910390a15050565b612710811115612bc557604051630a4930ad60e31b8152612710600482015260248101829052604401610c7a565b6040805180820182526001600160a01b038481168083526020808401868152600089815260088352869020945185546001600160a01b031916941693909317845591516001909301929092559151838152909185917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d9101611ac5565b6060612c678383604051806060016040528060278152602001614c2b602791396133b9565b9392505050565b6000828152600e60205260409020611885828261466a565b6000828152600b602052604090205460ff1615612cb957604051635d079ac960e11b815260048101839052602401610c7a565b6000828152600a60205260409020612cd1828261466a565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c612cfc83613427565b604080519182526020820185905201612b8b565b6000612d1a6123d8565b612d375760405163f409ec7360e01b815260040160405180910390fd5b85600003612d5857604051638fd36a9b60e01b815260040160405180910390fd5b6000600d549050612da0818888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061351992505050565b600d919091559150807f2a0365091ef1a40953c670dce28177e37520648a6fdc91506bffac0ab045570d6001612dd68a84614590565b612de091906149ae565b88888888604051612df5959493929190614a78565b60405180910390a25095945050505050565b6001600160a01b038416612e2d5760405162461bcd60e51b8152600401610c7a906149d5565b33612e4c818787612e3d8861357d565b612e468861357d565b87613061565b6001600160a01b038616600090815260026020908152604080832087845290915290205483811015612e905760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b0380881660009081526002602081815260408084208a855282528084208987039055938a16835290815282822088835290529081208054869290612edc908490614590565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46126e78288888888886135c8565b6001600160a01b038316612f835760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c7a565b33612fb281856000612f948761357d565b612f9d8761357d565b60405180602001604052806000815250613061565b6001600160a01b038416600090815260026020908152604080832086845290915290205482811015612ff65760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b03858116600081815260026020908152604080832089845282528083208887039055805189815291820188905291938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0385166130df5760005b83518110156130dd5782818151811061308d5761308d6145a3565b6020026020010151601260008684815181106130ab576130ab6145a3565b6020026020010151815260200190815260200160002060008282546130d09190614590565b9091555050600101613072565b505b6001600160a01b03841661268e5760005b83518110156126e75782818151811061310b5761310b6145a3565b602002602001015160126000868481518110613129576131296145a3565b60200260200101518152602001908152602001600020600082825461314e91906149ae565b90915550506001016130f0565b6001600160a01b0384163b1561268e5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061319f9089908990889088908890600401614ab1565b6020604051808303816000875af19250505080156131da575060408051601f3d908101601f191682019092526131d791810190614b03565b60015b61325c576131e6614b20565b806308c379a00361321f57506131fa614b3c565b806132055750613221565b8060405162461bcd60e51b8152600401610c7a9190613ac2565b505b60405162461bcd60e51b815260206004820152601060248201526f10a2a92198989a9aa922a1a2a4ab22a960811b6044820152606401610c7a565b6001600160e01b0319811663bc197c8160e01b146126e75760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c7a565b80156114635773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038516016132e35761272f82826136a5565b6114638484848461372b565b6001600160a01b0384166133155760405162461bcd60e51b8152600401610c7a906149d5565b3361332681600087612e3d8861357d565b6001600160a01b038516600090815260026020908152604080832087845290915281208054859290613359908490614590565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610e86816000878787876135c8565b6060600080856001600160a01b0316856040516133d69190614bb7565b600060405180830381855af49150503d8060008114613411576040519150601f19603f3d011682016040523d82523d6000602084013e613416565b606091505b5091509150611d898683838761377e565b60008061343360095490565b90506000600980548060200260200160405190810160405280929190818152602001828054801561348357602002820191906000526020600020905b81548152602001906001019080831161346f575b5050505050905060005b828110156134fc578181815181106134a7576134a76145a3565b602002602001015185036134f45780156134e957816134c76001836149ae565b815181106134d7576134d76145a3565b60200260200101519350505050919050565b506000949350505050565b60010161348d565b50604051630793127760e11b815260048101859052602401610c7a565b6000806135268486614590565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af018190556000818152600a60205260409020909250829150613574848261466a565b50935093915050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106135b7576135b76145a3565b602090810291909101015292915050565b6001600160a01b0384163b1561268e5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061360c9089908990889088908890600401614bd3565b6020604051808303816000875af1925050508015613647575060408051601f3d908101601f1916820190925261364491810190614b03565b60015b613653576131e6614b20565b6001600160e01b0319811663f23a6e6160e01b146126e75760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c7a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146136f2576040519150601f19603f3d011682016040523d82523d6000602084013e6136f7565b606091505b505090508061188557604051635fdc4ec160e11b81526001600160a01b038416600482015260248101839052604401610c7a565b816001600160a01b0316836001600160a01b0316031561146357306001600160a01b038416036137695761272f6001600160a01b03851683836137f7565b6114636001600160a01b03851684848461385a565b606083156137ed5782516000036137e6576001600160a01b0385163b6137e65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c7a565b50816123d0565b6123d08383613892565b6040516001600160a01b03831660248201526044810182905261188590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526138a2565b6040516001600160a01b03808516602483015283166044820152606481018290526114639085906323b872dd60e01b90608401613823565b8151156132055781518083602001fd5b60006138f7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139749092919063ffffffff16565b80519091501561188557808060200190518101906139159190614c0d565b6118855760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c7a565b60606123d0848460008585600080866001600160a01b0316858760405161399b9190614bb7565b60006040518083038185875af1925050503d80600081146139d8576040519150601f19603f3d011682016040523d82523d6000602084013e6139dd565b606091505b50915091506139ee8783838761377e565b979650505050505050565b80356001600160a01b0381168114613a1057600080fd5b919050565b60008060408385031215613a2857600080fd5b613a31836139f9565b946020939093013593505050565b6001600160e01b0319811681146109cc57600080fd5b600060208284031215613a6757600080fd5b8135612c6781613a3f565b60005b83811015613a8d578181015183820152602001613a75565b50506000910152565b60008151808452613aae816020860160208601613a72565b601f01601f19169290920160200192915050565b602081526000612c676020830184613a96565b600060208284031215613ae757600080fd5b5035919050565b600060208284031215613b0057600080fd5b612c67826139f9565b600060808284031215613b1b57600080fd5b50919050565b60008060008060008060c08789031215613b3a57600080fd5b86359550613b4a602088016139f9565b945060408701359350613b5f606088016139f9565b92506080870135915060a08701356001600160401b03811115613b8157600080fd5b613b8d89828a01613b09565b9150509295509295509295565b60008060408385031215613bad57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613bf757613bf7613bbc565b6040525050565b60006001600160401b03821115613c1757613c17613bbc565b5060051b60200190565b600082601f830112613c3257600080fd5b8135613c3d81613bfe565b604051613c4a8282613bd2565b80915082815260208101915060208360051b860101925085831115613c6e57600080fd5b602085015b83811015613c8b578035835260209283019201613c73565b5095945050505050565b60006001600160401b03821115613cae57613cae613bbc565b50601f01601f191660200190565b6000613cc783613c95565b604051613cd48282613bd2565b809250848152858585011115613ce957600080fd5b8484602083013760006020868301015250509392505050565b600082601f830112613d1357600080fd5b612c6783833560208501613cbc565b600080600080600060a08688031215613d3a57600080fd5b613d43866139f9565b9450613d51602087016139f9565b935060408601356001600160401b03811115613d6c57600080fd5b613d7888828901613c21565b93505060608601356001600160401b03811115613d9457600080fd5b613da088828901613c21565b92505060808601356001600160401b03811115613dbc57600080fd5b613dc888828901613d02565b9150509295509295909350565b60008060408385031215613de857600080fd5b82356001600160401b03811115613dfe57600080fd5b8301601f81018513613e0f57600080fd5b8035613e1a81613bfe565b604051613e278282613bd2565b80915082815260208101915060208360051b850101925087831115613e4b57600080fd5b6020840193505b82841015613e7457613e63846139f9565b825260209384019390910190613e52565b945050505060208301356001600160401b03811115613e9257600080fd5b613e9e85828601613c21565b9150509250929050565b600081518084526020840193506020830160005b82811015613eda578151865260209586019590910190600101613ebc565b5093949350505050565b602081526000612c676020830184613ea8565b600080600080600080600060e0888a031215613f1257600080fd5b613f1b886139f9565b96506020880135955060408801359450613f37606089016139f9565b93506080880135925060a08801356001600160401b03811115613f5957600080fd5b613f658a828b01613b09565b92505060c08801356001600160401b03811115613f8157600080fd5b613f8d8a828b01613d02565b91505092959891949750929550565b600080600060608486031215613fb157600080fd5b613fba846139f9565b925060208401356001600160401b03811115613fd557600080fd5b613fe186828701613c21565b92505060408401356001600160401b03811115613ffd57600080fd5b61400986828701613c21565b9150509250925092565b80151581146109cc57600080fd5b60008060006060848603121561403657600080fd5b8335925060208401356001600160401b0381111561405357600080fd5b8401610100818703121561406657600080fd5b9150604084013561407681614013565b809150509250925092565b60006020828403121561409357600080fd5b81356001600160401b038111156140a957600080fd5b8201601f810184136140ba57600080fd5b6123d084823560208401613cbc565b6000806000606084860312156140de57600080fd5b833592506140ee602085016139f9565b929592945050506040919091013590565b60008083601f84011261411157600080fd5b5081356001600160401b0381111561412857600080fd5b60208301915083602082850101111561414057600080fd5b9250929050565b60008060006040848603121561415c57600080fd5b8335925060208401356001600160401b0381111561417957600080fd5b614185868287016140ff565b9497909650939450505050565b600080604083850312156141a557600080fd5b6141ae836139f9565b915060208301356141be81614013565b809150509250929050565b600080602083850312156141dc57600080fd5b82356001600160401b038111156141f257600080fd5b8301601f8101851361420357600080fd5b80356001600160401b0381111561421957600080fd5b8560208260051b840101111561422e57600080fd5b6020919091019590945092505050565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b8281101561429757603f19878603018452614282858351613a96565b94506020938401939190910190600101614266565b50929695505050505050565b600080604083850312156142b657600080fd5b823591506142c6602084016139f9565b90509250929050565b6000806000806000606086880312156142e757600080fd5b8535945060208601356001600160401b0381111561430457600080fd5b614310888289016140ff565b90955093505060408601356001600160401b0381111561432f57600080fd5b61433b888289016140ff565b969995985093965092949392505050565b60008060006040848603121561436157600080fd5b83356001600160401b0381111561437757600080fd5b61438386828701613d02565b93505060208401356001600160401b0381111561417957600080fd5b8881528760208201528660408201528560608201528460808201528360a082015260018060a01b03831660c082015261010060e082015260006143e6610100830184613a96565b9a9950505050505050505050565b6000806040838503121561440757600080fd5b614410836139f9565b91506142c6602084016139f9565b600080600080600060a0868803121561443657600080fd5b61443f866139f9565b945061444d602087016139f9565b9350604086013592506060860135915060808601356001600160401b03811115613dbc57600080fd5b60008060006060848603121561448b57600080fd5b614494846139f9565b95602085013595506040909401359392505050565b600181811c908216806144bd57607f821691505b602082108103613b1b57634e487b7160e01b600052602260045260246000fd5b600082516144ef818460208701613a72565b600360fc1b920191825250600101919050565b60008351614514818460208801613a72565b835190830190614528818360208801613a72565b01949350505050565b6000808335601e1984360301811261454857600080fd5b8301803591506001600160401b0382111561456257600080fd5b6020019150600581901b360382131561414057600080fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561089b5761089b61457a565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761089b5761089b61457a565b634e487b7160e01b600052601260045260246000fd5b6000826145f5576145f56145d0565b500490565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b601f82111561188557806000526020600020601f840160051c8101602085101561464a5750805b601f840160051c820191505b81811015610e865760008155600101614656565b81516001600160401b0381111561468357614683613bbc565b6146978161469184546144a9565b84614623565b6020601f8211600181146146cb57600083156146b35750848201515b600019600385901b1c1916600184901b178455610e86565b600084815260208120601f198516915b828110156146fb57878501518255602094850194600190920191016146db565b50848210156147195786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6000808335601e1984360301811261473f57600080fd5b8301803591506001600160401b0382111561475957600080fd5b60200191503681900382131561414057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408082528335828201526020840135606080840191909152908401356080808401919091529084013560a0808401919091529084013560c0808401919091529084013560e08301526000906001600160a01b03906147f79086016139f9565b1661010083015260e0840135601e1985360301811261481557600080fd5b84016020810190356001600160401b0381111561483157600080fd5b80360382131561484057600080fd5b6101006101208501526148586101408501828461476e565b92505050612c67602083018415159052565b6000806040838503121561487d57600080fd5b82516001600160401b0381111561489357600080fd5b8301601f810185136148a457600080fd5b80516148af81613c95565b6040516148bc8282613bd2565b8281528760208486010111156148d157600080fd5b6148e2836020830160208701613a72565b6020969096015195979596505050505050565b60008551614907818460208a01613a72565b820184868237909301918252506020019392505050565b8284823760609190911b6001600160601b0319169101908152601401919050565b6000806040838503121561495257600080fd5b82356001600160401b0381111561496857600080fd5b61497485828601613d02565b95602094909401359450505050565b82848237909101908152602001919050565b6000600182016149a7576149a761457a565b5060010190565b8181038181111561089b5761089b61457a565b6000826149d0576149d06145d0565b500690565b6020808252600c908201526b2a27afad22a927afa0a2222960a11b604082015260600190565b60208082526010908201526f125394d551919250d251539517d0905360821b604082015260600190565b604081526000614a386040830185613ea8565b8281036020840152614a4a8185613ea8565b95945050505050565b604081526000614a666040830185613a96565b8281036020840152614a4a8185613a96565b858152606060208201526000614a9260608301868861476e565b8281036040840152614aa581858761476e565b98975050505050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090614add90830186613ea8565b8281036060840152614aef8186613ea8565b90508281036080840152614aa58185613a96565b600060208284031215614b1557600080fd5b8151612c6781613a3f565b600060033d1115614b395760046000803e5060005160e01c5b90565b600060443d1015614b4a5790565b6040513d600319016004823e80513d60248201116001600160401b0382111715614b7357505090565b80820180516001600160401b03811115614b8e575050505090565b3d8401600319018282016020011115614ba8575050505090565b61102260208285010185613bd2565b60008251614bc9818460208701613a72565b9190910192915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906139ee90830184613a96565b600060208284031215614c1f57600080fd5b8151612c678161401356fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207c42307087b8f5293969708455158584a310587afa969ff29c11ce6fbe5f86e264736f6c634300081a00330000000000000000000000004a7c213d4028e3ff13bc04477fba6ded6d1ce2b600000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000a82dd5840eaeb025c1ea6898a476556f59d1485600000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000a82dd5840eaeb025c1ea6898a476556f59d14856000000000000000000000000000000000000000000000000000000000000000f42657272794c6162204d757365756d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054272794c4d000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061023a5760003560e01c80638affb89f1161012e578063b24f2d39116100ab578063e8a3d4851161006f578063e8a3d48514610770578063e9703d2514610785578063e985e9c5146107b9578063f242432a146107f4578063f5298aca1461081457600080fd5b8063b24f2d39146106b8578063bd85b039146106e3578063ce80564214610710578063d37c353b14610730578063e71503221461075057600080fd5b80639fc4d68f116100f25780639fc4d68f146105de578063a05112fc146105fe578063a22cb4651461061e578063ac9650d81461063e578063ad1eefc51461066b57600080fd5b80638affb89f1461054b5780638da5cb5b1461056b578063938e3d7b1461058957806395d89b41146105a95780639bcf7a15146105be57600080fd5b80633b1475a7116101bc578063600dd5ea11610180578063600dd5ea146104a657806363b45e2d146104c65780636b20c454146104db5780636f4f2837146104fb578063830405321461051b57600080fd5b80633b1475a7146103ef578063492e224b146104045780634cc157df146104245780634e1273f41461046657806357bc3d781461049357600080fd5b806313af40351161020357806313af40351461032e57806323a2902b146103505780632419f51b146103705780632a55205a146103905780632eb2c2d6146103cf57600080fd5b8062fdd58e1461023f57806301ffc9a71461028a57806306fdde03146102ba578063079fe40e146102dc5780630e89341c1461030e575b600080fd5b34801561024b57600080fd5b5061027761025a366004613a15565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561029657600080fd5b506102aa6102a5366004613a55565b610834565b6040519015158152602001610281565b3480156102c657600080fd5b506102cf6108a1565b6040516102819190613ac2565b3480156102e857600080fd5b50600c546001600160a01b03165b6040516001600160a01b039091168152602001610281565b34801561031a57600080fd5b506102cf610329366004613ad5565b61092f565b34801561033a57600080fd5b5061034e610349366004613aee565b61099e565b005b34801561035c57600080fd5b506102aa61036b366004613b21565b6109cf565b34801561037c57600080fd5b5061027761038b366004613ad5565b610d6f565b34801561039c57600080fd5b506103b06103ab366004613b9a565b610dc1565b604080516001600160a01b039093168352602083019190915201610281565b3480156103db57600080fd5b5061034e6103ea366004613d22565b610dfe565b3480156103fb57600080fd5b50600d54610277565b34801561041057600080fd5b506102aa61041f366004613ad5565b610e8d565b34801561043057600080fd5b5061044461043f366004613ad5565b610eb3565b604080516001600160a01b03909316835261ffff909116602083015201610281565b34801561047257600080fd5b50610486610481366004613dd5565b610f1e565b6040516102819190613ee4565b61034e6104a1366004613ef7565b61102a565b3480156104b257600080fd5b5061034e6104c1366004613a15565b611294565b3480156104d257600080fd5b50600954610277565b3480156104e757600080fd5b5061034e6104f6366004613f9c565b6112c7565b34801561050757600080fd5b5061034e610516366004613aee565b611469565b34801561052757600080fd5b506102aa610536366004613ad5565b600b6020526000908152604090205460ff1681565b34801561055757600080fd5b5061034e610566366004614021565b611497565b34801561057757600080fd5b506006546001600160a01b03166102f6565b34801561059557600080fd5b5061034e6105a4366004614081565b61181a565b3480156105b557600080fd5b506102cf611848565b3480156105ca57600080fd5b5061034e6105d93660046140c9565b611855565b3480156105ea57600080fd5b506102cf6105f9366004614147565b61188a565b34801561060a57600080fd5b506102cf610619366004613ad5565b611a01565b34801561062a57600080fd5b5061034e610639366004614192565b611a1a565b34801561064a57600080fd5b5061065e6106593660046141c9565b611ad2565b604051610281919061423e565b34801561067757600080fd5b506102776106863660046142a3565b6000918252601060209081526040808420548452601182528084206001600160a01b0393909316845291905290205490565b3480156106c457600080fd5b506007546001600160a01b03811690600160a01b900461ffff16610444565b3480156106ef57600080fd5b506102776106fe366004613ad5565b60126020526000908152604090205481565b34801561071c57600080fd5b506102cf61072b366004614147565b611c37565b34801561073c57600080fd5b5061027761074b3660046142cf565b611cfb565b34801561075c57600080fd5b506102cf61076b36600461434c565b611d93565b34801561077c57600080fd5b506102cf611e08565b34801561079157600080fd5b506107a56107a0366004613ad5565b611e15565b60405161028198979695949392919061439f565b3480156107c557600080fd5b506102aa6107d43660046143f4565b600360209081526000928352604080842090915290825290205460ff1681565b34801561080057600080fd5b5061034e61080f36600461441e565b611eee565b34801561082057600080fd5b5061034e61082f366004614476565b611f76565b60006301ffc9a760e01b6001600160e01b0319831614806108655750636cdb3d1360e11b6001600160e01b03198316145b8061088057506303a24d0760e21b6001600160e01b03198316145b8061089b57506001600160e01b0319821663152a902d60e11b145b92915050565b600080546108ae906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546108da906144a9565b80156109275780601f106108fc57610100808354040283529160200191610927565b820191906000526020600020905b81548152906001019060200180831161090a57829003601f168201915b505050505081565b6060600061093c8361206b565b509050600061094a84612152565b905061095582610e8d565b15610983578060405160200161096b91906144dd565b60405160208183030381529060405292505050919050565b8061098d856122d0565b60405160200161096b929190614502565b6109a66123d8565b6109c3576040516316ccb9cb60e11b815260040160405180910390fd5b6109cc81612405565b50565b6000868152600f60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c08301526007810180548493929160e0840191610a4e906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7a906144a9565b8015610ac75780601f10610a9c57610100808354040283529160200191610ac7565b820191906000526020600020905b815481529060010190602001808311610aaa57829003601f168201915b50505091909252505050606081015160a082015160c08301516080840151939450919290919015610b7557610b71610aff8780614531565b86608001518d8a602001358b604001358c6060016020810190610b229190613aee565b6040516001600160601b0319606095861b811660208301526034820194909452605481019290925290921b16607482015260880160405160208183030381529060405280519060200120612457565b5094505b8415610bfc578560200135600003610b8d5782610b93565b85602001355b9250600019866040013503610ba85781610bae565b85604001355b9150600019866040013514158015610bdf57506000610bd36080880160608901613aee565b6001600160a01b031614155b610be95780610bf9565b610bf96080870160608801613aee565b90505b60008b8152601060209081526040808320548352601182528083206001600160a01b03808f16855292529091205490898116908316141580610c3e5750828814155b15610c835760405162461bcd60e51b815260206004820152601060248201526f2150726963654f7243757272656e637960801b60448201526064015b60405180910390fd5b891580610c98575083610c96828c614590565b115b15610cce5760405162461bcd60e51b8152600401610c7a906020808252600490820152632151747960e01b604082015260600190565b84602001518a8660400151610ce39190614590565b1115610d1e5760405162461bcd60e51b815260206004820152600a602482015269214d6178537570706c7960b01b6044820152606401610c7a565b8451421015610d605760405162461bcd60e51b815260206004820152600e60248201526d18d85b9d0818db185a5b481e595d60921b6044820152606401610c7a565b50505050509695505050505050565b6000610d7a60095490565b8210610d9c57604051630793127760e11b815260048101839052602401610c7a565b60098281548110610daf57610daf6145a3565b90600052602060002001549050919050565b600080600080610dd086610eb3565b90945084925061ffff169050612710610de982876145b9565b610df391906145e6565b925050509250929050565b6001600160a01b038516331480610e3857506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b610e795760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c7a565b610e8685858585856124e2565b5050505050565b6000818152600e602052604081208054829190610ea9906144a9565b9050119050919050565b6000818152600860209081526040808320815180830190925280546001600160a01b031680835260019091015492820192909252829115610efa5780516020820151610f14565b6007546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b60608151835114610f415760405162461bcd60e51b8152600401610c7a906145fa565b600083516001600160401b03811115610f5c57610f5c613bbc565b604051908082528060200260200182016040528015610f85578160200160208202803683370190505b50905060005b84518110156110225760026000868381518110610faa57610faa6145a3565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000858381518110610fe657610fe66145a3565b602002602001015181526020019081526020016000205482828151811061100f5761100f6145a3565b6020908102919091010152600101610f8b565b509392505050565b61103986888787878787612696565b6000868152600f60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e0840191906110b5906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546110e1906144a9565b801561112e5780601f106111035761010080835404028352916020019161112e565b820191906000526020600020905b81548152906001019060200180831161111157829003601f168201915b505050919092525050506000888152601060205260409020549091506111588833898989896109cf565b50868260400181815161116b9190614590565b905250600081815260116020908152604080832033845290915281208054899290611197908490614590565b90915550506000888152600f602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e0830151839190600782019061121f908261466a565b5090505061123060008888886126f0565b61123b8989896127e9565b876001600160a01b038a16336001600160a01b03167fff097c7d8b1957a4ff09ef1361b5fb54dcede3941ba836d0beb9d10bec725de68a60405161128191815260200190565b60405180910390a4505050505050505050565b61129c6123d8565b6112b957604051636fae358160e11b815260040160405180910390fd5b6112c38282612804565b5050565b336001600160a01b03841681148061130457506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b6113445760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c7a565b81518351146113875760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610c7a565b60005b8351811015611457578281815181106113a5576113a56145a3565b602002602001015160026000876001600160a01b03166001600160a01b0316815260200190815260200160002060008684815181106113e6576113e66145a3565b602002602001015181526020019081526020016000205410156114455760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c7a565b611450600182614590565b905061138a565b50611463848484612894565b50505050565b6114716123d8565b61148e57604051631c98210f60e21b815260040160405180910390fd5b6109cc81612a3f565b61149f6123d8565b6114dc5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610c7a565b6000838152600f60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a083015260068101546001600160a01b031660c083015260078101805460e084019190611558906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611584906144a9565b80156115d15780601f106115a6576101008083540402835291602001916115d1565b820191906000526020600020905b8154815290600101906020018083116115b457829003601f168201915b50505091909252505050600085815260106020526040908190205490820151919250908115806115fe5750835b15611648575060003360405160609190911b6001600160601b0319166020820152436034820152605481018790526074016040516020818303038152906040528051906020012091505b84602001358111156116915760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e4818db185a5b595960721b6044820152606401610c7a565b6000604051806101000160405280876000013581526020018760200135815260200183815260200187606001358152602001876080013581526020018760a0013581526020018760c00160208101906116ea9190613aee565b6001600160a01b0316815260200161170560e0890189614728565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050898152600f602090815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a0830151600582015560c08301516006820180546001600160a01b0319166001600160a01b0390921691909117905560e0830151929350839290915060078201906117c1908261466a565b505050600087815260106020526040908190208490555187907f81039d5ecdbb4bd2d72eda132d34c127e1136763fef04b3ab1a1ed1e109eb69a906118099089908990614797565b60405180910390a250505050505050565b6118226123d8565b61183f57604051639f7f092560e01b815260040160405180910390fd5b6109cc81612abb565b600180546108ae906144a9565b61185d6123d8565b61187a57604051636fae358160e11b815260040160405180910390fd5b611885838383612b97565b505050565b6000838152600e60205260408120805460609291906118a8906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546118d4906144a9565b80156119215780601f106118f657610100808354040283529160200191611921565b820191906000526020600020905b81548152906001019060200180831161190457829003601f168201915b50505050509050805160000361194a57604051635d0580b360e01b815260040160405180910390fd5b60008082806020019051810190611961919061486a565b91509150611970828787611d93565b9350808487874660405160200161198a94939291906148f5565b60405160208183030381529060405280519060200120146119f75780848787466040516020016119bd94939291906148f5565b60405160208183030381529060405280519060200120604051633364574f60e21b8152600401610c7a929190918252602082015260400190565b5050509392505050565b600e60205260009081526040902080546108ae906144a9565b336001600160a01b0383168103611a645760405162461bcd60e51b815260206004820152600e60248201526d20a8282927ab24a723afa9a2a62360911b6044820152606401610c7a565b6001600160a01b03818116600081815260036020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b6060816001600160401b03811115611aec57611aec613bbc565b604051908082528060200260200182016040528015611b1f57816020015b6060815260200190600190039081611b0a5790505b509050336000805b84811015611c2e578115611ba657611b8430878784818110611b4b57611b4b6145a3565b9050602002810190611b5d9190614728565b86604051602001611b709392919061491e565b604051602081830303815290604052612c42565b848281518110611b9657611b966145a3565b6020026020010181905250611c26565b611c0830878784818110611bbc57611bbc6145a3565b9050602002810190611bce9190614728565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c4292505050565b848281518110611c1a57611c1a6145a3565b60200260200101819052505b600101611b27565b50505092915050565b6060611c416123d8565b611c7e5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610c7a565b6000611c8985610d6f565b9050611c9681858561188a565b9150611cb18160405180602001604052806000815250612c6e565b611cbb8183612c86565b847f6df1d8db2a036436ffe0b2d1833f2c5f1e624818dfce2578c0faa4b83ef9998d83604051611ceb9190613ac2565b60405180910390a2509392505050565b60008115611d7c57600080611d128486018661493f565b915091508151600014158015611d2757508015155b15611d7957611d7988600d54611d3d9190614590565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c6e92505050565b50505b611d898686868686612d10565b9695505050505050565b8251604080518083016020019091528181529060005b81811015611dff576000858583604051602001611dc893929190614983565b60408051601f19818403018152919052805160209182012088840182015118858401820152611df8915082614590565b9050611da9565b50509392505050565b600580546108ae906144a9565b600f60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880180549798969795969495939492936001600160a01b039092169291611e6b906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611e97906144a9565b8015611ee45780601f10611eb957610100808354040283529160200191611ee4565b820191906000526020600020905b815481529060010190602001808311611ec757829003601f168201915b5050505050905088565b6001600160a01b038516331480611f2857506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b611f695760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610c7a565b610e868585858585612e07565b336001600160a01b038416811480611fb357506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b611ff35760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610c7a565b6001600160a01b03841660009081526002602090815260408083208684529091529020548211156120605760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610c7a565b611463848484612f3c565b600080600061207960095490565b9050600060098054806020026020016040519081016040528092919081815260200182805480156120c957602002820191906000526020600020905b8154815260200190600101908083116120b5575b5050505050905060005b82811015612135578181815181106120ed576120ed6145a3565b602002602001015186101561212357809350818181518110612111576121116145a3565b60200260200101519450505050915091565b61212e600182614590565b90506120d3565b506040516309797f6960e21b815260048101869052602401610c7a565b6060600061215f60095490565b9050600060098054806020026020016040519081016040528092919081815260200182805480156121af57602002820191906000526020600020905b81548152602001906001019080831161219b575b5050505050905060005b828110156122b3578181815181106121d3576121d36145a3565b60200260200101518510156122a157600a60008383815181106121f8576121f86145a3565b602002602001015181526020019081526020016000208054612219906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054612245906144a9565b80156122925780601f1061226757610100808354040283529160200191612292565b820191906000526020600020905b81548152906001019060200180831161227557829003601f168201915b50505050509350505050919050565b6122ac600182614590565b90506121b9565b506040516309797f6960e21b815260048101859052602401610c7a565b6060816000036122f75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612321578061230b81614995565b915061231a9050600a836145e6565b91506122fb565b6000816001600160401b0381111561233b5761233b613bbc565b6040519080825280601f01601f191660200182016040528015612365576020820181803683370190505b5090505b84156123d05761237a6001836149ae565b9150612387600a866149c1565b612392906030614590565b60f81b8183815181106123a7576123a76145a3565b60200101906001600160f81b031916908160001a9053506123c9600a866145e6565b9450612369565b949350505050565b60006123ec6006546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b6000808281805b878110156124d3576124716002836145b9565b91506000898983818110612487576124876145a3565b9050602002013590508084116124ac57600084815260208290526040902093506124ca565b600081815260208590526040902093506124c7600184614590565b92505b5060010161245e565b50941496939550929350505050565b81518351146125035760405162461bcd60e51b8152600401610c7a906145fa565b6001600160a01b0384166125295760405162461bcd60e51b8152600401610c7a906149d5565b33612538818787878787613061565b60005b8451811015612628576000858281518110612558576125586145a3565b602002602001015190506000858381518110612576576125766145a3565b6020908102919091018101516001600160a01b038b1660009081526002835260408082208683529093529190912054909150818110156125c85760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b03808b16600090815260026020818152604080842088855282528084208787039055938d16835290815282822086835290529081208054849290612614908490614590565b90915550506001909301925061253b915050565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612678929190614a25565b60405180910390a461268e81878787878761315b565b505050505050565b600d5487106126e75760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768206d696e74656420746f6b656e7300000000000000006044820152606401610c7a565b50505050505050565b8060000361273457341561272f5760405162461bcd60e51b81526020600482015260066024820152652156616c756560d01b6044820152606401610c7a565b611463565b600061274082856145b9565b9050600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038516016127725750348114612776565b5034155b806127b75760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964206d73672076616c756560781b6044820152606401610c7a565b60006001600160a01b038716156127ce57866127db565b600c546001600160a01b03165b90506126e7853383866132ae565b611885838383604051806020016040528060008152506132ef565b61271081111561283257604051630a4930ad60e31b8152612710600482015260248101829052604401610c7a565b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0383166128db5760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c7a565b80518251146128fc5760405162461bcd60e51b8152600401610c7a906145fa565b600033905061291f81856000868660405180602001604052806000815250613061565b60005b83518110156129e057600084828151811061293f5761293f6145a3565b60200260200101519050600084838151811061295d5761295d6145a3565b6020908102919091018101516001600160a01b03891660009081526002835260408082208683529093529190912054909150818110156129af5760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b03881660009081526002602090815260408083209583529490529290922091039055600101612922565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612a31929190614a25565b60405180910390a450505050565b6001600160a01b038116612a7157604051630f7cac3760e21b81526001600160a01b0382166004820152602401610c7a565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a250565b600060058054612aca906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054612af6906144a9565b8015612b435780601f10612b1857610100808354040283529160200191612b43565b820191906000526020600020905b815481529060010190602001808311612b2657829003601f168201915b505050505090508160059081612b59919061466a565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a168183604051612b8b929190614a53565b60405180910390a15050565b612710811115612bc557604051630a4930ad60e31b8152612710600482015260248101829052604401610c7a565b6040805180820182526001600160a01b038481168083526020808401868152600089815260088352869020945185546001600160a01b031916941693909317845591516001909301929092559151838152909185917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d9101611ac5565b6060612c678383604051806060016040528060278152602001614c2b602791396133b9565b9392505050565b6000828152600e60205260409020611885828261466a565b6000828152600b602052604090205460ff1615612cb957604051635d079ac960e11b815260048101839052602401610c7a565b6000828152600a60205260409020612cd1828261466a565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c612cfc83613427565b604080519182526020820185905201612b8b565b6000612d1a6123d8565b612d375760405163f409ec7360e01b815260040160405180910390fd5b85600003612d5857604051638fd36a9b60e01b815260040160405180910390fd5b6000600d549050612da0818888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061351992505050565b600d919091559150807f2a0365091ef1a40953c670dce28177e37520648a6fdc91506bffac0ab045570d6001612dd68a84614590565b612de091906149ae565b88888888604051612df5959493929190614a78565b60405180910390a25095945050505050565b6001600160a01b038416612e2d5760405162461bcd60e51b8152600401610c7a906149d5565b33612e4c818787612e3d8861357d565b612e468861357d565b87613061565b6001600160a01b038616600090815260026020908152604080832087845290915290205483811015612e905760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b0380881660009081526002602081815260408084208a855282528084208987039055938a16835290815282822088835290529081208054869290612edc908490614590565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46126e78288888888886135c8565b6001600160a01b038316612f835760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610c7a565b33612fb281856000612f948761357d565b612f9d8761357d565b60405180602001604052806000815250613061565b6001600160a01b038416600090815260026020908152604080832086845290915290205482811015612ff65760405162461bcd60e51b8152600401610c7a906149fb565b6001600160a01b03858116600081815260026020908152604080832089845282528083208887039055805189815291820188905291938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0385166130df5760005b83518110156130dd5782818151811061308d5761308d6145a3565b6020026020010151601260008684815181106130ab576130ab6145a3565b6020026020010151815260200190815260200160002060008282546130d09190614590565b9091555050600101613072565b505b6001600160a01b03841661268e5760005b83518110156126e75782818151811061310b5761310b6145a3565b602002602001015160126000868481518110613129576131296145a3565b60200260200101518152602001908152602001600020600082825461314e91906149ae565b90915550506001016130f0565b6001600160a01b0384163b1561268e5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061319f9089908990889088908890600401614ab1565b6020604051808303816000875af19250505080156131da575060408051601f3d908101601f191682019092526131d791810190614b03565b60015b61325c576131e6614b20565b806308c379a00361321f57506131fa614b3c565b806132055750613221565b8060405162461bcd60e51b8152600401610c7a9190613ac2565b505b60405162461bcd60e51b815260206004820152601060248201526f10a2a92198989a9aa922a1a2a4ab22a960811b6044820152606401610c7a565b6001600160e01b0319811663bc197c8160e01b146126e75760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c7a565b80156114635773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038516016132e35761272f82826136a5565b6114638484848461372b565b6001600160a01b0384166133155760405162461bcd60e51b8152600401610c7a906149d5565b3361332681600087612e3d8861357d565b6001600160a01b038516600090815260026020908152604080832087845290915281208054859290613359908490614590565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610e86816000878787876135c8565b6060600080856001600160a01b0316856040516133d69190614bb7565b600060405180830381855af49150503d8060008114613411576040519150601f19603f3d011682016040523d82523d6000602084013e613416565b606091505b5091509150611d898683838761377e565b60008061343360095490565b90506000600980548060200260200160405190810160405280929190818152602001828054801561348357602002820191906000526020600020905b81548152602001906001019080831161346f575b5050505050905060005b828110156134fc578181815181106134a7576134a76145a3565b602002602001015185036134f45780156134e957816134c76001836149ae565b815181106134d7576134d76145a3565b60200260200101519350505050919050565b506000949350505050565b60010161348d565b50604051630793127760e11b815260048101859052602401610c7a565b6000806135268486614590565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af018190556000818152600a60205260409020909250829150613574848261466a565b50935093915050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106135b7576135b76145a3565b602090810291909101015292915050565b6001600160a01b0384163b1561268e5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061360c9089908990889088908890600401614bd3565b6020604051808303816000875af1925050508015613647575060408051601f3d908101601f1916820190925261364491810190614b03565b60015b613653576131e6614b20565b6001600160e01b0319811663f23a6e6160e01b146126e75760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610c7a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146136f2576040519150601f19603f3d011682016040523d82523d6000602084013e6136f7565b606091505b505090508061188557604051635fdc4ec160e11b81526001600160a01b038416600482015260248101839052604401610c7a565b816001600160a01b0316836001600160a01b0316031561146357306001600160a01b038416036137695761272f6001600160a01b03851683836137f7565b6114636001600160a01b03851684848461385a565b606083156137ed5782516000036137e6576001600160a01b0385163b6137e65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c7a565b50816123d0565b6123d08383613892565b6040516001600160a01b03831660248201526044810182905261188590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526138a2565b6040516001600160a01b03808516602483015283166044820152606481018290526114639085906323b872dd60e01b90608401613823565b8151156132055781518083602001fd5b60006138f7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139749092919063ffffffff16565b80519091501561188557808060200190518101906139159190614c0d565b6118855760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c7a565b60606123d0848460008585600080866001600160a01b0316858760405161399b9190614bb7565b60006040518083038185875af1925050503d80600081146139d8576040519150601f19603f3d011682016040523d82523d6000602084013e6139dd565b606091505b50915091506139ee8783838761377e565b979650505050505050565b80356001600160a01b0381168114613a1057600080fd5b919050565b60008060408385031215613a2857600080fd5b613a31836139f9565b946020939093013593505050565b6001600160e01b0319811681146109cc57600080fd5b600060208284031215613a6757600080fd5b8135612c6781613a3f565b60005b83811015613a8d578181015183820152602001613a75565b50506000910152565b60008151808452613aae816020860160208601613a72565b601f01601f19169290920160200192915050565b602081526000612c676020830184613a96565b600060208284031215613ae757600080fd5b5035919050565b600060208284031215613b0057600080fd5b612c67826139f9565b600060808284031215613b1b57600080fd5b50919050565b60008060008060008060c08789031215613b3a57600080fd5b86359550613b4a602088016139f9565b945060408701359350613b5f606088016139f9565b92506080870135915060a08701356001600160401b03811115613b8157600080fd5b613b8d89828a01613b09565b9150509295509295509295565b60008060408385031215613bad57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613bf757613bf7613bbc565b6040525050565b60006001600160401b03821115613c1757613c17613bbc565b5060051b60200190565b600082601f830112613c3257600080fd5b8135613c3d81613bfe565b604051613c4a8282613bd2565b80915082815260208101915060208360051b860101925085831115613c6e57600080fd5b602085015b83811015613c8b578035835260209283019201613c73565b5095945050505050565b60006001600160401b03821115613cae57613cae613bbc565b50601f01601f191660200190565b6000613cc783613c95565b604051613cd48282613bd2565b809250848152858585011115613ce957600080fd5b8484602083013760006020868301015250509392505050565b600082601f830112613d1357600080fd5b612c6783833560208501613cbc565b600080600080600060a08688031215613d3a57600080fd5b613d43866139f9565b9450613d51602087016139f9565b935060408601356001600160401b03811115613d6c57600080fd5b613d7888828901613c21565b93505060608601356001600160401b03811115613d9457600080fd5b613da088828901613c21565b92505060808601356001600160401b03811115613dbc57600080fd5b613dc888828901613d02565b9150509295509295909350565b60008060408385031215613de857600080fd5b82356001600160401b03811115613dfe57600080fd5b8301601f81018513613e0f57600080fd5b8035613e1a81613bfe565b604051613e278282613bd2565b80915082815260208101915060208360051b850101925087831115613e4b57600080fd5b6020840193505b82841015613e7457613e63846139f9565b825260209384019390910190613e52565b945050505060208301356001600160401b03811115613e9257600080fd5b613e9e85828601613c21565b9150509250929050565b600081518084526020840193506020830160005b82811015613eda578151865260209586019590910190600101613ebc565b5093949350505050565b602081526000612c676020830184613ea8565b600080600080600080600060e0888a031215613f1257600080fd5b613f1b886139f9565b96506020880135955060408801359450613f37606089016139f9565b93506080880135925060a08801356001600160401b03811115613f5957600080fd5b613f658a828b01613b09565b92505060c08801356001600160401b03811115613f8157600080fd5b613f8d8a828b01613d02565b91505092959891949750929550565b600080600060608486031215613fb157600080fd5b613fba846139f9565b925060208401356001600160401b03811115613fd557600080fd5b613fe186828701613c21565b92505060408401356001600160401b03811115613ffd57600080fd5b61400986828701613c21565b9150509250925092565b80151581146109cc57600080fd5b60008060006060848603121561403657600080fd5b8335925060208401356001600160401b0381111561405357600080fd5b8401610100818703121561406657600080fd5b9150604084013561407681614013565b809150509250925092565b60006020828403121561409357600080fd5b81356001600160401b038111156140a957600080fd5b8201601f810184136140ba57600080fd5b6123d084823560208401613cbc565b6000806000606084860312156140de57600080fd5b833592506140ee602085016139f9565b929592945050506040919091013590565b60008083601f84011261411157600080fd5b5081356001600160401b0381111561412857600080fd5b60208301915083602082850101111561414057600080fd5b9250929050565b60008060006040848603121561415c57600080fd5b8335925060208401356001600160401b0381111561417957600080fd5b614185868287016140ff565b9497909650939450505050565b600080604083850312156141a557600080fd5b6141ae836139f9565b915060208301356141be81614013565b809150509250929050565b600080602083850312156141dc57600080fd5b82356001600160401b038111156141f257600080fd5b8301601f8101851361420357600080fd5b80356001600160401b0381111561421957600080fd5b8560208260051b840101111561422e57600080fd5b6020919091019590945092505050565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b8281101561429757603f19878603018452614282858351613a96565b94506020938401939190910190600101614266565b50929695505050505050565b600080604083850312156142b657600080fd5b823591506142c6602084016139f9565b90509250929050565b6000806000806000606086880312156142e757600080fd5b8535945060208601356001600160401b0381111561430457600080fd5b614310888289016140ff565b90955093505060408601356001600160401b0381111561432f57600080fd5b61433b888289016140ff565b969995985093965092949392505050565b60008060006040848603121561436157600080fd5b83356001600160401b0381111561437757600080fd5b61438386828701613d02565b93505060208401356001600160401b0381111561417957600080fd5b8881528760208201528660408201528560608201528460808201528360a082015260018060a01b03831660c082015261010060e082015260006143e6610100830184613a96565b9a9950505050505050505050565b6000806040838503121561440757600080fd5b614410836139f9565b91506142c6602084016139f9565b600080600080600060a0868803121561443657600080fd5b61443f866139f9565b945061444d602087016139f9565b9350604086013592506060860135915060808601356001600160401b03811115613dbc57600080fd5b60008060006060848603121561448b57600080fd5b614494846139f9565b95602085013595506040909401359392505050565b600181811c908216806144bd57607f821691505b602082108103613b1b57634e487b7160e01b600052602260045260246000fd5b600082516144ef818460208701613a72565b600360fc1b920191825250600101919050565b60008351614514818460208801613a72565b835190830190614528818360208801613a72565b01949350505050565b6000808335601e1984360301811261454857600080fd5b8301803591506001600160401b0382111561456257600080fd5b6020019150600581901b360382131561414057600080fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561089b5761089b61457a565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761089b5761089b61457a565b634e487b7160e01b600052601260045260246000fd5b6000826145f5576145f56145d0565b500490565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b601f82111561188557806000526020600020601f840160051c8101602085101561464a5750805b601f840160051c820191505b81811015610e865760008155600101614656565b81516001600160401b0381111561468357614683613bbc565b6146978161469184546144a9565b84614623565b6020601f8211600181146146cb57600083156146b35750848201515b600019600385901b1c1916600184901b178455610e86565b600084815260208120601f198516915b828110156146fb57878501518255602094850194600190920191016146db565b50848210156147195786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6000808335601e1984360301811261473f57600080fd5b8301803591506001600160401b0382111561475957600080fd5b60200191503681900382131561414057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408082528335828201526020840135606080840191909152908401356080808401919091529084013560a0808401919091529084013560c0808401919091529084013560e08301526000906001600160a01b03906147f79086016139f9565b1661010083015260e0840135601e1985360301811261481557600080fd5b84016020810190356001600160401b0381111561483157600080fd5b80360382131561484057600080fd5b6101006101208501526148586101408501828461476e565b92505050612c67602083018415159052565b6000806040838503121561487d57600080fd5b82516001600160401b0381111561489357600080fd5b8301601f810185136148a457600080fd5b80516148af81613c95565b6040516148bc8282613bd2565b8281528760208486010111156148d157600080fd5b6148e2836020830160208701613a72565b6020969096015195979596505050505050565b60008551614907818460208a01613a72565b820184868237909301918252506020019392505050565b8284823760609190911b6001600160601b0319169101908152601401919050565b6000806040838503121561495257600080fd5b82356001600160401b0381111561496857600080fd5b61497485828601613d02565b95602094909401359450505050565b82848237909101908152602001919050565b6000600182016149a7576149a761457a565b5060010190565b8181038181111561089b5761089b61457a565b6000826149d0576149d06145d0565b500690565b6020808252600c908201526b2a27afad22a927afa0a2222960a11b604082015260600190565b60208082526010908201526f125394d551919250d251539517d0905360821b604082015260600190565b604081526000614a386040830185613ea8565b8281036020840152614a4a8185613ea8565b95945050505050565b604081526000614a666040830185613a96565b8281036020840152614a4a8185613a96565b858152606060208201526000614a9260608301868861476e565b8281036040840152614aa581858761476e565b98975050505050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090614add90830186613ea8565b8281036060840152614aef8186613ea8565b90508281036080840152614aa58185613a96565b600060208284031215614b1557600080fd5b8151612c6781613a3f565b600060033d1115614b395760046000803e5060005160e01c5b90565b600060443d1015614b4a5790565b6040513d600319016004823e80513d60248201116001600160401b0382111715614b7357505090565b80820180516001600160401b03811115614b8e575050505090565b3d8401600319018282016020011115614ba8575050505090565b61102260208285010185613bd2565b60008251614bc9818460208701613a72565b9190910192915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906139ee90830184613a96565b600060208284031215614c1f57600080fd5b8151612c678161401356fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207c42307087b8f5293969708455158584a310587afa969ff29c11ce6fbe5f86e264736f6c634300081a0033

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

0000000000000000000000004a7c213d4028e3ff13bc04477fba6ded6d1ce2b600000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000a82dd5840eaeb025c1ea6898a476556f59d1485600000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000a82dd5840eaeb025c1ea6898a476556f59d14856000000000000000000000000000000000000000000000000000000000000000f42657272794c6162204d757365756d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054272794c4d000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _defaultAdmin (address): 0x4A7c213D4028E3FF13Bc04477fbA6dEd6d1cE2b6
Arg [1] : _name (string): BerryLab Museum
Arg [2] : _symbol (string): BryLM
Arg [3] : _royaltyRecipient (address): 0xA82Dd5840eaEb025c1Ea6898a476556F59D14856
Arg [4] : _royaltyBps (uint128): 500
Arg [5] : _primarySaleRecipient (address): 0xA82Dd5840eaEb025c1Ea6898a476556F59D14856

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000004a7c213d4028e3ff13bc04477fba6ded6d1ce2b6
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 000000000000000000000000a82dd5840eaeb025c1ea6898a476556f59d14856
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [5] : 000000000000000000000000a82dd5840eaeb025c1ea6898a476556f59d14856
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [7] : 42657272794c6162204d757365756d0000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [9] : 4272794c4d000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.