ETH Price: $2,453.17 (-5.71%)

Token

KAYC (KAYC)
 

Overview

Max Total Supply

7,000 KAYC

Holders

167

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
*未名只打金狗.eth
Balance
19 KAYC
0xa9c2837064acd4f66028940279cdf001580a60a8
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:
KAYC

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 1 : NFT.sol
// SPDX-License-Identifier: MIT

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


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

pragma solidity ^0.8.0;

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

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

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

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

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

// File: contracts/interfaces/IERC721x.sol


pragma solidity ^0.8.2;

/*
 *     ,_,
 *    (',')
 *    {/"\}
 *    -"-"- Thank you OWL
 */

interface IERC721x {

	/**
	 * @dev Returns if the token is locked (non-transferrable) or not.
	 */
	function isUnlocked(uint256 _id) external view returns(bool);

	/**
	 * @dev Returns the amount of locks on the token.
	 */
	function lockCount(uint256 _tokenId) external view returns(uint256);

	/**
	 * @dev Returns if a contract is allowed to lock/unlock tokens.
	 */
	function approvedContract(address _contract) external view returns(bool);

	/**
	 * @dev Returns the contract that locked a token at a specific index in the mapping.
	 */
	function lockMap(uint256 _tokenId, uint256 _index) external view returns(address);

	/**
	 * @dev Returns the mapping index of a contract that locked a token.
	 */
	function lockMapIndex(uint256 _tokenId, address _contract) external view returns(uint256);

	/**
	 * @dev Locks a token, preventing it from being transferrable
	 */
	function lockId(uint256 _id) external;

	/**
	 * @dev Unlocks a token.
	 */
	function unlockId(uint256 _id) external;

	/**
	 * @dev Unlocks a token from a given contract if the contract is no longer approved.
	 */
	function freeId(uint256 _id, address _contract) external;
}
// File: @openzeppelin/contracts/utils/Context.sol


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

pragma solidity ^0.8.0;

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

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

// File: @openzeppelin/contracts/access/Ownable.sol


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

pragma solidity ^0.8.0;


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

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

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

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

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

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

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

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

// File: contracts/extensions/LockRegistry.sol


pragma solidity ^0.8.2;

/*
 *     ,_,
 *    (',')
 *    {/"\}
 *    -"-"- Thank you OWL
 */



abstract contract LockRegistry is Ownable, IERC721x {
	
	mapping(address => bool) public override approvedContract;
	mapping(uint256 => uint256) public override lockCount;
	mapping(uint256 => mapping(uint256 => address)) public override lockMap;
	mapping(uint256 => mapping(address => uint256)) public override lockMapIndex;

	event TokenLocked(uint256 indexed tokenId, address indexed approvedContract);
	event TokenUnlocked(uint256 indexed tokenId, address indexed approvedContract);

	function isUnlocked(uint256 _id) public view override returns(bool) {
		return lockCount[_id] == 0;
	}

	function updateApprovedContracts(address[] calldata _contracts, bool[] calldata _values) external onlyOwner {
		require(_contracts.length == _values.length, "!length");
		for(uint256 i = 0; i < _contracts.length; i++)
			approvedContract[_contracts[i]] = _values[i];
	}

	function _lockId(uint256 _id) internal {
		require(approvedContract[msg.sender], "Cannot update map");
		require(lockMapIndex[_id][msg.sender] == 0, "ID already locked by caller");

		uint256 count = lockCount[_id] + 1;
		lockMap[_id][count] = msg.sender;
		lockMapIndex[_id][msg.sender] = count;
		lockCount[_id]++;
		emit TokenLocked(_id, msg.sender);
	}

	function _unlockId(uint256 _id) internal {
		require(approvedContract[msg.sender], "Cannot update map");
		uint256 index = lockMapIndex[_id][msg.sender];
		require(index != 0, "ID not locked by caller");
		
		uint256 last = lockCount[_id];
		if (index != last) {
			address lastContract = lockMap[_id][last];
			lockMap[_id][index] = lastContract;
			lockMap[_id][last] = address(0);
			lockMapIndex[_id][lastContract] = index;
		}
		else
			lockMap[_id][index] = address(0);
		lockMapIndex[_id][msg.sender] = 0;
		lockCount[_id]--;
		emit TokenUnlocked(_id, msg.sender);
	}

	function _freeId(uint256 _id, address _contract) internal {
		require(!approvedContract[_contract], "Cannot update map");
		uint256 index = lockMapIndex[_id][_contract];
		require(index != 0, "ID not locked");

		uint256 last = lockCount[_id];
		if (index != last) {
			address lastContract = lockMap[_id][last];
			lockMap[_id][index] = lastContract;
			lockMap[_id][last] = address(0);
			lockMapIndex[_id][lastContract] = index;
		}
		else
			lockMap[_id][index] = address(0);
		lockMapIndex[_id][_contract] = 0;
		lockCount[_id]--;
		emit TokenUnlocked(_id, _contract);
	}
}
// File: erc721a/contracts/IERC721A.sol


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

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`,
     * as defined in the ERC2309 standard. See `_mintERC2309` for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

// File: erc721a/contracts/ERC721A.sol


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

pragma solidity ^0.8.4;


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

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

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

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

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

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

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

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

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

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

    // The 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 tokenId of the next token to be minted.
    uint256 private _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See `_packedOwnershipOf` implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [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 => address) private _tokenApprovals;

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY;
    }

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

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

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

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

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

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

    /**
     * @dev 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 See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

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

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

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

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _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 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 {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // `balance` 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 tokenId = startTokenId;
            uint256 end = startTokenId + quantity;
            do {
                emit Transfer(address(0), to, tokenId++);
            } while (tokenId < end);

            _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 {
        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 Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            approvedAddress := sload(approvedAddressSlot)
        }
    }

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function 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) = _getApprovedAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isOwnerOrApproved(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 `_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) = _getApprovedAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isOwnerOrApproved(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++;
        }
    }

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

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal {
        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 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;
    }

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

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

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

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

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

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

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

// File: contracts/extensions/Erc721LockRegistry.sol


pragma solidity ^0.8.2;

/*
 *     ,_,
 *    (',')
 *    {/"\}
 *    -"-"- Thank you OWL
 */




