ETH Price: $3,506.16 (+0.45%)
Gas: 2 Gwei

Token

LaelapsSkullKey (LSK)
 

Overview

Max Total Supply

97 LSK

Holders

58

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
LaelapsSkullKey

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion
File 1 of 31 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

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

/// @author thirdweb

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

import "../extension/ContractMetadata.sol";
import "../extension/Multicall.sol";
import "../extension/Ownable.sol";
import "../extension/Royalty.sol";
import "../extension/BatchMintMetadata.sol";
import "../extension/DefaultOperatorFilterer.sol";

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

/**
 *  The `ERC1155Base` smart contract implements the ERC1155 NFT standard.
 *  It includes the following additions to standard ERC1155 logic:
 *
 *      - Ability to mint NFTs via the provided `mintTo` and `batchMintTo` functions.
 *
 *      - 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.
 */

contract ERC1155Base is
    ERC1155,
    ContractMetadata,
    Ownable,
    Royalty,
    Multicall,
    BatchMintMetadata,
    DefaultOperatorFilterer
{
    using TWStrings for uint256;

    /*//////////////////////////////////////////////////////////////
                        State variables
    //////////////////////////////////////////////////////////////*/

    /// @dev The tokenId of the next NFT to mint.
    uint256 internal nextTokenIdToMint_;

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

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

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

    constructor(
        address _defaultAdmin,
        string memory _name,
        string memory _symbol,
        address _royaltyRecipient,
        uint128 _royaltyBps
    ) ERC1155(_name, _symbol) {
        _setupOwner(_defaultAdmin);
        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);
        _setOperatorRestriction(true);
    }

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

    /// @notice Returns the metadata URI for the given tokenId.
    function uri(uint256 _tokenId) public view virtual override returns (string memory) {
        string memory uriForToken = _uri[_tokenId];
        if (bytes(uriForToken).length > 0) {
            return uriForToken;
        }

        string memory batchUri = _getBaseURI(_tokenId);
        return string(abi.encodePacked(batchUri, _tokenId.toString()));
    }

    /*//////////////////////////////////////////////////////////////
                        Mint / burn logic
    //////////////////////////////////////////////////////////////*/

    /**
     *  @notice          Lets an authorized address mint NFTs to a recipient.
     *  @dev             - The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs.
     *                   - If `_tokenId == type(uint256).max` a new NFT at tokenId `nextTokenIdToMint` is minted. If the given
     *                     `tokenId < nextTokenIdToMint`, then additional supply of an existing NFT is being minted.
     *
     *  @param _to       The recipient of the NFTs to mint.
     *  @param _tokenId  The tokenId of the NFT to mint.
     *  @param _tokenURI The full metadata URI for the NFTs minted (if a new NFT is being minted).
     *  @param _amount   The amount of the same NFT to mint.
     */
    function mintTo(
        address _to,
        uint256 _tokenId,
        string memory _tokenURI,
        uint256 _amount
    ) public virtual {
        require(_canMint(), "Not authorized to mint.");

        uint256 tokenIdToMint;
        uint256 nextIdToMint = nextTokenIdToMint();

        if (_tokenId == type(uint256).max) {
            tokenIdToMint = nextIdToMint;
            nextTokenIdToMint_ += 1;
            _setTokenURI(nextIdToMint, _tokenURI);
        } else {
            require(_tokenId < nextIdToMint, "invalid id");
            tokenIdToMint = _tokenId;
        }

        _mint(_to, tokenIdToMint, _amount, "");
    }

    /**
     *  @notice          Lets an authorized address mint multiple NEW NFTs at once to a recipient.
     *  @dev             The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs.
     *                   If `_tokenIds[i] == type(uint256).max` a new NFT at tokenId `nextTokenIdToMint` is minted. If the given
     *                   `tokenIds[i] < nextTokenIdToMint`, then additional supply of an existing NFT is minted.
     *                   The metadata for each new NFT is stored at `baseURI/{tokenID of NFT}`
     *
     *  @param _to       The recipient of the NFT to mint.
     *  @param _tokenIds The tokenIds of the NFTs to mint.
     *  @param _amounts  The amounts of each NFT to mint.
     *  @param _baseURI  The baseURI for the `n` number of NFTs minted. The metadata for each NFT is `baseURI/tokenId`
     */
    function batchMintTo(
        address _to,
        uint256[] memory _tokenIds,
        uint256[] memory _amounts,
        string memory _baseURI
    ) public virtual {
        require(_canMint(), "Not authorized to mint.");
        require(_amounts.length > 0, "Minting zero tokens.");
        require(_tokenIds.length == _amounts.length, "Length mismatch.");

        uint256 nextIdToMint = nextTokenIdToMint();
        uint256 startNextIdToMint = nextIdToMint;

        uint256 numOfNewNFTs;

        for (uint256 i = 0; i < _tokenIds.length; i += 1) {
            if (_tokenIds[i] == type(uint256).max) {
                _tokenIds[i] = nextIdToMint;

                nextIdToMint += 1;
                numOfNewNFTs += 1;
            } else {
                require(_tokenIds[i] < nextIdToMint, "invalid id");
            }
        }

        if (numOfNewNFTs > 0) {
            _batchMintMetadata(startNextIdToMint, numOfNewNFTs, _baseURI);
        }

        nextTokenIdToMint_ = nextIdToMint;
        _mintBatch(_to, _tokenIds, _amounts, "");
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override(ERC1155) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override(ERC1155) onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /*//////////////////////////////////////////////////////////////
                    Internal (overrideable) functions
    //////////////////////////////////////////////////////////////*/

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

    /// @dev Returns whether a token can be minted in the given execution context.
    function _canMint() internal view virtual returns (bool) {
        return msg.sender == owner();
    }

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

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

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

    /// @dev Runs before every token transfer / mint / burn.
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

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

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

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

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

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

    string public name;
    string public symbol;

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

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

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

    mapping(uint256 => string) internal _uri;

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

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

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

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

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

    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "LENGTH_MISMATCH");

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

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

        return batchBalances;
    }

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

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

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

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

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

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

        address operator = msg.sender;

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

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

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

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

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

        address operator = msg.sender;

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

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

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

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

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

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

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

        address operator = msg.sender;

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

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

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

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

        address operator = msg.sender;

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

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

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

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

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

        address operator = msg.sender;

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

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

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

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

        address operator = msg.sender;

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

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

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

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

    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("TOKENS_REJECTED");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("!ERC1155RECEIVER");
            }
        }
    }

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

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

        return array;
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * [EIP](https://eips.ethereum.org/EIPS/eip-165).
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

import "./IERC165.sol";

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

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

/// @author thirdweb

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

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

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

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

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

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

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

                return (batchId, index);
            }
        }

        revert("Invalid tokenId");
    }

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

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

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

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

        batchIds.push(batchId);

        baseURI[batchId] = _baseURIForTokens;
    }
}

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

/// @author thirdweb

import "./interface/IContractMetadata.sol";

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

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

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

        _setupContractURI(_uri);
    }

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

        emit ContractURIUpdated(prevURI, _uri);
    }

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

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

/// @author thirdweb

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

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

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}

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

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

/// @author thirdweb

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

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

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

/// @author thirdweb

import "./interface/IOperatorFilterToggle.sol";

abstract contract OperatorFilterToggle is IOperatorFilterToggle {
    bool public operatorRestriction;

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

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

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

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

/// @author thirdweb

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

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

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

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

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

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

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

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

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

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

/// @author thirdweb

import "./interface/IOwnable.sol";

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

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

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

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

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

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

        emit OwnerUpdated(_prevOwner, _newOwner);
    }

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

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

/// @author thirdweb

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

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

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

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

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

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

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

        return true;
    }

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

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

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

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

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

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

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

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

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

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

/// @author thirdweb

import "./interface/IPermissionsEnumerable.sol";
import "./Permissions.sol";

/**
 *  @title   PermissionsEnumerable
 *  @dev     This contracts provides extending-contracts with role-based access control mechanisms.
 *           Also provides interfaces to view all members with a given role, and total count of members.
 */
contract PermissionsEnumerable is IPermissionsEnumerable, Permissions {
    /**
     *  @notice A data structure to store data of members for a given role.
     *
     *  @param index    Current index in the list of accounts that have a role.
     *  @param members  map from index => address of account that has a role
     *  @param indexOf  map from address => index which the account has.
     */
    struct RoleMembers {
        uint256 index;
        mapping(uint256 => address) members;
        mapping(address => uint256) indexOf;
    }

    /// @dev map from keccak256 hash of a role to its members' data. See {RoleMembers}.
    mapping(bytes32 => RoleMembers) private roleMembers;

    /**
     *  @notice         Returns the role-member from a list of members for a role,
     *                  at a given index.
     *  @dev            Returns `member` who has `role`, at `index` of role-members list.
     *                  See struct {RoleMembers}, and mapping {roleMembers}
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *  @param index    Index in list of current members for the role.
     *
     *  @return member  Address of account that has `role`
     */
    function getRoleMember(bytes32 role, uint256 index) external view override returns (address member) {
        uint256 currentIndex = roleMembers[role].index;
        uint256 check;

        for (uint256 i = 0; i < currentIndex; i += 1) {
            if (roleMembers[role].members[i] != address(0)) {
                if (check == index) {
                    member = roleMembers[role].members[i];
                    return member;
                }
                check += 1;
            } else if (hasRole(role, address(0)) && i == roleMembers[role].indexOf[address(0)]) {
                check += 1;
            }
        }
    }

    /**
     *  @notice         Returns total number of accounts that have a role.
     *  @dev            Returns `count` of accounts that have `role`.
     *                  See struct {RoleMembers}, and mapping {roleMembers}
     *
     *  @param role     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     *
     *  @return count   Total number of accounts that have `role`
     */
    function getRoleMemberCount(bytes32 role) external view override returns (uint256 count) {
        uint256 currentIndex = roleMembers[role].index;

        for (uint256 i = 0; i < currentIndex; i += 1) {
            if (roleMembers[role].members[i] != address(0)) {
                count += 1;
            }
        }
        if (hasRole(role, address(0))) {
            count += 1;
        }
    }

    /// @dev Revokes `role` from `account`, and removes `account` from {roleMembers}
    ///      See {_removeMember}
    function _revokeRole(bytes32 role, address account) internal override {
        super._revokeRole(role, account);
        _removeMember(role, account);
    }

    /// @dev Grants `role` to `account`, and adds `account` to {roleMembers}
    ///      See {_addMember}
    function _setupRole(bytes32 role, address account) internal override {
        super._setupRole(role, account);
        _addMember(role, account);
    }

    /// @dev adds `account` to {roleMembers}, for `role`
    function _addMember(bytes32 role, address account) internal {
        uint256 idx = roleMembers[role].index;
        roleMembers[role].index += 1;

        roleMembers[role].members[idx] = account;
        roleMembers[role].indexOf[account] = idx;
    }

    /// @dev removes `account` from {roleMembers}, for `role`
    function _removeMember(bytes32 role, address account) internal {
        uint256 idx = roleMembers[role].indexOf[account];

        delete roleMembers[role].members[idx];
        delete roleMembers[role].indexOf[account];
    }
}

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

