ETH Price: $2,824.45 (+7.68%)
 

Overview

Max Total Supply

5,685 CNPR

Holders

2,490

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 CNPR
0x9cd181cf073be4a04cdbc6b6a7700beae390b11a
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
CNPR

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 800 runs

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

import "erc721a/contracts/ERC721A.sol";
import "./CNPRadmin.sol";
import {CouponSet} from "./lib/CouponSet.sol";
import "./lib/CNPRdescriptor.sol";

/**
 *  @title The CNPR ERC-721A token.
 *  @dev This is the contract we deploy to the blockchain.
 */
contract CNPR is CNPRadmin, ERC721A("CNP Rookies", "CNPR") {
    using CouponSet for CouponSet.Coupon;

    constructor(address _adminSigner) {
        admin = address(0);
        adminSigner = _adminSigner;
        _safeMint(WITHDRAW_ADDRESS, 500);
    }

    /**
     *  @notice If the conditions are met, a CNPR token is minted and sent to the specified address.
     *  @dev Whitelist authentication creates an off-chain signed coupon for each address and restores the public address for authentication (ECDSA).
     *  @param _quantity Amount of tokens.
     *  @param _allotted The total number of tokens the minter is allowed to claim.
     *  @param _coupon Coupon for verifying the signer.
     */
    function presaleMint(
        uint256 _quantity,
        uint256 _allotted,
        CouponSet.Coupon memory _coupon
    ) external payable {
        require(phase == SalePhase.PreSale, "presale event is not active");
        require(_quantity != 0, "the quantity is zero");
        require(
            _coupon._isVerifiedCoupon(
                CouponSet.CouponType.Presale,
                _allotted,
                presaleMintIndex,
                adminSigner
            ),
            "invalid coupon"
        );
        require(
            presaleMintCount[msg.sender] + _quantity <= _allotted,
            "exceeds number of earned Tokens"
        );
        require(MINT_COST * _quantity <= msg.value, "not enough eth");
        require(
            _quantity + totalSupply() <= MAX_SUPPLY,
            "claim is over the max supply"
        );
        presaleMintCount[msg.sender] += _quantity;
        _safeMint(msg.sender, _quantity);
    }

    /**
     *  @notice If the conditions are met, the existing tokens are burned and new tokens are minted.
     *  @dev Whitelist authentication creates an off-chain signed coupon for each address and restores the public address for authentication (ECDSA).
     *  @param _burnTokenIds The ID of tokens to be burned.
     *  @param _allotted The total number of tokens the minter is allowed to claim.
     *  @param _coupon Coupon for verifying the signer.
     */
    function burnMint(
        uint256[] memory _burnTokenIds,
        uint256 _allotted,
        CouponSet.Coupon memory _coupon
    ) external payable {
        require(phase == SalePhase.BurnMint, "burn mint is not activated");
        require(_burnTokenIds.length != 0, "the quantity is zero");
        require(
            _coupon._isVerifiedCoupon(
                CouponSet.CouponType.BurnMint,
                _allotted,
                burnMintIndex,
                adminSigner
            ),
            "invalid coupon"
        );
        require(
            burnMintStructs[burnMintIndex].numberOfBurnMintByAddress[
                msg.sender
            ] +
                _burnTokenIds.length <=
                _allotted,
            "address already claimed max amount"
        );
        require(
            burnMintCost * _burnTokenIds.length <= msg.value,
            "not enough eth"
        );
        require(
            _burnTokenIds.length + _totalBurned() <= maxBurnMintSupply,
            "over total burn count"
        );

        burnMintStructs[burnMintIndex].numberOfBurnMintByAddress[
                msg.sender
            ] += _burnTokenIds.length;

        for (uint256 i = 0; i < _burnTokenIds.length; i++) {
            uint256 tokenId = _burnTokenIds[i];
            require(
                _msgSender() == ownerOf(tokenId),
                "sender is not the owner of the token"
            );
            _burn(tokenId);
        }

        _safeMint(msg.sender, _burnTokenIds.length);
    }

    /**
     *  @notice Only owners or admins can use this function to mint CNPR tokens.
     *  @dev Tokens held by the operation are minted by the constructor, but this function is used when there is an urgent need for more.
     *  It is also used for airdropping.
     *  Only callable by the owner or admin.
     *  @param _to The Address to send token.
     *  @param _quantity The amount of tokens to be minted.
     */
    function adminMint(address[] calldata _to, uint256[] memory _quantity)
        external
        onlyAdmin
    {
        require(
            _to.length == _quantity.length,
            "the address and quantity do not match"
        );

        uint256 _mintAmount = 0;
        for (uint256 i = 0; i < _quantity.length; i++) {
            require(_quantity[i] != 0, "the quantity is zero");
            _mintAmount += _quantity[i];
        }

        require(
            _mintAmount + totalSupply() <= MAX_SUPPLY,
            "claim is over the max supply"
        );

        for (uint256 i = 0; i < _quantity.length; i++) {
            _safeMint(_to[i], _quantity[i]);
        }
    }

    /**
     *  @notice Given a token ID, construct a token URI for the CNPR.
     *  @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     *  @param _tokenId The token id.
     */
    function tokenURI(uint256 _tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(_exists(_tokenId), "URI query for nonexistent token");

        if (isOnchain) {
            return descriptor.tokenURI(_tokenId);
        }

        return
            string(abi.encodePacked(ERC721A.tokenURI(_tokenId), baseExtension));
    }

    /**
     *  @dev Returns whether `tokenId` exists.
     */
    function exists(uint256 tokenId) public view virtual returns (bool) {
        return _exists(tokenId);
    }

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

    /**
     *  @dev Return the URI of the base
     */
    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    /**
     *  @dev Set start to 1 for token ID.
     */
    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }
}

File 2 of 10 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Reference type for token approval.
    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 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 {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

        _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]`.
        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 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 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 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.
            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`.
                )

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

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

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

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

File 3 of 10 : CNPRadmin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "./CNPRcore.sol";
import "./interface/ICNPRdescriptor.sol";

/**
 *  @title CNPRadmin abstract contract for CNPR.
 *  @dev A collection of functions that can only be operated by the owner or admin.
 */
