ETH Price: $3,329.82 (-0.41%)
Gas: 4.11 Gwei

Token

Kandyland (KLAND)
 

Overview

Max Total Supply

7,777 KLAND

Holders

1,999

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
chikk.eth
Balance
1 KLAND
0xb6390aeb28f6b24d743723615a2996709103754d
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Kandyland is a collection of 7,777 fully animated 3D NFTs based on the four characters of the Kandyland universe.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Kandyland

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : Kandyland.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {IERC721A, ERC721A} from "erc721a/contracts/ERC721A.sol";
import {ERC721AQueryable} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {OperatorFilterer} from "./OperatorFilterer.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IERC2981, ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

// dev
error InvalidPhase();
error AddressCannotBeZero();
error ETHTransferFail();
// mint
error ExceedsMaxSupply();
error ExceedsMintSupply();
error ExceedsMaxPerWallet();
error AlreadyMintedKandylist();
error MintIsNotOpen();
error CallerIsAContract();
error IncorrectETHSent();
error Unauthorized();

/// @title Kandyland NFT Contract
/// @author @kangadev
/// @dev Based off ERC-721A for gas optimised batch mints

contract Kandyland is
    ERC721AQueryable,
    OperatorFilterer,
    ReentrancyGuard,
    Ownable,
    ERC2981
{
    using ECDSA for bytes32;

    enum Phases {
        CLOSED,
        KANDYLIST,
        WAITLIST,
        PUBLIC,
        COMPLETE
    }

    // Mint Information
    uint256 public constant MAX_SUPPLY = 7777;
    uint256 public constant MAX_PER_WALLET = 2;
    uint256 public MINT_PRICE = 0.11 ether;
    uint256 public MINT_SUPPLY = 7777;
    uint8 public currentPhase;
    
    bytes32 private kandylistMerkleRoot;
    address private waitlistSigner;

    // General
    address payable public ownerFund;
    string private _baseTokenURI;
    bool public operatorFilteringEnabled;

    // Events
    event UpdateBaseURI(string baseURI);
    event UpdateMintPrice(uint256 _price);
    event UpdateSalePhase(uint256 index);
    event UpdateOwnerFund(address _ownerFund);

    constructor() ERC721A("Kandyland", "KLAND") {
        ownerFund = payable(msg.sender);
        _registerForOperatorFiltering();
        operatorFilteringEnabled = true;
        _setDefaultRoyalty(msg.sender, 500);
    }

    //===============================================================
    //                    Modifiers
    //===============================================================
    
    /// @notice Checks that the user sent the correct amount of ETH.
    modifier isCorrectEth(uint256 _quantity) {
        if (msg.value != MINT_PRICE * _quantity) revert IncorrectETHSent();
        _;
    }

    /// @notice Checks that the quantity to mint does not exceed the max quantity per wallet.
    modifier isBelowOrEqualsMaxPerWallet(uint256 _quantity) {
        if(_numberMinted(msg.sender) + _quantity > MAX_PER_WALLET) revert ExceedsMaxPerWallet();
        _;
    }

    /// @notice Checks that a user has not already minted kandylist.
    modifier hasNotMintedKandylist() {
        if (_numberMinted(msg.sender) != 0) revert AlreadyMintedKandylist();
        _;
    }

    /// @notice Checks that the quantity to mint does not exceed the max supply.
    modifier isBelowOrEqualsMaxSupply(uint256 _quantity) {
        if ((_totalMinted() + _quantity) > MAX_SUPPLY) revert ExceedsMaxSupply();
        _;
    }

    /// @notice Checks that the quantity to mint does not exceed the mint supply.
    modifier isBelowOrEqualsMintSupply(uint256 _quantity) {
        if ((_totalMinted() + _quantity) > MINT_SUPPLY) revert ExceedsMintSupply();
        _;
    }

    /// @notice Checks that the mint phase is open.
    modifier isMintOpen(Phases phase) {
        if (uint8(phase) != currentPhase) revert MintIsNotOpen();
        _;
    }

    /// @notice Verifies whether a user is kandylisted or waitlisted.
    /// @dev Generate proof offchain and invoke mint function with proof as parameter.
    modifier isAllowlisted(bytes32[] calldata _merkleProof, bytes32 _merkleRoot) {
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        if (!MerkleProof.verifyCalldata(_merkleProof, _merkleRoot, leaf)) {
            revert Unauthorized();
        }
        _;
    }

    /// @notice Verifies whether a user is kandylisted or waitlisted.
    /// @dev Generate signature offchain and invoke mint function with signature as parameter.
    modifier isWaitlisted(bytes calldata _signature) {
        address _signer = keccak256(abi.encodePacked(msg.sender)).toEthSignedMessageHash().recover(_signature);
        if(_signer != waitlistSigner) {
            revert Unauthorized();
        }
        _;
    }

    //===============================================================
    //                    Minting Functions
    //===============================================================

    /// @notice This function allows kandylisted users to mint during the KANDYLIST phase.
    function kandylistMint(bytes32[] calldata _merkleProof, uint256 _quantity)
        external
        payable
        nonReentrant
        isMintOpen(Phases.KANDYLIST)
        isAllowlisted(_merkleProof, kandylistMerkleRoot)
        isCorrectEth(_quantity)
        isBelowOrEqualsMintSupply(_quantity)
        isBelowOrEqualsMaxPerWallet(_quantity)
        hasNotMintedKandylist()
    {
        _mint(msg.sender, _quantity);
    }

    /// @notice This function allows waitlisted users to mint during the WAITLIST phase.
    function waitlistMint(bytes calldata _signature, uint256 _quantity)
        external
        payable
        nonReentrant
        isMintOpen(Phases.WAITLIST)
        isWaitlisted(_signature)
        isCorrectEth(_quantity)
        isBelowOrEqualsMintSupply(_quantity)
        isBelowOrEqualsMaxPerWallet(_quantity)
    {
        _mint(msg.sender, _quantity);
    }

    /// @notice This function allows users to mint during the PUBLIC phase.
    function publicMint(uint256 _quantity)
        external
        payable
        nonReentrant
        isMintOpen(Phases.PUBLIC)
        isCorrectEth(_quantity)
        isBelowOrEqualsMintSupply(_quantity)
        isBelowOrEqualsMaxPerWallet(_quantity)
    {
        _mint(msg.sender, _quantity);
    }

    /// @notice This function allows the owner to mint reserved NFTs.
    function ownerMint(address _to, uint256 _quantity) 
        external
        onlyOwner
        isBelowOrEqualsMaxSupply(_quantity)  
    {
        _mint(_to, _quantity);
    }

    //===============================================================
    //                    Setter Functions
    //===============================================================

    function setBaseURI(string calldata baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
        emit UpdateBaseURI(baseURI);
    }

    function setMintPrice(uint256 _price) external onlyOwner {
        MINT_PRICE = _price;
        emit UpdateMintPrice(_price);
    }

    function setKandylistMerkleRoot(bytes32 _merkleRootHash) external onlyOwner {
        kandylistMerkleRoot = _merkleRootHash;
    }

    function setWaitlistSigner(address _signer) external onlyOwner {
        waitlistSigner = _signer;
    }

    function setCurrentPhase(uint256 index) external onlyOwner {
        if (index == 0) {
            currentPhase = uint8(Phases.CLOSED);
        } else if (index == 1) {
            currentPhase = uint8(Phases.KANDYLIST);
        } else if (index == 2) {
            currentPhase = uint8(Phases.WAITLIST);
        } else if (index == 3) {
            currentPhase = uint8(Phases.PUBLIC);
        } else if (index == 4) {
            currentPhase = uint8(Phases.COMPLETE);
        } else {
            revert InvalidPhase();
        }
        emit UpdateSalePhase(index);
    }

    function setMintSupply(uint256 _mintSupply) 
        external 
        onlyOwner 
        isBelowOrEqualsMaxSupply(_mintSupply) 
    {
        MINT_SUPPLY = _mintSupply;
    }

    function setOwnerFund(address _ownerFund) external onlyOwner {
        if (address(_ownerFund) == address(0)) revert AddressCannotBeZero();
        ownerFund = payable(_ownerFund);
        emit UpdateOwnerFund(_ownerFund);
    }

    //===============================================================
    //                    Getter Functions
    //===============================================================

    function getNumberMinted(address _address) external view returns (uint256) {
        return _numberMinted(_address);
    }

    //===============================================================
    //                    ETH Withdrawal
    //===============================================================

    function withdraw() external onlyOwner nonReentrant {
        uint256 currentBalance = address(this).balance;
        (bool success, ) = payable(ownerFund).call{value: currentBalance}("");
        if (!success) revert ETHTransferFail();
    }

    //===============================================================
    //                      Token Data
    //===============================================================

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

    //===============================================================
    //                    Royalty Enforcement
    //===============================================================

    function setApprovalForAll(address operator, bool approved) public override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function transferFrom(address from, address to, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    function setOperatorFilteringEnabled(bool value) public onlyOwner {
        operatorFilteringEnabled = value;
    }

    function _operatorFilteringEnabled() internal view override returns (bool) {
        return operatorFilteringEnabled;
    }

    function _isPriorityOperator(address operator) internal pure override returns (bool) {
        // OpenSea Seaport Conduit:
        // https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
        // https://goerli.etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
        return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71);
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    //===============================================================
    //                    SupportsInterface
    //===============================================================

    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC721A, ERC721A, ERC2981) returns (bool) {
        // Supports the following `interfaceId`s:
        // - IERC165: 0x01ffc9a7
        // - IERC721: 0x80ac58cd
        // - IERC721Metadata: 0x5b5e139f
        // - IERC2981: 0x2a55205a
        return
            ERC721A.supportsInterface(interfaceId) ||
            ERC2981.supportsInterface(interfaceId);
    }
}