/// @author thirdweb

import "./interface/IRoyalty.sol";

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

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

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

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

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

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

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

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

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

        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);
    }

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

        royaltyRecipient = _royaltyRecipient;
        royaltyBps = uint16(_royaltyBps);

        emit DefaultRoyalty(_royaltyRecipient, _royaltyBps);
    }

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

        _setupRoyaltyInfoForToken(_tokenId, _recipient, _bps);
    }

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

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

        emit RoyaltyForToken(_tokenId, _recipient, _bps);
    }

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

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

/// @author thirdweb

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

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

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

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

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

/// @author thirdweb

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

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

/// @author thirdweb

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

    function register(address registrant) external;

    function registerAndSubscribe(address registrant, address subscription) external;

    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    function unregister(address addr) external;

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

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

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

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

    function subscribe(address registrant, address registrantToSubscribe) external;

    function unsubscribe(address registrant, bool copyExistingEntries) external;

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

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

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

    function copyEntriesOf(address registrant, address registrantToCopy) external;

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

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

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

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

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

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

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

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

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

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

/// @author thirdweb

interface IOperatorFilterToggle {
    event OperatorRestriction(bool restriction);

    function operatorRestriction() external view returns (bool);

    function setOperatorRestriction(bool restriction) external;
}

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

/// @author thirdweb

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

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

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

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

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

/// @author thirdweb

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

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

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

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

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

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

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

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

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

/// @author thirdweb

import "./IPermissions.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IPermissionsEnumerable is IPermissions {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * [forum post](https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296)
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

/// @author thirdweb

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

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

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

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

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

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

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

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

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

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

/// @author thirdweb

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/// @author thirdweb

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

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

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

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

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

File 29 of 31 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 30 of 31 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 31 of 31 : ZeusHolderAirdropMintPrice.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/base/ERC1155Base.sol";
import "@thirdweb-dev/contracts/extension/PermissionsEnumerable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";


contract LaelapsSkullKey is ERC1155Base, PermissionsEnumerable {

    uint256 public mint_price = 10000;
    bool public buybackburn = true;
    address private constant UNISWAP_ROUTER_ADDRESS = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
    IUniswapV2Router02 private uniswapRouter;
    address public BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
    address public LAELAPS_ADDRESS = 0x6C059413686565D5aD6cce6EED7742c42DbC44CA;
    address public REWARD_WALLET = 0x7a188ee785589636059738DDA5F26e93062f473f;
    bool lock = true;

    constructor(
        address _defaultAdmin,
        string memory _name,
        string memory _symbol,
        address _royaltyRecipient,
        uint128 _royaltyBps
    )
        ERC1155Base(
            _defaultAdmin,
            _name,
            _symbol,
            _royaltyRecipient,
            _royaltyBps
        )
    {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        uniswapRouter = IUniswapV2Router02(UNISWAP_ROUTER_ADDRESS);

    }

    function mintToPaid(
        address _to,
        uint256 _tokenId
    )  public payable  {
        require(msg.value >= mint_price, "invalid minting price");
        require(lock == false, "contract locked");
        if (buybackburn) {
            buyAndBurnLaelaps();
            _mint(_to, _tokenId, 1, "");
        }
        else {
            uint amountOut = address(this).balance;
            require(amountOut > 0, "No balance to transfer");
            payable(REWARD_WALLET).transfer(amountOut);
            _mint(_to, _tokenId, 1, "");
        }
    }


    function buyAndBurnLaelaps() internal {
        address[] memory path = new address[](2);
        uint amountOutMin = address(this).balance;
        address WETH_ADDRESS = uniswapRouter.WETH();
        path[0] = WETH_ADDRESS;
        path[1] = LAELAPS_ADDRESS;
        require(amountOutMin > 0, "you have no eth yet");
        address to = address(this);
        uint deadline = block.timestamp + 100;
        uniswapRouter.swapExactETHForTokens{ value: amountOutMin }(amountOutMin, path, to, deadline);
        IERC20 laelaps_token = IERC20(LAELAPS_ADDRESS);
        require(laelaps_token.balanceOf(address(this)) >= 0, "Insufficient funds");
        laelaps_token.transfer(BURN_ADDRESS, laelaps_token.balanceOf(address(this)));
  }

  function setBuyBackBurn(bool _mode) public onlyRole(DEFAULT_ADMIN_ROLE){
    buybackburn = _mode;
  }

  function setPrice(uint256 _price) public onlyRole(DEFAULT_ADMIN_ROLE) {
    mint_price = _price;
  }

  function setLock(bool _lock) public onlyRole(DEFAULT_ADMIN_ROLE) {
    lock = _lock;
  }

  function setLaelapsContract(address _addr) public onlyRole(DEFAULT_ADMIN_ROLE) {
    LAELAPS_ADDRESS = _addr;
  }
}

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

Contract Security Audit

Contract ABI