abstract contract CNPRadmin is CNPRcore {
    /**
     *  @notice Check to see if you have admins' permissions.
     */
    modifier onlyAdmin() {
        require(
            owner() == _msgSender() || admin == _msgSender(),
            "caller is not the admin"
        );
        _;
    }

    /**
     *  @notice Move money to a designated address in an emergency.
     *  @dev Allow the owner to send funds directly to the recipient.
     *  This is for emergency purposes and use withdraw for regular withdraw.
     *  Only callable by the owner.
     *  @param _recipient The address of the recipient.
     */
    function emergencyWithdraw(address _recipient) external onlyOwner {
        require(_recipient != address(0), "recipient shouldn't be 0");
        (bool sent, ) = _recipient.call{value: address(this).balance}("");
        require(sent, "failed to withdraw");
    }

    /**
     *  @notice Move all of the funds to the fund manager contract.
     *  @dev Only callable by the admin.
     */
    function withdraw() external onlyAdmin {
        require(
            WITHDRAW_ADDRESS != address(0),
            "WITHDRAW_ADDRESS shouldn't be 0"
        );
        (bool sent, ) = WITHDRAW_ADDRESS.call{value: address(this).balance}("");
        require(sent, "failed to move fund to WITHDRAW_ADDRESS contract");
    }

    /**
     *  @notice Set the admin.
     *  @dev Only callable by the owner.
     *  @param _admin The address of the admin.
     */
    function setAdmin(address _admin) external onlyOwner {
        require(_admin != address(0), "address shouldn't be 0");
        admin = _admin;
    }

    /**
     *  @notice Set the adminSigner.
     *  @dev Only callable by the or admin.
     *  @param _adminSigner The address of the adminSigner.
     */
    function setAdminSigner(address _adminSigner) external onlyAdmin {
        require(_adminSigner != address(0), "address shouldn't be 0");
        adminSigner = _adminSigner;
    }

    /**
     *  @notice Set the phase.
     *  @dev Only callable by the admin.
     *  @param _phase The phase number of the project.
     */
    function setPhase(SalePhase _phase) external onlyAdmin {
        phase = _phase;
    }

    /**
     *  @notice Set the burn mint cost.
     *  @dev Only callable by the admin.
     *  @param _cost The cost of the burn mint.
     */
    function setBurnMintCost(uint256 _cost) external onlyAdmin {
        burnMintCost = _cost;
    }

    /**
     *  @notice Set the max amount supply of burn mint.
     *  @dev Only callable by the admin.
     *  @param _amount The max amount supply of the burn mint.
     */
    function setMaxBurnMintSupply(uint256 _amount) external onlyAdmin {
        maxBurnMintSupply = _amount;
    }

    /**
     *  @notice Set the index of the presale coupon.
     *  @dev Only callable by the admin.
     *  @param _index The index of the presale mint.
     */
    function setPresaleMintIndex(uint256 _index) external onlyAdmin {
        presaleMintIndex = _index;
    }

    /**
     *  @notice Set the index to change the burn mint count each time and the coupon index.
     *  Makes the previous index used and unusable.
     *  @dev Only callable by the admin.
     *  @param _index The index of the burn mint.
     */
    function setBurnMintIndex(uint256 _index) external onlyAdmin {
        require(
            burnMintStructs[_index].isDone != true,
            "this index has already been used"
        );
        bool done = !burnMintStructs[burnMintIndex].isDone;
        burnMintStructs[burnMintIndex].isDone = done;
        burnMintIndex = _index;
    }

    /**
     *  @notice Set the token URI descriptor.
     *  @dev Only callable by the admin.
     *  @param _descriptor The address of the descriptor.
     */
    function setCnprDescriptor(ICNPRdescriptor _descriptor) external onlyAdmin {
        bool onChain = true;
        isOnchain = onChain;
        descriptor = _descriptor;
    }

    /**
     *  @notice Set the base URI for all token IDs.
     *  @dev Only callable by the admin.
     *  @param _baseURI The baseURI of the token.
     */
    function setBaseURI(string memory _baseURI) external onlyAdmin {
        baseURI = _baseURI;
    }

    /**
     *  @notice Set the base URI extension for all token IDs.
     *  @dev Only callable by the admin.
     *  @param _baseExtension The base extension of the token.
     */
    function setBaseExtension(string memory _baseExtension) external onlyAdmin {
        baseExtension = _baseExtension;
    }

    /**
     *  @notice Toggle a boolean value that determines if `tokenURI` returns an on-chain or off-chain.
     *  @dev Only callable by the admin.
     */
    function toggleOnchain() external onlyAdmin {
        bool onChain = !isOnchain;
        isOnchain = onChain;
    }

    /**
     *  @notice Get a boolean value whether the index was used for burn minting or not.
     *  @return True or false.
     */
    function getBurnMintIsdone() external view returns (bool) {
        return burnMintStructs[burnMintIndex].isDone;
    }

    /**
     *  @notice Get the number of burn mint set for an address.
     *  @param _address The address to be set in numberOfBurnMintByAddress.
     *  @return The number of burn mint set at the address.
     */
    function getBurnMintCount(address _address)
        external
        view
        returns (uint256)
    {
        return
            burnMintStructs[burnMintIndex].numberOfBurnMintByAddress[_address];
    }
}

File 4 of 10 : CouponSet.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

/**
 *  @title Coupon set methods specified address.
 *  @notice Contains the methods necessary to authenticate the coupon.
 */
library CouponSet {
    // The coupon struct generated by the signing process off-chain
    struct Coupon {
        bytes32 r;
        bytes32 s;
        uint8 v;
    }

    // The coupon type
    enum CouponType {
        Presale,
        BurnMint
    }

    /**
     *  @notice Check if the coupon you were given is the correct one.
     *  @dev Use the ecrecover function to recover the public address and check if it is the same as the address set on the contract side.
     *  @param _coupon Coupon for verifying the signer.
     *  @param _couponType The coupon type used by _createDigest.
     *  @param _allotted The total number of tokens that can be claimed by miners used in _createDigest.
     *  @param _index Index of coupon used in _createDigest.
     *  @param _adminSigner Address of adminSigner.
     *  @return True or false.
     */
    function _isVerifiedCoupon(
        Coupon memory _coupon,
        CouponType _couponType,
        uint256 _allotted,
        uint256 _index,
        address _adminSigner
    ) internal view returns (bool) {
        bytes32 digest = _createDigest(_couponType, _allotted, _index);
        address signer = ecrecover(digest, _coupon.v, _coupon.r, _coupon.s);
        require(signer != address(0), "ECDSA: invalid signature");
        return signer == _adminSigner;
    }

    /**
     *  @notice Creates the encrypted data needed to authenticate the coupon.
     *  @dev Create a 32-byte hash from the coupon type, the total number that can be requested, and the sender's address.
     *  @param _couponType The coupon type(Presale or BurnMint).
     *  @param _allotted The total number of tokens the minter is allowed to claim.
     *  @param _index Index of coupon.
     *  @return A 32-byte hash created from the coupon type, the total number of coupons that can be requested, and the sender's address.
     */
    function _createDigest(
        CouponType _couponType,
        uint256 _allotted,
        uint256 _index
    ) internal view returns (bytes32) {
        return
            keccak256(abi.encode(_couponType, _allotted, _index, msg.sender));
    }
}

File 5 of 10 : CNPRdescriptor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "../interface/ICNPRdescriptor.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

/**
 *  @title CnprDescriptor contract for CNPR tokenURI.
 *  @dev Ensure that when gas prices become lower in the future, they can be easily transitioned to on-chain.
 */
contract CNPRdescriptor is ICNPRdescriptor, Ownable {
    // The baseURI of metadata
    string public baseURI;

    // The Extension of URI
    string public baseExtension = ".json";

    /**
     *  @notice Given a token ID, construct a token URI for the CNPR.
     *  @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     *  @param _tokenId The token id.
     */
    function tokenURI(uint256 _tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        return dataURI(_tokenId);
    }

    /**
     *  @notice Given a token ID , construct a data URI for the CNPR.
     *  @param _tokenId The token id.
     *  @return The data URI for CNPR.
     */
    function dataURI(uint256 _tokenId) public view returns (string memory) {
        return string(abi.encodePacked(_tokenURI(_tokenId), baseExtension));
    }

    /**
     *  @dev Return the token URI.
     *  @param _tokenId The token id.
     *  @return The token URI for CNPR.
     */
    function _tokenURI(uint256 _tokenId) internal view returns (string memory) {
        string memory baseURI_ = _baseURI();
        return
            bytes(baseURI_).length != 0
                ? string(abi.encodePacked(baseURI_, _toString(_tokenId)))
                : "";
    }

    /**
     *  @dev Return the URI of the base.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return baseURI;
    }

    /**
     *  @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value)
        internal
        pure
        virtual
        returns (string memory ptr)
    {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

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

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

    /**
     *  @notice Set the base URI for all token IDs.
     *  @dev Only callable by the owner.
     *  @param baseURI_ The baseURI of the token.
     */
    function setBaseURI(string memory baseURI_) external onlyOwner {
        baseURI = baseURI_;
    }

    /**
     *  @notice Set the base URI extension for all token IDs.
     *  @dev Only callable by the owner.
     *  @param _baseExtension The base extension of the token.
     */
    function setBaseExtension(string memory _baseExtension) external onlyOwner {
        baseExtension = _baseExtension;
    }
}

File 6 of 10 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                           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 7 of 10 : CNPRcore.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import "./interface/ICNPRdescriptor.sol";

/**
 *  @title Core abstract contract for CNPR.
 *  @dev Basic variables and other information are provided.
 */