File 2 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 17 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/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 paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 4 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 5 of 17 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 6 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 7 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 8 of 17 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 9 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.0;

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

File 11 of 17 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 12 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 13 of 17 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Optimized and flexible operator filterer to abide to OpenSea's
/// mandatory on-chain royalty enforcement in order for new collections to
/// receive royalties.
/// For more information, see:
/// See: https://github.com/ProjectOpenSea/operator-filter-registry
abstract contract OperatorFilterer {
    /// @dev The default OpenSea operator blocklist subscription.
    address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

    /// @dev The OpenSea operator filter registry.
    address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E;

    /// @dev Registers the current contract to OpenSea's operator filter,
    /// and subscribe to the default OpenSea operator blocklist.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering() internal virtual {
        _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true);
    }

    /// @dev Registers the current contract to OpenSea's operator filter.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        virtual
    {
        /// @solidity memory-safe-assembly
        assembly {
            let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`.

            // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty.
            subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy))

            for {} iszero(subscribe) {} {
                if iszero(subscriptionOrRegistrantToCopy) {
                    functionSelector := 0x4420e486 // `register(address)`.
                    break
                }
                functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`.
                break
            }
            // Store the function selector.
            mstore(0x00, shl(224, functionSelector))
            // Store the `address(this)`.
            mstore(0x04, address())
            // Store the `subscriptionOrRegistrantToCopy`.
            mstore(0x24, subscriptionOrRegistrantToCopy)
            // Register into the registry.
            if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) {
                // If the function selector has not been overwritten,
                // it is an out-of-gas error.
                if eq(shr(224, mload(0x00)), functionSelector) {
                    // To prevent gas under-estimation.
                    revert(0, 0)
                }
            }
            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, because of Solidity's memory size limits.
            mstore(0x24, 0)
        }
    }

    /// @dev Modifier to guard a function and revert if the caller is a blocked operator.
    modifier onlyAllowedOperator(address from) virtual {
        if (from != msg.sender) {
            if (!_isPriorityOperator(msg.sender)) {
                if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender);
            }
        }
        _;
    }

    /// @dev Modifier to guard a function from approving a blocked operator..
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        if (!_isPriorityOperator(operator)) {
            if (_operatorFilteringEnabled()) _revertIfBlocked(operator);
        }
        _;
    }

    /// @dev Helper function that reverts if the `operator` is blocked by the registry.
    function _revertIfBlocked(address operator) private view {
        /// @solidity memory-safe-assembly
        assembly {
            // Store the function selector of `isOperatorAllowed(address,address)`,
            // shifted left by 6 bytes, which is enough for 8tb of memory.
            // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL).
            mstore(0x00, 0xc6171134001122334455)
            // Store the `address(this)`.
            mstore(0x1a, address())
            // Store the `operator`.
            mstore(0x3a, operator)

            // `isOperatorAllowed` always returns true if it does not revert.
            if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) {
                // Bubble up the revert if the staticcall reverts.
                returndatacopy(0x00, 0x00, returndatasize())
                revert(0x00, returndatasize())
            }

            // We'll skip checking if `from` is inside the blacklist.
            // Even though that can block transferring out of wrapper contracts,
            // we don't want tokens to be stuck.

            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, if less than 8tb of memory is used.
            mstore(0x3a, 0)
        }
    }

    /// @dev For deriving contracts to override, so that operator filtering
    /// can be turned on / off.
    /// Returns true by default.
    function _operatorFilteringEnabled() internal view virtual returns (bool) {
        return true;
    }

    /// @dev For deriving contracts to override, so that preferred marketplaces can
    /// skip operator filtering, helping users save gas.
    /// Returns false for all inputs by default.
    function _isPriorityOperator(address) internal view virtual returns (bool) {
        return false;
    }
}