contract ERC721x is ERC721A, LockRegistry {

	/*
	 *     bytes4(keccak256('freeId(uint256,address)')) == 0x94d216d6
	 *     bytes4(keccak256('isUnlocked(uint256)')) == 0x72abc8b7
	 *     bytes4(keccak256('lockCount(uint256)')) == 0x650b00f6
	 *     bytes4(keccak256('lockId(uint256)')) == 0x2799cde0
	 *     bytes4(keccak256('lockMap(uint256,uint256)')) == 0x2cba8123
	 *     bytes4(keccak256('lockMapIndex(uint256,address)')) == 0x09308e5d
	 *     bytes4(keccak256('unlockId(uint256)')) == 0x40a9c8df
	 *     bytes4(keccak256('approvedContract(address)')) == 0xb1a6505f
	 *
	 *     => 0x94d216d6 ^ 0x72abc8b7 ^ 0x650b00f6 ^ 0x2799cde0 ^
	 *        0x2cba8123 ^ 0x09308e5d ^ 0x40a9c8df ^ 0xb1a6505f == 0x706e8489
	 */

	bytes4 private constant _INTERFACE_ID_ERC721x = 0x706e8489;

	constructor(string memory _name, string memory _symbol) ERC721A(_name, _symbol) {
	}

	function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721A) returns (bool) {
		return _interfaceId == _INTERFACE_ID_ERC721x
			|| super.supportsInterface(_interfaceId);
	}

	function transferFrom(address _from, address _to, uint256 _tokenId) public override virtual {
		require(isUnlocked(_tokenId), "Token is locked");
		ERC721A.transferFrom(_from, _to, _tokenId);
	}

	function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public override virtual {
		require(isUnlocked(_tokenId), "Token is locked");
		ERC721A.safeTransferFrom(_from, _to, _tokenId, _data);
	}

	function lockId(uint256 _id) external override virtual {
		require(_exists(_id), "Token !exist");
		_lockId(_id);
	}

	function unlockId(uint256 _id) external override virtual {
		require(_exists(_id), "Token !exist");
		_unlockId(_id);
	}

	function freeId(uint256 _id, address _contract) external override virtual {
		require(_exists(_id), "Token !exist");
		_freeId(_id, _contract);
	}
}
// File: contracts/NFT.sol



pragma solidity 0.8.13;