[{"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"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"prevURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRoyaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRoyaltyBps","type":"uint256"}],"name":"DefaultRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"restriction","type":"bool"}],"name":"OperatorRestriction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBps","type":"uint256"}],"name":"RoyaltyForToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LAELAPS_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_WALLET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"string","name":"_baseURI","type":"string"}],"name":"batchMintTo","outputs":[],"stateMutability":"nonpayable","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":[],"name":"buybackburn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"member","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRoleWithSwitch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mintToPaid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mint_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenIdToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorRestriction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":"bool","name":"_mode","type":"bool"}],"name":"setBuyBackBurn","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":"_addr","type":"address"}],"name":"setLaelapsContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_lock","type":"bool"}],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_restriction","type":"bool"}],"name":"setOperatorRestriction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_bps","type":"uint256"}],"name":"setRoyaltyInfoForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_subscription","type":"address"}],"name":"subscribeToRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60806040526127106011556012805460ff19166001179055601380546001600160a01b031990811661dead1790915560148054909116736c059413686565d5ad6cce6eed7742c42dbc44ca1790556015805474017a188ee785589636059738dda5f26e93062f473f6001600160a81b03199091161790553480156200008357600080fd5b506040516200507638038062005076833981016040819052620000a691620005af565b8484848484733cc6cdda760b79bafa08df41ecfa224f810dceb6600185856000620000d28382620006ed565b506001620000e18282620006ed565b505050620000f682826200016e60201b60201c565b50620001049050856200029c565b62000119826001600160801b038316620002ee565b62000125600162000399565b506200013a93506000925033915050620003e0565b505060128054610100600160a81b031916747a250d5630b4cf539739df2c5dacb4c659f2488d0017905550620007e1915050565b6daaeb6d7670e522a718067333cd4e3b1562000298576001600160a01b0382163b15620002515780156200021057604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620001f357600080fd5b505af115801562000208573d6000803e3d6000fd5b505050505050565b60405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620001d8565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001f357600080fd5b5050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b612710811115620003375760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b604482015260640160405180910390fd5b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b600b805460ff19168215159081179091556040519081527f38475885990d8dfe9ca01f0ef160a1b5514426eab9ddbc953a3353410ba780969060200160405180910390a150565b620003f782826200040360201b62001b8d1760201c565b6200029882826200045e565b6000828152600e602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000828152601060205260408120805491600191906200047f8385620007b9565b9091555050600092835260106020908152604080852083865260018101835281862080546001600160a01b039096166001600160a01b03199096168617905593855260029093019052912055565b80516001600160a01b0381168114620004e557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200051257600080fd5b81516001600160401b03808211156200052f576200052f620004ea565b604051601f8301601f19908116603f011681019082821181831017156200055a576200055a620004ea565b816040528381526020925086838588010111156200057757600080fd5b600091505b838210156200059b57858201830151818301840152908201906200057c565b600093810190920192909252949350505050565b600080600080600060a08688031215620005c857600080fd5b620005d386620004cd565b60208701519095506001600160401b0380821115620005f157600080fd5b620005ff89838a0162000500565b955060408801519150808211156200061657600080fd5b50620006258882890162000500565b9350506200063660608701620004cd565b60808701519092506001600160801b03811681146200065457600080fd5b809150509295509295909350565b600181811c908216806200067757607f821691505b6020821081036200069857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006e857600081815260208120601f850160051c81016020861015620006c75750805b601f850160051c820191505b818110156200020857828155600101620006d3565b505050565b81516001600160401b03811115620007095762000709620004ea565b62000721816200071a845462000662565b846200069e565b602080601f831160018114620007595760008415620007405750858301515b600019600386901b1c1916600185901b17855562000208565b600085815260208120601f198616915b828110156200078a5788860151825594840194600190910190840162000769565b5085821015620007a95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620007db57634e487b7160e01b600052601160045260246000fd5b92915050565b61488580620007f16000396000f3fe6080604052600436106102e35760003560e01c8063863065fb11610190578063ac9650d8116100dc578063ca15c87311610095578063e985e9c51161006f578063e985e9c514610945578063f242432a14610980578063f5298aca146109a0578063fccc2813146109c057600080fd5b8063ca15c873146108f0578063d547741f14610910578063e8a3d4851461093057600080fd5b8063ac9650d81461080b578063b03f452814610838578063b24f2d3914610858578063b66ceef614610883578063b7103f67146108a3578063bd85b039146108c357600080fd5b8063949c09f711610149578063a217fddf11610123578063a217fddf14610796578063a22cb465146107ab578063a32fa5b3146107cb578063a62dac46146107eb57600080fd5b8063949c09f71461074157806395d89b41146107615780639bcf7a151461077657600080fd5b8063863065fb146106835780638da5cb5b146106a35780639010d07c146106c157806391b7f5ed146106e157806391d1485414610701578063938e3d7b1461072157600080fd5b806332f0cd641161024f578063504c6e0111610208578063619d5194116101e2578063619d51941461061457806363b45e2d146106345780636b20c454146106495780638139b96d1461066957600080fd5b8063504c6e01146105ba57806357fd8455146105d4578063600dd5ea146105f457600080fd5b806332f0cd64146104bc57806336568abe146104dc5780633b1475a7146104fc57806341f43434146105115780634cc157df1461054b5780634e1273f41461058d57600080fd5b80632419f51b116102a15780632419f51b146103dd578063248a9ca3146103fd5780632762d3cb1461042a5780632a55205a1461043d5780632eb2c2d61461047c5780632f2ff15d1461049c57600080fd5b8062fdd58e146102e857806301ffc9a71461033357806306fdde03146103635780630e89341c1461038557806313af4035146103a55780631a4231a4146103c7575b600080fd5b3480156102f457600080fd5b5061032061030336600461393e565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561033f57600080fd5b5061035361034e366004613980565b6109e0565b604051901515815260200161032a565b34801561036f57600080fd5b50610378610a4d565b60405161032a91906139ed565b34801561039157600080fd5b506103786103a0366004613a00565b610adb565b3480156103b157600080fd5b506103c56103c0366004613a19565b610bc9565b005b3480156103d357600080fd5b5061032060115481565b3480156103e957600080fd5b506103206103f8366004613a00565b610c02565b34801561040957600080fd5b50610320610418366004613a00565b6000908152600f602052604090205490565b6103c561043836600461393e565b610c70565b34801561044957600080fd5b5061045d610458366004613a36565b610ddc565b604080516001600160a01b03909316835260208301919091520161032a565b34801561048857600080fd5b506103c5610497366004613ba1565b610e19565b3480156104a857600080fd5b506103c56104b7366004613c4e565b610e48565b3480156104c857600080fd5b506103c56104d7366004613c8c565b610ede565b3480156104e857600080fd5b506103c56104f7366004613c4e565b610f4f565b34801561050857600080fd5b50600c54610320565b34801561051d57600080fd5b506105336daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b03909116815260200161032a565b34801561055757600080fd5b5061056b610566366004613a00565b610fb1565b604080516001600160a01b03909316835261ffff90911660208301520161032a565b34801561059957600080fd5b506105ad6105a8366004613ca9565b61101c565b60405161032a9190613db0565b3480156105c657600080fd5b50600b546103539060ff1681565b3480156105e057600080fd5b506103c56105ef366004613a19565b611130565b34801561060057600080fd5b506103c561060f36600461393e565b6111a0565b34801561062057600080fd5b506103c561062f366004613c8c565b6111ce565b34801561064057600080fd5b50600954610320565b34801561065557600080fd5b506103c5610664366004613dc3565b6111f9565b34801561067557600080fd5b506012546103539060ff1681565b34801561068f57600080fd5b50601454610533906001600160a01b031681565b3480156106af57600080fd5b506006546001600160a01b0316610533565b3480156106cd57600080fd5b506105336106dc366004613a36565b61139b565b3480156106ed57600080fd5b506103c56106fc366004613a00565b611489565b34801561070d57600080fd5b5061035361071c366004613c4e565b61149b565b34801561072d57600080fd5b506103c561073c366004613e38565b6114c6565b34801561074d57600080fd5b506103c561075c366004613e6c565b6114f3565b34801561076d57600080fd5b506103786116ee565b34801561078257600080fd5b506103c5610791366004613f06565b6116fb565b3480156107a257600080fd5b50610320600081565b3480156107b757600080fd5b506103c56107c6366004613f3e565b61172a565b3480156107d757600080fd5b506103536107e6366004613c4e565b61173e565b3480156107f757600080fd5b506103c5610806366004613c8c565b611794565b34801561081757600080fd5b5061082b610826366004613f6c565b6117b4565b60405161032a9190613fe0565b34801561084457600080fd5b506103c5610853366004614042565b6118a8565b34801561086457600080fd5b506007546001600160a01b03811690600160a01b900461ffff1661056b565b34801561088f57600080fd5b50601554610533906001600160a01b031681565b3480156108af57600080fd5b506103c56108be366004613a19565b611993565b3480156108cf57600080fd5b506103206108de366004613a00565b600d6020526000908152604090205481565b3480156108fc57600080fd5b5061032061090b366004613a00565b6119c2565b34801561091c57600080fd5b506103c561092b366004613c4e565b611a4b565b34801561093c57600080fd5b50610378611a64565b34801561095157600080fd5b506103536109603660046140a2565b600360209081526000928352604080842090915290825290205460ff1681565b34801561098c57600080fd5b506103c561099b3660046140d0565b611a71565b3480156109ac57600080fd5b506103c56109bb366004614138565b611a98565b3480156109cc57600080fd5b50601354610533906001600160a01b031681565b60006301ffc9a760e01b6001600160e01b031983161480610a115750636cdb3d1360e11b6001600160e01b03198316145b80610a2c57506303a24d0760e21b6001600160e01b03198316145b80610a4757506001600160e01b0319821663152a902d60e11b145b92915050565b60008054610a5a9061416d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a869061416d565b8015610ad35780601f10610aa857610100808354040283529160200191610ad3565b820191906000526020600020905b815481529060010190602001808311610ab657829003601f168201915b505050505081565b600081815260046020526040812080546060929190610af99061416d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b259061416d565b8015610b725780601f10610b4757610100808354040283529160200191610b72565b820191906000526020600020905b815481529060010190602001808311610b5557829003601f168201915b50505050509050600081511115610b895792915050565b6000610b9484611be8565b905080610ba085611d84565b604051602001610bb19291906141a1565b60405160208183030381529060405292505050919050565b610bd1611e8c565b610bf65760405162461bcd60e51b8152600401610bed906141d0565b60405180910390fd5b610bff81611eb9565b50565b6000610c0d60095490565b8210610c4b5760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610bed565b60098281548110610c5e57610c5e6141f8565b90600052602060002001549050919050565b601154341015610cba5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964206d696e74696e6720707269636560581b6044820152606401610bed565b601554600160a01b900460ff1615610d065760405162461bcd60e51b815260206004820152600f60248201526e18dbdb9d1c9858dd081b1bd8dad959608a1b6044820152606401610bed565b60125460ff1615610d3957610d19611f0b565b610d358282600160405180602001604052806000815250612285565b5050565b4780610d805760405162461bcd60e51b81526020600482015260166024820152752737903130b630b731b2903a37903a3930b739b332b960511b6044820152606401610bed565b6015546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610dba573d6000803e3d6000fd5b50610dd78383600160405180602001604052806000815250612285565b505050565b600080600080610deb86610fb1565b90945084925061ffff169050612710610e048287614224565b610e0e9190614251565b925050509250929050565b846001600160a01b0381163314610e3357610e3333612365565b610e408686868686612429565b505050505050565b6000828152600f6020526040902054610e6190336124b1565b6000828152600e602090815260408083206001600160a01b038516845290915290205460ff1615610ed45760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c79206772616e7420746f206e6f6e20686f6c646572730000006044820152606401610bed565b610d358282612531565b610ee6611e8c565b610f465760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420617574686f72697a656420746f20736574206f70657261746f72207260448201526a32b9ba3934b1ba34b7b71760a91b6064820152608401610bed565b610bff81612545565b336001600160a01b03821614610fa75760405162461bcd60e51b815260206004820152601a60248201527f43616e206f6e6c792072656e6f756e636520666f722073656c660000000000006044820152606401610bed565b610d35828261258c565b6000818152600860209081526040808320815180830190925280546001600160a01b031680835260019091015492820192909252829115610ff85780516020820151611012565b6007546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b6060815183511461103f5760405162461bcd60e51b8152600401610bed90614265565b600083516001600160401b0381111561105a5761105a613a58565b604051908082528060200260200182016040528015611083578160200160208202803683370190505b50905060005b845181101561112857600260008683815181106110a8576110a86141f8565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008583815181106110e4576110e46141f8565b602002602001015181526020019081526020016000205482828151811061110d5761110d6141f8565b60209081029190910101526111218161428e565b9050611089565b509392505050565b611138611e8c565b6111955760405162461bcd60e51b815260206004820152602860248201527f4e6f7420617574686f72697a656420746f2073756273637269626520746f207260448201526732b3b4b9ba393c9760c11b6064820152608401610bed565b610bff8160016125e3565b6111a8611e8c565b6111c45760405162461bcd60e51b8152600401610bed906141d0565b610d3582826126e9565b60006111da81336124b1565b5060158054911515600160a01b0260ff60a01b19909216919091179055565b336001600160a01b03841681148061123657506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b6112765760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610bed565b81518351146112b95760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610bed565b60005b8351811015611389578281815181106112d7576112d76141f8565b602002602001015160026000876001600160a01b03166001600160a01b031681526020019081526020016000206000868481518110611318576113186141f8565b602002602001015181526020019081526020016000205410156113775760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610bed565b6113826001826142a7565b90506112bc565b5061139584848461278f565b50505050565b60008281526010602052604081205481805b828110156114805760008681526010602090815260408083208484526001019091529020546001600160a01b031615611429578482036114175760008681526010602090815260408083209383526001909301905220546001600160a01b03169250610a47915050565b6114226001836142a7565b915061146e565b61143486600061149b565b801561145b5750600086815260106020908152604080832083805260020190915290205481145b1561146e5761146b6001836142a7565b91505b6114796001826142a7565b90506113ad565b50505092915050565b600061149581336124b1565b50601155565b6000918252600e602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6114ce611e8c565b6114ea5760405162461bcd60e51b8152600401610bed906141d0565b610bff81612944565b6114fb611e8c565b6115415760405162461bcd60e51b81526020600482015260176024820152762737ba1030baba3437b934bd32b2103a379036b4b73a1760491b6044820152606401610bed565b60008251116115895760405162461bcd60e51b815260206004820152601460248201527326b4b73a34b733903d32b937903a37b5b2b7399760611b6044820152606401610bed565b81518351146115cd5760405162461bcd60e51b815260206004820152601060248201526f2632b733ba341036b4b9b6b0ba31b41760811b6044820152606401610bed565b60006115d8600c5490565b9050806000805b86518110156116ae576000198782815181106115fd576115fd6141f8565b602002602001015103611647578387828151811061161d5761161d6141f8565b60209081029190910101526116336001856142a7565b93506116406001836142a7565b915061169c565b8387828151811061165a5761165a6141f8565b60200260200101511061169c5760405162461bcd60e51b815260206004820152600a6024820152691a5b9d985b1a59081a5960b21b6044820152606401610bed565b6116a76001826142a7565b90506115df565b5080156116c3576116c0828286612a20565b50505b82600c819055506116e587878760405180602001604052806000815250612a84565b50505050505050565b60018054610a5a9061416d565b611703611e8c565b61171f5760405162461bcd60e51b8152600401610bed906141d0565b610dd7838383612bdf565b8161173481612365565b610dd78383612ca9565b6000828152600e6020908152604080832083805290915281205460ff1661178b57506000828152600e602090815260408083206001600160a01b038516845290915290205460ff16610a47565b50600192915050565b60006117a081336124b1565b506012805460ff1916911515919091179055565b6060816001600160401b038111156117ce576117ce613a58565b60405190808252806020026020018201604052801561180157816020015b60608152602001906001900390816117ec5790505b50905060005b828110156118a15761187130858584818110611825576118256141f8565b905060200281019061183791906142ba565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d5892505050565b828281518110611883576118836141f8565b602002602001018190525080806118999061428e565b915050611807565b5092915050565b6118b0611e8c565b6118f65760405162461bcd60e51b81526020600482015260176024820152762737ba1030baba3437b934bd32b2103a379036b4b73a1760491b6044820152606401610bed565b600080611902600c5490565b90506000198503611938578091506001600c600082825461192391906142a7565b9091555061193390508185612d84565b611978565b8085106119745760405162461bcd60e51b815260206004820152600a6024820152691a5b9d985b1a59081a5960b21b6044820152606401610bed565b8491505b610e4086838560405180602001604052806000815250612285565b600061199f81336124b1565b50601480546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260106020526040812054815b81811015611a265760008481526010602090815260408083208484526001019091529020546001600160a01b031615611a1457611a116001846142a7565b92505b611a1f6001826142a7565b90506119d3565b50611a3283600061149b565b15611a4557611a426001836142a7565b91505b50919050565b6000828152600f6020526040902054610fa790336124b1565b60058054610a5a9061416d565b846001600160a01b0381163314611a8b57611a8b33612365565b610e408686868686612d9c565b336001600160a01b038416811480611ad557506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b611b155760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610bed565b6001600160a01b0384166000908152600260209081526040808320868452909152902054821115611b825760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610bed565b611395848484612e24565b6000828152600e602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60606000611bf560095490565b905060006009805480602002602001604051908101604052809291908181526020018280548015611c4557602002820191906000526020600020905b815481526020019060010190808311611c31575b5050505050905060005b82811015611d4957818181518110611c6957611c696141f8565b6020026020010151851015611d3757600a6000838381518110611c8e57611c8e6141f8565b602002602001015181526020019081526020016000208054611caf9061416d565b80601f0160208091040260200160405190810160405280929190818152602001828054611cdb9061416d565b8015611d285780601f10611cfd57610100808354040283529160200191611d28565b820191906000526020600020905b815481529060010190602001808311611d0b57829003601f168201915b50505050509350505050919050565b611d426001826142a7565b9050611c4f565b5060405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610bed565b606081600003611dab5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611dd55780611dbf8161428e565b9150611dce9050600a83614251565b9150611daf565b6000816001600160401b03811115611def57611def613a58565b6040519080825280601f01601f191660200182016040528015611e19576020820181803683370190505b5090505b8415611e8457611e2e600183614307565b9150611e3b600a8661431a565b611e469060306142a7565b60f81b818381518110611e5b57611e5b6141f8565b60200101906001600160f81b031916908160001a905350611e7d600a86614251565b9450611e1d565b949350505050565b6000611ea06006546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b60408051600280825260608201835260009260208301908036833701905050905060004790506000601260019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611faa919061432e565b90508083600081518110611fc057611fc06141f8565b6001600160a01b039283166020918202929092010152601454845191169084906001908110611ff157611ff16141f8565b60200260200101906001600160a01b031690816001600160a01b031681525050600082116120575760405162461bcd60e51b81526020600482015260136024820152721e5bdd481a185d99481b9bc8195d1a081e595d606a1b6044820152606401610bed565b3060006120654260646142a7565b601254604051637ff36ab560e01b815291925061010090046001600160a01b031690637ff36ab59086906120a39082908a908890889060040161434b565b60006040518083038185885af11580156120c1573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526120ea91908101906143b5565b506014546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a0823190602401602060405180830381865afa158015612138573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215c9190614450565b101561219f5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610bed565b6013546040516370a0823160e01b81523060048201526001600160a01b038381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa1580156121f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122169190614450565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612261573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e59190614469565b6001600160a01b0384166122ab5760405162461bcd60e51b8152600401610bed90614486565b336122cb816000876122bc88612f49565b6122c588612f49565b87612f94565b6001600160a01b0385166000908152600260209081526040808320878452909152812080548592906122fe9084906142a7565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461235e816000878787876130a0565b5050505050565b600b5460ff1615610bff576daaeb6d7670e522a718067333cd4e3b15610bff57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156123dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124019190614469565b610bff57604051633b79c77360e21b81526001600160a01b0382166004820152602401610bed565b6001600160a01b03851633148061246357506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b6124a45760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610bed565b61235e85858585856131f3565b6000828152600e602090815260408083206001600160a01b038516845290915290205460ff16610d35576124ef816001600160a01b031660146133a6565b6124fa8360206133a6565b60405160200161250b9291906144ac565b60408051601f198184030181529082905262461bcd60e51b8252610bed916004016139ed565b61253b8282611b8d565b610d358282613541565b600b805460ff19168215159081179091556040519081527f38475885990d8dfe9ca01f0ef160a1b5514426eab9ddbc953a3353410ba780969060200160405180910390a150565b61259682826135ae565b60008281526010602090815260408083206001600160a01b03851680855260028201808552838620805487526001909301855292852080546001600160a01b031916905584529152555050565b6daaeb6d7670e522a718067333cd4e3b15610d35576001600160a01b0382163b156126b857801561267857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561266457600080fd5b505af1158015610e40573d6000803e3d6000fd5b60405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440161264a565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e4869060240161264a565b61271081111561272d5760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610bed565b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0383166127d65760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610bed565b80518251146127f75760405162461bcd60e51b8152600401610bed90614265565b600033905061281a81856000868660405180602001604052806000815250612f94565b60005b83518110156128e557600084828151811061283a5761283a6141f8565b602002602001015190506000848381518110612858576128586141f8565b6020908102919091018101516001600160a01b03891660009081526002835260408082208683529093529190912054909150818110156128aa5760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b03881660009081526002602090815260408083209583529490529290922091039055806128dd8161428e565b91505061281d565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612936929190614543565b60405180910390a450505050565b6000600580546129539061416d565b80601f016020809104026020016040519081016040528092919081815260200182805461297f9061416d565b80156129cc5780601f106129a1576101008083540402835291602001916129cc565b820191906000526020600020905b8154815290600101906020018083116129af57829003601f168201915b5050505050905081600590816129e291906145b7565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a168183604051612a14929190614676565b60405180910390a15050565b600080612a2d84866142a7565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af018190556000818152600a60205260409020909250829150612a7b84826145b7565b50935093915050565b6001600160a01b038416612aaa5760405162461bcd60e51b8152600401610bed90614486565b8151835114612acb5760405162461bcd60e51b8152600401610bed90614265565b33612adb81600087878787612f94565b60005b8451811015612b7757838181518110612af957612af96141f8565b602002602001015160026000886001600160a01b03166001600160a01b031681526020019081526020016000206000878481518110612b3a57612b3a6141f8565b602002602001015181526020019081526020016000206000828254612b5f91906142a7565b90915550819050612b6f8161428e565b915050612ade565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612bc8929190614543565b60405180910390a461235e81600087878787613610565b612710811115612c235760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610bed565b6040805180820182526001600160a01b038481168083526020808401868152600089815260088352869020945185546001600160a01b031916941693909317845591516001909301929092559151838152909185917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d91015b60405180910390a3505050565b336001600160a01b0383168103612cf35760405162461bcd60e51b815260206004820152600e60248201526d20a8282927ab24a723afa9a2a62360911b6044820152606401610bed565b6001600160a01b03818116600081815260036020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612c9c565b6060612d7d8383604051806060016040528060278152602001614829602791396136ed565b9392505050565b6000828152600460205260409020610dd782826145b7565b6001600160a01b038516331480612dd657506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b612e175760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610bed565b61235e85858585856137ca565b6001600160a01b038316612e6b5760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610bed565b33612e9a81856000612e7c87612f49565b612e8587612f49565b60405180602001604052806000815250612f94565b6001600160a01b038416600090815260026020908152604080832086845290915290205482811015612ede5760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b03858116600081815260026020908152604080832089845282528083208887039055805189815291820188905291938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612f8357612f836141f8565b602090810291909101015292915050565b6001600160a01b03851661301b5760005b835181101561301957828181518110612fc057612fc06141f8565b6020026020010151600d6000868481518110612fde57612fde6141f8565b60200260200101518152602001908152602001600020600082825461300391906142a7565b9091555061301290508161428e565b9050612fa5565b505b6001600160a01b038416610e405760005b83518110156116e557828181518110613047576130476141f8565b6020026020010151600d6000868481518110613065576130656141f8565b60200260200101518152602001908152602001600020600082825461308a9190614307565b9091555061309990508161428e565b905061302c565b6001600160a01b0384163b15610e405760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906130e4908990899088908890889060040161469b565b6020604051808303816000875af192505050801561311f575060408051601f3d908101601f1916820190925261311c918101906146d5565b60015b6131a15761312b6146f2565b806308c379a003613164575061313f61470e565b8061314a5750613166565b8060405162461bcd60e51b8152600401610bed91906139ed565b505b60405162461bcd60e51b815260206004820152601060248201526f10a2a92198989a9aa922a1a2a4ab22a960811b6044820152606401610bed565b6001600160e01b0319811663f23a6e6160e01b146116e55760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610bed565b81518351146132145760405162461bcd60e51b8152600401610bed90614265565b6001600160a01b03841661323a5760405162461bcd60e51b8152600401610bed90614486565b33613249818787878787612f94565b60005b8451811015613340576000858281518110613269576132696141f8565b602002602001015190506000858381518110613287576132876141f8565b6020908102919091018101516001600160a01b038b1660009081526002835260408082208683529093529190912054909150818110156132d95760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b03808b16600090815260026020818152604080842088855282528084208787039055938d168352908152828220868352905290812080548492906133259084906142a7565b92505081905550505050806133399061428e565b905061324c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613390929190614543565b60405180910390a4610e40818787878787613610565b606060006133b5836002614224565b6133c09060026142a7565b6001600160401b038111156133d7576133d7613a58565b6040519080825280601f01601f191660200182016040528015613401576020820181803683370190505b509050600360fc1b8160008151811061341c5761341c6141f8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061344b5761344b6141f8565b60200101906001600160f81b031916908160001a905350600061346f846002614224565b61347a9060016142a7565b90505b60018111156134f2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106134ae576134ae6141f8565b1a60f81b8282815181106134c4576134c46141f8565b60200101906001600160f81b031916908160001a90535060049490941c936134eb81614797565b905061347d565b508315612d7d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bed565b60008281526010602052604081208054916001919061356083856142a7565b9091555050600092835260106020908152604080852083865260018101835281862080546001600160a01b039096166001600160a01b03199096168617905593855260029093019052912055565b6135b882826124b1565b6000828152600e602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0384163b15610e405760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061365490899089908890889088906004016147ae565b6020604051808303816000875af192505050801561368f575060408051601f3d908101601f1916820190925261368c918101906146d5565b60015b61369b5761312b6146f2565b6001600160e01b0319811663bc197c8160e01b146116e55760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610bed565b60606001600160a01b0384163b6137555760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610bed565b600080856001600160a01b031685604051613770919061480c565b600060405180830381855af49150503d80600081146137ab576040519150601f19603f3d011682016040523d82523d6000602084013e6137b0565b606091505b50915091506137c08282866138f0565b9695505050505050565b6001600160a01b0384166137f05760405162461bcd60e51b8152600401610bed90614486565b336138008187876122bc88612f49565b6001600160a01b0386166000908152600260209081526040808320878452909152902054838110156138445760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b0380881660009081526002602081815260408084208a855282528084208987039055938a168352908152828220888352905290812080548692906138909084906142a7565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116e58288888888886130a0565b606083156138ff575081612d7d565b82511561390f5782518084602001fd5b8160405162461bcd60e51b8152600401610bed91906139ed565b6001600160a01b0381168114610bff57600080fd5b6000806040838503121561395157600080fd5b823561395c81613929565b946020939093013593505050565b6001600160e01b031981168114610bff57600080fd5b60006020828403121561399257600080fd5b8135612d7d8161396a565b60005b838110156139b85781810151838201526020016139a0565b50506000910152565b600081518084526139d981602086016020860161399d565b601f01601f19169290920160200192915050565b602081526000612d7d60208301846139c1565b600060208284031215613a1257600080fd5b5035919050565b600060208284031215613a2b57600080fd5b8135612d7d81613929565b60008060408385031215613a4957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613a9357613a93613a58565b6040525050565b60006001600160401b03821115613ab357613ab3613a58565b5060051b60200190565b600082601f830112613ace57600080fd5b81356020613adb82613a9a565b604051613ae88282613a6e565b83815260059390931b8501820192828101915086841115613b0857600080fd5b8286015b84811015613b235780358352918301918301613b0c565b509695505050505050565b600082601f830112613b3f57600080fd5b81356001600160401b03811115613b5857613b58613a58565b604051613b6f601f8301601f191660200182613a6e565b818152846020838601011115613b8457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215613bb957600080fd5b8535613bc481613929565b94506020860135613bd481613929565b935060408601356001600160401b0380821115613bf057600080fd5b613bfc89838a01613abd565b94506060880135915080821115613c1257600080fd5b613c1e89838a01613abd565b93506080880135915080821115613c3457600080fd5b50613c4188828901613b2e565b9150509295509295909350565b60008060408385031215613c6157600080fd5b823591506020830135613c7381613929565b809150509250929050565b8015158114610bff57600080fd5b600060208284031215613c9e57600080fd5b8135612d7d81613c7e565b60008060408385031215613cbc57600080fd5b82356001600160401b0380821115613cd357600080fd5b818501915085601f830112613ce757600080fd5b81356020613cf482613a9a565b604051613d018282613a6e565b83815260059390931b8501820192828101915089841115613d2157600080fd5b948201945b83861015613d48578535613d3981613929565b82529482019490820190613d26565b96505086013592505080821115613d5e57600080fd5b50613d6b85828601613abd565b9150509250929050565b600081518084526020808501945080840160005b83811015613da557815187529582019590820190600101613d89565b509495945050505050565b602081526000612d7d6020830184613d75565b600080600060608486031215613dd857600080fd5b8335613de381613929565b925060208401356001600160401b0380821115613dff57600080fd5b613e0b87838801613abd565b93506040860135915080821115613e2157600080fd5b50613e2e86828701613abd565b9150509250925092565b600060208284031215613e4a57600080fd5b81356001600160401b03811115613e6057600080fd5b611e8484828501613b2e565b60008060008060808587031215613e8257600080fd5b8435613e8d81613929565b935060208501356001600160401b0380821115613ea957600080fd5b613eb588838901613abd565b94506040870135915080821115613ecb57600080fd5b613ed788838901613abd565b93506060870135915080821115613eed57600080fd5b50613efa87828801613b2e565b91505092959194509250565b600080600060608486031215613f1b57600080fd5b833592506020840135613f2d81613929565b929592945050506040919091013590565b60008060408385031215613f5157600080fd5b8235613f5c81613929565b91506020830135613c7381613c7e565b60008060208385031215613f7f57600080fd5b82356001600160401b0380821115613f9657600080fd5b818501915085601f830112613faa57600080fd5b813581811115613fb957600080fd5b8660208260051b8501011115613fce57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561403557603f198886030184526140238583516139c1565b94509285019290850190600101614007565b5092979650505050505050565b6000806000806080858703121561405857600080fd5b843561406381613929565b93506020850135925060408501356001600160401b0381111561408557600080fd5b61409187828801613b2e565b949793965093946060013593505050565b600080604083850312156140b557600080fd5b82356140c081613929565b91506020830135613c7381613929565b600080600080600060a086880312156140e857600080fd5b85356140f381613929565b9450602086013561410381613929565b9350604086013592506060860135915060808601356001600160401b0381111561412c57600080fd5b613c4188828901613b2e565b60008060006060848603121561414d57600080fd5b833561415881613929565b95602085013595506040909401359392505050565b600181811c9082168061418157607f821691505b602082108103611a4557634e487b7160e01b600052602260045260246000fd5b600083516141b381846020880161399d565b8351908301906141c781836020880161399d565b01949350505050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a4757610a4761420e565b634e487b7160e01b600052601260045260246000fd5b6000826142605761426061423b565b500490565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b6000600182016142a0576142a061420e565b5060010190565b80820180821115610a4757610a4761420e565b6000808335601e198436030181126142d157600080fd5b8301803591506001600160401b038211156142eb57600080fd5b60200191503681900382131561430057600080fd5b9250929050565b81810381811115610a4757610a4761420e565b6000826143295761432961423b565b500690565b60006020828403121561434057600080fd5b8151612d7d81613929565b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156143955784516001600160a01b031683529383019391830191600101614370565b50506001600160a01b039690961660408501525050506060015292915050565b600060208083850312156143c857600080fd5b82516001600160401b038111156143de57600080fd5b8301601f810185136143ef57600080fd5b80516143fa81613a9a565b6040516144078282613a6e565b82815260059290921b830184019184810191508783111561442757600080fd5b928401925b828410156144455783518252928401929084019061442c565b979650505050505050565b60006020828403121561446257600080fd5b5051919050565b60006020828403121561447b57600080fd5b8151612d7d81613c7e565b6020808252600c908201526b2a27afad22a927afa0a2222960a11b604082015260600190565b7402832b936b4b9b9b4b7b7399d1030b1b1b7bab73a1605d1b8152600083516144dc81601585016020880161399d565b7001034b99036b4b9b9b4b733903937b6329607d1b601591840191820152835161450d81602684016020880161399d565b01602601949350505050565b60208082526010908201526f125394d551919250d251539517d0905360821b604082015260600190565b6040815260006145566040830185613d75565b82810360208401526145688185613d75565b95945050505050565b601f821115610dd757600081815260208120601f850160051c810160208610156145985750805b601f850160051c820191505b81811015610e40578281556001016145a4565b81516001600160401b038111156145d0576145d0613a58565b6145e4816145de845461416d565b84614571565b602080601f83116001811461461957600084156146015750858301515b600019600386901b1c1916600185901b178555610e40565b600085815260208120601f198616915b8281101561464857888601518255948401946001909101908401614629565b50858210156146665787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600061468960408301856139c1565b828103602084015261456881856139c1565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614445908301846139c1565b6000602082840312156146e757600080fd5b8151612d7d8161396a565b600060033d111561470b5760046000803e5060005160e01c5b90565b600060443d101561471c5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561474b57505050505090565b82850191508151818111156147635750505050505090565b843d870101602082850101111561477d5750505050505090565b61478c60208286010187613a6e565b509095945050505050565b6000816147a6576147a661420e565b506000190190565b6001600160a01b0386811682528516602082015260a0604082018190526000906147da90830186613d75565b82810360608401526147ec8186613d75565b9050828103608084015261480081856139c1565b98975050505050505050565b6000825161481e81846020870161399d565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201d67348ed1f11c9c7a7b5cc11f9391bcc567888f15c4e88bd76132ae8465248364736f6c63430008110033000000000000000000000000adc50022351f4ad58a2a4775da4edfd8ff58def300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000007a188ee785589636059738dda5f26e93062f473f00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000f4c61656c617073536b756c6c4b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034c534b0000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102e35760003560e01c8063863065fb11610190578063ac9650d8116100dc578063ca15c87311610095578063e985e9c51161006f578063e985e9c514610945578063f242432a14610980578063f5298aca146109a0578063fccc2813146109c057600080fd5b8063ca15c873146108f0578063d547741f14610910578063e8a3d4851461093057600080fd5b8063ac9650d81461080b578063b03f452814610838578063b24f2d3914610858578063b66ceef614610883578063b7103f67146108a3578063bd85b039146108c357600080fd5b8063949c09f711610149578063a217fddf11610123578063a217fddf14610796578063a22cb465146107ab578063a32fa5b3146107cb578063a62dac46146107eb57600080fd5b8063949c09f71461074157806395d89b41146107615780639bcf7a151461077657600080fd5b8063863065fb146106835780638da5cb5b146106a35780639010d07c146106c157806391b7f5ed146106e157806391d1485414610701578063938e3d7b1461072157600080fd5b806332f0cd641161024f578063504c6e0111610208578063619d5194116101e2578063619d51941461061457806363b45e2d146106345780636b20c454146106495780638139b96d1461066957600080fd5b8063504c6e01146105ba57806357fd8455146105d4578063600dd5ea146105f457600080fd5b806332f0cd64146104bc57806336568abe146104dc5780633b1475a7146104fc57806341f43434146105115780634cc157df1461054b5780634e1273f41461058d57600080fd5b80632419f51b116102a15780632419f51b146103dd578063248a9ca3146103fd5780632762d3cb1461042a5780632a55205a1461043d5780632eb2c2d61461047c5780632f2ff15d1461049c57600080fd5b8062fdd58e146102e857806301ffc9a71461033357806306fdde03146103635780630e89341c1461038557806313af4035146103a55780631a4231a4146103c7575b600080fd5b3480156102f457600080fd5b5061032061030336600461393e565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561033f57600080fd5b5061035361034e366004613980565b6109e0565b604051901515815260200161032a565b34801561036f57600080fd5b50610378610a4d565b60405161032a91906139ed565b34801561039157600080fd5b506103786103a0366004613a00565b610adb565b3480156103b157600080fd5b506103c56103c0366004613a19565b610bc9565b005b3480156103d357600080fd5b5061032060115481565b3480156103e957600080fd5b506103206103f8366004613a00565b610c02565b34801561040957600080fd5b50610320610418366004613a00565b6000908152600f602052604090205490565b6103c561043836600461393e565b610c70565b34801561044957600080fd5b5061045d610458366004613a36565b610ddc565b604080516001600160a01b03909316835260208301919091520161032a565b34801561048857600080fd5b506103c5610497366004613ba1565b610e19565b3480156104a857600080fd5b506103c56104b7366004613c4e565b610e48565b3480156104c857600080fd5b506103c56104d7366004613c8c565b610ede565b3480156104e857600080fd5b506103c56104f7366004613c4e565b610f4f565b34801561050857600080fd5b50600c54610320565b34801561051d57600080fd5b506105336daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b03909116815260200161032a565b34801561055757600080fd5b5061056b610566366004613a00565b610fb1565b604080516001600160a01b03909316835261ffff90911660208301520161032a565b34801561059957600080fd5b506105ad6105a8366004613ca9565b61101c565b60405161032a9190613db0565b3480156105c657600080fd5b50600b546103539060ff1681565b3480156105e057600080fd5b506103c56105ef366004613a19565b611130565b34801561060057600080fd5b506103c561060f36600461393e565b6111a0565b34801561062057600080fd5b506103c561062f366004613c8c565b6111ce565b34801561064057600080fd5b50600954610320565b34801561065557600080fd5b506103c5610664366004613dc3565b6111f9565b34801561067557600080fd5b506012546103539060ff1681565b34801561068f57600080fd5b50601454610533906001600160a01b031681565b3480156106af57600080fd5b506006546001600160a01b0316610533565b3480156106cd57600080fd5b506105336106dc366004613a36565b61139b565b3480156106ed57600080fd5b506103c56106fc366004613a00565b611489565b34801561070d57600080fd5b5061035361071c366004613c4e565b61149b565b34801561072d57600080fd5b506103c561073c366004613e38565b6114c6565b34801561074d57600080fd5b506103c561075c366004613e6c565b6114f3565b34801561076d57600080fd5b506103786116ee565b34801561078257600080fd5b506103c5610791366004613f06565b6116fb565b3480156107a257600080fd5b50610320600081565b3480156107b757600080fd5b506103c56107c6366004613f3e565b61172a565b3480156107d757600080fd5b506103536107e6366004613c4e565b61173e565b3480156107f757600080fd5b506103c5610806366004613c8c565b611794565b34801561081757600080fd5b5061082b610826366004613f6c565b6117b4565b60405161032a9190613fe0565b34801561084457600080fd5b506103c5610853366004614042565b6118a8565b34801561086457600080fd5b506007546001600160a01b03811690600160a01b900461ffff1661056b565b34801561088f57600080fd5b50601554610533906001600160a01b031681565b3480156108af57600080fd5b506103c56108be366004613a19565b611993565b3480156108cf57600080fd5b506103206108de366004613a00565b600d6020526000908152604090205481565b3480156108fc57600080fd5b5061032061090b366004613a00565b6119c2565b34801561091c57600080fd5b506103c561092b366004613c4e565b611a4b565b34801561093c57600080fd5b50610378611a64565b34801561095157600080fd5b506103536109603660046140a2565b600360209081526000928352604080842090915290825290205460ff1681565b34801561098c57600080fd5b506103c561099b3660046140d0565b611a71565b3480156109ac57600080fd5b506103c56109bb366004614138565b611a98565b3480156109cc57600080fd5b50601354610533906001600160a01b031681565b60006301ffc9a760e01b6001600160e01b031983161480610a115750636cdb3d1360e11b6001600160e01b03198316145b80610a2c57506303a24d0760e21b6001600160e01b03198316145b80610a4757506001600160e01b0319821663152a902d60e11b145b92915050565b60008054610a5a9061416d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a869061416d565b8015610ad35780601f10610aa857610100808354040283529160200191610ad3565b820191906000526020600020905b815481529060010190602001808311610ab657829003601f168201915b505050505081565b600081815260046020526040812080546060929190610af99061416d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b259061416d565b8015610b725780601f10610b4757610100808354040283529160200191610b72565b820191906000526020600020905b815481529060010190602001808311610b5557829003601f168201915b50505050509050600081511115610b895792915050565b6000610b9484611be8565b905080610ba085611d84565b604051602001610bb19291906141a1565b60405160208183030381529060405292505050919050565b610bd1611e8c565b610bf65760405162461bcd60e51b8152600401610bed906141d0565b60405180910390fd5b610bff81611eb9565b50565b6000610c0d60095490565b8210610c4b5760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610bed565b60098281548110610c5e57610c5e6141f8565b90600052602060002001549050919050565b601154341015610cba5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964206d696e74696e6720707269636560581b6044820152606401610bed565b601554600160a01b900460ff1615610d065760405162461bcd60e51b815260206004820152600f60248201526e18dbdb9d1c9858dd081b1bd8dad959608a1b6044820152606401610bed565b60125460ff1615610d3957610d19611f0b565b610d358282600160405180602001604052806000815250612285565b5050565b4780610d805760405162461bcd60e51b81526020600482015260166024820152752737903130b630b731b2903a37903a3930b739b332b960511b6044820152606401610bed565b6015546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610dba573d6000803e3d6000fd5b50610dd78383600160405180602001604052806000815250612285565b505050565b600080600080610deb86610fb1565b90945084925061ffff169050612710610e048287614224565b610e0e9190614251565b925050509250929050565b846001600160a01b0381163314610e3357610e3333612365565b610e408686868686612429565b505050505050565b6000828152600f6020526040902054610e6190336124b1565b6000828152600e602090815260408083206001600160a01b038516845290915290205460ff1615610ed45760405162461bcd60e51b815260206004820152601d60248201527f43616e206f6e6c79206772616e7420746f206e6f6e20686f6c646572730000006044820152606401610bed565b610d358282612531565b610ee6611e8c565b610f465760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420617574686f72697a656420746f20736574206f70657261746f72207260448201526a32b9ba3934b1ba34b7b71760a91b6064820152608401610bed565b610bff81612545565b336001600160a01b03821614610fa75760405162461bcd60e51b815260206004820152601a60248201527f43616e206f6e6c792072656e6f756e636520666f722073656c660000000000006044820152606401610bed565b610d35828261258c565b6000818152600860209081526040808320815180830190925280546001600160a01b031680835260019091015492820192909252829115610ff85780516020820151611012565b6007546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b6060815183511461103f5760405162461bcd60e51b8152600401610bed90614265565b600083516001600160401b0381111561105a5761105a613a58565b604051908082528060200260200182016040528015611083578160200160208202803683370190505b50905060005b845181101561112857600260008683815181106110a8576110a86141f8565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008583815181106110e4576110e46141f8565b602002602001015181526020019081526020016000205482828151811061110d5761110d6141f8565b60209081029190910101526111218161428e565b9050611089565b509392505050565b611138611e8c565b6111955760405162461bcd60e51b815260206004820152602860248201527f4e6f7420617574686f72697a656420746f2073756273637269626520746f207260448201526732b3b4b9ba393c9760c11b6064820152608401610bed565b610bff8160016125e3565b6111a8611e8c565b6111c45760405162461bcd60e51b8152600401610bed906141d0565b610d3582826126e9565b60006111da81336124b1565b5060158054911515600160a01b0260ff60a01b19909216919091179055565b336001600160a01b03841681148061123657506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b6112765760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610bed565b81518351146112b95760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610bed565b60005b8351811015611389578281815181106112d7576112d76141f8565b602002602001015160026000876001600160a01b03166001600160a01b031681526020019081526020016000206000868481518110611318576113186141f8565b602002602001015181526020019081526020016000205410156113775760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610bed565b6113826001826142a7565b90506112bc565b5061139584848461278f565b50505050565b60008281526010602052604081205481805b828110156114805760008681526010602090815260408083208484526001019091529020546001600160a01b031615611429578482036114175760008681526010602090815260408083209383526001909301905220546001600160a01b03169250610a47915050565b6114226001836142a7565b915061146e565b61143486600061149b565b801561145b5750600086815260106020908152604080832083805260020190915290205481145b1561146e5761146b6001836142a7565b91505b6114796001826142a7565b90506113ad565b50505092915050565b600061149581336124b1565b50601155565b6000918252600e602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6114ce611e8c565b6114ea5760405162461bcd60e51b8152600401610bed906141d0565b610bff81612944565b6114fb611e8c565b6115415760405162461bcd60e51b81526020600482015260176024820152762737ba1030baba3437b934bd32b2103a379036b4b73a1760491b6044820152606401610bed565b60008251116115895760405162461bcd60e51b815260206004820152601460248201527326b4b73a34b733903d32b937903a37b5b2b7399760611b6044820152606401610bed565b81518351146115cd5760405162461bcd60e51b815260206004820152601060248201526f2632b733ba341036b4b9b6b0ba31b41760811b6044820152606401610bed565b60006115d8600c5490565b9050806000805b86518110156116ae576000198782815181106115fd576115fd6141f8565b602002602001015103611647578387828151811061161d5761161d6141f8565b60209081029190910101526116336001856142a7565b93506116406001836142a7565b915061169c565b8387828151811061165a5761165a6141f8565b60200260200101511061169c5760405162461bcd60e51b815260206004820152600a6024820152691a5b9d985b1a59081a5960b21b6044820152606401610bed565b6116a76001826142a7565b90506115df565b5080156116c3576116c0828286612a20565b50505b82600c819055506116e587878760405180602001604052806000815250612a84565b50505050505050565b60018054610a5a9061416d565b611703611e8c565b61171f5760405162461bcd60e51b8152600401610bed906141d0565b610dd7838383612bdf565b8161173481612365565b610dd78383612ca9565b6000828152600e6020908152604080832083805290915281205460ff1661178b57506000828152600e602090815260408083206001600160a01b038516845290915290205460ff16610a47565b50600192915050565b60006117a081336124b1565b506012805460ff1916911515919091179055565b6060816001600160401b038111156117ce576117ce613a58565b60405190808252806020026020018201604052801561180157816020015b60608152602001906001900390816117ec5790505b50905060005b828110156118a15761187130858584818110611825576118256141f8565b905060200281019061183791906142ba565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d5892505050565b828281518110611883576118836141f8565b602002602001018190525080806118999061428e565b915050611807565b5092915050565b6118b0611e8c565b6118f65760405162461bcd60e51b81526020600482015260176024820152762737ba1030baba3437b934bd32b2103a379036b4b73a1760491b6044820152606401610bed565b600080611902600c5490565b90506000198503611938578091506001600c600082825461192391906142a7565b9091555061193390508185612d84565b611978565b8085106119745760405162461bcd60e51b815260206004820152600a6024820152691a5b9d985b1a59081a5960b21b6044820152606401610bed565b8491505b610e4086838560405180602001604052806000815250612285565b600061199f81336124b1565b50601480546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260106020526040812054815b81811015611a265760008481526010602090815260408083208484526001019091529020546001600160a01b031615611a1457611a116001846142a7565b92505b611a1f6001826142a7565b90506119d3565b50611a3283600061149b565b15611a4557611a426001836142a7565b91505b50919050565b6000828152600f6020526040902054610fa790336124b1565b60058054610a5a9061416d565b846001600160a01b0381163314611a8b57611a8b33612365565b610e408686868686612d9c565b336001600160a01b038416811480611ad557506001600160a01b0380851660009081526003602090815260408083209385168352929052205460ff165b611b155760405162461bcd60e51b81526020600482015260116024820152702ab730b8383937bb32b21031b0b63632b960791b6044820152606401610bed565b6001600160a01b0384166000908152600260209081526040808320868452909152902054821115611b825760405162461bcd60e51b8152602060048201526017602482015276139bdd08195b9bdd59da081d1bdad95b9cc81bdddb9959604a1b6044820152606401610bed565b611395848484612e24565b6000828152600e602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60606000611bf560095490565b905060006009805480602002602001604051908101604052809291908181526020018280548015611c4557602002820191906000526020600020905b815481526020019060010190808311611c31575b5050505050905060005b82811015611d4957818181518110611c6957611c696141f8565b6020026020010151851015611d3757600a6000838381518110611c8e57611c8e6141f8565b602002602001015181526020019081526020016000208054611caf9061416d565b80601f0160208091040260200160405190810160405280929190818152602001828054611cdb9061416d565b8015611d285780601f10611cfd57610100808354040283529160200191611d28565b820191906000526020600020905b815481529060010190602001808311611d0b57829003601f168201915b50505050509350505050919050565b611d426001826142a7565b9050611c4f565b5060405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610bed565b606081600003611dab5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611dd55780611dbf8161428e565b9150611dce9050600a83614251565b9150611daf565b6000816001600160401b03811115611def57611def613a58565b6040519080825280601f01601f191660200182016040528015611e19576020820181803683370190505b5090505b8415611e8457611e2e600183614307565b9150611e3b600a8661431a565b611e469060306142a7565b60f81b818381518110611e5b57611e5b6141f8565b60200101906001600160f81b031916908160001a905350611e7d600a86614251565b9450611e1d565b949350505050565b6000611ea06006546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b60408051600280825260608201835260009260208301908036833701905050905060004790506000601260019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611faa919061432e565b90508083600081518110611fc057611fc06141f8565b6001600160a01b039283166020918202929092010152601454845191169084906001908110611ff157611ff16141f8565b60200260200101906001600160a01b031690816001600160a01b031681525050600082116120575760405162461bcd60e51b81526020600482015260136024820152721e5bdd481a185d99481b9bc8195d1a081e595d606a1b6044820152606401610bed565b3060006120654260646142a7565b601254604051637ff36ab560e01b815291925061010090046001600160a01b031690637ff36ab59086906120a39082908a908890889060040161434b565b60006040518083038185885af11580156120c1573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526120ea91908101906143b5565b506014546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a0823190602401602060405180830381865afa158015612138573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215c9190614450565b101561219f5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610bed565b6013546040516370a0823160e01b81523060048201526001600160a01b038381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa1580156121f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122169190614450565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612261573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e59190614469565b6001600160a01b0384166122ab5760405162461bcd60e51b8152600401610bed90614486565b336122cb816000876122bc88612f49565b6122c588612f49565b87612f94565b6001600160a01b0385166000908152600260209081526040808320878452909152812080548592906122fe9084906142a7565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461235e816000878787876130a0565b5050505050565b600b5460ff1615610bff576daaeb6d7670e522a718067333cd4e3b15610bff57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156123dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124019190614469565b610bff57604051633b79c77360e21b81526001600160a01b0382166004820152602401610bed565b6001600160a01b03851633148061246357506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b6124a45760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610bed565b61235e85858585856131f3565b6000828152600e602090815260408083206001600160a01b038516845290915290205460ff16610d35576124ef816001600160a01b031660146133a6565b6124fa8360206133a6565b60405160200161250b9291906144ac565b60408051601f198184030181529082905262461bcd60e51b8252610bed916004016139ed565b61253b8282611b8d565b610d358282613541565b600b805460ff19168215159081179091556040519081527f38475885990d8dfe9ca01f0ef160a1b5514426eab9ddbc953a3353410ba780969060200160405180910390a150565b61259682826135ae565b60008281526010602090815260408083206001600160a01b03851680855260028201808552838620805487526001909301855292852080546001600160a01b031916905584529152555050565b6daaeb6d7670e522a718067333cd4e3b15610d35576001600160a01b0382163b156126b857801561267857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561266457600080fd5b505af1158015610e40573d6000803e3d6000fd5b60405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440161264a565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e4869060240161264a565b61271081111561272d5760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610bed565b600780546001600160a01b0384166001600160b01b03199091168117600160a01b61ffff851602179091556040518281527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb9060200160405180910390a25050565b6001600160a01b0383166127d65760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610bed565b80518251146127f75760405162461bcd60e51b8152600401610bed90614265565b600033905061281a81856000868660405180602001604052806000815250612f94565b60005b83518110156128e557600084828151811061283a5761283a6141f8565b602002602001015190506000848381518110612858576128586141f8565b6020908102919091018101516001600160a01b03891660009081526002835260408082208683529093529190912054909150818110156128aa5760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b03881660009081526002602090815260408083209583529490529290922091039055806128dd8161428e565b91505061281d565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612936929190614543565b60405180910390a450505050565b6000600580546129539061416d565b80601f016020809104026020016040519081016040528092919081815260200182805461297f9061416d565b80156129cc5780601f106129a1576101008083540402835291602001916129cc565b820191906000526020600020905b8154815290600101906020018083116129af57829003601f168201915b5050505050905081600590816129e291906145b7565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a168183604051612a14929190614676565b60405180910390a15050565b600080612a2d84866142a7565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af018190556000818152600a60205260409020909250829150612a7b84826145b7565b50935093915050565b6001600160a01b038416612aaa5760405162461bcd60e51b8152600401610bed90614486565b8151835114612acb5760405162461bcd60e51b8152600401610bed90614265565b33612adb81600087878787612f94565b60005b8451811015612b7757838181518110612af957612af96141f8565b602002602001015160026000886001600160a01b03166001600160a01b031681526020019081526020016000206000878481518110612b3a57612b3a6141f8565b602002602001015181526020019081526020016000206000828254612b5f91906142a7565b90915550819050612b6f8161428e565b915050612ade565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612bc8929190614543565b60405180910390a461235e81600087878787613610565b612710811115612c235760405162461bcd60e51b815260206004820152600f60248201526e45786365656473206d61782062707360881b6044820152606401610bed565b6040805180820182526001600160a01b038481168083526020808401868152600089815260088352869020945185546001600160a01b031916941693909317845591516001909301929092559151838152909185917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d91015b60405180910390a3505050565b336001600160a01b0383168103612cf35760405162461bcd60e51b815260206004820152600e60248201526d20a8282927ab24a723afa9a2a62360911b6044820152606401610bed565b6001600160a01b03818116600081815260036020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612c9c565b6060612d7d8383604051806060016040528060278152602001614829602791396136ed565b9392505050565b6000828152600460205260409020610dd782826145b7565b6001600160a01b038516331480612dd657506001600160a01b038516600090815260036020908152604080832033845290915290205460ff165b612e175760405162461bcd60e51b81526020600482015260126024820152710853d5d3915497d3d497d054141493d5915160721b6044820152606401610bed565b61235e85858585856137ca565b6001600160a01b038316612e6b5760405162461bcd60e51b815260206004820152600e60248201526d232927a6afad22a927afa0a2222960911b6044820152606401610bed565b33612e9a81856000612e7c87612f49565b612e8587612f49565b60405180602001604052806000815250612f94565b6001600160a01b038416600090815260026020908152604080832086845290915290205482811015612ede5760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b03858116600081815260026020908152604080832089845282528083208887039055805189815291820188905291938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612f8357612f836141f8565b602090810291909101015292915050565b6001600160a01b03851661301b5760005b835181101561301957828181518110612fc057612fc06141f8565b6020026020010151600d6000868481518110612fde57612fde6141f8565b60200260200101518152602001908152602001600020600082825461300391906142a7565b9091555061301290508161428e565b9050612fa5565b505b6001600160a01b038416610e405760005b83518110156116e557828181518110613047576130476141f8565b6020026020010151600d6000868481518110613065576130656141f8565b60200260200101518152602001908152602001600020600082825461308a9190614307565b9091555061309990508161428e565b905061302c565b6001600160a01b0384163b15610e405760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906130e4908990899088908890889060040161469b565b6020604051808303816000875af192505050801561311f575060408051601f3d908101601f1916820190925261311c918101906146d5565b60015b6131a15761312b6146f2565b806308c379a003613164575061313f61470e565b8061314a5750613166565b8060405162461bcd60e51b8152600401610bed91906139ed565b505b60405162461bcd60e51b815260206004820152601060248201526f10a2a92198989a9aa922a1a2a4ab22a960811b6044820152606401610bed565b6001600160e01b0319811663f23a6e6160e01b146116e55760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610bed565b81518351146132145760405162461bcd60e51b8152600401610bed90614265565b6001600160a01b03841661323a5760405162461bcd60e51b8152600401610bed90614486565b33613249818787878787612f94565b60005b8451811015613340576000858281518110613269576132696141f8565b602002602001015190506000858381518110613287576132876141f8565b6020908102919091018101516001600160a01b038b1660009081526002835260408082208683529093529190912054909150818110156132d95760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b03808b16600090815260026020818152604080842088855282528084208787039055938d168352908152828220868352905290812080548492906133259084906142a7565b92505081905550505050806133399061428e565b905061324c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613390929190614543565b60405180910390a4610e40818787878787613610565b606060006133b5836002614224565b6133c09060026142a7565b6001600160401b038111156133d7576133d7613a58565b6040519080825280601f01601f191660200182016040528015613401576020820181803683370190505b509050600360fc1b8160008151811061341c5761341c6141f8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061344b5761344b6141f8565b60200101906001600160f81b031916908160001a905350600061346f846002614224565b61347a9060016142a7565b90505b60018111156134f2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106134ae576134ae6141f8565b1a60f81b8282815181106134c4576134c46141f8565b60200101906001600160f81b031916908160001a90535060049490941c936134eb81614797565b905061347d565b508315612d7d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bed565b60008281526010602052604081208054916001919061356083856142a7565b9091555050600092835260106020908152604080852083865260018101835281862080546001600160a01b039096166001600160a01b03199096168617905593855260029093019052912055565b6135b882826124b1565b6000828152600e602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0384163b15610e405760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061365490899089908890889088906004016147ae565b6020604051808303816000875af192505050801561368f575060408051601f3d908101601f1916820190925261368c918101906146d5565b60015b61369b5761312b6146f2565b6001600160e01b0319811663bc197c8160e01b146116e55760405162461bcd60e51b815260206004820152600f60248201526e1513d2d15394d7d491529150d51151608a1b6044820152606401610bed565b60606001600160a01b0384163b6137555760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610bed565b600080856001600160a01b031685604051613770919061480c565b600060405180830381855af49150503d80600081146137ab576040519150601f19603f3d011682016040523d82523d6000602084013e6137b0565b606091505b50915091506137c08282866138f0565b9695505050505050565b6001600160a01b0384166137f05760405162461bcd60e51b8152600401610bed90614486565b336138008187876122bc88612f49565b6001600160a01b0386166000908152600260209081526040808320878452909152902054838110156138445760405162461bcd60e51b8152600401610bed90614519565b6001600160a01b0380881660009081526002602081815260408084208a855282528084208987039055938a168352908152828220888352905290812080548692906138909084906142a7565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116e58288888888886130a0565b606083156138ff575081612d7d565b82511561390f5782518084602001fd5b8160405162461bcd60e51b8152600401610bed91906139ed565b6001600160a01b0381168114610bff57600080fd5b6000806040838503121561395157600080fd5b823561395c81613929565b946020939093013593505050565b6001600160e01b031981168114610bff57600080fd5b60006020828403121561399257600080fd5b8135612d7d8161396a565b60005b838110156139b85781810151838201526020016139a0565b50506000910152565b600081518084526139d981602086016020860161399d565b601f01601f19169290920160200192915050565b602081526000612d7d60208301846139c1565b600060208284031215613a1257600080fd5b5035919050565b600060208284031215613a2b57600080fd5b8135612d7d81613929565b60008060408385031215613a4957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613a9357613a93613a58565b6040525050565b60006001600160401b03821115613ab357613ab3613a58565b5060051b60200190565b600082601f830112613ace57600080fd5b81356020613adb82613a9a565b604051613ae88282613a6e565b83815260059390931b8501820192828101915086841115613b0857600080fd5b8286015b84811015613b235780358352918301918301613b0c565b509695505050505050565b600082601f830112613b3f57600080fd5b81356001600160401b03811115613b5857613b58613a58565b604051613b6f601f8301601f191660200182613a6e565b818152846020838601011115613b8457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215613bb957600080fd5b8535613bc481613929565b94506020860135613bd481613929565b935060408601356001600160401b0380821115613bf057600080fd5b613bfc89838a01613abd565b94506060880135915080821115613c1257600080fd5b613c1e89838a01613abd565b93506080880135915080821115613c3457600080fd5b50613c4188828901613b2e565b9150509295509295909350565b60008060408385031215613c6157600080fd5b823591506020830135613c7381613929565b809150509250929050565b8015158114610bff57600080fd5b600060208284031215613c9e57600080fd5b8135612d7d81613c7e565b60008060408385031215613cbc57600080fd5b82356001600160401b0380821115613cd357600080fd5b818501915085601f830112613ce757600080fd5b81356020613cf482613a9a565b604051613d018282613a6e565b83815260059390931b8501820192828101915089841115613d2157600080fd5b948201945b83861015613d48578535613d3981613929565b82529482019490820190613d26565b96505086013592505080821115613d5e57600080fd5b50613d6b85828601613abd565b9150509250929050565b600081518084526020808501945080840160005b83811015613da557815187529582019590820190600101613d89565b509495945050505050565b602081526000612d7d6020830184613d75565b600080600060608486031215613dd857600080fd5b8335613de381613929565b925060208401356001600160401b0380821115613dff57600080fd5b613e0b87838801613abd565b93506040860135915080821115613e2157600080fd5b50613e2e86828701613abd565b9150509250925092565b600060208284031215613e4a57600080fd5b81356001600160401b03811115613e6057600080fd5b611e8484828501613b2e565b60008060008060808587031215613e8257600080fd5b8435613e8d81613929565b935060208501356001600160401b0380821115613ea957600080fd5b613eb588838901613abd565b94506040870135915080821115613ecb57600080fd5b613ed788838901613abd565b93506060870135915080821115613eed57600080fd5b50613efa87828801613b2e565b91505092959194509250565b600080600060608486031215613f1b57600080fd5b833592506020840135613f2d81613929565b929592945050506040919091013590565b60008060408385031215613f5157600080fd5b8235613f5c81613929565b91506020830135613c7381613c7e565b60008060208385031215613f7f57600080fd5b82356001600160401b0380821115613f9657600080fd5b818501915085601f830112613faa57600080fd5b813581811115613fb957600080fd5b8660208260051b8501011115613fce57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561403557603f198886030184526140238583516139c1565b94509285019290850190600101614007565b5092979650505050505050565b6000806000806080858703121561405857600080fd5b843561406381613929565b93506020850135925060408501356001600160401b0381111561408557600080fd5b61409187828801613b2e565b949793965093946060013593505050565b600080604083850312156140b557600080fd5b82356140c081613929565b91506020830135613c7381613929565b600080600080600060a086880312156140e857600080fd5b85356140f381613929565b9450602086013561410381613929565b9350604086013592506060860135915060808601356001600160401b0381111561412c57600080fd5b613c4188828901613b2e565b60008060006060848603121561414d57600080fd5b833561415881613929565b95602085013595506040909401359392505050565b600181811c9082168061418157607f821691505b602082108103611a4557634e487b7160e01b600052602260045260246000fd5b600083516141b381846020880161399d565b8351908301906141c781836020880161399d565b01949350505050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a4757610a4761420e565b634e487b7160e01b600052601260045260246000fd5b6000826142605761426061423b565b500490565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b6000600182016142a0576142a061420e565b5060010190565b80820180821115610a4757610a4761420e565b6000808335601e198436030181126142d157600080fd5b8301803591506001600160401b038211156142eb57600080fd5b60200191503681900382131561430057600080fd5b9250929050565b81810381811115610a4757610a4761420e565b6000826143295761432961423b565b500690565b60006020828403121561434057600080fd5b8151612d7d81613929565b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156143955784516001600160a01b031683529383019391830191600101614370565b50506001600160a01b039690961660408501525050506060015292915050565b600060208083850312156143c857600080fd5b82516001600160401b038111156143de57600080fd5b8301601f810185136143ef57600080fd5b80516143fa81613a9a565b6040516144078282613a6e565b82815260059290921b830184019184810191508783111561442757600080fd5b928401925b828410156144455783518252928401929084019061442c565b979650505050505050565b60006020828403121561446257600080fd5b5051919050565b60006020828403121561447b57600080fd5b8151612d7d81613c7e565b6020808252600c908201526b2a27afad22a927afa0a2222960a11b604082015260600190565b7402832b936b4b9b9b4b7b7399d1030b1b1b7bab73a1605d1b8152600083516144dc81601585016020880161399d565b7001034b99036b4b9b9b4b733903937b6329607d1b601591840191820152835161450d81602684016020880161399d565b01602601949350505050565b60208082526010908201526f125394d551919250d251539517d0905360821b604082015260600190565b6040815260006145566040830185613d75565b82810360208401526145688185613d75565b95945050505050565b601f821115610dd757600081815260208120601f850160051c810160208610156145985750805b601f850160051c820191505b81811015610e40578281556001016145a4565b81516001600160401b038111156145d0576145d0613a58565b6145e4816145de845461416d565b84614571565b602080601f83116001811461461957600084156146015750858301515b600019600386901b1c1916600185901b178555610e40565b600085815260208120601f198616915b8281101561464857888601518255948401946001909101908401614629565b50858210156146665787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600061468960408301856139c1565b828103602084015261456881856139c1565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614445908301846139c1565b6000602082840312156146e757600080fd5b8151612d7d8161396a565b600060033d111561470b5760046000803e5060005160e01c5b90565b600060443d101561471c5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561474b57505050505090565b82850191508151818111156147635750505050505090565b843d870101602082850101111561477d5750505050505090565b61478c60208286010187613a6e565b509095945050505050565b6000816147a6576147a661420e565b506000190190565b6001600160a01b0386811682528516602082015260a0604082018190526000906147da90830186613d75565b82810360608401526147ec8186613d75565b9050828103608084015261480081856139c1565b98975050505050505050565b6000825161481e81846020870161399d565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201d67348ed1f11c9c7a7b5cc11f9391bcc567888f15c4e88bd76132ae8465248364736f6c63430008110033

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

000000000000000000000000adc50022351f4ad58a2a4775da4edfd8ff58def300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000007a188ee785589636059738dda5f26e93062f473f00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000f4c61656c617073536b756c6c4b6579000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034c534b0000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _defaultAdmin (address): 0xADC50022351F4AD58A2A4775Da4eDFD8ff58dEf3
Arg [1] : _name (string): LaelapsSkullKey
Arg [2] : _symbol (string): LSK
Arg [3] : _royaltyRecipient (address): 0x7a188ee785589636059738DDA5F26e93062f473f
Arg [4] : _royaltyBps (uint128): 1000

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000adc50022351f4ad58a2a4775da4edfd8ff58def3
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000007a188ee785589636059738dda5f26e93062f473f
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [6] : 4c61656c617073536b756c6c4b65790000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 4c534b0000000000000000000000000000000000000000000000000000000000


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

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