abstract contract CNPRcore is Ownable {
    // Burn mint struct
    struct BurnMintStruct {
        bool isDone;
        mapping(address => uint256) numberOfBurnMintByAddress;
    }

    // Sale phase enum
    enum SalePhase {
        Locked,
        PreSale,
        BurnMint
    }

    // The CNPR token URI descriptor
    ICNPRdescriptor public descriptor;

    // Phase management
    SalePhase public phase = SalePhase.Locked;

    // Address of withdraw
    address public constant WITHDRAW_ADDRESS =
        0x7dDeE8b16F3F36cFb51De9dE2173dfD522909fb1;

    // Address of adminSigner
    address public adminSigner;

    // Address of admin
    address public admin;

    // The baseURI of metadata
    string public baseURI;

    // The Extension of URI
    string public baseExtension = ".json";

    // Maximum number of CNPR tokens can be minted
    uint256 public constant MAX_SUPPLY = 7777;

    // The CNPR token mint cost
    uint256 public constant MINT_COST = 0.001 ether;

    // Maximum number of BurnMint that can be done
    uint256 public maxBurnMintSupply = 2222;

    // Burn mint cost
    uint256 public burnMintCost = 0.001 ether;

    // Presale mint index
    uint256 public presaleMintIndex;

    // Burn mint index
    uint256 public burnMintIndex;

    // The bool switching to on-chain
    bool public isOnchain;

    // The mapping presale mint count
    mapping(address => uint256) public presaleMintCount;

    // The burn mint struct (index => BurnMintStruct)
    mapping(uint256 => BurnMintStruct) public burnMintStructs;
}

File 8 of 10 : ICNPRdescriptor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

