ETH Price: $3,471.31 (+4.12%)

Token

Pikuserushounen (PIKU)
 

Overview

Max Total Supply

5,550 PIKU

Holders

3,269

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
linyu.eth
Balance
1 PIKU
0x00794b7b900165f452e2b02cc191e6b8b6f8f869
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Piku

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

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

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

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

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

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

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

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

    // ==============================
    //            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`.
     *
     * 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 calldata data
    ) external;

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

    /**
     * @dev Transfers `tokenId` token 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;

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

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

// File: erc721a/contracts/ERC721A.sol


// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;


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

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // 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 tokenId of the next token 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`
    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 => address) private _tokenApprovals;

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

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

    /**
     * @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 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 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 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 returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    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: 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.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view 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 auxillary 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 auxillary 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 {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        assembly { // Cast aux without masking.
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    /**
     * 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 ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

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

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    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, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev Casts the address to uint256 without masking.
     */
    function _addressToUint256(address value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev Casts the boolean to uint256 without branching.
     */
    function _boolToUint256(bool value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = address(uint160(_packedOwnershipOf(tokenId)));
        if (to == owner) revert ApprovalToCurrentOwner();

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

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

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @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 (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, 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.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.code.length != 0) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @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.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

        bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
            isApprovedForAll(from, _msgSenderERC721A()) ||
            getApproved(tokenId) == _msgSenderERC721A());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        delete _tokenApprovals[tokenId];

        // 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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

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

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
                isApprovedForAll(from, _msgSenderERC721A()) ||
                getApproved(tokenId) == _msgSenderERC721A());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        delete _tokenApprovals[tokenId];

        // 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] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED | 
                BITMASK_NEXT_INITIALIZED;

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool 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))
                }
            }
        }
    }

    /**
     * @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 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 returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), 
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length, 
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for { 
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp { 
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } { // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }
            
            let length := sub(end, ptr)
            // Move the pointer 32 bytes leftwards to make room for the length.
            ptr := sub(ptr, 32)
            // Store the length.
            mstore(ptr, length)
        }
    }
}

// File: erc721a/contracts/extensions/IERC721AQueryable.sol


// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;


/**
 * @dev Interface of an ERC721AQueryable compliant contract.
 */
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`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    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 pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

// File: erc721a/contracts/extensions/ERC721AQueryable.sol


// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;



/**
 * @title ERC721A Queryable
 * @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`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) public view 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[] memory tokenIds) external view 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 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 pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view 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: @openzeppelin/contracts/utils/Strings.sol


// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// 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: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @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: @openzeppelin/contracts/interfaces/IERC2981.sol


// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;