contract KAYC is ERC721x {  
  using Strings for uint256;
  
  bool public saleOpen = false;

  string private preRevealURI;
  string private postRevealBaseURI;

  // Mint Settings
  uint256 public MINT_PRICE = 0.0 ether;
  uint256 public MINT_PRICE1 = 0.01 ether;
  uint256 public MINT_PRICE2 = 0.02 ether;

  uint256 private constant PER_TXN_LIMIT = 20;

  uint256 public MAX_SUPPLY = 7000;

  //Reveal Data
  bool public isRevealed;
  uint256 public tokenOffset;

  constructor(string memory _preRevealURI) ERC721x("KAYC", "KAYC") {
    preRevealURI = _preRevealURI;    
  }

  function getMintPrice() public view returns (uint256)
  {
    if (totalSupply() > 6000) {
      return MINT_PRICE2;
    } else if (totalSupply() > 3000) {
      return MINT_PRICE1;
    } 
    
    return MINT_PRICE;    
  }

//Minting
  function processMint(uint256 _quantity, address _toWallet) internal {
    require(!isRevealed, "NO MINTS POSTREVEAL");            
    require(totalSupply() + _quantity <= MAX_SUPPLY, "NO MINTS LEFT");
    
    _mint(_toWallet, _quantity);
  }
  
  function publicMint(uint256 _quantity) external payable {
    require(saleOpen, "MINT IS CLOSED");    
    require(_quantity <= PER_TXN_LIMIT, "MINTING TOO MANY");

    require(msg.value == getMintPrice() * _quantity, "INCORRECT ETH SENT");
    
    processMint(_quantity, msg.sender);
  }
  
  function privateMint(uint256 _quantity, address _toWallet) external onlyOwner {        
    processMint(_quantity, _toWallet);
  }

//Community will vote on the random Offset Number  
  function startReveal(uint256 _randomNumber) external onlyOwner {
    require(!isRevealed, "ALREADY SET OFFSET");
    isRevealed = true;
    tokenOffset = _randomNumber % totalSupply();
  }

// METADATA
  function setPreRevealURI(string memory _URI) external onlyOwner {
    preRevealURI = _URI;
  }

  function setPostRevealBaseURI(string memory _URI) external onlyOwner {
    postRevealBaseURI = _URI;
  }
      
  function withdrawFunds(address _withdrawTo) external onlyOwner {
    payable(_withdrawTo).transfer(address(this).balance);
  }  

//PRICE in WEI
  function setMintPrice(uint256 _price, uint256 _number) external onlyOwner {
    if (_number == 1) {
      MINT_PRICE1 = _price;
    } else if (_number == 2) {
      MINT_PRICE2 = _price;
    }
    else {
      MINT_PRICE = _price;
    }
  }
  
  function setSaleOpen(bool _status) external onlyOwner {
    saleOpen = _status;
  }
  
// View Only Functions
  function tokenURI(uint256 _tokenId) public view override returns (string memory) {
    require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token");

    if (!isRevealed) 
    {
        uint256 coverChoice = _tokenId % 10; //Show one of the Random Covers
        return string(abi.encodePacked(preRevealURI, coverChoice.toString()));
    }

    uint256 shiftedTokenId = (_tokenId + tokenOffset) % totalSupply();
    return string(abi.encodePacked(postRevealBaseURI, shiftedTokenId.toString()));
  }
  
  function numberMinted(address _owner) public view returns (uint256) {
    return _numberMinted(_owner);
  }

  function getOwnershipData(uint256 _tokenId) external view returns (TokenOwnership memory) {
    return _ownershipOf(_tokenId);
  }
  
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_preRevealURI","type":"string"}],"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":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"approvedContract","type":"address"}],"name":"TokenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"approvedContract","type":"address"}],"name":"TokenUnlocked","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_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_contract","type":"address"}],"name":"freeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getOwnershipData","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"isUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"lockId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockMap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"lockMapIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_toWallet","type":"address"}],"name":"privateMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":[],"name":"saleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_number","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPostRevealBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPreRevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setSaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_randomNumber","type":"uint256"}],"name":"startReveal","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":"tokenOffset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unlockId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_contracts","type":"address[]"},{"internalType":"bool[]","name":"_values","type":"bool[]"}],"name":"updateApprovedContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawTo","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600d805460ff191690556000601055662386f26fc1000060115566470de4df820000601255611b586013553480156200003c57600080fd5b5060405162002bbb38038062002bbb8339810160408190526200005f91620001f7565b6040805180820182526004808252634b41594360e01b60208084018281528551808701909652928552840152815191929183918391620000a2916002916200013b565b508051620000b89060039060208401906200013b565b50506000805550620000ca33620000e9565b50508051620000e190600e9060208401906200013b565b50506200030f565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200014990620002d3565b90600052602060002090601f0160209004810192826200016d5760008555620001b8565b82601f106200018857805160ff1916838001178555620001b8565b82800160010185558215620001b8579182015b82811115620001b85782518255916020019190600101906200019b565b50620001c6929150620001ca565b5090565b5b80821115620001c65760008155600101620001cb565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156200020b57600080fd5b82516001600160401b03808211156200022357600080fd5b818501915085601f8301126200023857600080fd5b8151818111156200024d576200024d620001e1565b604051601f8201601f19908116603f01168101908382118183101715620002785762000278620001e1565b8160405282815288868487010111156200029157600080fd5b600093505b82841015620002b5578484018601518185018701529285019262000296565b82841115620002c75760008684830101525b98975050505050505050565b600181811c90821680620002e857607f821691505b6020821081036200030957634e487b7160e01b600052602260045260246000fd5b50919050565b61289c806200031f6000396000f3fe6080604052600436106102a75760003560e01c806370a0823111610164578063af979f25116100c6578063c87b56dd1161008a578063dc8c57b411610064578063dc8c57b414610851578063e985e9c514610867578063f2fde38b146108b057600080fd5b8063c87b56dd146107f1578063db292e7f14610811578063dc33e6811461083157600080fd5b8063af979f251461074b578063b1a6505f1461076b578063b88d4fde1461079b578063bef870ca146107bb578063c002d23d146107db57600080fd5b806394d216d611610128578063a22cb46511610102578063a22cb465146106f6578063a7f93ebd14610716578063ac52e6441461072b57600080fd5b806394d216d6146106a757806395d89b41146106c757806399288dbb146106dc57600080fd5b806370a08231146105b9578063715018a6146105d957806372abc8b7146105ee5780638da5cb5b1461061c5780639231ab2a1461063a57600080fd5b80632db115441161020d57806342842e0e116101d15780636352211e116101ab5780636352211e1461054c578063650b00f61461056c57806368742da61461059957600080fd5b806342842e0e146104fc57806354214f691461051c5780635aee49091461053657600080fd5b80632db115441461047d57806332cb6b0c146104905780633653b377146104a657806340a9c8df146104bc57806341af4f00146104dc57600080fd5b8063095ea7b31161026f5780632799cde0116102495780632799cde0146103fc5780632a85db551461041c5780632cba81231461043c57600080fd5b8063095ea7b3146103a357806318160ddd146103c357806323b872dd146103dc57600080fd5b806301ffc9a7146102ac5780630442bfa8146102e157806306fdde0314610303578063081812fc1461032557806309308e5d1461035d575b600080fd5b3480156102b857600080fd5b506102cc6102c73660046121f5565b6108d0565b60405190151581526020015b60405180910390f35b3480156102ed57600080fd5b506103016102fc366004612212565b6108fb565b005b34801561030f57600080fd5b5061031861096e565b6040516102d8919061228c565b34801561033157600080fd5b5061034561034036600461229f565b610a00565b6040516001600160a01b0390911681526020016102d8565b34801561036957600080fd5b506103956103783660046122d4565b600c60209081526000928352604080842090915290825290205481565b6040519081526020016102d8565b3480156103af57600080fd5b506103016103be366004612300565b610a44565b3480156103cf57600080fd5b5060015460005403610395565b3480156103e857600080fd5b506103016103f736600461232a565b610ae4565b34801561040857600080fd5b5061030161041736600461229f565b610b42565b34801561042857600080fd5b506103016104373660046123f2565b610b92565b34801561044857600080fd5b50610345610457366004612212565b600b6020908152600092835260408084209091529082529020546001600160a01b031681565b61030161048b36600461229f565b610bed565b34801561049c57600080fd5b5061039560135481565b3480156104b257600080fd5b5061039560125481565b3480156104c857600080fd5b506103016104d736600461229f565b610cfb565b3480156104e857600080fd5b506103016104f736600461229f565b610d48565b34801561050857600080fd5b5061030161051736600461232a565b610e0d565b34801561052857600080fd5b506014546102cc9060ff1681565b34801561054257600080fd5b5061039560115481565b34801561055857600080fd5b5061034561056736600461229f565b610e28565b34801561057857600080fd5b5061039561058736600461229f565b600a6020526000908152604090205481565b3480156105a557600080fd5b506103016105b436600461243b565b610e33565b3480156105c557600080fd5b506103956105d436600461243b565b610eb0565b3480156105e557600080fd5b50610301610eff565b3480156105fa57600080fd5b506102cc61060936600461229f565b6000908152600a60205260409020541590565b34801561062857600080fd5b506008546001600160a01b0316610345565b34801561064657600080fd5b5061065a61065536600461229f565b610f53565b6040516102d8919081516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260609182015162ffffff169181019190915260800190565b3480156106b357600080fd5b506103016106c23660046122d4565b610f80565b3480156106d357600080fd5b50610318610fce565b3480156106e857600080fd5b50600d546102cc9060ff1681565b34801561070257600080fd5b50610301610711366004612466565b610fdd565b34801561072257600080fd5b50610395611072565b34801561073757600080fd5b506103016107463660046124dc565b6110b5565b34801561075757600080fd5b50610301610766366004612548565b6111d4565b34801561077757600080fd5b506102cc61078636600461243b565b60096020526000908152604090205460ff1681565b3480156107a757600080fd5b506103016107b6366004612563565b61122f565b3480156107c757600080fd5b506103016107d63660046122d4565b61128f565b3480156107e757600080fd5b5061039560105481565b3480156107fd57600080fd5b5061031861080c36600461229f565b6112e1565b34801561081d57600080fd5b5061030161082c3660046123f2565b6113dd565b34801561083d57600080fd5b5061039561084c36600461243b565b611438565b34801561085d57600080fd5b5061039560155481565b34801561087357600080fd5b506102cc6108823660046125df565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108bc57600080fd5b506103016108cb36600461243b565b611463565b60006001600160e01b0319821663706e848960e01b14806108f557506108f582611519565b92915050565b6008546001600160a01b031633146109485760405162461bcd60e51b8152602060048201819052602482015260008051602061284783398151915260448201526064015b60405180910390fd5b806001036109565750601155565b806002036109645750601255565b60108290555b5050565b60606002805461097d90612609565b80601f01602080910402602001604051908101604052809291908181526020018280546109a990612609565b80156109f65780601f106109cb576101008083540402835291602001916109f6565b820191906000526020600020905b8154815290600101906020018083116109d957829003601f168201915b5050505050905090565b6000610a0b82611567565b610a28576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a4f82610e28565b9050336001600160a01b03821614610a8857610a6b8133610882565b610a88576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600a602052604090205415610b325760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881a5cc81b1bd8dad959608a1b604482015260640161093f565b610b3d83838361158e565b505050565b610b4b81611567565b610b865760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b8808595e1a5cdd60a21b604482015260640161093f565b610b8f81611726565b50565b6008546001600160a01b03163314610bda5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b805161096a90600e906020840190612146565b600d5460ff16610c3f5760405162461bcd60e51b815260206004820152600e60248201527f4d494e5420495320434c4f534544000000000000000000000000000000000000604482015260640161093f565b6014811115610c905760405162461bcd60e51b815260206004820152601060248201527f4d494e54494e4720544f4f204d414e5900000000000000000000000000000000604482015260640161093f565b80610c99611072565b610ca39190612659565b3414610cf15760405162461bcd60e51b815260206004820152601260248201527f494e434f5252454354204554482053454e540000000000000000000000000000604482015260640161093f565b610b8f813361188a565b610d0481611567565b610d3f5760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b8808595e1a5cdd60a21b604482015260640161093f565b610b8f81611940565b6008546001600160a01b03163314610d905760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b60145460ff1615610de35760405162461bcd60e51b815260206004820152601260248201527f414c524541445920534554204f46465345540000000000000000000000000000604482015260640161093f565b6014805460ff19166001179055610dfd6001546000540390565b610e07908261268e565b60155550565b610b3d8383836040518060200160405280600081525061122f565b60006108f582611b04565b6008546001600160a01b03163314610e7b5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b6040516001600160a01b038216904780156108fc02916000818181858888f1935050505015801561096a573d6000803e3d6000fd5b60006001600160a01b038216610ed9576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610f475760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b610f516000611b72565b565b6040805160808101825260008082526020820181905291810182905260608101919091526108f582611bc4565b610f8982611567565b610fc45760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b8808595e1a5cdd60a21b604482015260640161093f565b61096a8282611c3c565b60606003805461097d90612609565b336001600160a01b038316036110065760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006117706110846001546000540390565b1115611091575060125490565b610bb86110a16001546000540390565b11156110ae575060115490565b5060105490565b6008546001600160a01b031633146110fd5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b8281146111365760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b604482015260640161093f565b60005b838110156111cd57828282818110611153576111536126a2565b90506020020160208101906111689190612548565b6009600087878581811061117e5761117e6126a2565b9050602002016020810190611193919061243b565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806111c5816126b8565b915050611139565b5050505050565b6008546001600160a01b0316331461121c5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b600d805460ff1916911515919091179055565b6000828152600a60205260409020541561127d5760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881a5cc81b1bd8dad959608a1b604482015260640161093f565b61128984848484611e16565b50505050565b6008546001600160a01b031633146112d75760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b61096a828261188a565b60606112ec82611567565b61135e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606482015260840161093f565b60145460ff166113aa576000611375600a8461268e565b9050600e61138282611e5a565b6040516020016113939291906126ed565b604051602081830303815290604052915050919050565b60006113b96001546000540390565b6015546113c69085612793565b6113d0919061268e565b9050600f61138282611e5a565b6008546001600160a01b031633146114255760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b805161096a90600f906020840190612146565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c166108f5565b6008546001600160a01b031633146114ab5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b6001600160a01b0381166115105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161093f565b610b8f81611b72565b60006301ffc9a760e01b6001600160e01b03198316148061154a57506380ac58cd60e01b6001600160e01b03198316145b806108f55750506001600160e01b031916635b5e139f60e01b1490565b60008054821080156108f5575050600090815260046020526040902054600160e01b161590565b600061159982611b04565b9050836001600160a01b0316816001600160a01b0316146115cc5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417611619576115fc8633610882565b61161957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661164057604051633a954ecd60e21b815260040160405180910390fd5b801561164b57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036116dd576001840160008181526004602052604081205490036116db5760005481146116db5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b3360009081526009602052604090205460ff166117795760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f7420757064617465206d617607c1b604482015260640161093f565b6000818152600c60209081526040808320338452909152902054156117e05760405162461bcd60e51b815260206004820152601b60248201527f494420616c7265616479206c6f636b65642062792063616c6c65720000000000604482015260640161093f565b6000818152600a60205260408120546117fa906001612793565b6000838152600b60209081526040808320848452825280832080546001600160a01b03191633908117909155868452600c83528184209084528252808320849055858352600a9091528120805492935090611854836126b8565b9091555050604051339083907f9ecfd70e9ff36df72989324a49559383d39f9290d700b10cf5ac10dcb68d264390600090a35050565b60145460ff16156118dd5760405162461bcd60e51b815260206004820152601360248201527f4e4f204d494e545320504f535452455645414c00000000000000000000000000604482015260640161093f565b601354826118ee6001546000540390565b6118f89190612793565b11156119365760405162461bcd60e51b815260206004820152600d60248201526c1393c81352539514c813115195609a1b604482015260640161093f565b61096a8183611f7b565b3360009081526009602052604090205460ff166119935760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f7420757064617465206d617607c1b604482015260640161093f565b6000818152600c60209081526040808320338452909152812054908190036119fd5760405162461bcd60e51b815260206004820152601760248201527f4944206e6f74206c6f636b65642062792063616c6c6572000000000000000000604482015260640161093f565b6000828152600a6020526040902054818114611a73576000838152600b602090815260408083208484528252808320805486855282852080546001600160a01b03199081166001600160a01b03909316928317909155825416909155868452600c83528184209084529091529020829055611a9b565b6000838152600b60209081526040808320858452909152902080546001600160a01b03191690555b6000838152600c602090815260408083203384528252808320839055858352600a9091528120805491611acd836127ab565b9091555050604051339084907f0fe7d9801197f79ef3b1595d19379eb58f0fff5f98b0f6d6f34c03cae5306c3790600090a3505050565b600081600054811015611b595760008181526004602052604081205490600160e01b82169003611b57575b80600003611b50575060001901600081815260046020526040902054611b2f565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160808101825260008082526020820181905291810182905260608101919091526108f5611bf483611b04565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6001600160a01b03811660009081526009602052604090205460ff1615611c995760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f7420757064617465206d617607c1b604482015260640161093f565b6000828152600c602090815260408083206001600160a01b038516845290915281205490819003611cfc5760405162461bcd60e51b815260206004820152600d60248201526c1251081b9bdd081b1bd8dad959609a1b604482015260640161093f565b6000838152600a6020526040902054818114611d72576000848152600b602090815260408083208484528252808320805486855282852080546001600160a01b03199081166001600160a01b03909316928317909155825416909155878452600c83528184209084529091529020829055611d9a565b6000848152600b60209081526040808320858452909152902080546001600160a01b03191690555b6000848152600c602090815260408083206001600160a01b03871684528252808320839055868352600a9091528120805491611dd5836127ab565b90915550506040516001600160a01b0384169085907f0fe7d9801197f79ef3b1595d19379eb58f0fff5f98b0f6d6f34c03cae5306c3790600090a350505050565b611e21848484610ae4565b6001600160a01b0383163b1561128957611e3d8484848461205b565b611289576040516368d2bf6b60e11b815260040160405180910390fd5b606081600003611e815750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611eab5780611e95816126b8565b9150611ea49050600a836127c2565b9150611e85565b60008167ffffffffffffffff811115611ec657611ec6612366565b6040519080825280601f01601f191660200182016040528015611ef0576020820181803683370190505b5090505b8415611f7357611f056001836127d6565b9150611f12600a8661268e565b611f1d906030612793565b60f81b818381518110611f3257611f326126a2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f6c600a866127c2565b9450611ef4565b949350505050565b6000546001600160a01b038316611fa457604051622e076360e81b815260040160405180910390fd5b81600003611fc55760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260056020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260046020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061200f5760005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906120909033908990889088906004016127ed565b6020604051808303816000875af19250505080156120cb575060408051601f3d908101601f191682019092526120c891810190612829565b60015b612129573d8080156120f9576040519150601f19603f3d011682016040523d82523d6000602084013e6120fe565b606091505b508051600003612121576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b82805461215290612609565b90600052602060002090601f01602090048101928261217457600085556121ba565b82601f1061218d57805160ff19168380011785556121ba565b828001600101855582156121ba579182015b828111156121ba57825182559160200191906001019061219f565b506121c69291506121ca565b5090565b5b808211156121c657600081556001016121cb565b6001600160e01b031981168114610b8f57600080fd5b60006020828403121561220757600080fd5b8135611b50816121df565b6000806040838503121561222557600080fd5b50508035926020909101359150565b60005b8381101561224f578181015183820152602001612237565b838111156112895750506000910152565b60008151808452612278816020860160208601612234565b601f01601f19169290920160200192915050565b602081526000611b506020830184612260565b6000602082840312156122b157600080fd5b5035919050565b80356001600160a01b03811681146122cf57600080fd5b919050565b600080604083850312156122e757600080fd5b823591506122f7602084016122b8565b90509250929050565b6000806040838503121561231357600080fd5b61231c836122b8565b946020939093013593505050565b60008060006060848603121561233f57600080fd5b612348846122b8565b9250612356602085016122b8565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561239757612397612366565b604051601f8501601f19908116603f011681019082821181831017156123bf576123bf612366565b816040528093508581528686860111156123d857600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561240457600080fd5b813567ffffffffffffffff81111561241b57600080fd5b8201601f8101841361242c57600080fd5b611f738482356020840161237c565b60006020828403121561244d57600080fd5b611b50826122b8565b803580151581146122cf57600080fd5b6000806040838503121561247957600080fd5b612482836122b8565b91506122f760208401612456565b60008083601f8401126124a257600080fd5b50813567ffffffffffffffff8111156124ba57600080fd5b6020830191508360208260051b85010111156124d557600080fd5b9250929050565b600080600080604085870312156124f257600080fd5b843567ffffffffffffffff8082111561250a57600080fd5b61251688838901612490565b9096509450602087013591508082111561252f57600080fd5b5061253c87828801612490565b95989497509550505050565b60006020828403121561255a57600080fd5b611b5082612456565b6000806000806080858703121561257957600080fd5b612582856122b8565b9350612590602086016122b8565b925060408501359150606085013567ffffffffffffffff8111156125b357600080fd5b8501601f810187136125c457600080fd5b6125d38782356020840161237c565b91505092959194509250565b600080604083850312156125f257600080fd5b6125fb836122b8565b91506122f7602084016122b8565b600181811c9082168061261d57607f821691505b60208210810361263d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561267357612673612643565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261269d5761269d612678565b500690565b634e487b7160e01b600052603260045260246000fd5b6000600182016126ca576126ca612643565b5060010190565b600081516126e3818560208601612234565b9290920192915050565b600080845481600182811c91508083168061270957607f831692505b6020808410820361272857634e487b7160e01b86526022600452602486fd5b81801561273c576001811461274d5761277a565b60ff1986168952848901965061277a565b60008b81526020902060005b868110156127725781548b820152908501908301612759565b505084890196505b50505050505061278a81856126d1565b95945050505050565b600082198211156127a6576127a6612643565b500190565b6000816127ba576127ba612643565b506000190190565b6000826127d1576127d1612678565b500490565b6000828210156127e8576127e8612643565b500390565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261281f6080830184612260565b9695505050505050565b60006020828403121561283b57600080fd5b8151611b50816121df56fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122050e932e33c5e954c2dc3b9dc37eb1efd0442a4fc988f0d53f60554bfa99bdeaa64736f6c634300080d00330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f697066732e696f2f697066732f626166796265696863657765646e7170647279376e6269727a746a3337756b3672736a7165797273706e71766875327863747a70746b34716f636d2f000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102a75760003560e01c806370a0823111610164578063af979f25116100c6578063c87b56dd1161008a578063dc8c57b411610064578063dc8c57b414610851578063e985e9c514610867578063f2fde38b146108b057600080fd5b8063c87b56dd146107f1578063db292e7f14610811578063dc33e6811461083157600080fd5b8063af979f251461074b578063b1a6505f1461076b578063b88d4fde1461079b578063bef870ca146107bb578063c002d23d146107db57600080fd5b806394d216d611610128578063a22cb46511610102578063a22cb465146106f6578063a7f93ebd14610716578063ac52e6441461072b57600080fd5b806394d216d6146106a757806395d89b41146106c757806399288dbb146106dc57600080fd5b806370a08231146105b9578063715018a6146105d957806372abc8b7146105ee5780638da5cb5b1461061c5780639231ab2a1461063a57600080fd5b80632db115441161020d57806342842e0e116101d15780636352211e116101ab5780636352211e1461054c578063650b00f61461056c57806368742da61461059957600080fd5b806342842e0e146104fc57806354214f691461051c5780635aee49091461053657600080fd5b80632db115441461047d57806332cb6b0c146104905780633653b377146104a657806340a9c8df146104bc57806341af4f00146104dc57600080fd5b8063095ea7b31161026f5780632799cde0116102495780632799cde0146103fc5780632a85db551461041c5780632cba81231461043c57600080fd5b8063095ea7b3146103a357806318160ddd146103c357806323b872dd146103dc57600080fd5b806301ffc9a7146102ac5780630442bfa8146102e157806306fdde0314610303578063081812fc1461032557806309308e5d1461035d575b600080fd5b3480156102b857600080fd5b506102cc6102c73660046121f5565b6108d0565b60405190151581526020015b60405180910390f35b3480156102ed57600080fd5b506103016102fc366004612212565b6108fb565b005b34801561030f57600080fd5b5061031861096e565b6040516102d8919061228c565b34801561033157600080fd5b5061034561034036600461229f565b610a00565b6040516001600160a01b0390911681526020016102d8565b34801561036957600080fd5b506103956103783660046122d4565b600c60209081526000928352604080842090915290825290205481565b6040519081526020016102d8565b3480156103af57600080fd5b506103016103be366004612300565b610a44565b3480156103cf57600080fd5b5060015460005403610395565b3480156103e857600080fd5b506103016103f736600461232a565b610ae4565b34801561040857600080fd5b5061030161041736600461229f565b610b42565b34801561042857600080fd5b506103016104373660046123f2565b610b92565b34801561044857600080fd5b50610345610457366004612212565b600b6020908152600092835260408084209091529082529020546001600160a01b031681565b61030161048b36600461229f565b610bed565b34801561049c57600080fd5b5061039560135481565b3480156104b257600080fd5b5061039560125481565b3480156104c857600080fd5b506103016104d736600461229f565b610cfb565b3480156104e857600080fd5b506103016104f736600461229f565b610d48565b34801561050857600080fd5b5061030161051736600461232a565b610e0d565b34801561052857600080fd5b506014546102cc9060ff1681565b34801561054257600080fd5b5061039560115481565b34801561055857600080fd5b5061034561056736600461229f565b610e28565b34801561057857600080fd5b5061039561058736600461229f565b600a6020526000908152604090205481565b3480156105a557600080fd5b506103016105b436600461243b565b610e33565b3480156105c557600080fd5b506103956105d436600461243b565b610eb0565b3480156105e557600080fd5b50610301610eff565b3480156105fa57600080fd5b506102cc61060936600461229f565b6000908152600a60205260409020541590565b34801561062857600080fd5b506008546001600160a01b0316610345565b34801561064657600080fd5b5061065a61065536600461229f565b610f53565b6040516102d8919081516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260609182015162ffffff169181019190915260800190565b3480156106b357600080fd5b506103016106c23660046122d4565b610f80565b3480156106d357600080fd5b50610318610fce565b3480156106e857600080fd5b50600d546102cc9060ff1681565b34801561070257600080fd5b50610301610711366004612466565b610fdd565b34801561072257600080fd5b50610395611072565b34801561073757600080fd5b506103016107463660046124dc565b6110b5565b34801561075757600080fd5b50610301610766366004612548565b6111d4565b34801561077757600080fd5b506102cc61078636600461243b565b60096020526000908152604090205460ff1681565b3480156107a757600080fd5b506103016107b6366004612563565b61122f565b3480156107c757600080fd5b506103016107d63660046122d4565b61128f565b3480156107e757600080fd5b5061039560105481565b3480156107fd57600080fd5b5061031861080c36600461229f565b6112e1565b34801561081d57600080fd5b5061030161082c3660046123f2565b6113dd565b34801561083d57600080fd5b5061039561084c36600461243b565b611438565b34801561085d57600080fd5b5061039560155481565b34801561087357600080fd5b506102cc6108823660046125df565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108bc57600080fd5b506103016108cb36600461243b565b611463565b60006001600160e01b0319821663706e848960e01b14806108f557506108f582611519565b92915050565b6008546001600160a01b031633146109485760405162461bcd60e51b8152602060048201819052602482015260008051602061284783398151915260448201526064015b60405180910390fd5b806001036109565750601155565b806002036109645750601255565b60108290555b5050565b60606002805461097d90612609565b80601f01602080910402602001604051908101604052809291908181526020018280546109a990612609565b80156109f65780601f106109cb576101008083540402835291602001916109f6565b820191906000526020600020905b8154815290600101906020018083116109d957829003601f168201915b5050505050905090565b6000610a0b82611567565b610a28576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a4f82610e28565b9050336001600160a01b03821614610a8857610a6b8133610882565b610a88576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600a602052604090205415610b325760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881a5cc81b1bd8dad959608a1b604482015260640161093f565b610b3d83838361158e565b505050565b610b4b81611567565b610b865760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b8808595e1a5cdd60a21b604482015260640161093f565b610b8f81611726565b50565b6008546001600160a01b03163314610bda5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b805161096a90600e906020840190612146565b600d5460ff16610c3f5760405162461bcd60e51b815260206004820152600e60248201527f4d494e5420495320434c4f534544000000000000000000000000000000000000604482015260640161093f565b6014811115610c905760405162461bcd60e51b815260206004820152601060248201527f4d494e54494e4720544f4f204d414e5900000000000000000000000000000000604482015260640161093f565b80610c99611072565b610ca39190612659565b3414610cf15760405162461bcd60e51b815260206004820152601260248201527f494e434f5252454354204554482053454e540000000000000000000000000000604482015260640161093f565b610b8f813361188a565b610d0481611567565b610d3f5760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b8808595e1a5cdd60a21b604482015260640161093f565b610b8f81611940565b6008546001600160a01b03163314610d905760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b60145460ff1615610de35760405162461bcd60e51b815260206004820152601260248201527f414c524541445920534554204f46465345540000000000000000000000000000604482015260640161093f565b6014805460ff19166001179055610dfd6001546000540390565b610e07908261268e565b60155550565b610b3d8383836040518060200160405280600081525061122f565b60006108f582611b04565b6008546001600160a01b03163314610e7b5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b6040516001600160a01b038216904780156108fc02916000818181858888f1935050505015801561096a573d6000803e3d6000fd5b60006001600160a01b038216610ed9576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610f475760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b610f516000611b72565b565b6040805160808101825260008082526020820181905291810182905260608101919091526108f582611bc4565b610f8982611567565b610fc45760405162461bcd60e51b815260206004820152600c60248201526b151bdad95b8808595e1a5cdd60a21b604482015260640161093f565b61096a8282611c3c565b60606003805461097d90612609565b336001600160a01b038316036110065760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006117706110846001546000540390565b1115611091575060125490565b610bb86110a16001546000540390565b11156110ae575060115490565b5060105490565b6008546001600160a01b031633146110fd5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b8281146111365760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b604482015260640161093f565b60005b838110156111cd57828282818110611153576111536126a2565b90506020020160208101906111689190612548565b6009600087878581811061117e5761117e6126a2565b9050602002016020810190611193919061243b565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806111c5816126b8565b915050611139565b5050505050565b6008546001600160a01b0316331461121c5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b600d805460ff1916911515919091179055565b6000828152600a60205260409020541561127d5760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881a5cc81b1bd8dad959608a1b604482015260640161093f565b61128984848484611e16565b50505050565b6008546001600160a01b031633146112d75760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b61096a828261188a565b60606112ec82611567565b61135e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606482015260840161093f565b60145460ff166113aa576000611375600a8461268e565b9050600e61138282611e5a565b6040516020016113939291906126ed565b604051602081830303815290604052915050919050565b60006113b96001546000540390565b6015546113c69085612793565b6113d0919061268e565b9050600f61138282611e5a565b6008546001600160a01b031633146114255760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b805161096a90600f906020840190612146565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c166108f5565b6008546001600160a01b031633146114ab5760405162461bcd60e51b81526020600482018190526024820152600080516020612847833981519152604482015260640161093f565b6001600160a01b0381166115105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161093f565b610b8f81611b72565b60006301ffc9a760e01b6001600160e01b03198316148061154a57506380ac58cd60e01b6001600160e01b03198316145b806108f55750506001600160e01b031916635b5e139f60e01b1490565b60008054821080156108f5575050600090815260046020526040902054600160e01b161590565b600061159982611b04565b9050836001600160a01b0316816001600160a01b0316146115cc5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417611619576115fc8633610882565b61161957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661164057604051633a954ecd60e21b815260040160405180910390fd5b801561164b57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036116dd576001840160008181526004602052604081205490036116db5760005481146116db5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b3360009081526009602052604090205460ff166117795760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f7420757064617465206d617607c1b604482015260640161093f565b6000818152600c60209081526040808320338452909152902054156117e05760405162461bcd60e51b815260206004820152601b60248201527f494420616c7265616479206c6f636b65642062792063616c6c65720000000000604482015260640161093f565b6000818152600a60205260408120546117fa906001612793565b6000838152600b60209081526040808320848452825280832080546001600160a01b03191633908117909155868452600c83528184209084528252808320849055858352600a9091528120805492935090611854836126b8565b9091555050604051339083907f9ecfd70e9ff36df72989324a49559383d39f9290d700b10cf5ac10dcb68d264390600090a35050565b60145460ff16156118dd5760405162461bcd60e51b815260206004820152601360248201527f4e4f204d494e545320504f535452455645414c00000000000000000000000000604482015260640161093f565b601354826118ee6001546000540390565b6118f89190612793565b11156119365760405162461bcd60e51b815260206004820152600d60248201526c1393c81352539514c813115195609a1b604482015260640161093f565b61096a8183611f7b565b3360009081526009602052604090205460ff166119935760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f7420757064617465206d617607c1b604482015260640161093f565b6000818152600c60209081526040808320338452909152812054908190036119fd5760405162461bcd60e51b815260206004820152601760248201527f4944206e6f74206c6f636b65642062792063616c6c6572000000000000000000604482015260640161093f565b6000828152600a6020526040902054818114611a73576000838152600b602090815260408083208484528252808320805486855282852080546001600160a01b03199081166001600160a01b03909316928317909155825416909155868452600c83528184209084529091529020829055611a9b565b6000838152600b60209081526040808320858452909152902080546001600160a01b03191690555b6000838152600c602090815260408083203384528252808320839055858352600a9091528120805491611acd836127ab565b9091555050604051339084907f0fe7d9801197f79ef3b1595d19379eb58f0fff5f98b0f6d6f34c03cae5306c3790600090a3505050565b600081600054811015611b595760008181526004602052604081205490600160e01b82169003611b57575b80600003611b50575060001901600081815260046020526040902054611b2f565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160808101825260008082526020820181905291810182905260608101919091526108f5611bf483611b04565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6001600160a01b03811660009081526009602052604090205460ff1615611c995760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f7420757064617465206d617607c1b604482015260640161093f565b6000828152600c602090815260408083206001600160a01b038516845290915281205490819003611cfc5760405162461bcd60e51b815260206004820152600d60248201526c1251081b9bdd081b1bd8dad959609a1b604482015260640161093f565b6000838152600a6020526040902054818114611d72576000848152600b602090815260408083208484528252808320805486855282852080546001600160a01b03199081166001600160a01b03909316928317909155825416909155878452600c83528184209084529091529020829055611d9a565b6000848152600b60209081526040808320858452909152902080546001600160a01b03191690555b6000848152600c602090815260408083206001600160a01b03871684528252808320839055868352600a9091528120805491611dd5836127ab565b90915550506040516001600160a01b0384169085907f0fe7d9801197f79ef3b1595d19379eb58f0fff5f98b0f6d6f34c03cae5306c3790600090a350505050565b611e21848484610ae4565b6001600160a01b0383163b1561128957611e3d8484848461205b565b611289576040516368d2bf6b60e11b815260040160405180910390fd5b606081600003611e815750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611eab5780611e95816126b8565b9150611ea49050600a836127c2565b9150611e85565b60008167ffffffffffffffff811115611ec657611ec6612366565b6040519080825280601f01601f191660200182016040528015611ef0576020820181803683370190505b5090505b8415611f7357611f056001836127d6565b9150611f12600a8661268e565b611f1d906030612793565b60f81b818381518110611f3257611f326126a2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f6c600a866127c2565b9450611ef4565b949350505050565b6000546001600160a01b038316611fa457604051622e076360e81b815260040160405180910390fd5b81600003611fc55760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260056020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260046020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061200f5760005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906120909033908990889088906004016127ed565b6020604051808303816000875af19250505080156120cb575060408051601f3d908101601f191682019092526120c891810190612829565b60015b612129573d8080156120f9576040519150601f19603f3d011682016040523d82523d6000602084013e6120fe565b606091505b508051600003612121576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b82805461215290612609565b90600052602060002090601f01602090048101928261217457600085556121ba565b82601f1061218d57805160ff19168380011785556121ba565b828001600101855582156121ba579182015b828111156121ba57825182559160200191906001019061219f565b506121c69291506121ca565b5090565b5b808211156121c657600081556001016121cb565b6001600160e01b031981168114610b8f57600080fd5b60006020828403121561220757600080fd5b8135611b50816121df565b6000806040838503121561222557600080fd5b50508035926020909101359150565b60005b8381101561224f578181015183820152602001612237565b838111156112895750506000910152565b60008151808452612278816020860160208601612234565b601f01601f19169290920160200192915050565b602081526000611b506020830184612260565b6000602082840312156122b157600080fd5b5035919050565b80356001600160a01b03811681146122cf57600080fd5b919050565b600080604083850312156122e757600080fd5b823591506122f7602084016122b8565b90509250929050565b6000806040838503121561231357600080fd5b61231c836122b8565b946020939093013593505050565b60008060006060848603121561233f57600080fd5b612348846122b8565b9250612356602085016122b8565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561239757612397612366565b604051601f8501601f19908116603f011681019082821181831017156123bf576123bf612366565b816040528093508581528686860111156123d857600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561240457600080fd5b813567ffffffffffffffff81111561241b57600080fd5b8201601f8101841361242c57600080fd5b611f738482356020840161237c565b60006020828403121561244d57600080fd5b611b50826122b8565b803580151581146122cf57600080fd5b6000806040838503121561247957600080fd5b612482836122b8565b91506122f760208401612456565b60008083601f8401126124a257600080fd5b50813567ffffffffffffffff8111156124ba57600080fd5b6020830191508360208260051b85010111156124d557600080fd5b9250929050565b600080600080604085870312156124f257600080fd5b843567ffffffffffffffff8082111561250a57600080fd5b61251688838901612490565b9096509450602087013591508082111561252f57600080fd5b5061253c87828801612490565b95989497509550505050565b60006020828403121561255a57600080fd5b611b5082612456565b6000806000806080858703121561257957600080fd5b612582856122b8565b9350612590602086016122b8565b925060408501359150606085013567ffffffffffffffff8111156125b357600080fd5b8501601f810187136125c457600080fd5b6125d38782356020840161237c565b91505092959194509250565b600080604083850312156125f257600080fd5b6125fb836122b8565b91506122f7602084016122b8565b600181811c9082168061261d57607f821691505b60208210810361263d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561267357612673612643565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261269d5761269d612678565b500690565b634e487b7160e01b600052603260045260246000fd5b6000600182016126ca576126ca612643565b5060010190565b600081516126e3818560208601612234565b9290920192915050565b600080845481600182811c91508083168061270957607f831692505b6020808410820361272857634e487b7160e01b86526022600452602486fd5b81801561273c576001811461274d5761277a565b60ff1986168952848901965061277a565b60008b81526020902060005b868110156127725781548b820152908501908301612759565b505084890196505b50505050505061278a81856126d1565b95945050505050565b600082198211156127a6576127a6612643565b500190565b6000816127ba576127ba612643565b506000190190565b6000826127d1576127d1612678565b500490565b6000828210156127e8576127e8612643565b500390565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261281f6080830184612260565b9695505050505050565b60006020828403121561283b57600080fd5b8151611b50816121df56fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122050e932e33c5e954c2dc3b9dc37eb1efd0442a4fc988f0d53f60554bfa99bdeaa64736f6c634300080d0033

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

0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f697066732e696f2f697066732f626166796265696863657765646e7170647279376e6269727a746a3337756b3672736a7165797273706e71766875327863747a70746b34716f636d2f000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _preRevealURI (string): https://ipfs.io/ipfs/bafybeihcewednqpdry7nbirztj37uk6rsjqeyrspnqvhu2xctzptk4qocm/

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [2] : 68747470733a2f2f697066732e696f2f697066732f6261667962656968636577
Arg [3] : 65646e7170647279376e6269727a746a3337756b3672736a7165797273706e71
Arg [4] : 766875327863747a70746b34716f636d2f000000000000000000000000000000


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.