Token CharmingCrypto

NFT  
 

Overview [ERC-721]

Max Total Supply:
272,502 CC

Holders:
9,217

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
CharmingCrypto

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 1 : CharmingCrypto.sol
// SPDX-License-Identifier: MIT
// File: erc721a/contracts/IERC721A.sol


// ERC721A Contracts v4.2.3

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: erc721a/contracts/ERC721A.sol


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

pragma solidity ^0.8.4;


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId].value;
    }

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: contracts/CharmingCrypto.sol

pragma solidity ^0.8.0;


contract CharmingCrypto is ERC721A, Ownable {

    uint256 public constant MAX_SUPPLY = 666666;
    uint256 public constant FREE_SUPPLY = 6;
    uint256 public constant CHARGE_SUPPLY = 12;

    uint256 private _flag;
    string private _defTokenURI = "https://ipfs.io/ipfs/QmYTtaaDjRu9iuQD9Rvq7ctY8BFinW6BLYuCQwcKaD37oC";
    string private _baseTokenURI = "";

    mapping(address => bool) private _hasMinted;

    event NewMint(address indexed msgSender, uint256 indexed mintQuantity);

    constructor() ERC721A("CharmingCrypto", "CC") {
    }

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

    function changeTokenURIFlag(uint256 flag) external onlyOwner {
        _flag = flag;
    }

    function changeDefURI(string calldata _tokenURI) external onlyOwner {
        _defTokenURI = _tokenURI;
    }

    function changeURI(string calldata _tokenURI) external onlyOwner {
        _baseTokenURI = _tokenURI;
    }

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

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        if (_flag == 0) {
            return _defTokenURI;
        } else {
            require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
            return string(abi.encodePacked(_baseTokenURI, Strings.toString(tokenId)));
        }
    }

    function mint(uint256 quantity) public payable {
        require(totalSupply() + quantity <= MAX_SUPPLY, "ERC721: Exceeds maximum supply");
        require(quantity == 1 ||  quantity == FREE_SUPPLY || quantity == CHARGE_SUPPLY, "ERC721: Invalid quantity");

        if (quantity == 1 ) {
            require(msg.value >= 0.00666 ether, "ERC721: Insufficient payment");
            _safeMint(msg.sender,quantity);
        } else if (quantity == FREE_SUPPLY ) {
            _safeMint(msg.sender,quantity);
        } else {
            require(msg.value >= 0.0666 ether, "ERC721: Insufficient payment");
            _safeMint(msg.sender,quantity);
        }
        
        emit NewMint(msg.sender, quantity);
    }

    function withdraw() external onlyOwner {
		(bool success, ) = payable(msg.sender).call{
			value: address(this).balance
		}("");
		require(success, "Withdraw failed.");
	}
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"msgSender","type":"address"},{"indexed":true,"internalType":"uint256","name":"mintQuantity","type":"uint256"}],"name":"NewMint","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":"CHARGE_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FREE_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"changeDefURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"flag","type":"uint256"}],"name":"changeTokenURIFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"changeURI","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"quantity","type":"uint256"}],"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":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608034620003b4576001600160401b039060409080820183811182821017620002f6578252600e81526020906d436861726d696e6743727970746f60901b8282015282519383850185811082821117620002f657845260029081865261434360f01b848701528251818111620002f657806200007c8454620003b9565b94601f9586811162000382575b50869086831160011462000318576000926200030c575b50508160011b916000199060031b1c19161782555b8551908111620002f657600390620000ce8254620003b9565b848111620002b9575b50848482116001146200024657819062376f4360e81b959697986000926200023a575b50508160011b9160001990841b1c19161781555b60016000556008543360018060a01b0319821617600855339060018060a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a362000161600a54620003b9565b84811162000214575b50506087600a55600a600052836000207f68747470733a2f2f697066732e696f2f697066732f516d5954746161446a527581557f39697551443952767137637459384246696e5736424c5975435177634b61443360018201550155620001d2600b54620003b9565b90808211620001f0575b836000600b55516119fa9081620004108239f35b6200020b92600b600052600020910160051c810190620003f6565b388080620001dc565b6200023291600a6000528587600020920160051c82019101620003f6565b38806200016a565b015190503880620000fa565b601f1982169783600052866000209860005b818110620002a157509162376f4360e81b969798999184600195941062000288575b505050811b0181556200010e565b015160001983861b60f8161c191690553880806200027a565b838301518b556001909a019992880192880162000258565b620002e59083600052866000208680850160051c820192898610620002ec575b0160051c0190620003f6565b38620000d7565b92508192620002d9565b634e487b7160e01b600052604160045260246000fd5b015190503880620000a0565b60008681528881209350601f198516905b898282106200036b57505090846001959493921062000351575b505050811b018255620000b5565b015160001960f88460031b161c1916905538808062000343565b600185968293968601518155019501930162000329565b620003ad9086600052886000208880860160051c8201928b8710620002ec570160051c0190620003f6565b3862000089565b600080fd5b90600182811c92168015620003eb575b6020831014620003d557565b634e487b7160e01b600052602260045260246000fd5b91607f1691620003c9565b81811062000402575050565b60008155600101620003f656fe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461020757806306fdde03146101fe578063081812fc146101f5578063095ea7b3146101ec5780630e5c1919146101e357806318160ddd146101da57806323b872dd146101d157806332cb6b0c146101c85780633ccfd60b146101bf57806342842e0e146101b6578063528c06cc146101ad5780636352211e146101a457806370a082311461019b578063715018a6146101925780638da5cb5b1461018957806395d89b41146101805780639858cf1914610177578063a0712d681461016e578063a22cb46514610165578063b88d4fde1461015c578063c87b56dd14610153578063d6933d6f1461014a578063e5e01c1114610141578063e985e9c5146101385763f2fde38b1461013057600080fd5b61000e610dd5565b5061000e610d77565b5061000e610c6a565b5061000e610c4d565b5061000e610c19565b5061000e610b95565b5061000e610a7c565b5061000e610994565b5061000e610977565b5061000e6108d2565b5061000e6108a8565b5061000e610846565b5061000e6107ea565b5061000e6107ba565b5061000e61078b565b5061000e610767565b5061000e6106ee565b5061000e6106cf565b5061000e6106ba565b5061000e61065d565b5061000e610550565b5061000e61044f565b5061000e6103ce565b5061000e6102ed565b5061000e610222565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e57602060043561024281610210565b63ffffffff60e01b166301ffc9a760e01b8114908115610280575b811561026f575b506040519015158152f35b635b5e139f60e01b14905038610264565b6380ac58cd60e01b8114915061025d565b60005b8381106102a45750506000910152565b8181015183820152602001610294565b906020916102cd81518092818552858086019101610291565b601f01601f1916010190565b9060206102ea9281815201906102b4565b90565b503461000e576000806003193601126103cb576040518160025461031081610e6c565b808452906001908181169081156103a3575060011461034a575b6103468461033a81880382610b4a565b604051918291826102d9565b0390f35b60028352602094507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b82841061039057505050816103469361033a928201019361032a565b8054858501870152928501928101610374565b610346965061033a9450602092508593915060ff191682840152151560051b8201019361032a565b80fd5b503461000e57602036600319011261000e576004356103ec81610fdb565b15610411576000526006602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b50604036600319011261000e57610464610423565b6024356001600160a01b038061047983610f63565b16908133036104d4575b600083815260066020526040812080546001600160a01b0319166001600160a01b0387161790559316907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b600082815260076020908152604080832033845290915290205460ff16610483576040516367d9dca160e11b8152600490fd5b90602060031983011261000e576004356001600160401b039283821161000e578060238301121561000e57816004013593841161000e576024848301011161000e576024019190565b503461000e5761055f36610507565b61057460018060a01b0360085416331461139f565b6001600160401b038111610650575b61059781610592600a54610e6c565b611433565b6000601f82116001146105d25781926000926105c7575b5050600019600383901b1c191660019190911b17600a55005b0135905038806105ae565b600a600052601f198216927fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a891805b8581106106385750836001951061061e575b505050811b01600a55005b0135600019600384901b60f8161c19169055388080610613565b90926020600181928686013581550194019101610601565b610658610b0b565b610583565b503461000e57600036600319011261000e576000546001546040519103600019018152602090f35b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b506106cd6106c736610685565b91611016565b005b503461000e57600036600319011261000e576020604051620a2c2a8152f35b503461000e576000806003193601126103cb5761071660018060a01b0360085416331461139f565b8080808047335af161072661129d565b501561072f5780f35b60405162461bcd60e51b815260206004820152601060248201526f2bb4ba34323930bb903330b4b632b21760811b6044820152606490fd5b506106cd61077436610685565b906040519261078284610b22565b600084526111e8565b503461000e57602036600319011261000e576107b260018060a01b0360085416331461139f565b600435600955005b503461000e57602036600319011261000e5760206001600160a01b036107e1600435610f63565b16604051908152f35b503461000e57602036600319011261000e576001600160a01b0361080c610423565b16801561083457600052600560205260206001600160401b0360406000205416604051908152f35b6040516323d3ad8160e21b8152600490fd5b503461000e576000806003193601126103cb5760085481906001600160a01b0381169061087433831461139f565b6001600160a01b0319166008557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e576008546040516001600160a01b039091168152602090f35b503461000e576000806003193601126103cb57604051816003546108f581610e6c565b808452906001908181169081156103a3575060011461091e576103468461033a81880382610b4a565b60038352602094507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061096457505050816103469361033a928201019361032a565b8054858501870152928501928101610948565b503461000e57600036600319011261000e57602060405160068152f35b50602036600319011261000e576004356109ce620a2c2a6109c7836109c26000546000199060015490030190565b611684565b111561178e565b60018114808015610a72575b8015610a68575b6109ea906117da565b15610a3457610a026617a93c16344000341015611821565b610a0c813361186d565b337f52277f0b4a9b555c5aa96900a13546f972bda413737ec164aac947c87eec6024600080a3005b60068103610a4b57610a46813361186d565b610a0c565b610a5e66ec9c58de0a8000341015611821565b610a46813361186d565b50600c82146109e1565b50600682146109da565b503461000e57604036600319011261000e57610a96610423565b6024359081151580920361000e573360009081526007602090815260408083206001600160a01b0385168452909152902060ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b50634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b03821117610b3d57604052565b610b45610b0b565b604052565b90601f801991011681019081106001600160401b03821117610b3d57604052565b6020906001600160401b038111610b88575b601f01601f19160190565b610b90610b0b565b610b7d565b50608036600319011261000e57610baa610423565b610bb2610439565b606435916001600160401b03831161000e573660238401121561000e57826004013591610bde83610b6b565b92610bec6040519485610b4a565b808452366024828701011161000e5760208160009260246106cd98018388013785010152604435916111e8565b503461000e57602036600319011261000e57610346610c39600435611566565b6040519182916020835260208301906102b4565b503461000e57600036600319011261000e576020604051600c8152f35b503461000e57610c7936610507565b610c8e60018060a01b0360085416331461139f565b6001600160401b038111610d6a575b610cb181610cac600b54610e6c565b611487565b6000601f8211600114610cec578192600092610ce1575b5050600019600383901b1c191660019190911b17600b55005b013590503880610cc8565b600b600052601f198216927f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db991805b858110610d5257508360019510610d38575b505050811b01600b55005b0135600019600384901b60f8161c19169055388080610d2d565b90926020600181928686013581550194019101610d1b565b610d72610b0b565b610c9d565b503461000e57604036600319011261000e57602060ff610dc9610d98610423565b610da0610439565b6001600160a01b0391821660009081526007865260408082209290931681526020919091522090565b54166040519015158152f35b503461000e57602036600319011261000e57610def610423565b6008546001600160a01b0390610e08908216331461139f565b811615610e18576106cd906113ea565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b90600182811c92168015610e9c575b6020831014610e8657565b634e487b7160e01b600052602260045260246000fd5b91607f1691610e7b565b60405190600082600a5491610eba83610e6c565b808352600193808516908115610f425750600114610ee2575b50610ee092500383610b4a565b565b600a60009081527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a894602093509091905b818310610f2a575050610ee0935082010138610ed3565b85548884018501529485019487945091830191610f13565b9050610ee094506020925060ff191682840152151560051b82010138610ed3565b6000818060011115610f82575b604051636f96cda160e11b8152600490fd5b8154811015610f705781526004906020918083526040928383205494600160e01b861615610fb257505050610f70565b93929190935b8515610fc657505050505090565b60001901808352818552838320549550610fb8565b8060011115908161100a575b81610ff0575090565b90506000526004602052600160e01b604060002054161590565b60005481109150610fe7565b9061102083610f63565b6001600160a01b03838116928282168490036111d7576000868152600660205260409020805490926110656001600160a01b03881633908114908414171590565b1590565b61117c575b821695861561116a576110bd9361109b92611160575b506001600160a01b0316600090815260056020526040902090565b80546000190190556001600160a01b0316600090815260056020526040902090565b80546001019055600160e11b804260a01b8517176110e5866000526004602052604060002090565b55811615611116575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b6001840161112e816000526004602052604060002090565b541561113b575b506110ee565b600054811461113557611158906000526004602052604060002090565b553880611135565b6000905538611080565b604051633a954ecd60e21b8152600490fd5b6111c06110616111b9336111a28b60018060a01b03166000526007602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b1561106a57604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9291906111f6828286611016565b803b611203575b50505050565b61120c93611376565b1561121a57388080806111fd565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261000e57516102ea81610210565b6102ea939260809260018060a01b0316825260006020830152604082015281606082015201906102b4565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526102ea929101906102b4565b3d156112c8573d906112ae82610b6b565b916112bc6040519384610b4a565b82523d6000602084013e565b606090565b6112f660209160009394604051948580948193630a85bd0160e11b998a84523360048501611241565b03926001600160a01b03165af160009181611346575b506113385761131961129d565b80519081611333576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b61136891925060203d811161136f575b6113608183610b4a565b81019061122c565b903861130c565b503d611356565b926020916112f6936000604051809681958294630a85bd0160e11b9a8b8552336004860161126c565b156113a657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600880546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b601f811161143f575050565b600090600a825260208220906020601f850160051c8301941061147d575b601f0160051c01915b82811061147257505050565b818155600101611466565b909250829061145d565b601f8111611493575050565b600090600b825260208220906020601f850160051c830194106114d1575b601f0160051c01915b8281106114c657505050565b8181556001016114ba565b90925082906114b1565b600b54600092916114eb82610e6c565b9160019081811690811561153c575060011461150657505050565b9091929350600b60005260209081600020906000915b85831061152b57505050500190565b80548584015291830191810161151c565b60ff191683525050811515909102019150565b9061156260209282815194859201610291565b0190565b60095461157657506102ea610ea6565b61157f81610fdb565b156115b9576102ea6115936115ab926116b8565b6040519283916115a5602084016114db565b9061154f565b03601f198101835282610b4a565b60405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608490fd5b50634e487b7160e01b600052601160045260246000fd5b9061163782610b6b565b6116446040519182610b4a565b8281528092611655601f1991610b6b565b0190602036910137565b60001981019190821161166e57565b610ee0611616565b603001908160301161166e57565b9190820180921161166e57565b9081518110156116a2570160200190565b634e487b7160e01b600052603260045260246000fd5b8015611752576000818181805b61172857506116d38161162d565b935b6116df5750505090565b6116e89061165f565b90600a906117136117036116fd848406611676565b60ff1690565b60f81b6001600160f81b03191690565b841a61171f8487611691565b530490816116d5565b91506001600a916000198114611745575b019104808492916116c5565b61174d611616565b611739565b50604051604081018181106001600160401b03821117611781575b60405260018152600360fc1b602082015290565b611789610b0b565b61176d565b1561179557565b60405162461bcd60e51b815260206004820152601e60248201527f4552433732313a2045786365656473206d6178696d756d20737570706c7900006044820152606490fd5b156117e157565b60405162461bcd60e51b81526020600482015260186024820152774552433732313a20496e76616c6964207175616e7469747960401b6044820152606490fd5b1561182857565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20496e73756666696369656e74207061796d656e74000000006044820152606490fd5b6040805161187a81610b22565b60009384825284549381156119b3576001600160a01b038116600090815260056020526040902080546801000000000000000184020190556000858152600460205260409020600192906001600160a01b038316904260a01b85841460e11b17821790558187019684807fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9280858d868180a4015b8981036119a4575050501561199457858755813b611931575b50505050505050565b85039180805b611954575b5050505050508154036103cb57808080808080611928565b15611987575b8661196c6110618684870196866112cd565b6119765781611937565b85516368d2bf6b60e11b8152600490fd5b85831061195a578061193c565b8451622e076360e81b8152600490fd5b80848c858180a401859061190f565b835163b562e8dd60e01b8152600490fdfea2646970667358221220f3c5ed5fb9c06346473a4db8beb13428954a169d4124181928403c021b08da4464736f6c63430008110033

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461020757806306fdde03146101fe578063081812fc146101f5578063095ea7b3146101ec5780630e5c1919146101e357806318160ddd146101da57806323b872dd146101d157806332cb6b0c146101c85780633ccfd60b146101bf57806342842e0e146101b6578063528c06cc146101ad5780636352211e146101a457806370a082311461019b578063715018a6146101925780638da5cb5b1461018957806395d89b41146101805780639858cf1914610177578063a0712d681461016e578063a22cb46514610165578063b88d4fde1461015c578063c87b56dd14610153578063d6933d6f1461014a578063e5e01c1114610141578063e985e9c5146101385763f2fde38b1461013057600080fd5b61000e610dd5565b5061000e610d77565b5061000e610c6a565b5061000e610c4d565b5061000e610c19565b5061000e610b95565b5061000e610a7c565b5061000e610994565b5061000e610977565b5061000e6108d2565b5061000e6108a8565b5061000e610846565b5061000e6107ea565b5061000e6107ba565b5061000e61078b565b5061000e610767565b5061000e6106ee565b5061000e6106cf565b5061000e6106ba565b5061000e61065d565b5061000e610550565b5061000e61044f565b5061000e6103ce565b5061000e6102ed565b5061000e610222565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e57602060043561024281610210565b63ffffffff60e01b166301ffc9a760e01b8114908115610280575b811561026f575b506040519015158152f35b635b5e139f60e01b14905038610264565b6380ac58cd60e01b8114915061025d565b60005b8381106102a45750506000910152565b8181015183820152602001610294565b906020916102cd81518092818552858086019101610291565b601f01601f1916010190565b9060206102ea9281815201906102b4565b90565b503461000e576000806003193601126103cb576040518160025461031081610e6c565b808452906001908181169081156103a3575060011461034a575b6103468461033a81880382610b4a565b604051918291826102d9565b0390f35b60028352602094507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b82841061039057505050816103469361033a928201019361032a565b8054858501870152928501928101610374565b610346965061033a9450602092508593915060ff191682840152151560051b8201019361032a565b80fd5b503461000e57602036600319011261000e576004356103ec81610fdb565b15610411576000526006602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b50604036600319011261000e57610464610423565b6024356001600160a01b038061047983610f63565b16908133036104d4575b600083815260066020526040812080546001600160a01b0319166001600160a01b0387161790559316907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b600082815260076020908152604080832033845290915290205460ff16610483576040516367d9dca160e11b8152600490fd5b90602060031983011261000e576004356001600160401b039283821161000e578060238301121561000e57816004013593841161000e576024848301011161000e576024019190565b503461000e5761055f36610507565b61057460018060a01b0360085416331461139f565b6001600160401b038111610650575b61059781610592600a54610e6c565b611433565b6000601f82116001146105d25781926000926105c7575b5050600019600383901b1c191660019190911b17600a55005b0135905038806105ae565b600a600052601f198216927fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a891805b8581106106385750836001951061061e575b505050811b01600a55005b0135600019600384901b60f8161c19169055388080610613565b90926020600181928686013581550194019101610601565b610658610b0b565b610583565b503461000e57600036600319011261000e576000546001546040519103600019018152602090f35b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b506106cd6106c736610685565b91611016565b005b503461000e57600036600319011261000e576020604051620a2c2a8152f35b503461000e576000806003193601126103cb5761071660018060a01b0360085416331461139f565b8080808047335af161072661129d565b501561072f5780f35b60405162461bcd60e51b815260206004820152601060248201526f2bb4ba34323930bb903330b4b632b21760811b6044820152606490fd5b506106cd61077436610685565b906040519261078284610b22565b600084526111e8565b503461000e57602036600319011261000e576107b260018060a01b0360085416331461139f565b600435600955005b503461000e57602036600319011261000e5760206001600160a01b036107e1600435610f63565b16604051908152f35b503461000e57602036600319011261000e576001600160a01b0361080c610423565b16801561083457600052600560205260206001600160401b0360406000205416604051908152f35b6040516323d3ad8160e21b8152600490fd5b503461000e576000806003193601126103cb5760085481906001600160a01b0381169061087433831461139f565b6001600160a01b0319166008557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e576008546040516001600160a01b039091168152602090f35b503461000e576000806003193601126103cb57604051816003546108f581610e6c565b808452906001908181169081156103a3575060011461091e576103468461033a81880382610b4a565b60038352602094507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061096457505050816103469361033a928201019361032a565b8054858501870152928501928101610948565b503461000e57600036600319011261000e57602060405160068152f35b50602036600319011261000e576004356109ce620a2c2a6109c7836109c26000546000199060015490030190565b611684565b111561178e565b60018114808015610a72575b8015610a68575b6109ea906117da565b15610a3457610a026617a93c16344000341015611821565b610a0c813361186d565b337f52277f0b4a9b555c5aa96900a13546f972bda413737ec164aac947c87eec6024600080a3005b60068103610a4b57610a46813361186d565b610a0c565b610a5e66ec9c58de0a8000341015611821565b610a46813361186d565b50600c82146109e1565b50600682146109da565b503461000e57604036600319011261000e57610a96610423565b6024359081151580920361000e573360009081526007602090815260408083206001600160a01b0385168452909152902060ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b50634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b03821117610b3d57604052565b610b45610b0b565b604052565b90601f801991011681019081106001600160401b03821117610b3d57604052565b6020906001600160401b038111610b88575b601f01601f19160190565b610b90610b0b565b610b7d565b50608036600319011261000e57610baa610423565b610bb2610439565b606435916001600160401b03831161000e573660238401121561000e57826004013591610bde83610b6b565b92610bec6040519485610b4a565b808452366024828701011161000e5760208160009260246106cd98018388013785010152604435916111e8565b503461000e57602036600319011261000e57610346610c39600435611566565b6040519182916020835260208301906102b4565b503461000e57600036600319011261000e576020604051600c8152f35b503461000e57610c7936610507565b610c8e60018060a01b0360085416331461139f565b6001600160401b038111610d6a575b610cb181610cac600b54610e6c565b611487565b6000601f8211600114610cec578192600092610ce1575b5050600019600383901b1c191660019190911b17600b55005b013590503880610cc8565b600b600052601f198216927f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db991805b858110610d5257508360019510610d38575b505050811b01600b55005b0135600019600384901b60f8161c19169055388080610d2d565b90926020600181928686013581550194019101610d1b565b610d72610b0b565b610c9d565b503461000e57604036600319011261000e57602060ff610dc9610d98610423565b610da0610439565b6001600160a01b0391821660009081526007865260408082209290931681526020919091522090565b54166040519015158152f35b503461000e57602036600319011261000e57610def610423565b6008546001600160a01b0390610e08908216331461139f565b811615610e18576106cd906113ea565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b90600182811c92168015610e9c575b6020831014610e8657565b634e487b7160e01b600052602260045260246000fd5b91607f1691610e7b565b60405190600082600a5491610eba83610e6c565b808352600193808516908115610f425750600114610ee2575b50610ee092500383610b4a565b565b600a60009081527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a894602093509091905b818310610f2a575050610ee0935082010138610ed3565b85548884018501529485019487945091830191610f13565b9050610ee094506020925060ff191682840152151560051b82010138610ed3565b6000818060011115610f82575b604051636f96cda160e11b8152600490fd5b8154811015610f705781526004906020918083526040928383205494600160e01b861615610fb257505050610f70565b93929190935b8515610fc657505050505090565b60001901808352818552838320549550610fb8565b8060011115908161100a575b81610ff0575090565b90506000526004602052600160e01b604060002054161590565b60005481109150610fe7565b9061102083610f63565b6001600160a01b03838116928282168490036111d7576000868152600660205260409020805490926110656001600160a01b03881633908114908414171590565b1590565b61117c575b821695861561116a576110bd9361109b92611160575b506001600160a01b0316600090815260056020526040902090565b80546000190190556001600160a01b0316600090815260056020526040902090565b80546001019055600160e11b804260a01b8517176110e5866000526004602052604060002090565b55811615611116575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b6001840161112e816000526004602052604060002090565b541561113b575b506110ee565b600054811461113557611158906000526004602052604060002090565b553880611135565b6000905538611080565b604051633a954ecd60e21b8152600490fd5b6111c06110616111b9336111a28b60018060a01b03166000526007602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b1561106a57604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9291906111f6828286611016565b803b611203575b50505050565b61120c93611376565b1561121a57388080806111fd565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261000e57516102ea81610210565b6102ea939260809260018060a01b0316825260006020830152604082015281606082015201906102b4565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526102ea929101906102b4565b3d156112c8573d906112ae82610b6b565b916112bc6040519384610b4a565b82523d6000602084013e565b606090565b6112f660209160009394604051948580948193630a85bd0160e11b998a84523360048501611241565b03926001600160a01b03165af160009181611346575b506113385761131961129d565b80519081611333576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b61136891925060203d811161136f575b6113608183610b4a565b81019061122c565b903861130c565b503d611356565b926020916112f6936000604051809681958294630a85bd0160e11b9a8b8552336004860161126c565b156113a657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600880546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b601f811161143f575050565b600090600a825260208220906020601f850160051c8301941061147d575b601f0160051c01915b82811061147257505050565b818155600101611466565b909250829061145d565b601f8111611493575050565b600090600b825260208220906020601f850160051c830194106114d1575b601f0160051c01915b8281106114c657505050565b8181556001016114ba565b90925082906114b1565b600b54600092916114eb82610e6c565b9160019081811690811561153c575060011461150657505050565b9091929350600b60005260209081600020906000915b85831061152b57505050500190565b80548584015291830191810161151c565b60ff191683525050811515909102019150565b9061156260209282815194859201610291565b0190565b60095461157657506102ea610ea6565b61157f81610fdb565b156115b9576102ea6115936115ab926116b8565b6040519283916115a5602084016114db565b9061154f565b03601f198101835282610b4a565b60405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608490fd5b50634e487b7160e01b600052601160045260246000fd5b9061163782610b6b565b6116446040519182610b4a565b8281528092611655601f1991610b6b565b0190602036910137565b60001981019190821161166e57565b610ee0611616565b603001908160301161166e57565b9190820180921161166e57565b9081518110156116a2570160200190565b634e487b7160e01b600052603260045260246000fd5b8015611752576000818181805b61172857506116d38161162d565b935b6116df5750505090565b6116e89061165f565b90600a906117136117036116fd848406611676565b60ff1690565b60f81b6001600160f81b03191690565b841a61171f8487611691565b530490816116d5565b91506001600a916000198114611745575b019104808492916116c5565b61174d611616565b611739565b50604051604081018181106001600160401b03821117611781575b60405260018152600360fc1b602082015290565b611789610b0b565b61176d565b1561179557565b60405162461bcd60e51b815260206004820152601e60248201527f4552433732313a2045786365656473206d6178696d756d20737570706c7900006044820152606490fd5b156117e157565b60405162461bcd60e51b81526020600482015260186024820152774552433732313a20496e76616c6964207175616e7469747960401b6044820152606490fd5b1561182857565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20496e73756666696369656e74207061796d656e74000000006044820152606490fd5b6040805161187a81610b22565b60009384825284549381156119b3576001600160a01b038116600090815260056020526040902080546801000000000000000184020190556000858152600460205260409020600192906001600160a01b038316904260a01b85841460e11b17821790558187019684807fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9280858d868180a4015b8981036119a4575050501561199457858755813b611931575b50505050505050565b85039180805b611954575b5050505050508154036103cb57808080808080611928565b15611987575b8661196c6110618684870196866112cd565b6119765781611937565b85516368d2bf6b60e11b8152600490fd5b85831061195a578061193c565b8451622e076360e81b8152600490fd5b80848c858180a401859061190f565b835163b562e8dd60e01b8152600490fdfea2646970667358221220f3c5ed5fb9c06346473a4db8beb13428954a169d4124181928403c021b08da4464736f6c63430008110033

Loading