/**
 * @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: @openzeppelin/contracts/token/common/ERC2981.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;



/**
 * @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:
     *
     * - `tokenId` must be already minted.
     * - `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: @openzeppelin/contracts/utils/Context.sol


// 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: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

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


pragma solidity ^0.8.9;



contract Piku is ERC2981, ERC721AQueryable, Ownable {
    using Address for address payable;
    using Strings for uint256;

    uint256 public _price;
    uint32 public _txLimit;
    uint32 public _maxSupply;
    uint32 public _teamReserved;
    uint32 public _walletLimit;

    bool public _started;
    uint32 public _teamMinted;
    string public _metadataURI = "ipfs://QmYBsjHzvYRJvfL79wyjChqpv37ArUtSTKpS5Vju5JMg1p/";

    struct HelperState {
        uint256 price;
        uint32 txLimit;
        uint32 walletLimit;
        uint32 maxSupply;
        uint32 teamReserved;
        uint32 totalMinted;
        uint32 userMinted;
        bool started;
    }

    constructor() ERC721A("Pikuserushounen", "PIKU") {
        _price = 0.004 ether;
        _maxSupply = 5555;
        _txLimit = 10;
        _walletLimit = 20;
        _teamReserved = 5;

        _setDefaultRoyalty(owner(), 500);
    }

    function setSupply (uint32 amount) external onlyOwner {
        _maxSupply = amount;
    }

    function setPrice (uint256 price) external onlyOwner {
        _price = price;
    }

    function mint(uint32 amount) external payable {
        require(_started, "Sale has not started");
        require(amount + _totalMinted() <= _maxSupply - _teamReserved, "Exceeded max supply");
        require(amount <= _txLimit, "Exceeded transaction limit");

        uint256 minted = _numberMinted(msg.sender);
        if (minted > 0) {
            require(msg.value >= amount * _price, "Insufficient funds");
        } else {
            require(msg.value >= (amount - 1) * _price, "Insufficient funds");
        }

        require(minted + amount <= _walletLimit, "Exceed wallet limit");

        _safeMint(msg.sender, amount);
    }

    function _state(address minter) external view returns (HelperState memory) {
        return
            HelperState({
                price: _price,
                txLimit: _txLimit,
                walletLimit: _walletLimit,
                maxSupply: _maxSupply,
                teamReserved: _teamReserved,
                totalMinted: uint32(ERC721A._totalMinted()),
                userMinted: uint32(_numberMinted(minter)),
                started: _started
            });
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _metadataURI;
        return string(abi.encodePacked(baseURI, tokenId.toString(), ".json"));
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721A) returns (bool) {
        return
            interfaceId == type(IERC2981).interfaceId ||
            interfaceId == type(IERC721A).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function devMint(address to, uint32 amount) external onlyOwner {
        _teamMinted += amount;
        require (_teamMinted <= _teamReserved, "Exceeded max supply");
        _safeMint(to, amount);
    }

    function setFeeNumerator(uint96 feeNumerator) external onlyOwner {
        _setDefaultRoyalty(owner(), feeNumerator);
    }

    function setStarted(bool started) external onlyOwner {
        _started = started;
    }

    function setMetadataURI(string memory uri) external onlyOwner {
        _metadataURI = uri;
    }

    function withdraw() external onlyOwner {
        payable(msg.sender).sendValue(address(this).balance);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","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"},{"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":"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"},{"inputs":[],"name":"_maxSupply","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_metadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"_state","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint32","name":"txLimit","type":"uint32"},{"internalType":"uint32","name":"walletLimit","type":"uint32"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"teamReserved","type":"uint32"},{"internalType":"uint32","name":"totalMinted","type":"uint32"},{"internalType":"uint32","name":"userMinted","type":"uint32"},{"internalType":"bool","name":"started","type":"bool"}],"internalType":"struct Piku.HelperState","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_teamMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_teamReserved","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_txLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_walletLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","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":"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":"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":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"nonpayable","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setFeeNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"started","type":"bool"}],"name":"setStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"setSupply","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e0604052603660808181529062002ce560a03980516200002991600d9160209091019062000265565b503480156200003757600080fd5b506040518060400160405280600f81526020016e2834b5bab9b2b93ab9b437bab732b760891b8152506040518060400160405280600481526020016350494b5560e01b81525081600490805190602001906200009592919062000265565b508051620000ab90600590602084019062000265565b5050600060025550620000be336200010e565b660e35fa931a0000600b55600c80546001600160801b0319166c1400000005000015b30000000a17905562000108620000ff600a546001600160a01b031690565b6101f462000160565b62000348565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620001d45760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b0382166200022c5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001cb565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b82805462000273906200030b565b90600052602060002090601f016020900481019282620002975760008555620002e2565b82601f10620002b257805160ff1916838001178555620002e2565b82800160010185558215620002e2579182015b82811115620002e2578251825591602001919060010190620002c5565b50620002f0929150620002f4565b5090565b5b80821115620002f05760008155600101620002f5565b600181811c908216806200032057607f821691505b602082108114156200034257634e487b7160e01b600052602260045260246000fd5b50919050565b61298d80620003586000396000f3fe6080604052600436106102305760003560e01c806370a082311161012e578063a9cbba99116100ab578063dd48f07d1161006f578063dd48f07d146106d3578063e985e9c5146106f7578063ef6b141a14610717578063f2fde38b14610737578063f4e2ae581461075757600080fd5b8063a9cbba9914610631578063b88d4fde14610651578063c23dc68f14610671578063c87b56dd1461069e578063d4a67623146106be57600080fd5b806391b7f5ed116100f257806391b7f5ed146105a957806395d89b41146105c957806399a2557a146105de578063a22cb465146105fe578063a71bbebe1461061e57600080fd5b806370a0823114610509578063715018a614610529578063750521f51461053e5780638462151c1461055e5780638da5cb5b1461058b57600080fd5b806323b872dd116101bc5780634df8bb45116101805780634df8bb45146104525780635bbb21771461047f5780636352211e146104ac57806363553e7c146104cc578063653a819e146104e957600080fd5b806323b872dd1461039d5780632a55205a146103bd5780633ccfd60b146103fc57806342842e0e146104115780634df22a541461043157600080fd5b80630e2351e2116102035780630e2351e2146102e657806317a5aced1461031f57806318160ddd1461033f57806322f4596f14610362578063235b6ea11461038757600080fd5b806301ffc9a71461023557806306fdde031461026a578063081812fc1461028c578063095ea7b3146102c4575b600080fd5b34801561024157600080fd5b5061025561025036600461213e565b61077b565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b5061027f6107c1565b60405161026191906121b3565b34801561029857600080fd5b506102ac6102a73660046121c6565b610853565b6040516001600160a01b039091168152602001610261565b3480156102d057600080fd5b506102e46102df3660046121fb565b610897565b005b3480156102f257600080fd5b50600c5461030a90600160601b900463ffffffff1681565b60405163ffffffff9091168152602001610261565b34801561032b57600080fd5b506102e461033a366004612239565b61096a565b34801561034b57600080fd5b50600354600254035b604051908152602001610261565b34801561036e57600080fd5b50600c5461030a90640100000000900463ffffffff1681565b34801561039357600080fd5b50610354600b5481565b3480156103a957600080fd5b506102e46103b836600461226c565b610a4c565b3480156103c957600080fd5b506103dd6103d83660046122a8565b610a5c565b604080516001600160a01b039093168352602083019190915201610261565b34801561040857600080fd5b506102e4610b08565b34801561041d57600080fd5b506102e461042c36600461226c565b610b3e565b34801561043d57600080fd5b50600c5461025590600160801b900460ff1681565b34801561045e57600080fd5b5061047261046d3660046122ca565b610b59565b60405161026191906122e5565b34801561048b57600080fd5b5061049f61049a3660046123a2565b610c4f565b6040516102619190612447565b3480156104b857600080fd5b506102ac6104c73660046121c6565b610d15565b3480156104d857600080fd5b50600c5461030a9063ffffffff1681565b3480156104f557600080fd5b506102e46105043660046124b1565b610d20565b34801561051557600080fd5b506103546105243660046122ca565b610d68565b34801561053557600080fd5b506102e4610db6565b34801561054a57600080fd5b506102e4610559366004612531565b610dea565b34801561056a57600080fd5b5061057e6105793660046122ca565b610e27565b6040516102619190612579565b34801561059757600080fd5b50600a546001600160a01b03166102ac565b3480156105b557600080fd5b506102e46105c43660046121c6565b610f2f565b3480156105d557600080fd5b5061027f610f5e565b3480156105ea57600080fd5b5061057e6105f93660046125b1565b610f6d565b34801561060a57600080fd5b506102e46106193660046125f4565b6110ea565b6102e461062c36600461261e565b611180565b34801561063d57600080fd5b506102e461064c36600461261e565b611407565b34801561065d57600080fd5b506102e461066c366004612639565b611459565b34801561067d57600080fd5b5061069161068c3660046121c6565b6114a3565b60405161026191906126b4565b3480156106aa57600080fd5b5061027f6106b93660046121c6565b61150c565b3480156106ca57600080fd5b5061027f6115f5565b3480156106df57600080fd5b50600c5461030a90600160881b900463ffffffff1681565b34801561070357600080fd5b506102556107123660046126e9565b611683565b34801561072357600080fd5b506102e4610732366004612713565b6116b1565b34801561074357600080fd5b506102e46107523660046122ca565b6116f9565b34801561076357600080fd5b50600c5461030a90600160401b900463ffffffff1681565b60006001600160e01b0319821663152a902d60e11b14806107ac57506001600160e01b0319821663184371e560e31b145b806107bb57506107bb82611791565b92915050565b6060600480546107d09061272e565b80601f01602080910402602001604051908101604052809291908181526020018280546107fc9061272e565b80156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b600061085e826117df565b61087b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006108a282611807565b9050806001600160a01b0316836001600160a01b031614156108d75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161461090e576108f18133611683565b61090e576040516367d9dca160e11b815260040160405180910390fd5b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600a546001600160a01b0316331461099d5760405162461bcd60e51b815260040161099490612769565b60405180910390fd5b80600c60118282829054906101000a900463ffffffff166109be91906127b4565b82546101009290920a63ffffffff818102199093169183160217909155600c54600160401b81048216600160881b90910490911611159050610a385760405162461bcd60e51b81526020600482015260136024820152724578636565646564206d617820737570706c7960681b6044820152606401610994565b610a48828263ffffffff16611868565b5050565b610a57838383611882565b505050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610ad15750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610af0906001600160601b0316876127dc565b610afa9190612811565b915196919550909350505050565b600a546001600160a01b03163314610b325760405162461bcd60e51b815260040161099490612769565b610b3c3347611a25565b565b610a5783838360405180602001604052806000815250611459565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101919091526040805161010081018252600b548152600c5463ffffffff8082166020840152600160601b8204811693830193909352640100000000810483166060830152600160401b9004909116608082015260a08101610bf560025490565b63ffffffff168152602001610c2c846001600160a01b03166000908152600760205260409081902054901c6001600160401b031690565b63ffffffff168152600c54600160801b900460ff16151560209091015292915050565b80516060906000816001600160401b03811115610c6e57610c6e61235c565b604051908082528060200260200182016040528015610cb957816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181610c8c5790505b50905060005b828114610d0d57610ce8858281518110610cdb57610cdb612825565b60200260200101516114a3565b828281518110610cfa57610cfa612825565b6020908102919091010152600101610cbf565b509392505050565b60006107bb82611807565b600a546001600160a01b03163314610d4a5760405162461bcd60e51b815260040161099490612769565b610d65610d5f600a546001600160a01b031690565b82611b3e565b50565b60006001600160a01b038216610d91576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600760205260409020546001600160401b031690565b600a546001600160a01b03163314610de05760405162461bcd60e51b815260040161099490612769565b610b3c6000611c3b565b600a546001600160a01b03163314610e145760405162461bcd60e51b815260040161099490612769565b8051610a4890600d90602084019061208f565b60606000806000610e3785610d68565b90506000816001600160401b03811115610e5357610e5361235c565b604051908082528060200260200182016040528015610e7c578160200160208202803683370190505b509050610ea2604080516060810182526000808252602082018190529181019190915290565b60005b838614610f2357610eb581611c8d565b9150816040015115610ec657610f1b565b81516001600160a01b031615610edb57815194505b876001600160a01b0316856001600160a01b03161415610f1b5780838780600101985081518110610f0e57610f0e612825565b6020026020010181815250505b600101610ea5565b50909695505050505050565b600a546001600160a01b03163314610f595760405162461bcd60e51b815260040161099490612769565b600b55565b6060600580546107d09061272e565b6060818310610f8f57604051631960ccad60e11b815260040160405180910390fd5b600080610f9b60025490565b905080841115610fa9578093505b6000610fb487610d68565b905084861015610fd35785850381811015610fcd578091505b50610fd7565b5060005b6000816001600160401b03811115610ff157610ff161235c565b60405190808252806020026020018201604052801561101a578160200160208202803683370190505b5090508161102d5793506110e392505050565b6000611038886114a3565b905060008160400151611049575080515b885b88811415801561105b5750848714155b156110d75761106981611c8d565b925082604001511561107a576110cf565b82516001600160a01b03161561108f57825191505b8a6001600160a01b0316826001600160a01b031614156110cf57808488806001019950815181106110c2576110c2612825565b6020026020010181815250505b60010161104b565b50505092835250909150505b9392505050565b6001600160a01b0382163314156111145760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600c54600160801b900460ff166111d05760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185cc81b9bdd081cdd185c9d195960621b6044820152606401610994565b600c546111f49063ffffffff600160401b820481169164010000000090041661283b565b63ffffffff1661120360025490565b6112139063ffffffff8416612860565b11156112575760405162461bcd60e51b81526020600482015260136024820152724578636565646564206d617820737570706c7960681b6044820152606401610994565b600c5463ffffffff90811690821611156112b35760405162461bcd60e51b815260206004820152601a60248201527f4578636565646564207472616e73616374696f6e206c696d69740000000000006044820152606401610994565b336000908152600760205260409081902054901c6001600160401b0316801561133257600b546112e99063ffffffff84166127dc565b34101561132d5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610994565b611394565b600b5461134060018461283b565b63ffffffff1661135091906127dc565b3410156113945760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610994565b600c5463ffffffff600160601b9091048116906113b390841683612860565b11156113f75760405162461bcd60e51b8152602060048201526013602482015272115e18d95959081dd85b1b195d081b1a5b5a5d606a1b6044820152606401610994565b610a48338363ffffffff16611868565b600a546001600160a01b031633146114315760405162461bcd60e51b815260040161099490612769565b600c805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b611464848484611882565b6001600160a01b0383163b1561149d5761148084848484611cc2565b61149d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60408051606080820183526000808352602080840182905283850182905284519283018552818352820181905292810183905290915060025483106114e85792915050565b6114f183611c8d565b90508060400151156115035792915050565b6110e383611dba565b6060611517826117df565b61153457604051630a14c4b560e41b815260040160405180910390fd5b6000600d80546115439061272e565b80601f016020809104026020016040519081016040528092919081815260200182805461156f9061272e565b80156115bc5780601f10611591576101008083540402835291602001916115bc565b820191906000526020600020905b81548152906001019060200180831161159f57829003601f168201915b50505050509050806115cd84611de8565b6040516020016115de929190612878565b604051602081830303815290604052915050919050565b600d80546116029061272e565b80601f016020809104026020016040519081016040528092919081815260200182805461162e9061272e565b801561167b5780601f106116505761010080835404028352916020019161167b565b820191906000526020600020905b81548152906001019060200180831161165e57829003601f168201915b505050505081565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b031633146116db5760405162461bcd60e51b815260040161099490612769565b600c8054911515600160801b0260ff60801b19909216919091179055565b600a546001600160a01b031633146117235760405162461bcd60e51b815260040161099490612769565b6001600160a01b0381166117885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610994565b610d6581611c3b565b60006301ffc9a760e01b6001600160e01b0319831614806117c257506380ac58cd60e01b6001600160e01b03198316145b806107bb5750506001600160e01b031916635b5e139f60e01b1490565b6000600254821080156107bb575050600090815260066020526040902054600160e01b161590565b60008160025481101561184f57600081815260066020526040902054600160e01b811661184d575b806110e357506000190160008181526006602052604090205461182f565b505b604051636f96cda160e11b815260040160405180910390fd5b610a48828260405180602001604052806000815250611ee5565b600061188d82611807565b9050836001600160a01b0316816001600160a01b0316146118c05760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806118de57506118de8533611683565b806118f95750336118ee84610853565b6001600160a01b0316145b90508061191957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661194057604051633a954ecd60e21b815260040160405180910390fd5b600083815260086020908152604080832080546001600160a01b03191690556001600160a01b038881168452600783528184208054600019019055871683528083208054600101905585835260069091529020600160e11b4260a01b8617811790915582166119dd57600183016000818152600660205260409020546119db5760025481146119db5760008181526006602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b80471015611a755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610994565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611ac2576040519150601f19603f3d011682016040523d82523d6000602084013e611ac7565b606091505b5050905080610a575760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610994565b6127106001600160601b0382161115611bac5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610994565b6001600160a01b038216611c025760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610994565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051606081018252600080825260208201819052918101919091526000828152600660205260409020546107bb90612055565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611cf79033908990889088906004016128b7565b602060405180830381600087803b158015611d1157600080fd5b505af1925050508015611d41575060408051601f3d908101601f19168201909252611d3e918101906128f4565b60015b611d9c573d808015611d6f576040519150601f19603f3d011682016040523d82523d6000602084013e611d74565b606091505b508051611d94576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051606081018252600080825260208201819052918101919091526107bb611de383611807565b612055565b606081611e0c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e365780611e2081612911565b9150611e2f9050600a83612811565b9150611e10565b6000816001600160401b03811115611e5057611e5061235c565b6040519080825280601f01601f191660200182016040528015611e7a576020820181803683370190505b5090505b8415611db257611e8f60018361292c565b9150611e9c600a86612943565b611ea7906030612860565b60f81b818381518110611ebc57611ebc612825565b60200101906001600160f81b031916908160001a905350611ede600a86612811565b9450611e7e565b6002546001600160a01b038416611f0e57604051622e076360e81b815260040160405180910390fd5b82611f2c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03841660008181526007602090815260408083208054680100000000000000018902019055848352600690915290204260a01b86176001861460e11b1790558190818501903b15612001575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611fca6000878480600101955087611cc2565b611fe7576040516368d2bf6b60e11b815260040160405180910390fd5b808210611f7f578260025414611ffc57600080fd5b612046565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612002575b5060025561149d600085838684565b604080516060810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b90921615159082015290565b82805461209b9061272e565b90600052602060002090601f0160209004810192826120bd5760008555612103565b82601f106120d657805160ff1916838001178555612103565b82800160010185558215612103579182015b828111156121035782518255916020019190600101906120e8565b5061210f929150612113565b5090565b5b8082111561210f5760008155600101612114565b6001600160e01b031981168114610d6557600080fd5b60006020828403121561215057600080fd5b81356110e381612128565b60005b8381101561217657818101518382015260200161215e565b8381111561149d5750506000910152565b6000815180845261219f81602086016020860161215b565b601f01601f19169290920160200192915050565b6020815260006110e36020830184612187565b6000602082840312156121d857600080fd5b5035919050565b80356001600160a01b03811681146121f657600080fd5b919050565b6000806040838503121561220e57600080fd5b612217836121df565b946020939093013593505050565b803563ffffffff811681146121f657600080fd5b6000806040838503121561224c57600080fd5b612255836121df565b915061226360208401612225565b90509250929050565b60008060006060848603121561228157600080fd5b61228a846121df565b9250612298602085016121df565b9150604084013590509250925092565b600080604083850312156122bb57600080fd5b50508035926020909101359150565b6000602082840312156122dc57600080fd5b6110e3826121df565b60006101008201905082518252602083015163ffffffff80821660208501528060408601511660408501528060608601511660608501528060808601511660808501528060a08601511660a08501528060c08601511660c0850152505060e083015161235560e084018215159052565b5092915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561239a5761239a61235c565b604052919050565b600060208083850312156123b557600080fd5b82356001600160401b03808211156123cc57600080fd5b818501915085601f8301126123e057600080fd5b8135818111156123f2576123f261235c565b8060051b9150612403848301612372565b818152918301840191848101908884111561241d57600080fd5b938501935b8385101561243b57843582529385019390850190612422565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610f235761249e83855180516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b9284019260609290920191600101612463565b6000602082840312156124c357600080fd5b81356001600160601b03811681146110e357600080fd5b60006001600160401b038311156124f3576124f361235c565b612506601f8401601f1916602001612372565b905082815283838301111561251a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561254357600080fd5b81356001600160401b0381111561255957600080fd5b8201601f8101841361256a57600080fd5b611db2848235602084016124da565b6020808252825182820181905260009190848201906040850190845b81811015610f2357835183529284019291840191600101612595565b6000806000606084860312156125c657600080fd5b6125cf846121df565b95602085013595506040909401359392505050565b803580151581146121f657600080fd5b6000806040838503121561260757600080fd5b612610836121df565b9150612263602084016125e4565b60006020828403121561263057600080fd5b6110e382612225565b6000806000806080858703121561264f57600080fd5b612658856121df565b9350612666602086016121df565b92506040850135915060608501356001600160401b0381111561268857600080fd5b8501601f8101871361269957600080fd5b6126a8878235602084016124da565b91505092959194509250565b81516001600160a01b031681526020808301516001600160401b031690820152604080830151151590820152606081016107bb565b600080604083850312156126fc57600080fd5b612705836121df565b9150612263602084016121df565b60006020828403121561272557600080fd5b6110e3826125e4565b600181811c9082168061274257607f821691505b6020821081141561276357634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168185168083038211156127d3576127d361279e565b01949350505050565b60008160001904831182151516156127f6576127f661279e565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612820576128206127fb565b500490565b634e487b7160e01b600052603260045260246000fd5b600063ffffffff838116908316818110156128585761285861279e565b039392505050565b600082198211156128735761287361279e565b500190565b6000835161288a81846020880161215b565b83519083019061289e81836020880161215b565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906128ea90830184612187565b9695505050505050565b60006020828403121561290657600080fd5b81516110e381612128565b60006000198214156129255761292561279e565b5060010190565b60008282101561293e5761293e61279e565b500390565b600082612952576129526127fb565b50069056fea264697066735822122004464850e860a2bfd36d251551c9aeb7afd9485f91946aea145719154ad3e35864736f6c63430008090033697066733a2f2f516d5942736a487a7659524a76664c373977796a436871707633374172557453544b705335566a75354a4d6731702f

Deployed Bytecode

0x6080604052600436106102305760003560e01c806370a082311161012e578063a9cbba99116100ab578063dd48f07d1161006f578063dd48f07d146106d3578063e985e9c5146106f7578063ef6b141a14610717578063f2fde38b14610737578063f4e2ae581461075757600080fd5b8063a9cbba9914610631578063b88d4fde14610651578063c23dc68f14610671578063c87b56dd1461069e578063d4a67623146106be57600080fd5b806391b7f5ed116100f257806391b7f5ed146105a957806395d89b41146105c957806399a2557a146105de578063a22cb465146105fe578063a71bbebe1461061e57600080fd5b806370a0823114610509578063715018a614610529578063750521f51461053e5780638462151c1461055e5780638da5cb5b1461058b57600080fd5b806323b872dd116101bc5780634df8bb45116101805780634df8bb45146104525780635bbb21771461047f5780636352211e146104ac57806363553e7c146104cc578063653a819e146104e957600080fd5b806323b872dd1461039d5780632a55205a146103bd5780633ccfd60b146103fc57806342842e0e146104115780634df22a541461043157600080fd5b80630e2351e2116102035780630e2351e2146102e657806317a5aced1461031f57806318160ddd1461033f57806322f4596f14610362578063235b6ea11461038757600080fd5b806301ffc9a71461023557806306fdde031461026a578063081812fc1461028c578063095ea7b3146102c4575b600080fd5b34801561024157600080fd5b5061025561025036600461213e565b61077b565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b5061027f6107c1565b60405161026191906121b3565b34801561029857600080fd5b506102ac6102a73660046121c6565b610853565b6040516001600160a01b039091168152602001610261565b3480156102d057600080fd5b506102e46102df3660046121fb565b610897565b005b3480156102f257600080fd5b50600c5461030a90600160601b900463ffffffff1681565b60405163ffffffff9091168152602001610261565b34801561032b57600080fd5b506102e461033a366004612239565b61096a565b34801561034b57600080fd5b50600354600254035b604051908152602001610261565b34801561036e57600080fd5b50600c5461030a90640100000000900463ffffffff1681565b34801561039357600080fd5b50610354600b5481565b3480156103a957600080fd5b506102e46103b836600461226c565b610a4c565b3480156103c957600080fd5b506103dd6103d83660046122a8565b610a5c565b604080516001600160a01b039093168352602083019190915201610261565b34801561040857600080fd5b506102e4610b08565b34801561041d57600080fd5b506102e461042c36600461226c565b610b3e565b34801561043d57600080fd5b50600c5461025590600160801b900460ff1681565b34801561045e57600080fd5b5061047261046d3660046122ca565b610b59565b60405161026191906122e5565b34801561048b57600080fd5b5061049f61049a3660046123a2565b610c4f565b6040516102619190612447565b3480156104b857600080fd5b506102ac6104c73660046121c6565b610d15565b3480156104d857600080fd5b50600c5461030a9063ffffffff1681565b3480156104f557600080fd5b506102e46105043660046124b1565b610d20565b34801561051557600080fd5b506103546105243660046122ca565b610d68565b34801561053557600080fd5b506102e4610db6565b34801561054a57600080fd5b506102e4610559366004612531565b610dea565b34801561056a57600080fd5b5061057e6105793660046122ca565b610e27565b6040516102619190612579565b34801561059757600080fd5b50600a546001600160a01b03166102ac565b3480156105b557600080fd5b506102e46105c43660046121c6565b610f2f565b3480156105d557600080fd5b5061027f610f5e565b3480156105ea57600080fd5b5061057e6105f93660046125b1565b610f6d565b34801561060a57600080fd5b506102e46106193660046125f4565b6110ea565b6102e461062c36600461261e565b611180565b34801561063d57600080fd5b506102e461064c36600461261e565b611407565b34801561065d57600080fd5b506102e461066c366004612639565b611459565b34801561067d57600080fd5b5061069161068c3660046121c6565b6114a3565b60405161026191906126b4565b3480156106aa57600080fd5b5061027f6106b93660046121c6565b61150c565b3480156106ca57600080fd5b5061027f6115f5565b3480156106df57600080fd5b50600c5461030a90600160881b900463ffffffff1681565b34801561070357600080fd5b506102556107123660046126e9565b611683565b34801561072357600080fd5b506102e4610732366004612713565b6116b1565b34801561074357600080fd5b506102e46107523660046122ca565b6116f9565b34801561076357600080fd5b50600c5461030a90600160401b900463ffffffff1681565b60006001600160e01b0319821663152a902d60e11b14806107ac57506001600160e01b0319821663184371e560e31b145b806107bb57506107bb82611791565b92915050565b6060600480546107d09061272e565b80601f01602080910402602001604051908101604052809291908181526020018280546107fc9061272e565b80156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b600061085e826117df565b61087b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006108a282611807565b9050806001600160a01b0316836001600160a01b031614156108d75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161461090e576108f18133611683565b61090e576040516367d9dca160e11b815260040160405180910390fd5b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600a546001600160a01b0316331461099d5760405162461bcd60e51b815260040161099490612769565b60405180910390fd5b80600c60118282829054906101000a900463ffffffff166109be91906127b4565b82546101009290920a63ffffffff818102199093169183160217909155600c54600160401b81048216600160881b90910490911611159050610a385760405162461bcd60e51b81526020600482015260136024820152724578636565646564206d617820737570706c7960681b6044820152606401610994565b610a48828263ffffffff16611868565b5050565b610a57838383611882565b505050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610ad15750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610af0906001600160601b0316876127dc565b610afa9190612811565b915196919550909350505050565b600a546001600160a01b03163314610b325760405162461bcd60e51b815260040161099490612769565b610b3c3347611a25565b565b610a5783838360405180602001604052806000815250611459565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101919091526040805161010081018252600b548152600c5463ffffffff8082166020840152600160601b8204811693830193909352640100000000810483166060830152600160401b9004909116608082015260a08101610bf560025490565b63ffffffff168152602001610c2c846001600160a01b03166000908152600760205260409081902054901c6001600160401b031690565b63ffffffff168152600c54600160801b900460ff16151560209091015292915050565b80516060906000816001600160401b03811115610c6e57610c6e61235c565b604051908082528060200260200182016040528015610cb957816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181610c8c5790505b50905060005b828114610d0d57610ce8858281518110610cdb57610cdb612825565b60200260200101516114a3565b828281518110610cfa57610cfa612825565b6020908102919091010152600101610cbf565b509392505050565b60006107bb82611807565b600a546001600160a01b03163314610d4a5760405162461bcd60e51b815260040161099490612769565b610d65610d5f600a546001600160a01b031690565b82611b3e565b50565b60006001600160a01b038216610d91576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600760205260409020546001600160401b031690565b600a546001600160a01b03163314610de05760405162461bcd60e51b815260040161099490612769565b610b3c6000611c3b565b600a546001600160a01b03163314610e145760405162461bcd60e51b815260040161099490612769565b8051610a4890600d90602084019061208f565b60606000806000610e3785610d68565b90506000816001600160401b03811115610e5357610e5361235c565b604051908082528060200260200182016040528015610e7c578160200160208202803683370190505b509050610ea2604080516060810182526000808252602082018190529181019190915290565b60005b838614610f2357610eb581611c8d565b9150816040015115610ec657610f1b565b81516001600160a01b031615610edb57815194505b876001600160a01b0316856001600160a01b03161415610f1b5780838780600101985081518110610f0e57610f0e612825565b6020026020010181815250505b600101610ea5565b50909695505050505050565b600a546001600160a01b03163314610f595760405162461bcd60e51b815260040161099490612769565b600b55565b6060600580546107d09061272e565b6060818310610f8f57604051631960ccad60e11b815260040160405180910390fd5b600080610f9b60025490565b905080841115610fa9578093505b6000610fb487610d68565b905084861015610fd35785850381811015610fcd578091505b50610fd7565b5060005b6000816001600160401b03811115610ff157610ff161235c565b60405190808252806020026020018201604052801561101a578160200160208202803683370190505b5090508161102d5793506110e392505050565b6000611038886114a3565b905060008160400151611049575080515b885b88811415801561105b5750848714155b156110d75761106981611c8d565b925082604001511561107a576110cf565b82516001600160a01b03161561108f57825191505b8a6001600160a01b0316826001600160a01b031614156110cf57808488806001019950815181106110c2576110c2612825565b6020026020010181815250505b60010161104b565b50505092835250909150505b9392505050565b6001600160a01b0382163314156111145760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600c54600160801b900460ff166111d05760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185cc81b9bdd081cdd185c9d195960621b6044820152606401610994565b600c546111f49063ffffffff600160401b820481169164010000000090041661283b565b63ffffffff1661120360025490565b6112139063ffffffff8416612860565b11156112575760405162461bcd60e51b81526020600482015260136024820152724578636565646564206d617820737570706c7960681b6044820152606401610994565b600c5463ffffffff90811690821611156112b35760405162461bcd60e51b815260206004820152601a60248201527f4578636565646564207472616e73616374696f6e206c696d69740000000000006044820152606401610994565b336000908152600760205260409081902054901c6001600160401b0316801561133257600b546112e99063ffffffff84166127dc565b34101561132d5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610994565b611394565b600b5461134060018461283b565b63ffffffff1661135091906127dc565b3410156113945760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610994565b600c5463ffffffff600160601b9091048116906113b390841683612860565b11156113f75760405162461bcd60e51b8152602060048201526013602482015272115e18d95959081dd85b1b195d081b1a5b5a5d606a1b6044820152606401610994565b610a48338363ffffffff16611868565b600a546001600160a01b031633146114315760405162461bcd60e51b815260040161099490612769565b600c805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b611464848484611882565b6001600160a01b0383163b1561149d5761148084848484611cc2565b61149d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60408051606080820183526000808352602080840182905283850182905284519283018552818352820181905292810183905290915060025483106114e85792915050565b6114f183611c8d565b90508060400151156115035792915050565b6110e383611dba565b6060611517826117df565b61153457604051630a14c4b560e41b815260040160405180910390fd5b6000600d80546115439061272e565b80601f016020809104026020016040519081016040528092919081815260200182805461156f9061272e565b80156115bc5780601f10611591576101008083540402835291602001916115bc565b820191906000526020600020905b81548152906001019060200180831161159f57829003601f168201915b50505050509050806115cd84611de8565b6040516020016115de929190612878565b604051602081830303815290604052915050919050565b600d80546116029061272e565b80601f016020809104026020016040519081016040528092919081815260200182805461162e9061272e565b801561167b5780601f106116505761010080835404028352916020019161167b565b820191906000526020600020905b81548152906001019060200180831161165e57829003601f168201915b505050505081565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b031633146116db5760405162461bcd60e51b815260040161099490612769565b600c8054911515600160801b0260ff60801b19909216919091179055565b600a546001600160a01b031633146117235760405162461bcd60e51b815260040161099490612769565b6001600160a01b0381166117885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610994565b610d6581611c3b565b60006301ffc9a760e01b6001600160e01b0319831614806117c257506380ac58cd60e01b6001600160e01b03198316145b806107bb5750506001600160e01b031916635b5e139f60e01b1490565b6000600254821080156107bb575050600090815260066020526040902054600160e01b161590565b60008160025481101561184f57600081815260066020526040902054600160e01b811661184d575b806110e357506000190160008181526006602052604090205461182f565b505b604051636f96cda160e11b815260040160405180910390fd5b610a48828260405180602001604052806000815250611ee5565b600061188d82611807565b9050836001600160a01b0316816001600160a01b0316146118c05760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806118de57506118de8533611683565b806118f95750336118ee84610853565b6001600160a01b0316145b90508061191957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661194057604051633a954ecd60e21b815260040160405180910390fd5b600083815260086020908152604080832080546001600160a01b03191690556001600160a01b038881168452600783528184208054600019019055871683528083208054600101905585835260069091529020600160e11b4260a01b8617811790915582166119dd57600183016000818152600660205260409020546119db5760025481146119db5760008181526006602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b80471015611a755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610994565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611ac2576040519150601f19603f3d011682016040523d82523d6000602084013e611ac7565b606091505b5050905080610a575760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610994565b6127106001600160601b0382161115611bac5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610994565b6001600160a01b038216611c025760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610994565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051606081018252600080825260208201819052918101919091526000828152600660205260409020546107bb90612055565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611cf79033908990889088906004016128b7565b602060405180830381600087803b158015611d1157600080fd5b505af1925050508015611d41575060408051601f3d908101601f19168201909252611d3e918101906128f4565b60015b611d9c573d808015611d6f576040519150601f19603f3d011682016040523d82523d6000602084013e611d74565b606091505b508051611d94576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051606081018252600080825260208201819052918101919091526107bb611de383611807565b612055565b606081611e0c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e365780611e2081612911565b9150611e2f9050600a83612811565b9150611e10565b6000816001600160401b03811115611e5057611e5061235c565b6040519080825280601f01601f191660200182016040528015611e7a576020820181803683370190505b5090505b8415611db257611e8f60018361292c565b9150611e9c600a86612943565b611ea7906030612860565b60f81b818381518110611ebc57611ebc612825565b60200101906001600160f81b031916908160001a905350611ede600a86612811565b9450611e7e565b6002546001600160a01b038416611f0e57604051622e076360e81b815260040160405180910390fd5b82611f2c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03841660008181526007602090815260408083208054680100000000000000018902019055848352600690915290204260a01b86176001861460e11b1790558190818501903b15612001575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611fca6000878480600101955087611cc2565b611fe7576040516368d2bf6b60e11b815260040160405180910390fd5b808210611f7f578260025414611ffc57600080fd5b612046565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612002575b5060025561149d600085838684565b604080516060810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b90921615159082015290565b82805461209b9061272e565b90600052602060002090601f0160209004810192826120bd5760008555612103565b82601f106120d657805160ff1916838001178555612103565b82800160010185558215612103579182015b828111156121035782518255916020019190600101906120e8565b5061210f929150612113565b5090565b5b8082111561210f5760008155600101612114565b6001600160e01b031981168114610d6557600080fd5b60006020828403121561215057600080fd5b81356110e381612128565b60005b8381101561217657818101518382015260200161215e565b8381111561149d5750506000910152565b6000815180845261219f81602086016020860161215b565b601f01601f19169290920160200192915050565b6020815260006110e36020830184612187565b6000602082840312156121d857600080fd5b5035919050565b80356001600160a01b03811681146121f657600080fd5b919050565b6000806040838503121561220e57600080fd5b612217836121df565b946020939093013593505050565b803563ffffffff811681146121f657600080fd5b6000806040838503121561224c57600080fd5b612255836121df565b915061226360208401612225565b90509250929050565b60008060006060848603121561228157600080fd5b61228a846121df565b9250612298602085016121df565b9150604084013590509250925092565b600080604083850312156122bb57600080fd5b50508035926020909101359150565b6000602082840312156122dc57600080fd5b6110e3826121df565b60006101008201905082518252602083015163ffffffff80821660208501528060408601511660408501528060608601511660608501528060808601511660808501528060a08601511660a08501528060c08601511660c0850152505060e083015161235560e084018215159052565b5092915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561239a5761239a61235c565b604052919050565b600060208083850312156123b557600080fd5b82356001600160401b03808211156123cc57600080fd5b818501915085601f8301126123e057600080fd5b8135818111156123f2576123f261235c565b8060051b9150612403848301612372565b818152918301840191848101908884111561241d57600080fd5b938501935b8385101561243b57843582529385019390850190612422565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610f235761249e83855180516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b9284019260609290920191600101612463565b6000602082840312156124c357600080fd5b81356001600160601b03811681146110e357600080fd5b60006001600160401b038311156124f3576124f361235c565b612506601f8401601f1916602001612372565b905082815283838301111561251a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561254357600080fd5b81356001600160401b0381111561255957600080fd5b8201601f8101841361256a57600080fd5b611db2848235602084016124da565b6020808252825182820181905260009190848201906040850190845b81811015610f2357835183529284019291840191600101612595565b6000806000606084860312156125c657600080fd5b6125cf846121df565b95602085013595506040909401359392505050565b803580151581146121f657600080fd5b6000806040838503121561260757600080fd5b612610836121df565b9150612263602084016125e4565b60006020828403121561263057600080fd5b6110e382612225565b6000806000806080858703121561264f57600080fd5b612658856121df565b9350612666602086016121df565b92506040850135915060608501356001600160401b0381111561268857600080fd5b8501601f8101871361269957600080fd5b6126a8878235602084016124da565b91505092959194509250565b81516001600160a01b031681526020808301516001600160401b031690820152604080830151151590820152606081016107bb565b600080604083850312156126fc57600080fd5b612705836121df565b9150612263602084016121df565b60006020828403121561272557600080fd5b6110e3826125e4565b600181811c9082168061274257607f821691505b6020821081141561276357634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8083168185168083038211156127d3576127d361279e565b01949350505050565b60008160001904831182151516156127f6576127f661279e565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612820576128206127fb565b500490565b634e487b7160e01b600052603260045260246000fd5b600063ffffffff838116908316818110156128585761285861279e565b039392505050565b600082198211156128735761287361279e565b500190565b6000835161288a81846020880161215b565b83519083019061289e81836020880161215b565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906128ea90830184612187565b9695505050505050565b60006020828403121561290657600080fd5b81516110e381612128565b60006000198214156129255761292561279e565b5060010190565b60008282101561293e5761293e61279e565b500390565b600082612952576129526127fb565b50069056fea264697066735822122004464850e860a2bfd36d251551c9aeb7afd9485f91946aea145719154ad3e35864736f6c63430008090033

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.