interface ICNPRdescriptor {
    function tokenURI(uint256 _tokenId) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_adminSigner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","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":"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":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_quantity","type":"uint256[]"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_burnTokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_allotted","type":"uint256"},{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct CouponSet.Coupon","name":"_coupon","type":"tuple"}],"name":"burnMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"burnMintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnMintStructs","outputs":[{"internalType":"bool","name":"isDone","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"contract ICNPRdescriptor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getBurnMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnMintIsdone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"isOnchain","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBurnMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"phase","outputs":[{"internalType":"enum CNPRcore.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_allotted","type":"uint256"},{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct CouponSet.Coupon","name":"_coupon","type":"tuple"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adminSigner","type":"address"}],"name":"setAdminSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setBurnMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"setBurnMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICNPRdescriptor","name":"_descriptor","type":"address"}],"name":"setCnprDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxBurnMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum CNPRcore.SalePhase","name":"_phase","type":"uint8"}],"name":"setPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"setPresaleMintIndex","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":[],"name":"toggleOnchain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6001805460ff60a01b1916905560c06040526005608081905264173539b7b760d91b60a0908152620000339190816200041e565b506108ae60065566038d7ea4c680006007553480156200005257600080fd5b50604051620037b3380380620037b38339810160408190526200007591620004c4565b6040518060400160405280600b81526020016a434e5020526f6f6b69657360a81b8152506040518060400160405280600481526020016321a7282960e11b815250620000d0620000ca6200015360201b60201c565b62000157565b8151620000e590600f9060208501906200041e565b508051620000fb9060109060208401906200041e565b506001600d555050600380546001600160a01b0319908116909155600280549091166001600160a01b0383161790556200014c737ddee8b16f3f36cfb51de9de2173dfd522909fb16101f4620001a7565b50620005da565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620001c9828260405180602001604052806000815250620001cd60201b60201c565b5050565b620001d9838362000244565b6001600160a01b0383163b156200023f57600d548281035b600181019062000207906000908790866200031d565b62000225576040516368d2bf6b60e11b815260040160405180910390fd5b818110620001f15781600d54146200023c57600080fd5b50505b505050565b600d5481620002665760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526012602090815260408083208054680100000000000000018802019055848352601190915281206001851460e11b4260a01b17831790558284019083908390600080516020620037938339815191528180a4600183015b818114620002f5578083600060008051602062003793833981519152600080a4600101620002cc565b50816200031457604051622e076360e81b815260040160405180910390fd5b600d5550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200035490339089908890889060040162000522565b602060405180830381600087803b1580156200036f57600080fd5b505af1925050508015620003a2575060408051601f3d908101601f191682019092526200039f91810190620004f6565b60015b62000401573d808015620003d3576040519150601f19603f3d011682016040523d82523d6000602084013e620003d8565b606091505b508051620003f9576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b8280546200042c906200059d565b90600052602060002090601f0160209004810192826200045057600085556200049b565b82601f106200046b57805160ff19168380011785556200049b565b828001600101855582156200049b579182015b828111156200049b5782518255916020019190600101906200047e565b50620004a9929150620004ad565b5090565b5b80821115620004a95760008155600101620004ae565b600060208284031215620004d757600080fd5b81516001600160a01b0381168114620004ef57600080fd5b9392505050565b6000602082840312156200050957600080fd5b81516001600160e01b031981168114620004ef57600080fd5b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620005715785810182015185820160a00152810162000553565b828111156200058457600060a084870101525b5050601f01601f19169190910160a00195945050505050565b600181811c90821680620005b257607f821691505b60208210811415620005d457634e487b7160e01b600052602260045260246000fd5b50919050565b6131a980620005ea6000396000f3fe60806040526004361061034a5760003560e01c8063715018a6116101bb578063c03afb59116100f7578063e6430ef711610095578063f2fde38b1161006f578063f2fde38b14610990578063f851a440146109b0578063fd524666146109d0578063ff9d2dcc146109f057600080fd5b8063e6430ef71461090a578063e985e9c514610920578063ea639c1c1461096957600080fd5b8063c87b56dd116100d1578063c87b56dd146108a0578063d89135cd146108c0578063da3ef23f146108d5578063df5a1dd0146108f557600080fd5b8063c03afb5914610850578063c662e48114610870578063c66828621461088b57600080fd5b8063a22cb46511610164578063b1c9fe6e1161013e578063b1c9fe6e146107c8578063b34d0547146107f6578063b88d4fde14610816578063b8f962ca1461083657600080fd5b8063a22cb46514610772578063a49340cc14610792578063ae2243c9146107b257600080fd5b806395d89b411161019557806395d89b41146107275780639bbb8ec31461073c5780639c02757a1461075c57600080fd5b8063715018a6146106ac5780637a0ad11d146106c15780638da5cb5b1461070957600080fd5b80633c9b96bb1161028a5780636352211e116102335780636e3bd6b11161020d5780636e3bd6b11461062c5780636ff1c9bc1461064c578063704b6c021461066c57806370a082311461068c57600080fd5b80636352211e146105e157806365093f83146106015780636c0360eb1461061757600080fd5b806342842e0e1161026457806342842e0e146105815780634f558e79146105a157806355f804b3146105c157600080fd5b80633c9b96bb146105395780633ccfd60b146105595780633d0648de1461056e57600080fd5b8063122e04a8116102f757806320e6e82b116102d157806320e6e82b146104b357806323b872dd146104e3578063303e74df1461050357806332cb6b0c1461052357600080fd5b8063122e04a81461044e57806318160ddd14610476578063183bbe801461049357600080fd5b8063094e407211610328578063094e4072146103de578063095ea7b314610419578063096f28271461043b57600080fd5b806301ffc9a71461034f57806306fdde0314610384578063081812fc146103a6575b600080fd5b34801561035b57600080fd5b5061036f61036a366004612caf565b610a10565b60405190151581526020015b60405180910390f35b34801561039057600080fd5b50610399610a62565b60405161037b9190612fab565b3480156103b257600080fd5b506103c66103c1366004612dca565b610af4565b6040516001600160a01b03909116815260200161037b565b3480156103ea57600080fd5b5061040b6103f9366004612a4a565b600b6020526000908152604090205481565b60405190815260200161037b565b34801561042557600080fd5b50610439610434366004612b94565b610b38565b005b610439610449366004612c57565b610bd8565b34801561045a57600080fd5b506103c6737ddee8b16f3f36cfb51de9de2173dfd522909fb181565b34801561048257600080fd5b50600e54600d54036000190161040b565b34801561049f57600080fd5b506104396104ae366004612a4a565b610f23565b3480156104bf57600080fd5b5061036f6104ce366004612dca565b600c6020526000908152604090205460ff1681565b3480156104ef57600080fd5b506104396104fe366004612aa0565b610ff8565b34801561050f57600080fd5b506001546103c6906001600160a01b031681565b34801561052f57600080fd5b5061040b611e6181565b34801561054557600080fd5b50610439610554366004612dca565b611193565b34801561056557600080fd5b50610439611279565b61043961057c366004612de3565b6113ab565b34801561058d57600080fd5b5061043961059c366004612aa0565b61160a565b3480156105ad57600080fd5b5061036f6105bc366004612dca565b611625565b3480156105cd57600080fd5b506104396105dc366004612d0a565b611630565b3480156105ed57600080fd5b506103c66105fc366004612dca565b6116a4565b34801561060d57600080fd5b5061040b60085481565b34801561062357600080fd5b506103996116af565b34801561063857600080fd5b50610439610647366004612dca565b61173d565b34801561065857600080fd5b50610439610667366004612a4a565b61179f565b34801561067857600080fd5b50610439610687366004612a4a565b6118a0565b34801561069857600080fd5b5061040b6106a7366004612a4a565b611920565b3480156106b857600080fd5b5061043961196f565b3480156106cd57600080fd5b5061040b6106dc366004612a4a565b6009546000908152600c602090815260408083206001600160a01b03909416835260019093019052205490565b34801561071557600080fd5b506000546001600160a01b03166103c6565b34801561073357600080fd5b50610399611983565b34801561074857600080fd5b50610439610757366004612dca565b611992565b34801561076857600080fd5b5061040b60075481565b34801561077e57600080fd5b5061043961078d366004612b61565b6119f4565b34801561079e57600080fd5b506104396107ad366004612bc0565b611a8a565b3480156107be57600080fd5b5061040b60095481565b3480156107d457600080fd5b506001546107e990600160a01b900460ff1681565b60405161037b9190612f91565b34801561080257600080fd5b50610439610811366004612dca565b611cdb565b34801561082257600080fd5b50610439610831366004612ae1565b611d3d565b34801561084257600080fd5b50600a5461036f9060ff1681565b34801561085c57600080fd5b5061043961086b366004612ce9565b611d87565b34801561087c57600080fd5b5061040b66038d7ea4c6800081565b34801561089757600080fd5b50610399611e2c565b3480156108ac57600080fd5b506103996108bb366004612dca565b611e39565b3480156108cc57600080fd5b5061040b611f4d565b3480156108e157600080fd5b506104396108f0366004612d0a565b611f5d565b34801561090157600080fd5b50610439611fcd565b34801561091657600080fd5b5061040b60065481565b34801561092c57600080fd5b5061036f61093b366004612a67565b6001600160a01b03918216600090815260146020908152604080832093909416825291909152205460ff1690565b34801561097557600080fd5b506009546000908152600c602052604090205460ff1661036f565b34801561099c57600080fd5b506104396109ab366004612a4a565b61203e565b3480156109bc57600080fd5b506003546103c6906001600160a01b031681565b3480156109dc57600080fd5b506104396109eb366004612a4a565b6120cb565b3480156109fc57600080fd5b506002546103c6906001600160a01b031681565b60006301ffc9a760e01b6001600160e01b031983161480610a4157506380ac58cd60e01b6001600160e01b03198316145b80610a5c5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600f8054610a719061307a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9d9061307a565b8015610aea5780601f10610abf57610100808354040283529160200191610aea565b820191906000526020600020905b815481529060010190602001808311610acd57829003601f168201915b5050505050905090565b6000610aff82612159565b610b1c576040516333d1c03960e21b815260040160405180910390fd5b506000908152601360205260409020546001600160a01b031690565b6000610b43826116a4565b9050336001600160a01b03821614610b7c57610b5f813361093b565b610b7c576040516367d9dca160e11b815260040160405180910390fd5b60008281526013602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6002600154600160a01b900460ff166002811115610bf857610bf86130e6565b14610c4a5760405162461bcd60e51b815260206004820152601a60248201527f6275726e206d696e74206973206e6f742061637469766174656400000000000060448201526064015b60405180910390fd5b8251610c8f5760405162461bcd60e51b8152602060048201526014602482015273746865207175616e74697479206973207a65726f60601b6044820152606401610c41565b600954600254610cae91839160019186916001600160a01b031661218e565b610ceb5760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b7bab837b760911b6044820152606401610c41565b82516009546000908152600c602090815260408083203384526001019091529020548391610d1891613017565b1115610d715760405162461bcd60e51b815260206004820152602260248201527f6164647265737320616c726561647920636c61696d6564206d617820616d6f756044820152611b9d60f21b6064820152608401610c41565b348351600754610d81919061302f565b1115610dc05760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b6044820152606401610c41565b600654600e548451610dd29190613017565b1115610e205760405162461bcd60e51b815260206004820152601560248201527f6f76657220746f74616c206275726e20636f756e7400000000000000000000006044820152606401610c41565b82516009546000908152600c6020908152604080832033845260010190915281208054909190610e51908490613017565b90915550600090505b8351811015610f12576000848281518110610e7757610e776130fc565b60200260200101519050610e8a816116a4565b6001600160a01b0316336001600160a01b031614610ef65760405162461bcd60e51b8152602060048201526024808201527f73656e646572206973206e6f7420746865206f776e6572206f6620746865207460448201526337b5b2b760e11b6064820152608401610c41565b610eff8161228f565b5080610f0a816130b5565b915050610e5a565b50610f1e33845161229a565b505050565b6000546001600160a01b0316331480610f4657506003546001600160a01b031633145b610f805760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b6001600160a01b038116610fd65760405162461bcd60e51b815260206004820152601660248201527f616464726573732073686f756c646e27742062652030000000000000000000006044820152606401610c41565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000611003826122b4565b9050836001600160a01b0316816001600160a01b0316146110365760405162a1148160e81b815260040160405180910390fd5b600082815260136020526040902080546110628187335b6001600160a01b039081169116811491141790565b61108d57611070863361093b565b61108d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166110b457604051633a954ecd60e21b815260040160405180910390fd5b80156110bf57600082555b6001600160a01b038681166000908152601260205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260116020526040902055600160e11b831661114a576001840160008181526011602052604090205461114857600d5481146111485760008181526011602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000546001600160a01b03163314806111b657506003546001600160a01b031633145b6111f05760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b6000818152600c602052604090205460ff161515600114156112545760405162461bcd60e51b815260206004820181905260248201527f7468697320696e6465782068617320616c7265616479206265656e20757365646044820152606401610c41565b600980546000908152600c60205260409020805460ff19811660ff9091161517905555565b6000546001600160a01b031633148061129c57506003546001600160a01b031633145b6112d65760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b604051600090737ddee8b16f3f36cfb51de9de2173dfd522909fb19047908381818185875af1925050503d806000811461132c576040519150601f19603f3d011682016040523d82523d6000602084013e611331565b606091505b50509050806113a85760405162461bcd60e51b815260206004820152603060248201527f6661696c656420746f206d6f76652066756e6420746f2057495448445241575f60448201527f4144445245535320636f6e7472616374000000000000000000000000000000006064820152608401610c41565b50565b60018054600160a01b900460ff1660028111156113ca576113ca6130e6565b146114175760405162461bcd60e51b815260206004820152601b60248201527f70726573616c65206576656e74206973206e6f742061637469766500000000006044820152606401610c41565b8261145b5760405162461bcd60e51b8152602060048201526014602482015273746865207175616e74697479206973207a65726f60601b6044820152606401610c41565b60085460025461147a91839160009186916001600160a01b031661218e565b6114b75760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b7bab837b760911b6044820152606401610c41565b336000908152600b602052604090205482906114d4908590613017565b11156115225760405162461bcd60e51b815260206004820152601f60248201527f65786365656473206e756d626572206f66206561726e656420546f6b656e73006044820152606401610c41565b346115348466038d7ea4c6800061302f565b11156115735760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b6044820152606401610c41565b600e54600d54611e619190036000190161158d9085613017565b11156115db5760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c79000000006044820152606401610c41565b336000908152600b6020526040812080548592906115fa908490613017565b90915550610f1e9050338461229a565b610f1e83838360405180602001604052806000815250611d3d565b6000610a5c82612159565b6000546001600160a01b031633148061165357506003546001600160a01b031633145b61168d5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b80516116a0906004906020840190612881565b5050565b6000610a5c826122b4565b600480546116bc9061307a565b80601f01602080910402602001604051908101604052809291908181526020018280546116e89061307a565b80156117355780601f1061170a57610100808354040283529160200191611735565b820191906000526020600020905b81548152906001019060200180831161171857829003601f168201915b505050505081565b6000546001600160a01b031633148061176057506003546001600160a01b031633145b61179a5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600755565b6117a7612324565b6001600160a01b0381166117fd5760405162461bcd60e51b815260206004820152601860248201527f726563697069656e742073686f756c646e2774206265203000000000000000006044820152606401610c41565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461184a576040519150601f19603f3d011682016040523d82523d6000602084013e61184f565b606091505b50509050806116a05760405162461bcd60e51b815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610c41565b6118a8612324565b6001600160a01b0381166118fe5760405162461bcd60e51b815260206004820152601660248201527f616464726573732073686f756c646e27742062652030000000000000000000006044820152606401610c41565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611949576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526012602052604090205467ffffffffffffffff1690565b611977612324565b611981600061237e565b565b606060108054610a719061307a565b6000546001600160a01b03163314806119b557506003546001600160a01b031633145b6119ef5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600855565b6001600160a01b038216331415611a1e5760405163b06307db60e01b815260040160405180910390fd5b3360008181526014602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b0316331480611aad57506003546001600160a01b031633145b611ae75760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b80518214611b5d5760405162461bcd60e51b815260206004820152602560248201527f746865206164647265737320616e64207175616e7469747920646f206e6f742060448201527f6d617463680000000000000000000000000000000000000000000000000000006064820152608401610c41565b6000805b8251811015611c0457828181518110611b7c57611b7c6130fc565b602002602001015160001415611bcb5760405162461bcd60e51b8152602060048201526014602482015273746865207175616e74697479206973207a65726f60601b6044820152606401610c41565b828181518110611bdd57611bdd6130fc565b602002602001015182611bf09190613017565b915080611bfc816130b5565b915050611b61565b50600e54600d54611e6191900360001901611c1f9083613017565b1115611c6d5760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c79000000006044820152606401610c41565b60005b8251811015611cd457611cc2858583818110611c8e57611c8e6130fc565b9050602002016020810190611ca39190612a4a565b848381518110611cb557611cb56130fc565b602002602001015161229a565b80611ccc816130b5565b915050611c70565b5050505050565b6000546001600160a01b0316331480611cfe57506003546001600160a01b031633145b611d385760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600655565b611d48848484610ff8565b6001600160a01b0383163b15611d8157611d64848484846123ce565b611d81576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000546001600160a01b0316331480611daa57506003546001600160a01b031633145b611de45760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600180548291907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b836002811115611e2457611e246130e6565b021790555050565b600580546116bc9061307a565b6060611e4482612159565b611e905760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610c41565b600a5460ff1615611f1b5760015460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b158015611edf57600080fd5b505afa158015611ef3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a5c9190810190612d53565b611f24826124c6565b6005604051602001611f37929190612e6b565b6040516020818303038152906040529050919050565b6000611f58600e5490565b905090565b6000546001600160a01b0316331480611f8057506003546001600160a01b031633145b611fba5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b80516116a0906005906020840190612881565b6000546001600160a01b0316331480611ff057506003546001600160a01b031633145b61202a5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600a805460ff19811660ff90911615179055565b612046612324565b6001600160a01b0381166120c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c41565b6113a88161237e565b6000546001600160a01b03163314806120ee57506003546001600160a01b031633145b6121285760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600a805460ff1916600190811790915580546001600160a01b039092166001600160a01b0319909216919091179055565b60008160011115801561216d5750600d5482105b8015610a5c575050600090815260116020526040902054600160e01b161590565b60008061219c86868661254a565b9050600060018289604001518a600001518b60200151604051600081526020016040526040516121e8949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561220a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661226d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c41565b836001600160a01b0316816001600160a01b0316149250505095945050505050565b6113a8816000612582565b6116a08282604051806020016040528060008152506126c6565b6000818060011161230b57600d5481101561230b57600081815260116020526040902054600160e01b8116612309575b806123025750600019016000818152601160205260409020546122e4565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000546001600160a01b031633146119815760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c41565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612403903390899088908890600401612f1c565b602060405180830381600087803b15801561241d57600080fd5b505af192505050801561244d575060408051601f3d908101601f1916820190925261244a91810190612ccc565b60015b6124a8573d80801561247b576040519150601f19603f3d011682016040523d82523d6000602084013e612480565b606091505b5080516124a0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606124d182612159565b6124ee57604051630a14c4b560e41b815260040160405180910390fd5b60006124f861272c565b90508051600014156125195760405180602001604052806000815250612302565b806125238461273b565b604051602001612534929190612e3c565b6040516020818303038152906040529392505050565b6000838383336040516020016125639493929190612f58565b6040516020818303038152906040528051906020012090509392505050565b600061258d836122b4565b9050806000806125ab86600090815260136020526040902080549091565b9150915084156125eb576125c081843361104d565b6125eb576125ce833361093b565b6125eb57604051632ce44b5f60e11b815260040160405180910390fd5b80156125f657600082555b6001600160a01b038316600081815260126020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260116020526040902055600160e11b841661267d576001860160008181526011602052604090205461267b57600d54811461267b5760008181526011602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600e8054600101905550505050565b6126d0838361278a565b6001600160a01b0383163b15610f1e57600d548281035b6126fa60008683806001019450866123ce565b612717576040516368d2bf6b60e11b815260040160405180910390fd5b8181106126e75781600d5414611cd457600080fd5b606060048054610a719061307a565b604080516080810191829052607f0190826030600a8206018353600a90045b801561277857600183039250600a81066030018353600a900461275a565b50819003601f19909101908152919050565b600d54816127ab5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526012602090815260408083208054680100000000000000018802019055848352601190915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461285a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612822565b508161287857604051622e076360e81b815260040160405180910390fd5b600d5550505050565b82805461288d9061307a565b90600052602060002090601f0160209004810192826128af57600085556128f5565b82601f106128c857805160ff19168380011785556128f5565b828001600101855582156128f5579182015b828111156128f55782518255916020019190600101906128da565b50612901929150612905565b5090565b5b808211156129015760008155600101612906565b600061292d61292884612fef565b612fbe565b905082815283838301111561294157600080fd5b828260208301376000602084830101529392505050565b600082601f83011261296957600080fd5b8135602067ffffffffffffffff82111561298557612985613112565b8160051b612994828201612fbe565b8381528281019086840183880185018910156129af57600080fd5b600093505b858410156129d25780358352600193909301929184019184016129b4565b50979650505050505050565b6000606082840312156129f057600080fd5b6040516060810181811067ffffffffffffffff82111715612a1357612a13613112565b80604052508091508235815260208301356020820152604083013560ff81168114612a3d57600080fd5b6040919091015292915050565b600060208284031215612a5c57600080fd5b813561230281613128565b60008060408385031215612a7a57600080fd5b8235612a8581613128565b91506020830135612a9581613128565b809150509250929050565b600080600060608486031215612ab557600080fd5b8335612ac081613128565b92506020840135612ad081613128565b929592945050506040919091013590565b60008060008060808587031215612af757600080fd5b8435612b0281613128565b93506020850135612b1281613128565b925060408501359150606085013567ffffffffffffffff811115612b3557600080fd5b8501601f81018713612b4657600080fd5b612b558782356020840161291a565b91505092959194509250565b60008060408385031215612b7457600080fd5b8235612b7f81613128565b915060208301358015158114612a9557600080fd5b60008060408385031215612ba757600080fd5b8235612bb281613128565b946020939093013593505050565b600080600060408486031215612bd557600080fd5b833567ffffffffffffffff80821115612bed57600080fd5b818601915086601f830112612c0157600080fd5b813581811115612c1057600080fd5b8760208260051b8501011115612c2557600080fd5b602092830195509350908501359080821115612c4057600080fd5b50612c4d86828701612958565b9150509250925092565b600080600060a08486031215612c6c57600080fd5b833567ffffffffffffffff811115612c8357600080fd5b612c8f86828701612958565b93505060208401359150612ca685604086016129de565b90509250925092565b600060208284031215612cc157600080fd5b81356123028161313d565b600060208284031215612cde57600080fd5b81516123028161313d565b600060208284031215612cfb57600080fd5b81356003811061230257600080fd5b600060208284031215612d1c57600080fd5b813567ffffffffffffffff811115612d3357600080fd5b8201601f81018413612d4457600080fd5b6124be8482356020840161291a565b600060208284031215612d6557600080fd5b815167ffffffffffffffff811115612d7c57600080fd5b8201601f81018413612d8d57600080fd5b8051612d9b61292882612fef565b818152856020838501011115612db057600080fd5b612dc182602083016020860161304e565b95945050505050565b600060208284031215612ddc57600080fd5b5035919050565b600080600060a08486031215612df857600080fd5b8335925060208401359150612ca685604086016129de565b60008151808452612e2881602086016020860161304e565b601f01601f19169290920160200192915050565b60008351612e4e81846020880161304e565b835190830190612e6281836020880161304e565b01949350505050565b600083516020612e7e828583890161304e565b845491840191600090600181811c9080831680612e9c57607f831692505b858310811415612eba57634e487b7160e01b85526022600452602485fd5b808015612ece5760018114612edf57612f0c565b60ff19851688528388019550612f0c565b60008b81526020902060005b85811015612f045781548a820152908401908801612eeb565b505083880195505b50939a9950505050505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612f4e6080830184612e10565b9695505050505050565b6080810160028610612f6c57612f6c6130e6565b948152602081019390935260408301919091526001600160a01b031660609091015290565b6020810160038310612fa557612fa56130e6565b91905290565b6020815260006123026020830184612e10565b604051601f8201601f1916810167ffffffffffffffff81118282101715612fe757612fe7613112565b604052919050565b600067ffffffffffffffff82111561300957613009613112565b50601f01601f191660200190565b6000821982111561302a5761302a6130d0565b500190565b6000816000190483118215151615613049576130496130d0565b500290565b60005b83811015613069578181015183820152602001613051565b83811115611d815750506000910152565b600181811c9082168061308e57607f821691505b602082108114156130af57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156130c9576130c96130d0565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146113a857600080fd5b6001600160e01b0319811681146113a857600080fdfe63616c6c6572206973206e6f74207468652061646d696e000000000000000000a26469706673582212203fa06041137555b794a7436adcd25f3a816449def306f8d5056bdcddcb06744c64736f6c63430008060033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0000000000000000000000004754ad911d3a3496bb3f6717ccff003e6eb3cf9d