File 14 of 17 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

    // Mapping from token ID to approved address.
    mapping(uint256 => TokenApprovalRef) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            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 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the
     * zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token IDs
     * are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 15 of 17 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721AQueryable.
 *
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
            return ownership;
        }
        ownership = _ownershipAt(tokenId);
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] calldata tokenIds)
        external
        view
        virtual
        override
        returns (TokenOwnership[] memory)
    {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view virtual override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

File 16 of 17 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721AQueryable.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 17 of 17 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            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 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables
     * (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`,
     * checking first that contract recipients are aware of the ERC721 protocol
     * to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move
     * this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external payable;

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom}
     * whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the
     * zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external payable;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressCannotBeZero","type":"error"},{"inputs":[],"name":"AlreadyMintedKandylist","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ETHTransferFail","type":"error"},{"inputs":[],"name":"ExceedsMaxPerWallet","type":"error"},{"inputs":[],"name":"ExceedsMaxSupply","type":"error"},{"inputs":[],"name":"ExceedsMintSupply","type":"error"},{"inputs":[],"name":"IncorrectETHSent","type":"error"},{"inputs":[],"name":"InvalidPhase","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintIsNotOpen","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"UpdateBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"UpdateMintPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_ownerFund","type":"address"}],"name":"UpdateOwnerFund","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"UpdateSalePhase","type":"event"},{"inputs":[],"name":"MAX_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPhase","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getNumberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"kandylistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerFund","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"setCurrentPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRootHash","type":"bytes32"}],"name":"setKandylistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintSupply","type":"uint256"}],"name":"setMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ownerFund","type":"address"}],"name":"setOwnerFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setWaitlistSigner","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"waitlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052670186cc6acd4b0000600c55611e61600d553480156200002357600080fd5b506040518060400160405280600981526020017f4b616e64796c616e6400000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f4b4c414e440000000000000000000000000000000000000000000000000000008152508160029081620000a191906200071b565b508060039081620000b391906200071b565b50620000c46200017a60201b60201c565b60008190555050506001600881905550620000f4620000e86200018360201b60201c565b6200018b60201b60201c565b33601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620001456200025160201b60201c565b6001601360006101000a81548160ff02191690831515021790555062000174336101f46200027a60201b60201c565b6200091d565b60006001905090565b600033905090565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b62000278733cc6cdda760b79bafa08df41ecfa224f810dceb660016200041d60201b60201c565b565b6200028a6200049760201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115620002eb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002e29062000889565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200035d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200035490620008fb565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600a60008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b637d3e3dbe8260601b60601c9250816200044c57826200044457634420e48690506200044c565b63a0af290390505b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af16200048d578060005160e01c036200048c57600080fd5b5b6000602452505050565b6000612710905090565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200052357607f821691505b602082108103620005395762000538620004db565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620005a37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000564565b620005af868362000564565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620005fc620005f6620005f084620005c7565b620005d1565b620005c7565b9050919050565b6000819050919050565b6200061883620005db565b62000630620006278262000603565b84845462000571565b825550505050565b600090565b6200064762000638565b620006548184846200060d565b505050565b5b818110156200067c57620006706000826200063d565b6001810190506200065a565b5050565b601f821115620006cb5762000695816200053f565b620006a08462000554565b81016020851015620006b0578190505b620006c8620006bf8562000554565b83018262000659565b50505b505050565b600082821c905092915050565b6000620006f060001984600802620006d0565b1980831691505092915050565b60006200070b8383620006dd565b9150826002028217905092915050565b6200072682620004a1565b67ffffffffffffffff811115620007425762000741620004ac565b5b6200074e82546200050a565b6200075b82828562000680565b600060209050601f8311600181146200079357600084156200077e578287015190505b6200078a8582620006fd565b865550620007fa565b601f198416620007a3866200053f565b60005b82811015620007cd57848901518255600182019150602085019450602081019050620007a6565b86831015620007ed5784890151620007e9601f891682620006dd565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000871602a8362000802565b91506200087e8262000813565b604082019050919050565b60006020820190508181036000830152620008a48162000862565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000620008e360198362000802565b9150620008f082620008ab565b602082019050919050565b600060208201905081810360008301526200091681620008d4565b9050919050565b6152bb806200092d6000396000f3fe6080604052600436106102675760003560e01c8063715018a611610144578063b7c0b8e8116100b6578063e6138f101161007a578063e6138f1014610901578063e985e9c51461091d578063f2fde38b1461095a578063f4a0a52814610983578063f72ba0fb146109ac578063fb796e6c146109d557610267565b8063b7c0b8e814610817578063b88d4fde14610840578063c002d23d1461085c578063c23dc68f14610887578063c87b56dd146108c457610267565b806395d89b411161010857806395d89b411461070957806399a2557a146107345780639dfbcde814610771578063a22cb4651461079c578063a7d662a6146107c5578063ac568e84146107ee57610267565b8063715018a6146106245780637d3e1ee41461063b5780638462151c146106645780638a59a7fd146106a15780638da5cb5b146106de57610267565b80632db11544116101dd57806342842e0e116101a157806342842e0e146104ff578063484b973c1461051b57806355f804b3146105445780635bbb21771461056d5780636352211e146105aa57806370a08231146105e757610267565b80632db115441461045a57806332cb6b0c14610476578063393abd8c146104a15780633ccfd60b146104bd5780633e1e9ce7146104d457610267565b8063095ea7b31161022f578063095ea7b3146103655780630f2cdd6c1461038157806318160ddd146103ac5780631dca03f3146103d757806323b872dd146104005780632a55205a1461041c57610267565b806301ffc9a71461026c57806304634d8d146102a9578063055ad42e146102d257806306fdde03146102fd578063081812fc14610328575b600080fd5b34801561027857600080fd5b50610293600480360381019061028e91906139db565b610a00565b6040516102a09190613a23565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190613ae0565b610a22565b005b3480156102de57600080fd5b506102e7610a38565b6040516102f49190613b3c565b60405180910390f35b34801561030957600080fd5b50610312610a4b565b60405161031f9190613be7565b60405180910390f35b34801561033457600080fd5b5061034f600480360381019061034a9190613c3f565b610add565b60405161035c9190613c7b565b60405180910390f35b61037f600480360381019061037a9190613c96565b610b5c565b005b34801561038d57600080fd5b50610396610b91565b6040516103a39190613ce5565b60405180910390f35b3480156103b857600080fd5b506103c1610b96565b6040516103ce9190613ce5565b60405180910390f35b3480156103e357600080fd5b506103fe60048036038101906103f99190613d00565b610bad565b005b61041a60048036038101906104159190613d2d565b610c96565b005b34801561042857600080fd5b50610443600480360381019061043e9190613d80565b610d01565b604051610451929190613dc0565b60405180910390f35b610474600480360381019061046f9190613c3f565b610eeb565b005b34801561048257600080fd5b5061048b611053565b6040516104989190613ce5565b60405180910390f35b6104bb60048036038101906104b69190613e4e565b611059565b005b3480156104c957600080fd5b506104d26112d8565b005b3480156104e057600080fd5b506104e96113be565b6040516104f69190613ecf565b60405180910390f35b61051960048036038101906105149190613d2d565b6113e4565b005b34801561052757600080fd5b50610542600480360381019061053d9190613c96565b61144f565b005b34801561055057600080fd5b5061056b60048036038101906105669190613f40565b6114b5565b005b34801561057957600080fd5b50610594600480360381019061058f9190613fe3565b61150c565b6040516105a19190614193565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190613c3f565b6115cf565b6040516105de9190613c7b565b60405180910390f35b3480156105f357600080fd5b5061060e60048036038101906106099190613d00565b6115e1565b60405161061b9190613ce5565b60405180910390f35b34801561063057600080fd5b50610639611699565b005b34801561064757600080fd5b50610662600480360381019061065d9190613c3f565b6116ad565b005b34801561067057600080fd5b5061068b60048036038101906106869190613d00565b61184b565b6040516106989190614273565b60405180910390f35b3480156106ad57600080fd5b506106c860048036038101906106c39190613d00565b61198e565b6040516106d59190613ce5565b60405180910390f35b3480156106ea57600080fd5b506106f36119a0565b6040516107009190613c7b565b60405180910390f35b34801561071557600080fd5b5061071e6119ca565b60405161072b9190613be7565b60405180910390f35b34801561074057600080fd5b5061075b60048036038101906107569190614295565b611a5c565b6040516107689190614273565b60405180910390f35b34801561077d57600080fd5b50610786611c68565b6040516107939190613ce5565b60405180910390f35b3480156107a857600080fd5b506107c360048036038101906107be9190614314565b611c6e565b005b3480156107d157600080fd5b506107ec60048036038101906107e7919061438a565b611ca3565b005b3480156107fa57600080fd5b5061081560048036038101906108109190613c3f565b611cb5565b005b34801561082357600080fd5b5061083e600480360381019061083991906143b7565b611d17565b005b61085a60048036038101906108559190614514565b611d3c565b005b34801561086857600080fd5b50610871611da9565b60405161087e9190613ce5565b60405180910390f35b34801561089357600080fd5b506108ae60048036038101906108a99190613c3f565b611daf565b6040516108bb91906145ec565b60405180910390f35b3480156108d057600080fd5b506108eb60048036038101906108e69190613c3f565b611e19565b6040516108f89190613be7565b60405180910390f35b61091b6004803603810190610916919061465d565b611eb7565b005b34801561092957600080fd5b50610944600480360381019061093f91906146bd565b6120d9565b6040516109519190613a23565b60405180910390f35b34801561096657600080fd5b50610981600480360381019061097c9190613d00565b61216d565b005b34801561098f57600080fd5b506109aa60048036038101906109a59190613c3f565b6121f0565b005b3480156109b857600080fd5b506109d360048036038101906109ce9190613d00565b612239565b005b3480156109e157600080fd5b506109ea612285565b6040516109f79190613a23565b60405180910390f35b6000610a0b82612298565b80610a1b5750610a1a8261232a565b5b9050919050565b610a2a6123a4565b610a348282612422565b5050565b600e60009054906101000a900460ff1681565b606060028054610a5a9061472c565b80601f0160208091040260200160405190810160405280929190818152602001828054610a869061472c565b8015610ad35780601f10610aa857610100808354040283529160200191610ad3565b820191906000526020600020905b815481529060010190602001808311610ab657829003601f168201915b5050505050905090565b6000610ae8826125b7565b610b1e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610b6681612616565b610b8257610b72612662565b15610b8157610b8081612679565b5b5b610b8c83836126bd565b505050565b600281565b6000610ba0612801565b6001546000540303905090565b610bb56123a4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c1b576040517fe622e04000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fea4a1adab5bbb5eba55c738276b66261787bf27c739a13263de78110c3db457d81604051610c8b9190613c7b565b60405180910390a150565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cf057610cd333612616565b610cef57610cdf612662565b15610cee57610ced33612679565b5b5b5b610cfb84848461280a565b50505050565b6000806000600b60008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610e9657600a6040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610ea0612b2c565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610ecc919061478c565b610ed691906147fd565b90508160000151819350935050509250929050565b610ef3612b36565b6003600e60009054906101000a900460ff1660ff16816004811115610f1b57610f1a61482e565b5b60ff1614610f55576040517ff47e7f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8180600c54610f64919061478c565b3414610f9c576040517f22790dad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600d5481610fa9612b85565b610fb3919061485d565b1115610feb576040517f7f70f90b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600281610ff833612b98565b611002919061485d565b111561103a576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110443386612bef565b50505050611050612daa565b50565b611e6181565b611061612b36565b6002600e60009054906101000a900460ff1660ff168160048111156110895761108861482e565b5b60ff16146110c3576040517ff47e7f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383600061114c83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061113e3360405160200161112391906148d9565b60405160208183030381529060405280519060200120612db4565b612de490919063ffffffff16565b9050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111d5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8480600c546111e4919061478c565b341461121c576040517f22790dad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85600d5481611229612b85565b611233919061485d565b111561126b576040517f7f70f90b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660028161127833612b98565b611282919061485d565b11156112ba576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112c43389612bef565b505050505050506112d3612daa565b505050565b6112e06123a4565b6112e8612b36565b60004790506000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260405161133590614925565b60006040518083038185875af1925050503d8060008114611372576040519150601f19603f3d011682016040523d82523d6000602084013e611377565b606091505b50509050806113b2576040517f07246cf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50506113bc612daa565b565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461143e5761142133612616565b61143d5761142d612662565b1561143c5761143b33612679565b5b5b5b611449848484612e0b565b50505050565b6114576123a4565b80611e6181611464612b85565b61146e919061485d565b11156114a6576040517fc30436e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114b08383612bef565b505050565b6114bd6123a4565b8181601291826114ce929190614af1565b507f157d450c8fb1377294d9db75af1de2753efc52d8e5578551d70d2c7d9cd74df98282604051611500929190614bee565b60405180910390a15050565b6060600083839050905060008167ffffffffffffffff811115611532576115316143e9565b5b60405190808252806020026020018201604052801561156b57816020015b611558613920565b8152602001906001900390816115505790505b50905060005b8281146115c35761159a86868381811061158e5761158d614c12565b5b90506020020135611daf565b8282815181106115ad576115ac614c12565b5b6020026020010181905250806001019050611571565b50809250505092915050565b60006115da82612e2b565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611648576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6116a16123a4565b6116ab6000612ef7565b565b6116b56123a4565b600081036116f057600060048111156116d1576116d061482e565b5b600e60006101000a81548160ff021916908360ff160217905550611811565b6001810361172b576001600481111561170c5761170b61482e565b5b600e60006101000a81548160ff021916908360ff160217905550611810565b6002810361176657600260048111156117475761174661482e565b5b600e60006101000a81548160ff021916908360ff16021790555061180f565b600381036117a157600360048111156117825761178161482e565b5b600e60006101000a81548160ff021916908360ff16021790555061180e565b600481036117db576004808111156117bc576117bb61482e565b5b600e60006101000a81548160ff021916908360ff16021790555061180d565b6040517f9a36fd9c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5b5b7ff7a3839f4ad602cc143b15c40b7472dbcd4698549da972fc31005c000dd524e4816040516118409190613ce5565b60405180910390a150565b6060600080600061185b856115e1565b905060008167ffffffffffffffff811115611879576118786143e9565b5b6040519080825280602002602001820160405280156118a75781602001602082028036833780820191505090505b5090506118b2613920565b60006118bc612801565b90505b838614611980576118cf81612fbd565b9150816040015161197557600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461191a57816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611974578083878060010198508151811061196757611966614c12565b5b6020026020010181815250505b5b8060010190506118bf565b508195505050505050919050565b600061199982612b98565b9050919050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546119d99061472c565b80601f0160208091040260200160405190810160405280929190818152602001828054611a059061472c565b8015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b5050505050905090565b6060818310611a97576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611aa2612fe8565b9050611aac612801565b851015611abe57611abb612801565b94505b80841115611aca578093505b6000611ad5876115e1565b905084861015611af8576000868603905081811015611af2578091505b50611afd565b600090505b60008167ffffffffffffffff811115611b1957611b186143e9565b5b604051908082528060200260200182016040528015611b475781602001602082028036833780820191505090505b50905060008203611b5e5780945050505050611c61565b6000611b6988611daf565b905060008160400151611b7e57816000015190505b60008990505b888114158015611b945750848714155b15611c5357611ba281612fbd565b92508260400151611c4857600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611bed57826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c475780848880600101995081518110611c3a57611c39614c12565b5b6020026020010181815250505b5b806001019050611b84565b508583528296505050505050505b9392505050565b600d5481565b81611c7881612616565b611c9457611c84612662565b15611c9357611c9281612679565b5b5b611c9e8383612ff1565b505050565b611cab6123a4565b80600f8190555050565b611cbd6123a4565b80611e6181611cca612b85565b611cd4919061485d565b1115611d0c576040517fc30436e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600d819055505050565b611d1f6123a4565b80601360006101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d9657611d7933612616565b611d9557611d85612662565b15611d9457611d9333612679565b5b5b5b611da2858585856130fc565b5050505050565b600c5481565b611db7613920565b611dbf613920565b611dc7612801565b831080611ddb5750611dd7612fe8565b8310155b15611de95780915050611e14565b611df283612fbd565b9050806040015115611e075780915050611e14565b611e108361316f565b9150505b919050565b6060611e24826125b7565b611e5a576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e6461318f565b90506000815103611e845760405180602001604052806000815250611eaf565b80611e8e84613221565b604051602001611e9f929190614c7d565b6040516020818303038152906040525b915050919050565b611ebf612b36565b6001600e60009054906101000a900460ff1660ff16816004811115611ee757611ee661482e565b5b60ff1614611f21576040517ff47e7f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383600f54600033604051602001611f3991906148d9565b604051602081830303815290604052805190602001209050611f5d84848484613271565b611f93576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8580600c54611fa2919061478c565b3414611fda576040517f22790dad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b86600d5481611fe7612b85565b611ff1919061485d565b1115612029576040517f7f70f90b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8760028161203633612b98565b612040919061485d565b1115612078576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061208333612b98565b146120ba576040517f9954466400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6120c4338a612bef565b50505050505050506120d4612daa565b505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6121756123a4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121db90614d13565b60405180910390fd5b6121ed81612ef7565b50565b6121f86123a4565b80600c819055507f0f6e30cbea7cb67e47bd9d9c28efec570b560826aef4cf586a3b52a2e45396d18160405161222e9190613ce5565b60405180910390a150565b6122416123a4565b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601360009054906101000a900460ff1681565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806122f357506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806123235750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061239d575061239c8261328a565b5b9050919050565b6123ac6132f4565b73ffffffffffffffffffffffffffffffffffffffff166123ca6119a0565b73ffffffffffffffffffffffffffffffffffffffff1614612420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241790614d7f565b60405180910390fd5b565b61242a612b2c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612488576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161247f90614e11565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036124f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ee90614e7d565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600a60008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000816125c2612801565b111580156125d1575060005482105b801561260f575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b6000731e0049783f008a0085193e00003d00cd54003c7173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000601360009054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa6126b5573d6000803e3d6000fd5b6000603a5250565b60006126c8826115cf565b90508073ffffffffffffffffffffffffffffffffffffffff166126e96132fc565b73ffffffffffffffffffffffffffffffffffffffff161461274c57612715816127106132fc565b6120d9565b61274b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006001905090565b600061281582612e2b565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461287c576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061288884613304565b9150915061289e81876128996132fc565b61332b565b6128ea576128b3866128ae6132fc565b6120d9565b6128e9576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612950576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61295d868686600161336f565b801561296857600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612a3685612a12888887613375565b7c02000000000000000000000000000000000000000000000000000000001761339d565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612abc5760006001850190506000600460008381526020019081526020016000205403612aba576000548114612ab9578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b2486868660016133c8565b505050505050565b6000612710905090565b600260085403612b7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7290614ee9565b60405180910390fd5b6002600881905550565b6000612b8f612801565b60005403905090565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b60008054905060008203612c2f576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612c3c600084838561336f565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612cb383612ca46000866000613375565b612cad856133ce565b1761339d565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612d5457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612d19565b5060008203612d8f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050612da560008483856133c8565b505050565b6001600881905550565b600081604051602001612dc79190614f76565b604051602081830303815290604052805190602001209050919050565b6000806000612df385856133de565b91509150612e008161342f565b819250505092915050565b612e2683838360405180602001604052806000815250611d3c565b505050565b60008082905080612e3a612801565b11612ec057600054811015612ebf5760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612ebd575b60008103612eb3576004600083600190039350838152602001908152602001600020549050612e89565b8092505050612ef2565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612fc5613920565b612fe16004600084815260200190815260200160002054613595565b9050919050565b60008054905090565b8060076000612ffe6132fc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166130ab6132fc565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516130f09190613a23565b60405180910390a35050565b613107848484610c96565b60008373ffffffffffffffffffffffffffffffffffffffff163b14613169576131328484848461364b565b613168576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b613177613920565b61318861318383612e2b565b613595565b9050919050565b60606012805461319e9061472c565b80601f01602080910402602001604051908101604052809291908181526020018280546131ca9061472c565b80156132175780601f106131ec57610100808354040283529160200191613217565b820191906000526020600020905b8154815290600101906020018083116131fa57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b60011561325c57600184039350600a81066030018453600a810490508061323a575b50828103602084039350808452505050919050565b60008261327f86868561379b565b149050949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e861338c8686846137f3565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b600080604183510361341f5760008060006020860151925060408601519150606086015160001a9050613413878285856137fc565b94509450505050613428565b60006002915091505b9250929050565b600060048111156134435761344261482e565b5b8160048111156134565761345561482e565b5b031561359257600160048111156134705761346f61482e565b5b8160048111156134835761348261482e565b5b036134c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134ba90614fe8565b60405180910390fd5b600260048111156134d7576134d661482e565b5b8160048111156134ea576134e961482e565b5b0361352a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161352190615054565b60405180910390fd5b6003600481111561353e5761353d61482e565b5b8160048111156135515761355061482e565b5b03613591576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613588906150e6565b60405180910390fd5b5b50565b61359d613920565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026136716132fc565b8786866040518563ffffffff1660e01b8152600401613693949392919061515b565b6020604051808303816000875af19250505080156136cf57506040513d601f19601f820116820180604052508101906136cc91906151bc565b60015b613748573d80600081146136ff576040519150601f19603f3d011682016040523d82523d6000602084013e613704565b606091505b506000815103613740576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60008082905060005b858590508110156137e7576137d2828787848181106137c6576137c5614c12565b5b905060200201356138de565b915080806137df906151e9565b9150506137a4565b50809150509392505050565b60009392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156138375760006003915091506138d5565b60006001878787876040516000815260200160405260405161385c9493929190615240565b6020604051602081039080840390855afa15801561387e573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036138cc576000600192509250506138d5565b80600092509250505b94509492505050565b60008183106138f6576138f18284613909565b613901565b6139008383613909565b5b905092915050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6139b881613983565b81146139c357600080fd5b50565b6000813590506139d5816139af565b92915050565b6000602082840312156139f1576139f0613979565b5b60006139ff848285016139c6565b91505092915050565b60008115159050919050565b613a1d81613a08565b82525050565b6000602082019050613a386000830184613a14565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613a6982613a3e565b9050919050565b613a7981613a5e565b8114613a8457600080fd5b50565b600081359050613a9681613a70565b92915050565b60006bffffffffffffffffffffffff82169050919050565b613abd81613a9c565b8114613ac857600080fd5b50565b600081359050613ada81613ab4565b92915050565b60008060408385031215613af757613af6613979565b5b6000613b0585828601613a87565b9250506020613b1685828601613acb565b9150509250929050565b600060ff82169050919050565b613b3681613b20565b82525050565b6000602082019050613b516000830184613b2d565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613b91578082015181840152602081019050613b76565b60008484015250505050565b6000601f19601f8301169050919050565b6000613bb982613b57565b613bc38185613b62565b9350613bd3818560208601613b73565b613bdc81613b9d565b840191505092915050565b60006020820190508181036000830152613c018184613bae565b905092915050565b6000819050919050565b613c1c81613c09565b8114613c2757600080fd5b50565b600081359050613c3981613c13565b92915050565b600060208284031215613c5557613c54613979565b5b6000613c6384828501613c2a565b91505092915050565b613c7581613a5e565b82525050565b6000602082019050613c906000830184613c6c565b92915050565b60008060408385031215613cad57613cac613979565b5b6000613cbb85828601613a87565b9250506020613ccc85828601613c2a565b9150509250929050565b613cdf81613c09565b82525050565b6000602082019050613cfa6000830184613cd6565b92915050565b600060208284031215613d1657613d15613979565b5b6000613d2484828501613a87565b91505092915050565b600080600060608486031215613d4657613d45613979565b5b6000613d5486828701613a87565b9350506020613d6586828701613a87565b9250506040613d7686828701613c2a565b9150509250925092565b60008060408385031215613d9757613d96613979565b5b6000613da585828601613c2a565b9250506020613db685828601613c2a565b9150509250929050565b6000604082019050613dd56000830185613c6c565b613de26020830184613cd6565b9392505050565b600080fd5b600080fd5b600080fd5b60008083601f840112613e0e57613e0d613de9565b5b8235905067ffffffffffffffff811115613e2b57613e2a613dee565b5b602083019150836001820283011115613e4757613e46613df3565b5b9250929050565b600080600060408486031215613e6757613e66613979565b5b600084013567ffffffffffffffff811115613e8557613e8461397e565b5b613e9186828701613df8565b93509350506020613ea486828701613c2a565b9150509250925092565b6000613eb982613a3e565b9050919050565b613ec981613eae565b82525050565b6000602082019050613ee46000830184613ec0565b92915050565b60008083601f840112613f0057613eff613de9565b5b8235905067ffffffffffffffff811115613f1d57613f1c613dee565b5b602083019150836001820283011115613f3957613f38613df3565b5b9250929050565b60008060208385031215613f5757613f56613979565b5b600083013567ffffffffffffffff811115613f7557613f7461397e565b5b613f8185828601613eea565b92509250509250929050565b60008083601f840112613fa357613fa2613de9565b5b8235905067ffffffffffffffff811115613fc057613fbf613dee565b5b602083019150836020820283011115613fdc57613fdb613df3565b5b9250929050565b60008060208385031215613ffa57613ff9613979565b5b600083013567ffffffffffffffff8111156140185761401761397e565b5b61402485828601613f8d565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61406581613a5e565b82525050565b600067ffffffffffffffff82169050919050565b6140888161406b565b82525050565b61409781613a08565b82525050565b600062ffffff82169050919050565b6140b58161409d565b82525050565b6080820160008201516140d1600085018261405c565b5060208201516140e4602085018261407f565b5060408201516140f7604085018261408e565b50606082015161410a60608501826140ac565b50505050565b600061411c83836140bb565b60808301905092915050565b6000602082019050919050565b600061414082614030565b61414a818561403b565b93506141558361404c565b8060005b8381101561418657815161416d8882614110565b975061417883614128565b925050600181019050614159565b5085935050505092915050565b600060208201905081810360008301526141ad8184614135565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6141ea81613c09565b82525050565b60006141fc83836141e1565b60208301905092915050565b6000602082019050919050565b6000614220826141b5565b61422a81856141c0565b9350614235836141d1565b8060005b8381101561426657815161424d88826141f0565b975061425883614208565b925050600181019050614239565b5085935050505092915050565b6000602082019050818103600083015261428d8184614215565b905092915050565b6000806000606084860312156142ae576142ad613979565b5b60006142bc86828701613a87565b93505060206142cd86828701613c2a565b92505060406142de86828701613c2a565b9150509250925092565b6142f181613a08565b81146142fc57600080fd5b50565b60008135905061430e816142e8565b92915050565b6000806040838503121561432b5761432a613979565b5b600061433985828601613a87565b925050602061434a858286016142ff565b9150509250929050565b6000819050919050565b61436781614354565b811461437257600080fd5b50565b6000813590506143848161435e565b92915050565b6000602082840312156143a05761439f613979565b5b60006143ae84828501614375565b91505092915050565b6000602082840312156143cd576143cc613979565b5b60006143db848285016142ff565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61442182613b9d565b810181811067ffffffffffffffff821117156144405761443f6143e9565b5b80604052505050565b600061445361396f565b905061445f8282614418565b919050565b600067ffffffffffffffff82111561447f5761447e6143e9565b5b61448882613b9d565b9050602081019050919050565b82818337600083830152505050565b60006144b76144b284614464565b614449565b9050828152602081018484840111156144d3576144d26143e4565b5b6144de848285614495565b509392505050565b600082601f8301126144fb576144fa613de9565b5b813561450b8482602086016144a4565b91505092915050565b6000806000806080858703121561452e5761452d613979565b5b600061453c87828801613a87565b945050602061454d87828801613a87565b935050604061455e87828801613c2a565b925050606085013567ffffffffffffffff81111561457f5761457e61397e565b5b61458b878288016144e6565b91505092959194509250565b6080820160008201516145ad600085018261405c565b5060208201516145c0602085018261407f565b5060408201516145d3604085018261408e565b5060608201516145e660608501826140ac565b50505050565b60006080820190506146016000830184614597565b92915050565b60008083601f84011261461d5761461c613de9565b5b8235905067ffffffffffffffff81111561463a57614639613dee565b5b60208301915083602082028301111561465657614655613df3565b5b9250929050565b60008060006040848603121561467657614675613979565b5b600084013567ffffffffffffffff8111156146945761469361397e565b5b6146a086828701614607565b935093505060206146b386828701613c2a565b9150509250925092565b600080604083850312156146d4576146d3613979565b5b60006146e285828601613a87565b92505060206146f385828601613a87565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061474457607f821691505b602082108103614757576147566146fd565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061479782613c09565b91506147a283613c09565b92508282026147b081613c09565b915082820484148315176147c7576147c661475d565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061480882613c09565b915061481383613c09565b925082614823576148226147ce565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600061486882613c09565b915061487383613c09565b925082820190508082111561488b5761488a61475d565b5b92915050565b60008160601b9050919050565b60006148a982614891565b9050919050565b60006148bb8261489e565b9050919050565b6148d36148ce82613a5e565b6148b0565b82525050565b60006148e582846148c2565b60148201915081905092915050565b600081905092915050565b50565b600061490f6000836148f4565b915061491a826148ff565b600082019050919050565b600061493082614902565b9150819050919050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026149a77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261496a565b6149b1868361496a565b95508019841693508086168417925050509392505050565b6000819050919050565b60006149ee6149e96149e484613c09565b6149c9565b613c09565b9050919050565b6000819050919050565b614a08836149d3565b614a1c614a14826149f5565b848454614977565b825550505050565b600090565b614a31614a24565b614a3c8184846149ff565b505050565b5b81811015614a6057614a55600082614a29565b600181019050614a42565b5050565b601f821115614aa557614a7681614945565b614a7f8461495a565b81016020851015614a8e578190505b614aa2614a9a8561495a565b830182614a41565b50505b505050565b600082821c905092915050565b6000614ac860001984600802614aaa565b1980831691505092915050565b6000614ae18383614ab7565b9150826002028217905092915050565b614afb838361493a565b67ffffffffffffffff811115614b1457614b136143e9565b5b614b1e825461472c565b614b29828285614a64565b6000601f831160018114614b585760008415614b46578287013590505b614b508582614ad5565b865550614bb8565b601f198416614b6686614945565b60005b82811015614b8e57848901358255600182019150602085019450602081019050614b69565b86831015614bab5784890135614ba7601f891682614ab7565b8355505b6001600288020188555050505b50505050505050565b6000614bcd8385613b62565b9350614bda838584614495565b614be383613b9d565b840190509392505050565b60006020820190508181036000830152614c09818486614bc1565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b6000614c5782613b57565b614c618185614c41565b9350614c71818560208601613b73565b80840191505092915050565b6000614c898285614c4c565b9150614c958284614c4c565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614cfd602683613b62565b9150614d0882614ca1565b604082019050919050565b60006020820190508181036000830152614d2c81614cf0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614d69602083613b62565b9150614d7482614d33565b602082019050919050565b60006020820190508181036000830152614d9881614d5c565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614dfb602a83613b62565b9150614e0682614d9f565b604082019050919050565b60006020820190508181036000830152614e2a81614dee565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614e67601983613b62565b9150614e7282614e31565b602082019050919050565b60006020820190508181036000830152614e9681614e5a565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614ed3601f83613b62565b9150614ede82614e9d565b602082019050919050565b60006020820190508181036000830152614f0281614ec6565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614f3f601c83614c41565b9150614f4a82614f09565b601c82019050919050565b6000819050919050565b614f70614f6b82614354565b614f55565b82525050565b6000614f8182614f32565b9150614f8d8284614f5f565b60208201915081905092915050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614fd2601883613b62565b9150614fdd82614f9c565b602082019050919050565b6000602082019050818103600083015261500181614fc5565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061503e601f83613b62565b915061504982615008565b602082019050919050565b6000602082019050818103600083015261506d81615031565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b60006150d0602283613b62565b91506150db82615074565b604082019050919050565b600060208201905081810360008301526150ff816150c3565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061512d82615106565b6151378185615111565b9350615147818560208601613b73565b61515081613b9d565b840191505092915050565b60006080820190506151706000830187613c6c565b61517d6020830186613c6c565b61518a6040830185613cd6565b818103606083015261519c8184615122565b905095945050505050565b6000815190506151b6816139af565b92915050565b6000602082840312156151d2576151d1613979565b5b60006151e0848285016151a7565b91505092915050565b60006151f482613c09565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036152265761522561475d565b5b600182019050919050565b61523a81614354565b82525050565b60006080820190506152556000830187615231565b6152626020830186613b2d565b61526f6040830185615231565b61527c6060830184615231565b9594505050505056fea2646970667358221220f617276a5e63b70017bc539fee8befa5e990875a8291383dedde19f45e659e8664736f6c63430008120033

Deployed Bytecode

0x6080604052600436106102675760003560e01c8063715018a611610144578063b7c0b8e8116100b6578063e6138f101161007a578063e6138f1014610901578063e985e9c51461091d578063f2fde38b1461095a578063f4a0a52814610983578063f72ba0fb146109ac578063fb796e6c146109d557610267565b8063b7c0b8e814610817578063b88d4fde14610840578063c002d23d1461085c578063c23dc68f14610887578063c87b56dd146108c457610267565b806395d89b411161010857806395d89b411461070957806399a2557a146107345780639dfbcde814610771578063a22cb4651461079c578063a7d662a6146107c5578063ac568e84146107ee57610267565b8063715018a6146106245780637d3e1ee41461063b5780638462151c146106645780638a59a7fd146106a15780638da5cb5b146106de57610267565b80632db11544116101dd57806342842e0e116101a157806342842e0e146104ff578063484b973c1461051b57806355f804b3146105445780635bbb21771461056d5780636352211e146105aa57806370a08231146105e757610267565b80632db115441461045a57806332cb6b0c14610476578063393abd8c146104a15780633ccfd60b146104bd5780633e1e9ce7146104d457610267565b8063095ea7b31161022f578063095ea7b3146103655780630f2cdd6c1461038157806318160ddd146103ac5780631dca03f3146103d757806323b872dd146104005780632a55205a1461041c57610267565b806301ffc9a71461026c57806304634d8d146102a9578063055ad42e146102d257806306fdde03146102fd578063081812fc14610328575b600080fd5b34801561027857600080fd5b50610293600480360381019061028e91906139db565b610a00565b6040516102a09190613a23565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190613ae0565b610a22565b005b3480156102de57600080fd5b506102e7610a38565b6040516102f49190613b3c565b60405180910390f35b34801561030957600080fd5b50610312610a4b565b60405161031f9190613be7565b60405180910390f35b34801561033457600080fd5b5061034f600480360381019061034a9190613c3f565b610add565b60405161035c9190613c7b565b60405180910390f35b61037f600480360381019061037a9190613c96565b610b5c565b005b34801561038d57600080fd5b50610396610b91565b6040516103a39190613ce5565b60405180910390f35b3480156103b857600080fd5b506103c1610b96565b6040516103ce9190613ce5565b60405180910390f35b3480156103e357600080fd5b506103fe60048036038101906103f99190613d00565b610bad565b005b61041a60048036038101906104159190613d2d565b610c96565b005b34801561042857600080fd5b50610443600480360381019061043e9190613d80565b610d01565b604051610451929190613dc0565b60405180910390f35b610474600480360381019061046f9190613c3f565b610eeb565b005b34801561048257600080fd5b5061048b611053565b6040516104989190613ce5565b60405180910390f35b6104bb60048036038101906104b69190613e4e565b611059565b005b3480156104c957600080fd5b506104d26112d8565b005b3480156104e057600080fd5b506104e96113be565b6040516104f69190613ecf565b60405180910390f35b61051960048036038101906105149190613d2d565b6113e4565b005b34801561052757600080fd5b50610542600480360381019061053d9190613c96565b61144f565b005b34801561055057600080fd5b5061056b60048036038101906105669190613f40565b6114b5565b005b34801561057957600080fd5b50610594600480360381019061058f9190613fe3565b61150c565b6040516105a19190614193565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190613c3f565b6115cf565b6040516105de9190613c7b565b60405180910390f35b3480156105f357600080fd5b5061060e60048036038101906106099190613d00565b6115e1565b60405161061b9190613ce5565b60405180910390f35b34801561063057600080fd5b50610639611699565b005b34801561064757600080fd5b50610662600480360381019061065d9190613c3f565b6116ad565b005b34801561067057600080fd5b5061068b60048036038101906106869190613d00565b61184b565b6040516106989190614273565b60405180910390f35b3480156106ad57600080fd5b506106c860048036038101906106c39190613d00565b61198e565b6040516106d59190613ce5565b60405180910390f35b3480156106ea57600080fd5b506106f36119a0565b6040516107009190613c7b565b60405180910390f35b34801561071557600080fd5b5061071e6119ca565b60405161072b9190613be7565b60405180910390f35b34801561074057600080fd5b5061075b60048036038101906107569190614295565b611a5c565b6040516107689190614273565b60405180910390f35b34801561077d57600080fd5b50610786611c68565b6040516107939190613ce5565b60405180910390f35b3480156107a857600080fd5b506107c360048036038101906107be9190614314565b611c6e565b005b3480156107d157600080fd5b506107ec60048036038101906107e7919061438a565b611ca3565b005b3480156107fa57600080fd5b5061081560048036038101906108109190613c3f565b611cb5565b005b34801561082357600080fd5b5061083e600480360381019061083991906143b7565b611d17565b005b61085a60048036038101906108559190614514565b611d3c565b005b34801561086857600080fd5b50610871611da9565b60405161087e9190613ce5565b60405180910390f35b34801561089357600080fd5b506108ae60048036038101906108a99190613c3f565b611daf565b6040516108bb91906145ec565b60405180910390f35b3480156108d057600080fd5b506108eb60048036038101906108e69190613c3f565b611e19565b6040516108f89190613be7565b60405180910390f35b61091b6004803603810190610916919061465d565b611eb7565b005b34801561092957600080fd5b50610944600480360381019061093f91906146bd565b6120d9565b6040516109519190613a23565b60405180910390f35b34801561096657600080fd5b50610981600480360381019061097c9190613d00565b61216d565b005b34801561098f57600080fd5b506109aa60048036038101906109a59190613c3f565b6121f0565b005b3480156109b857600080fd5b506109d360048036038101906109ce9190613d00565b612239565b005b3480156109e157600080fd5b506109ea612285565b6040516109f79190613a23565b60405180910390f35b6000610a0b82612298565b80610a1b5750610a1a8261232a565b5b9050919050565b610a2a6123a4565b610a348282612422565b5050565b600e60009054906101000a900460ff1681565b606060028054610a5a9061472c565b80601f0160208091040260200160405190810160405280929190818152602001828054610a869061472c565b8015610ad35780601f10610aa857610100808354040283529160200191610ad3565b820191906000526020600020905b815481529060010190602001808311610ab657829003601f168201915b5050505050905090565b6000610ae8826125b7565b610b1e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610b6681612616565b610b8257610b72612662565b15610b8157610b8081612679565b5b5b610b8c83836126bd565b505050565b600281565b6000610ba0612801565b6001546000540303905090565b610bb56123a4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c1b576040517fe622e04000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fea4a1adab5bbb5eba55c738276b66261787bf27c739a13263de78110c3db457d81604051610c8b9190613c7b565b60405180910390a150565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cf057610cd333612616565b610cef57610cdf612662565b15610cee57610ced33612679565b5b5b5b610cfb84848461280a565b50505050565b6000806000600b60008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610e9657600a6040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610ea0612b2c565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610ecc919061478c565b610ed691906147fd565b90508160000151819350935050509250929050565b610ef3612b36565b6003600e60009054906101000a900460ff1660ff16816004811115610f1b57610f1a61482e565b5b60ff1614610f55576040517ff47e7f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8180600c54610f64919061478c565b3414610f9c576040517f22790dad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600d5481610fa9612b85565b610fb3919061485d565b1115610feb576040517f7f70f90b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600281610ff833612b98565b611002919061485d565b111561103a576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110443386612bef565b50505050611050612daa565b50565b611e6181565b611061612b36565b6002600e60009054906101000a900460ff1660ff168160048111156110895761108861482e565b5b60ff16146110c3576040517ff47e7f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383600061114c83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061113e3360405160200161112391906148d9565b60405160208183030381529060405280519060200120612db4565b612de490919063ffffffff16565b9050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111d5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8480600c546111e4919061478c565b341461121c576040517f22790dad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85600d5481611229612b85565b611233919061485d565b111561126b576040517f7f70f90b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8660028161127833612b98565b611282919061485d565b11156112ba576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112c43389612bef565b505050505050506112d3612daa565b505050565b6112e06123a4565b6112e8612b36565b60004790506000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260405161133590614925565b60006040518083038185875af1925050503d8060008114611372576040519150601f19603f3d011682016040523d82523d6000602084013e611377565b606091505b50509050806113b2576040517f07246cf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50506113bc612daa565b565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461143e5761142133612616565b61143d5761142d612662565b1561143c5761143b33612679565b5b5b5b611449848484612e0b565b50505050565b6114576123a4565b80611e6181611464612b85565b61146e919061485d565b11156114a6576040517fc30436e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114b08383612bef565b505050565b6114bd6123a4565b8181601291826114ce929190614af1565b507f157d450c8fb1377294d9db75af1de2753efc52d8e5578551d70d2c7d9cd74df98282604051611500929190614bee565b60405180910390a15050565b6060600083839050905060008167ffffffffffffffff811115611532576115316143e9565b5b60405190808252806020026020018201604052801561156b57816020015b611558613920565b8152602001906001900390816115505790505b50905060005b8281146115c35761159a86868381811061158e5761158d614c12565b5b90506020020135611daf565b8282815181106115ad576115ac614c12565b5b6020026020010181905250806001019050611571565b50809250505092915050565b60006115da82612e2b565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611648576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6116a16123a4565b6116ab6000612ef7565b565b6116b56123a4565b600081036116f057600060048111156116d1576116d061482e565b5b600e60006101000a81548160ff021916908360ff160217905550611811565b6001810361172b576001600481111561170c5761170b61482e565b5b600e60006101000a81548160ff021916908360ff160217905550611810565b6002810361176657600260048111156117475761174661482e565b5b600e60006101000a81548160ff021916908360ff16021790555061180f565b600381036117a157600360048111156117825761178161482e565b5b600e60006101000a81548160ff021916908360ff16021790555061180e565b600481036117db576004808111156117bc576117bb61482e565b5b600e60006101000a81548160ff021916908360ff16021790555061180d565b6040517f9a36fd9c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5b5b7ff7a3839f4ad602cc143b15c40b7472dbcd4698549da972fc31005c000dd524e4816040516118409190613ce5565b60405180910390a150565b6060600080600061185b856115e1565b905060008167ffffffffffffffff811115611879576118786143e9565b5b6040519080825280602002602001820160405280156118a75781602001602082028036833780820191505090505b5090506118b2613920565b60006118bc612801565b90505b838614611980576118cf81612fbd565b9150816040015161197557600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461191a57816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611974578083878060010198508151811061196757611966614c12565b5b6020026020010181815250505b5b8060010190506118bf565b508195505050505050919050565b600061199982612b98565b9050919050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546119d99061472c565b80601f0160208091040260200160405190810160405280929190818152602001828054611a059061472c565b8015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b5050505050905090565b6060818310611a97576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611aa2612fe8565b9050611aac612801565b851015611abe57611abb612801565b94505b80841115611aca578093505b6000611ad5876115e1565b905084861015611af8576000868603905081811015611af2578091505b50611afd565b600090505b60008167ffffffffffffffff811115611b1957611b186143e9565b5b604051908082528060200260200182016040528015611b475781602001602082028036833780820191505090505b50905060008203611b5e5780945050505050611c61565b6000611b6988611daf565b905060008160400151611b7e57816000015190505b60008990505b888114158015611b945750848714155b15611c5357611ba281612fbd565b92508260400151611c4857600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611bed57826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c475780848880600101995081518110611c3a57611c39614c12565b5b6020026020010181815250505b5b806001019050611b84565b508583528296505050505050505b9392505050565b600d5481565b81611c7881612616565b611c9457611c84612662565b15611c9357611c9281612679565b5b5b611c9e8383612ff1565b505050565b611cab6123a4565b80600f8190555050565b611cbd6123a4565b80611e6181611cca612b85565b611cd4919061485d565b1115611d0c576040517fc30436e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600d819055505050565b611d1f6123a4565b80601360006101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d9657611d7933612616565b611d9557611d85612662565b15611d9457611d9333612679565b5b5b5b611da2858585856130fc565b5050505050565b600c5481565b611db7613920565b611dbf613920565b611dc7612801565b831080611ddb5750611dd7612fe8565b8310155b15611de95780915050611e14565b611df283612fbd565b9050806040015115611e075780915050611e14565b611e108361316f565b9150505b919050565b6060611e24826125b7565b611e5a576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e6461318f565b90506000815103611e845760405180602001604052806000815250611eaf565b80611e8e84613221565b604051602001611e9f929190614c7d565b6040516020818303038152906040525b915050919050565b611ebf612b36565b6001600e60009054906101000a900460ff1660ff16816004811115611ee757611ee661482e565b5b60ff1614611f21576040517ff47e7f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383600f54600033604051602001611f3991906148d9565b604051602081830303815290604052805190602001209050611f5d84848484613271565b611f93576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8580600c54611fa2919061478c565b3414611fda576040517f22790dad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b86600d5481611fe7612b85565b611ff1919061485d565b1115612029576040517f7f70f90b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8760028161203633612b98565b612040919061485d565b1115612078576040517fc0e54d7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061208333612b98565b146120ba576040517f9954466400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6120c4338a612bef565b50505050505050506120d4612daa565b505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6121756123a4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121db90614d13565b60405180910390fd5b6121ed81612ef7565b50565b6121f86123a4565b80600c819055507f0f6e30cbea7cb67e47bd9d9c28efec570b560826aef4cf586a3b52a2e45396d18160405161222e9190613ce5565b60405180910390a150565b6122416123a4565b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601360009054906101000a900460ff1681565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806122f357506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806123235750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061239d575061239c8261328a565b5b9050919050565b6123ac6132f4565b73ffffffffffffffffffffffffffffffffffffffff166123ca6119a0565b73ffffffffffffffffffffffffffffffffffffffff1614612420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241790614d7f565b60405180910390fd5b565b61242a612b2c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612488576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161247f90614e11565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036124f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ee90614e7d565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600a60008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000816125c2612801565b111580156125d1575060005482105b801561260f575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b6000731e0049783f008a0085193e00003d00cd54003c7173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000601360009054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa6126b5573d6000803e3d6000fd5b6000603a5250565b60006126c8826115cf565b90508073ffffffffffffffffffffffffffffffffffffffff166126e96132fc565b73ffffffffffffffffffffffffffffffffffffffff161461274c57612715816127106132fc565b6120d9565b61274b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006001905090565b600061281582612e2b565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461287c576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061288884613304565b9150915061289e81876128996132fc565b61332b565b6128ea576128b3866128ae6132fc565b6120d9565b6128e9576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612950576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61295d868686600161336f565b801561296857600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612a3685612a12888887613375565b7c02000000000000000000000000000000000000000000000000000000001761339d565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612abc5760006001850190506000600460008381526020019081526020016000205403612aba576000548114612ab9578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b2486868660016133c8565b505050505050565b6000612710905090565b600260085403612b7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7290614ee9565b60405180910390fd5b6002600881905550565b6000612b8f612801565b60005403905090565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b60008054905060008203612c2f576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612c3c600084838561336f565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612cb383612ca46000866000613375565b612cad856133ce565b1761339d565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612d5457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612d19565b5060008203612d8f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050612da560008483856133c8565b505050565b6001600881905550565b600081604051602001612dc79190614f76565b604051602081830303815290604052805190602001209050919050565b6000806000612df385856133de565b91509150612e008161342f565b819250505092915050565b612e2683838360405180602001604052806000815250611d3c565b505050565b60008082905080612e3a612801565b11612ec057600054811015612ebf5760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612ebd575b60008103612eb3576004600083600190039350838152602001908152602001600020549050612e89565b8092505050612ef2565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612fc5613920565b612fe16004600084815260200190815260200160002054613595565b9050919050565b60008054905090565b8060076000612ffe6132fc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166130ab6132fc565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516130f09190613a23565b60405180910390a35050565b613107848484610c96565b60008373ffffffffffffffffffffffffffffffffffffffff163b14613169576131328484848461364b565b613168576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b613177613920565b61318861318383612e2b565b613595565b9050919050565b60606012805461319e9061472c565b80601f01602080910402602001604051908101604052809291908181526020018280546131ca9061472c565b80156132175780601f106131ec57610100808354040283529160200191613217565b820191906000526020600020905b8154815290600101906020018083116131fa57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b60011561325c57600184039350600a81066030018453600a810490508061323a575b50828103602084039350808452505050919050565b60008261327f86868561379b565b149050949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e861338c8686846137f3565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b600080604183510361341f5760008060006020860151925060408601519150606086015160001a9050613413878285856137fc565b94509450505050613428565b60006002915091505b9250929050565b600060048111156134435761344261482e565b5b8160048111156134565761345561482e565b5b031561359257600160048111156134705761346f61482e565b5b8160048111156134835761348261482e565b5b036134c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134ba90614fe8565b60405180910390fd5b600260048111156134d7576134d661482e565b5b8160048111156134ea576134e961482e565b5b0361352a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161352190615054565b60405180910390fd5b6003600481111561353e5761353d61482e565b5b8160048111156135515761355061482e565b5b03613591576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613588906150e6565b60405180910390fd5b5b50565b61359d613920565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026136716132fc565b8786866040518563ffffffff1660e01b8152600401613693949392919061515b565b6020604051808303816000875af19250505080156136cf57506040513d601f19601f820116820180604052508101906136cc91906151bc565b60015b613748573d80600081146136ff576040519150601f19603f3d011682016040523d82523d6000602084013e613704565b606091505b506000815103613740576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60008082905060005b858590508110156137e7576137d2828787848181106137c6576137c5614c12565b5b905060200201356138de565b915080806137df906151e9565b9150506137a4565b50809150509392505050565b60009392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156138375760006003915091506138d5565b60006001878787876040516000815260200160405260405161385c9493929190615240565b6020604051602081039080840390855afa15801561387e573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036138cc576000600192509250506138d5565b80600092509250505b94509492505050565b60008183106138f6576138f18284613909565b613901565b6139008383613909565b5b905092915050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6139b881613983565b81146139c357600080fd5b50565b6000813590506139d5816139af565b92915050565b6000602082840312156139f1576139f0613979565b5b60006139ff848285016139c6565b91505092915050565b60008115159050919050565b613a1d81613a08565b82525050565b6000602082019050613a386000830184613a14565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613a6982613a3e565b9050919050565b613a7981613a5e565b8114613a8457600080fd5b50565b600081359050613a9681613a70565b92915050565b60006bffffffffffffffffffffffff82169050919050565b613abd81613a9c565b8114613ac857600080fd5b50565b600081359050613ada81613ab4565b92915050565b60008060408385031215613af757613af6613979565b5b6000613b0585828601613a87565b9250506020613b1685828601613acb565b9150509250929050565b600060ff82169050919050565b613b3681613b20565b82525050565b6000602082019050613b516000830184613b2d565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613b91578082015181840152602081019050613b76565b60008484015250505050565b6000601f19601f8301169050919050565b6000613bb982613b57565b613bc38185613b62565b9350613bd3818560208601613b73565b613bdc81613b9d565b840191505092915050565b60006020820190508181036000830152613c018184613bae565b905092915050565b6000819050919050565b613c1c81613c09565b8114613c2757600080fd5b50565b600081359050613c3981613c13565b92915050565b600060208284031215613c5557613c54613979565b5b6000613c6384828501613c2a565b91505092915050565b613c7581613a5e565b82525050565b6000602082019050613c906000830184613c6c565b92915050565b60008060408385031215613cad57613cac613979565b5b6000613cbb85828601613a87565b9250506020613ccc85828601613c2a565b9150509250929050565b613cdf81613c09565b82525050565b6000602082019050613cfa6000830184613cd6565b92915050565b600060208284031215613d1657613d15613979565b5b6000613d2484828501613a87565b91505092915050565b600080600060608486031215613d4657613d45613979565b5b6000613d5486828701613a87565b9350506020613d6586828701613a87565b9250506040613d7686828701613c2a565b9150509250925092565b60008060408385031215613d9757613d96613979565b5b6000613da585828601613c2a565b9250506020613db685828601613c2a565b9150509250929050565b6000604082019050613dd56000830185613c6c565b613de26020830184613cd6565b9392505050565b600080fd5b600080fd5b600080fd5b60008083601f840112613e0e57613e0d613de9565b5b8235905067ffffffffffffffff811115613e2b57613e2a613dee565b5b602083019150836001820283011115613e4757613e46613df3565b5b9250929050565b600080600060408486031215613e6757613e66613979565b5b600084013567ffffffffffffffff811115613e8557613e8461397e565b5b613e9186828701613df8565b93509350506020613ea486828701613c2a565b9150509250925092565b6000613eb982613a3e565b9050919050565b613ec981613eae565b82525050565b6000602082019050613ee46000830184613ec0565b92915050565b60008083601f840112613f0057613eff613de9565b5b8235905067ffffffffffffffff811115613f1d57613f1c613dee565b5b602083019150836001820283011115613f3957613f38613df3565b5b9250929050565b60008060208385031215613f5757613f56613979565b5b600083013567ffffffffffffffff811115613f7557613f7461397e565b5b613f8185828601613eea565b92509250509250929050565b60008083601f840112613fa357613fa2613de9565b5b8235905067ffffffffffffffff811115613fc057613fbf613dee565b5b602083019150836020820283011115613fdc57613fdb613df3565b5b9250929050565b60008060208385031215613ffa57613ff9613979565b5b600083013567ffffffffffffffff8111156140185761401761397e565b5b61402485828601613f8d565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61406581613a5e565b82525050565b600067ffffffffffffffff82169050919050565b6140888161406b565b82525050565b61409781613a08565b82525050565b600062ffffff82169050919050565b6140b58161409d565b82525050565b6080820160008201516140d1600085018261405c565b5060208201516140e4602085018261407f565b5060408201516140f7604085018261408e565b50606082015161410a60608501826140ac565b50505050565b600061411c83836140bb565b60808301905092915050565b6000602082019050919050565b600061414082614030565b61414a818561403b565b93506141558361404c565b8060005b8381101561418657815161416d8882614110565b975061417883614128565b925050600181019050614159565b5085935050505092915050565b600060208201905081810360008301526141ad8184614135565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6141ea81613c09565b82525050565b60006141fc83836141e1565b60208301905092915050565b6000602082019050919050565b6000614220826141b5565b61422a81856141c0565b9350614235836141d1565b8060005b8381101561426657815161424d88826141f0565b975061425883614208565b925050600181019050614239565b5085935050505092915050565b6000602082019050818103600083015261428d8184614215565b905092915050565b6000806000606084860312156142ae576142ad613979565b5b60006142bc86828701613a87565b93505060206142cd86828701613c2a565b92505060406142de86828701613c2a565b9150509250925092565b6142f181613a08565b81146142fc57600080fd5b50565b60008135905061430e816142e8565b92915050565b6000806040838503121561432b5761432a613979565b5b600061433985828601613a87565b925050602061434a858286016142ff565b9150509250929050565b6000819050919050565b61436781614354565b811461437257600080fd5b50565b6000813590506143848161435e565b92915050565b6000602082840312156143a05761439f613979565b5b60006143ae84828501614375565b91505092915050565b6000602082840312156143cd576143cc613979565b5b60006143db848285016142ff565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61442182613b9d565b810181811067ffffffffffffffff821117156144405761443f6143e9565b5b80604052505050565b600061445361396f565b905061445f8282614418565b919050565b600067ffffffffffffffff82111561447f5761447e6143e9565b5b61448882613b9d565b9050602081019050919050565b82818337600083830152505050565b60006144b76144b284614464565b614449565b9050828152602081018484840111156144d3576144d26143e4565b5b6144de848285614495565b509392505050565b600082601f8301126144fb576144fa613de9565b5b813561450b8482602086016144a4565b91505092915050565b6000806000806080858703121561452e5761452d613979565b5b600061453c87828801613a87565b945050602061454d87828801613a87565b935050604061455e87828801613c2a565b925050606085013567ffffffffffffffff81111561457f5761457e61397e565b5b61458b878288016144e6565b91505092959194509250565b6080820160008201516145ad600085018261405c565b5060208201516145c0602085018261407f565b5060408201516145d3604085018261408e565b5060608201516145e660608501826140ac565b50505050565b60006080820190506146016000830184614597565b92915050565b60008083601f84011261461d5761461c613de9565b5b8235905067ffffffffffffffff81111561463a57614639613dee565b5b60208301915083602082028301111561465657614655613df3565b5b9250929050565b60008060006040848603121561467657614675613979565b5b600084013567ffffffffffffffff8111156146945761469361397e565b5b6146a086828701614607565b935093505060206146b386828701613c2a565b9150509250925092565b600080604083850312156146d4576146d3613979565b5b60006146e285828601613a87565b92505060206146f385828601613a87565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061474457607f821691505b602082108103614757576147566146fd565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061479782613c09565b91506147a283613c09565b92508282026147b081613c09565b915082820484148315176147c7576147c661475d565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061480882613c09565b915061481383613c09565b925082614823576148226147ce565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600061486882613c09565b915061487383613c09565b925082820190508082111561488b5761488a61475d565b5b92915050565b60008160601b9050919050565b60006148a982614891565b9050919050565b60006148bb8261489e565b9050919050565b6148d36148ce82613a5e565b6148b0565b82525050565b60006148e582846148c2565b60148201915081905092915050565b600081905092915050565b50565b600061490f6000836148f4565b915061491a826148ff565b600082019050919050565b600061493082614902565b9150819050919050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026149a77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261496a565b6149b1868361496a565b95508019841693508086168417925050509392505050565b6000819050919050565b60006149ee6149e96149e484613c09565b6149c9565b613c09565b9050919050565b6000819050919050565b614a08836149d3565b614a1c614a14826149f5565b848454614977565b825550505050565b600090565b614a31614a24565b614a3c8184846149ff565b505050565b5b81811015614a6057614a55600082614a29565b600181019050614a42565b5050565b601f821115614aa557614a7681614945565b614a7f8461495a565b81016020851015614a8e578190505b614aa2614a9a8561495a565b830182614a41565b50505b505050565b600082821c905092915050565b6000614ac860001984600802614aaa565b1980831691505092915050565b6000614ae18383614ab7565b9150826002028217905092915050565b614afb838361493a565b67ffffffffffffffff811115614b1457614b136143e9565b5b614b1e825461472c565b614b29828285614a64565b6000601f831160018114614b585760008415614b46578287013590505b614b508582614ad5565b865550614bb8565b601f198416614b6686614945565b60005b82811015614b8e57848901358255600182019150602085019450602081019050614b69565b86831015614bab5784890135614ba7601f891682614ab7565b8355505b6001600288020188555050505b50505050505050565b6000614bcd8385613b62565b9350614bda838584614495565b614be383613b9d565b840190509392505050565b60006020820190508181036000830152614c09818486614bc1565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b6000614c5782613b57565b614c618185614c41565b9350614c71818560208601613b73565b80840191505092915050565b6000614c898285614c4c565b9150614c958284614c4c565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614cfd602683613b62565b9150614d0882614ca1565b604082019050919050565b60006020820190508181036000830152614d2c81614cf0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614d69602083613b62565b9150614d7482614d33565b602082019050919050565b60006020820190508181036000830152614d9881614d5c565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614dfb602a83613b62565b9150614e0682614d9f565b604082019050919050565b60006020820190508181036000830152614e2a81614dee565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614e67601983613b62565b9150614e7282614e31565b602082019050919050565b60006020820190508181036000830152614e9681614e5a565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614ed3601f83613b62565b9150614ede82614e9d565b602082019050919050565b60006020820190508181036000830152614f0281614ec6565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614f3f601c83614c41565b9150614f4a82614f09565b601c82019050919050565b6000819050919050565b614f70614f6b82614354565b614f55565b82525050565b6000614f8182614f32565b9150614f8d8284614f5f565b60208201915081905092915050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614fd2601883613b62565b9150614fdd82614f9c565b602082019050919050565b6000602082019050818103600083015261500181614fc5565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061503e601f83613b62565b915061504982615008565b602082019050919050565b6000602082019050818103600083015261506d81615031565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b60006150d0602283613b62565b91506150db82615074565b604082019050919050565b600060208201905081810360008301526150ff816150c3565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061512d82615106565b6151378185615111565b9350615147818560208601613b73565b61515081613b9d565b840191505092915050565b60006080820190506151706000830187613c6c565b61517d6020830186613c6c565b61518a6040830185613cd6565b818103606083015261519c8184615122565b905095945050505050565b6000815190506151b6816139af565b92915050565b6000602082840312156151d2576151d1613979565b5b60006151e0848285016151a7565b91505092915050565b60006151f482613c09565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036152265761522561475d565b5b600182019050919050565b61523a81614354565b82525050565b60006080820190506152556000830187615231565b6152626020830186613b2d565b61526f6040830185615231565b61527c6060830184615231565b9594505050505056fea2646970667358221220f617276a5e63b70017bc539fee8befa5e990875a8291383dedde19f45e659e8664736f6c63430008120033

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.