Deployed Bytecode

0x60806040526004361061034a5760003560e01c8063715018a6116101bb578063c03afb59116100f7578063e6430ef711610095578063f2fde38b1161006f578063f2fde38b14610990578063f851a440146109b0578063fd524666146109d0578063ff9d2dcc146109f057600080fd5b8063e6430ef71461090a578063e985e9c514610920578063ea639c1c1461096957600080fd5b8063c87b56dd116100d1578063c87b56dd146108a0578063d89135cd146108c0578063da3ef23f146108d5578063df5a1dd0146108f557600080fd5b8063c03afb5914610850578063c662e48114610870578063c66828621461088b57600080fd5b8063a22cb46511610164578063b1c9fe6e1161013e578063b1c9fe6e146107c8578063b34d0547146107f6578063b88d4fde14610816578063b8f962ca1461083657600080fd5b8063a22cb46514610772578063a49340cc14610792578063ae2243c9146107b257600080fd5b806395d89b411161019557806395d89b41146107275780639bbb8ec31461073c5780639c02757a1461075c57600080fd5b8063715018a6146106ac5780637a0ad11d146106c15780638da5cb5b1461070957600080fd5b80633c9b96bb1161028a5780636352211e116102335780636e3bd6b11161020d5780636e3bd6b11461062c5780636ff1c9bc1461064c578063704b6c021461066c57806370a082311461068c57600080fd5b80636352211e146105e157806365093f83146106015780636c0360eb1461061757600080fd5b806342842e0e1161026457806342842e0e146105815780634f558e79146105a157806355f804b3146105c157600080fd5b80633c9b96bb146105395780633ccfd60b146105595780633d0648de1461056e57600080fd5b8063122e04a8116102f757806320e6e82b116102d157806320e6e82b146104b357806323b872dd146104e3578063303e74df1461050357806332cb6b0c1461052357600080fd5b8063122e04a81461044e57806318160ddd14610476578063183bbe801461049357600080fd5b8063094e407211610328578063094e4072146103de578063095ea7b314610419578063096f28271461043b57600080fd5b806301ffc9a71461034f57806306fdde0314610384578063081812fc146103a6575b600080fd5b34801561035b57600080fd5b5061036f61036a366004612caf565b610a10565b60405190151581526020015b60405180910390f35b34801561039057600080fd5b50610399610a62565b60405161037b9190612fab565b3480156103b257600080fd5b506103c66103c1366004612dca565b610af4565b6040516001600160a01b03909116815260200161037b565b3480156103ea57600080fd5b5061040b6103f9366004612a4a565b600b6020526000908152604090205481565b60405190815260200161037b565b34801561042557600080fd5b50610439610434366004612b94565b610b38565b005b610439610449366004612c57565b610bd8565b34801561045a57600080fd5b506103c6737ddee8b16f3f36cfb51de9de2173dfd522909fb181565b34801561048257600080fd5b50600e54600d54036000190161040b565b34801561049f57600080fd5b506104396104ae366004612a4a565b610f23565b3480156104bf57600080fd5b5061036f6104ce366004612dca565b600c6020526000908152604090205460ff1681565b3480156104ef57600080fd5b506104396104fe366004612aa0565b610ff8565b34801561050f57600080fd5b506001546103c6906001600160a01b031681565b34801561052f57600080fd5b5061040b611e6181565b34801561054557600080fd5b50610439610554366004612dca565b611193565b34801561056557600080fd5b50610439611279565b61043961057c366004612de3565b6113ab565b34801561058d57600080fd5b5061043961059c366004612aa0565b61160a565b3480156105ad57600080fd5b5061036f6105bc366004612dca565b611625565b3480156105cd57600080fd5b506104396105dc366004612d0a565b611630565b3480156105ed57600080fd5b506103c66105fc366004612dca565b6116a4565b34801561060d57600080fd5b5061040b60085481565b34801561062357600080fd5b506103996116af565b34801561063857600080fd5b50610439610647366004612dca565b61173d565b34801561065857600080fd5b50610439610667366004612a4a565b61179f565b34801561067857600080fd5b50610439610687366004612a4a565b6118a0565b34801561069857600080fd5b5061040b6106a7366004612a4a565b611920565b3480156106b857600080fd5b5061043961196f565b3480156106cd57600080fd5b5061040b6106dc366004612a4a565b6009546000908152600c602090815260408083206001600160a01b03909416835260019093019052205490565b34801561071557600080fd5b506000546001600160a01b03166103c6565b34801561073357600080fd5b50610399611983565b34801561074857600080fd5b50610439610757366004612dca565b611992565b34801561076857600080fd5b5061040b60075481565b34801561077e57600080fd5b5061043961078d366004612b61565b6119f4565b34801561079e57600080fd5b506104396107ad366004612bc0565b611a8a565b3480156107be57600080fd5b5061040b60095481565b3480156107d457600080fd5b506001546107e990600160a01b900460ff1681565b60405161037b9190612f91565b34801561080257600080fd5b50610439610811366004612dca565b611cdb565b34801561082257600080fd5b50610439610831366004612ae1565b611d3d565b34801561084257600080fd5b50600a5461036f9060ff1681565b34801561085c57600080fd5b5061043961086b366004612ce9565b611d87565b34801561087c57600080fd5b5061040b66038d7ea4c6800081565b34801561089757600080fd5b50610399611e2c565b3480156108ac57600080fd5b506103996108bb366004612dca565b611e39565b3480156108cc57600080fd5b5061040b611f4d565b3480156108e157600080fd5b506104396108f0366004612d0a565b611f5d565b34801561090157600080fd5b50610439611fcd565b34801561091657600080fd5b5061040b60065481565b34801561092c57600080fd5b5061036f61093b366004612a67565b6001600160a01b03918216600090815260146020908152604080832093909416825291909152205460ff1690565b34801561097557600080fd5b506009546000908152600c602052604090205460ff1661036f565b34801561099c57600080fd5b506104396109ab366004612a4a565b61203e565b3480156109bc57600080fd5b506003546103c6906001600160a01b031681565b3480156109dc57600080fd5b506104396109eb366004612a4a565b6120cb565b3480156109fc57600080fd5b506002546103c6906001600160a01b031681565b60006301ffc9a760e01b6001600160e01b031983161480610a4157506380ac58cd60e01b6001600160e01b03198316145b80610a5c5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600f8054610a719061307a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9d9061307a565b8015610aea5780601f10610abf57610100808354040283529160200191610aea565b820191906000526020600020905b815481529060010190602001808311610acd57829003601f168201915b5050505050905090565b6000610aff82612159565b610b1c576040516333d1c03960e21b815260040160405180910390fd5b506000908152601360205260409020546001600160a01b031690565b6000610b43826116a4565b9050336001600160a01b03821614610b7c57610b5f813361093b565b610b7c576040516367d9dca160e11b815260040160405180910390fd5b60008281526013602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6002600154600160a01b900460ff166002811115610bf857610bf86130e6565b14610c4a5760405162461bcd60e51b815260206004820152601a60248201527f6275726e206d696e74206973206e6f742061637469766174656400000000000060448201526064015b60405180910390fd5b8251610c8f5760405162461bcd60e51b8152602060048201526014602482015273746865207175616e74697479206973207a65726f60601b6044820152606401610c41565b600954600254610cae91839160019186916001600160a01b031661218e565b610ceb5760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b7bab837b760911b6044820152606401610c41565b82516009546000908152600c602090815260408083203384526001019091529020548391610d1891613017565b1115610d715760405162461bcd60e51b815260206004820152602260248201527f6164647265737320616c726561647920636c61696d6564206d617820616d6f756044820152611b9d60f21b6064820152608401610c41565b348351600754610d81919061302f565b1115610dc05760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b6044820152606401610c41565b600654600e548451610dd29190613017565b1115610e205760405162461bcd60e51b815260206004820152601560248201527f6f76657220746f74616c206275726e20636f756e7400000000000000000000006044820152606401610c41565b82516009546000908152600c6020908152604080832033845260010190915281208054909190610e51908490613017565b90915550600090505b8351811015610f12576000848281518110610e7757610e776130fc565b60200260200101519050610e8a816116a4565b6001600160a01b0316336001600160a01b031614610ef65760405162461bcd60e51b8152602060048201526024808201527f73656e646572206973206e6f7420746865206f776e6572206f6620746865207460448201526337b5b2b760e11b6064820152608401610c41565b610eff8161228f565b5080610f0a816130b5565b915050610e5a565b50610f1e33845161229a565b505050565b6000546001600160a01b0316331480610f4657506003546001600160a01b031633145b610f805760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b6001600160a01b038116610fd65760405162461bcd60e51b815260206004820152601660248201527f616464726573732073686f756c646e27742062652030000000000000000000006044820152606401610c41565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000611003826122b4565b9050836001600160a01b0316816001600160a01b0316146110365760405162a1148160e81b815260040160405180910390fd5b600082815260136020526040902080546110628187335b6001600160a01b039081169116811491141790565b61108d57611070863361093b565b61108d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166110b457604051633a954ecd60e21b815260040160405180910390fd5b80156110bf57600082555b6001600160a01b038681166000908152601260205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260116020526040902055600160e11b831661114a576001840160008181526011602052604090205461114857600d5481146111485760008181526011602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000546001600160a01b03163314806111b657506003546001600160a01b031633145b6111f05760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b6000818152600c602052604090205460ff161515600114156112545760405162461bcd60e51b815260206004820181905260248201527f7468697320696e6465782068617320616c7265616479206265656e20757365646044820152606401610c41565b600980546000908152600c60205260409020805460ff19811660ff9091161517905555565b6000546001600160a01b031633148061129c57506003546001600160a01b031633145b6112d65760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b604051600090737ddee8b16f3f36cfb51de9de2173dfd522909fb19047908381818185875af1925050503d806000811461132c576040519150601f19603f3d011682016040523d82523d6000602084013e611331565b606091505b50509050806113a85760405162461bcd60e51b815260206004820152603060248201527f6661696c656420746f206d6f76652066756e6420746f2057495448445241575f60448201527f4144445245535320636f6e7472616374000000000000000000000000000000006064820152608401610c41565b50565b60018054600160a01b900460ff1660028111156113ca576113ca6130e6565b146114175760405162461bcd60e51b815260206004820152601b60248201527f70726573616c65206576656e74206973206e6f742061637469766500000000006044820152606401610c41565b8261145b5760405162461bcd60e51b8152602060048201526014602482015273746865207175616e74697479206973207a65726f60601b6044820152606401610c41565b60085460025461147a91839160009186916001600160a01b031661218e565b6114b75760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b7bab837b760911b6044820152606401610c41565b336000908152600b602052604090205482906114d4908590613017565b11156115225760405162461bcd60e51b815260206004820152601f60248201527f65786365656473206e756d626572206f66206561726e656420546f6b656e73006044820152606401610c41565b346115348466038d7ea4c6800061302f565b11156115735760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b6044820152606401610c41565b600e54600d54611e619190036000190161158d9085613017565b11156115db5760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c79000000006044820152606401610c41565b336000908152600b6020526040812080548592906115fa908490613017565b90915550610f1e9050338461229a565b610f1e83838360405180602001604052806000815250611d3d565b6000610a5c82612159565b6000546001600160a01b031633148061165357506003546001600160a01b031633145b61168d5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b80516116a0906004906020840190612881565b5050565b6000610a5c826122b4565b600480546116bc9061307a565b80601f01602080910402602001604051908101604052809291908181526020018280546116e89061307a565b80156117355780601f1061170a57610100808354040283529160200191611735565b820191906000526020600020905b81548152906001019060200180831161171857829003601f168201915b505050505081565b6000546001600160a01b031633148061176057506003546001600160a01b031633145b61179a5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600755565b6117a7612324565b6001600160a01b0381166117fd5760405162461bcd60e51b815260206004820152601860248201527f726563697069656e742073686f756c646e2774206265203000000000000000006044820152606401610c41565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461184a576040519150601f19603f3d011682016040523d82523d6000602084013e61184f565b606091505b50509050806116a05760405162461bcd60e51b815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610c41565b6118a8612324565b6001600160a01b0381166118fe5760405162461bcd60e51b815260206004820152601660248201527f616464726573732073686f756c646e27742062652030000000000000000000006044820152606401610c41565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611949576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526012602052604090205467ffffffffffffffff1690565b611977612324565b611981600061237e565b565b606060108054610a719061307a565b6000546001600160a01b03163314806119b557506003546001600160a01b031633145b6119ef5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600855565b6001600160a01b038216331415611a1e5760405163b06307db60e01b815260040160405180910390fd5b3360008181526014602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b0316331480611aad57506003546001600160a01b031633145b611ae75760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b80518214611b5d5760405162461bcd60e51b815260206004820152602560248201527f746865206164647265737320616e64207175616e7469747920646f206e6f742060448201527f6d617463680000000000000000000000000000000000000000000000000000006064820152608401610c41565b6000805b8251811015611c0457828181518110611b7c57611b7c6130fc565b602002602001015160001415611bcb5760405162461bcd60e51b8152602060048201526014602482015273746865207175616e74697479206973207a65726f60601b6044820152606401610c41565b828181518110611bdd57611bdd6130fc565b602002602001015182611bf09190613017565b915080611bfc816130b5565b915050611b61565b50600e54600d54611e6191900360001901611c1f9083613017565b1115611c6d5760405162461bcd60e51b815260206004820152601c60248201527f636c61696d206973206f76657220746865206d617820737570706c79000000006044820152606401610c41565b60005b8251811015611cd457611cc2858583818110611c8e57611c8e6130fc565b9050602002016020810190611ca39190612a4a565b848381518110611cb557611cb56130fc565b602002602001015161229a565b80611ccc816130b5565b915050611c70565b5050505050565b6000546001600160a01b0316331480611cfe57506003546001600160a01b031633145b611d385760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600655565b611d48848484610ff8565b6001600160a01b0383163b15611d8157611d64848484846123ce565b611d81576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000546001600160a01b0316331480611daa57506003546001600160a01b031633145b611de45760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600180548291907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b836002811115611e2457611e246130e6565b021790555050565b600580546116bc9061307a565b6060611e4482612159565b611e905760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610c41565b600a5460ff1615611f1b5760015460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b158015611edf57600080fd5b505afa158015611ef3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a5c9190810190612d53565b611f24826124c6565b6005604051602001611f37929190612e6b565b6040516020818303038152906040529050919050565b6000611f58600e5490565b905090565b6000546001600160a01b0316331480611f8057506003546001600160a01b031633145b611fba5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b80516116a0906005906020840190612881565b6000546001600160a01b0316331480611ff057506003546001600160a01b031633145b61202a5760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600a805460ff19811660ff90911615179055565b612046612324565b6001600160a01b0381166120c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c41565b6113a88161237e565b6000546001600160a01b03163314806120ee57506003546001600160a01b031633145b6121285760405162461bcd60e51b815260206004820152601760248201526000805160206131548339815191526044820152606401610c41565b600a805460ff1916600190811790915580546001600160a01b039092166001600160a01b0319909216919091179055565b60008160011115801561216d5750600d5482105b8015610a5c575050600090815260116020526040902054600160e01b161590565b60008061219c86868661254a565b9050600060018289604001518a600001518b60200151604051600081526020016040526040516121e8949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561220a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661226d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c41565b836001600160a01b0316816001600160a01b0316149250505095945050505050565b6113a8816000612582565b6116a08282604051806020016040528060008152506126c6565b6000818060011161230b57600d5481101561230b57600081815260116020526040902054600160e01b8116612309575b806123025750600019016000818152601160205260409020546122e4565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000546001600160a01b031633146119815760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c41565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612403903390899088908890600401612f1c565b602060405180830381600087803b15801561241d57600080fd5b505af192505050801561244d575060408051601f3d908101601f1916820190925261244a91810190612ccc565b60015b6124a8573d80801561247b576040519150601f19603f3d011682016040523d82523d6000602084013e612480565b606091505b5080516124a0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606124d182612159565b6124ee57604051630a14c4b560e41b815260040160405180910390fd5b60006124f861272c565b90508051600014156125195760405180602001604052806000815250612302565b806125238461273b565b604051602001612534929190612e3c565b6040516020818303038152906040529392505050565b6000838383336040516020016125639493929190612f58565b6040516020818303038152906040528051906020012090509392505050565b600061258d836122b4565b9050806000806125ab86600090815260136020526040902080549091565b9150915084156125eb576125c081843361104d565b6125eb576125ce833361093b565b6125eb57604051632ce44b5f60e11b815260040160405180910390fd5b80156125f657600082555b6001600160a01b038316600081815260126020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260116020526040902055600160e11b841661267d576001860160008181526011602052604090205461267b57600d54811461267b5760008181526011602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600e8054600101905550505050565b6126d0838361278a565b6001600160a01b0383163b15610f1e57600d548281035b6126fa60008683806001019450866123ce565b612717576040516368d2bf6b60e11b815260040160405180910390fd5b8181106126e75781600d5414611cd457600080fd5b606060048054610a719061307a565b604080516080810191829052607f0190826030600a8206018353600a90045b801561277857600183039250600a81066030018353600a900461275a565b50819003601f19909101908152919050565b600d54816127ab5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526012602090815260408083208054680100000000000000018802019055848352601190915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461285a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612822565b508161287857604051622e076360e81b815260040160405180910390fd5b600d5550505050565b82805461288d9061307a565b90600052602060002090601f0160209004810192826128af57600085556128f5565b82601f106128c857805160ff19168380011785556128f5565b828001600101855582156128f5579182015b828111156128f55782518255916020019190600101906128da565b50612901929150612905565b5090565b5b808211156129015760008155600101612906565b600061292d61292884612fef565b612fbe565b905082815283838301111561294157600080fd5b828260208301376000602084830101529392505050565b600082601f83011261296957600080fd5b8135602067ffffffffffffffff82111561298557612985613112565b8160051b612994828201612fbe565b8381528281019086840183880185018910156129af57600080fd5b600093505b858410156129d25780358352600193909301929184019184016129b4565b50979650505050505050565b6000606082840312156129f057600080fd5b6040516060810181811067ffffffffffffffff82111715612a1357612a13613112565b80604052508091508235815260208301356020820152604083013560ff81168114612a3d57600080fd5b6040919091015292915050565b600060208284031215612a5c57600080fd5b813561230281613128565b60008060408385031215612a7a57600080fd5b8235612a8581613128565b91506020830135612a9581613128565b809150509250929050565b600080600060608486031215612ab557600080fd5b8335612ac081613128565b92506020840135612ad081613128565b929592945050506040919091013590565b60008060008060808587031215612af757600080fd5b8435612b0281613128565b93506020850135612b1281613128565b925060408501359150606085013567ffffffffffffffff811115612b3557600080fd5b8501601f81018713612b4657600080fd5b612b558782356020840161291a565b91505092959194509250565b60008060408385031215612b7457600080fd5b8235612b7f81613128565b915060208301358015158114612a9557600080fd5b60008060408385031215612ba757600080fd5b8235612bb281613128565b946020939093013593505050565b600080600060408486031215612bd557600080fd5b833567ffffffffffffffff80821115612bed57600080fd5b818601915086601f830112612c0157600080fd5b813581811115612c1057600080fd5b8760208260051b8501011115612c2557600080fd5b602092830195509350908501359080821115612c4057600080fd5b50612c4d86828701612958565b9150509250925092565b600080600060a08486031215612c6c57600080fd5b833567ffffffffffffffff811115612c8357600080fd5b612c8f86828701612958565b93505060208401359150612ca685604086016129de565b90509250925092565b600060208284031215612cc157600080fd5b81356123028161313d565b600060208284031215612cde57600080fd5b81516123028161313d565b600060208284031215612cfb57600080fd5b81356003811061230257600080fd5b600060208284031215612d1c57600080fd5b813567ffffffffffffffff811115612d3357600080fd5b8201601f81018413612d4457600080fd5b6124be8482356020840161291a565b600060208284031215612d6557600080fd5b815167ffffffffffffffff811115612d7c57600080fd5b8201601f81018413612d8d57600080fd5b8051612d9b61292882612fef565b818152856020838501011115612db057600080fd5b612dc182602083016020860161304e565b95945050505050565b600060208284031215612ddc57600080fd5b5035919050565b600080600060a08486031215612df857600080fd5b8335925060208401359150612ca685604086016129de565b60008151808452612e2881602086016020860161304e565b601f01601f19169290920160200192915050565b60008351612e4e81846020880161304e565b835190830190612e6281836020880161304e565b01949350505050565b600083516020612e7e828583890161304e565b845491840191600090600181811c9080831680612e9c57607f831692505b858310811415612eba57634e487b7160e01b85526022600452602485fd5b808015612ece5760018114612edf57612f0c565b60ff19851688528388019550612f0c565b60008b81526020902060005b85811015612f045781548a820152908401908801612eeb565b505083880195505b50939a9950505050505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612f4e6080830184612e10565b9695505050505050565b6080810160028610612f6c57612f6c6130e6565b948152602081019390935260408301919091526001600160a01b031660609091015290565b6020810160038310612fa557612fa56130e6565b91905290565b6020815260006123026020830184612e10565b604051601f8201601f1916810167ffffffffffffffff81118282101715612fe757612fe7613112565b604052919050565b600067ffffffffffffffff82111561300957613009613112565b50601f01601f191660200190565b6000821982111561302a5761302a6130d0565b500190565b6000816000190483118215151615613049576130496130d0565b500290565b60005b83811015613069578181015183820152602001613051565b83811115611d815750506000910152565b600181811c9082168061308e57607f821691505b602082108114156130af57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156130c9576130c96130d0565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146113a857600080fd5b6001600160e01b0319811681146113a857600080fdfe63616c6c6572206973206e6f74207468652061646d696e000000000000000000a26469706673582212203fa06041137555b794a7436adcd25f3a816449def306f8d5056bdcddcb06744c64736f6c63430008060033

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

0000000000000000000000004754ad911d3a3496bb3f6717ccff003e6eb3cf9d

-----Decoded View---------------
Arg [0] : _adminSigner (address): 0x4754AD911d3A3496bb3F6717CcfF003e6eB3cf9d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004754ad911d3a3496bb3f6717ccff003e6eb3cf9d


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

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