// Contract: MBMSFY
// Target function: function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool)
/**
 *Submitted for verification at Etherscan.io on 2022-07-14
*/

// SPDX-License-Identifier: None

/**
MY BODY. MY SOUL. FCK YOU.

No roadmap, no discord and no utility other than a quick and to-the-point
statement reminding everybody this space is for FCKING EVERYONE.
If this is something you want to pass on that's totally fine, but if this offends you
or upsets you please kindly FCK OFF.
**/


pragma solidity ^0.8.4;


// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A {
		/**
		 * The caller must own the token or be an approved operator.
		 */
		error ApprovalCallerNotOwnerNorApproved();

		/**
		 * The token does not exist.
		 */
		error ApprovalQueryForNonexistentToken();

		/**
		 * The caller cannot approve to their own address.
		 */
		error ApproveToCaller();

		/**
		 * The caller cannot approve to the current owner.
		 */
		error ApprovalToCurrentOwner();

		/**
		 * Cannot query the balance for the zero address.
		 */
		error BalanceQueryForZeroAddress();

		/**
		 * Cannot mint to the zero address.
		 */
		error MintToZeroAddress();

		/**
		 * The quantity of tokens minted must be more than zero.
		 */
		error MintZeroQuantity();

		/**
		 * The token does not exist.
		 */
		error OwnerQueryForNonexistentToken();

		/**
		 * The caller must own the token or be an approved operator.
		 */
		error TransferCallerNotOwnerNorApproved();

		/**
		 * The token must be owned by `from`.
		 */
		error TransferFromIncorrectOwner();

		/**
		 * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
		 */
		error TransferToNonERC721ReceiverImplementer();

		/**
		 * Cannot transfer to the zero address.
		 */
		error TransferToZeroAddress();

		/**
		 * The token does not exist.
		 */
		error URIQueryForNonexistentToken();

		struct TokenOwnership {
				// The address of the owner.
				address addr;
				// Keeps track of the start time of ownership with minimal overhead for tokenomics.
				uint64 startTimestamp;
				// Whether the token has been burned.
				bool burned;
		}

		/**
		 * @dev Returns the total amount of tokens stored by the contract.
		 *
		 * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
		 */
		function totalSupply() external view returns (uint256);

		// ==============================
		//						IERC165
		// ==============================

		/**
		 * @dev Returns true if this contract implements the interface defined by
		 * `interfaceId`. See the corresponding
		 * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
		 * to learn more about how these ids are created.
		 *
		 * This function call must use less than 30 000 gas.
		 */
		function supportsInterface(bytes4 interfaceId) external view returns (bool);

		// ==============================
		//						IERC721
		// ==============================

		/**
		 * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
		 */
		event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

		/**
		 * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
		 */
		event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

		/**
		 * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
		 */
		event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

		/**
		 * @dev Returns the number of tokens in ``owner``'s account.
		 */
		function balanceOf(address owner) external view returns (uint256 balance);

		/**
		 * @dev Returns the owner of the `tokenId` token.
		 *
		 * Requirements:
		 *
		 * - `tokenId` must exist.
		 */
		function ownerOf(uint256 tokenId) external view returns (address owner);

		/**
		 * @dev Safely transfers `tokenId` token from `from` to `to`.
		 *
		 * Requirements:
		 *
		 * - `from` cannot be the zero address.
		 * - `to` cannot be the zero address.
		 * - `tokenId` token must exist and be owned by `from`.
		 * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
		 * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
		 *
		 * Emits a {Transfer} event.
		 */
		function safeTransferFrom(
				address from,
				address to,
				uint256 tokenId,
				bytes calldata data
		) external;

		/**
		 * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
		 * are aware of the ERC721 protocol to prevent tokens from being forever locked.
		 *
		 * Requirements:
		 *
		 * - `from` cannot be the zero address.
		 * - `to` cannot be the zero address.
		 * - `tokenId` token must exist and be owned by `from`.
		 * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
		 * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
		 *
		 * Emits a {Transfer} event.
		 */
		function safeTransferFrom(
				address from,
				address to,
				uint256 tokenId
		) external;

		/**
		 * @dev Transfers `tokenId` token from `from` to `to`.
		 *
		 * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
		 *
		 * Requirements:
		 *
		 * - `from` cannot be the zero address.
		 * - `to` cannot be the zero address.
		 * - `tokenId` token must be owned by `from`.
		 * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
		 *
		 * Emits a {Transfer} event.
		 */
		function transferFrom(
				address from,
				address to,
				uint256 tokenId
		) external;

		/**
		 * @dev Gives permission to `to` to transfer `tokenId` token to another account.
		 * The approval is cleared when the token is transferred.
		 *
		 * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
		 *
		 * Requirements:
		 *
		 * - The caller must own the token or be an approved operator.
		 * - `tokenId` must exist.
		 *
		 * Emits an {Approval} event.
		 */
		function approve(address to, uint256 tokenId) external;

		/**
		 * @dev Approve or remove `operator` as an operator for the caller.
		 * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
		 *
		 * Requirements:
		 *
		 * - The `operator` cannot be the caller.
		 *
		 * Emits an {ApprovalForAll} event.
		 */
		function setApprovalForAll(address operator, bool _approved) external;

		/**
		 * @dev Returns the account approved for `tokenId` token.
		 *
		 * Requirements:
		 *
		 * - `tokenId` must exist.
		 */
		function getApproved(uint256 tokenId) external view returns (address operator);

		/**
		 * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
		 *
		 * See {setApprovalForAll}
		 */
		function isApprovedForAll(address owner, address operator) external view returns (bool);

		// ==============================
		//				IERC721Metadata
		// ==============================

		/**
		 * @dev Returns the token collection name.
		 */
		function name() external view returns (string memory);

		/**
		 * @dev Returns the token collection symbol.
		 */
		function symbol() external view returns (string memory);

		/**
		 * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
		 */
		function tokenURI(uint256 tokenId) external view returns (string memory);
}


/**
 * @dev ERC721 token receiver interface.
 */
interface ERC721A__IERC721Receiver {
		function onERC721Received(
				address operator,
				address from,
				uint256 tokenId,
				bytes calldata data
		) external returns (bytes4);
}

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
		// Mask of an entry in packed address data.
		uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

		// The bit position of `numberMinted` in packed address data.
		uint256 private constant BITPOS_NUMBER_MINTED = 64;

		// The bit position of `numberBurned` in packed address data.
		uint256 private constant BITPOS_NUMBER_BURNED = 128;

		// The bit position of `aux` in packed address data.
		uint256 private constant BITPOS_AUX = 192;

		// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
		uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

		// The bit position of `startTimestamp` in packed ownership.
		uint256 private constant BITPOS_START_TIMESTAMP = 160;

		// The bit mask of the `burned` bit in packed ownership.
		uint256 private constant BITMASK_BURNED = 1 << 224;
		
		// The bit position of the `nextInitialized` bit in packed ownership.
		uint256 private constant BITPOS_NEXT_INITIALIZED = 225;

		// The bit mask of the `nextInitialized` bit in packed ownership.
		uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;

		// The tokenId of the next token to be minted.
		uint256 private _currentIndex;

		// The number of tokens burned.
		uint256 private _burnCounter;

		// Token name
		string private _name;

		// Token symbol
		string private _symbol;

		// Mapping from token ID to ownership details
		// An empty struct value does not necessarily mean the token is unowned.
		// See `_packedOwnershipOf` implementation for details.
		//
		// Bits Layout:
		// - [0..159]		`addr`
		// - [160..223] `startTimestamp`
		// - [224]			`burned`
		// - [225]			`nextInitialized`
		mapping(uint256 => uint256) private _packedOwnerships;

		// Mapping owner address to address data.
		//
		// Bits Layout:
		// - [0..63]		`balance`
		// - [64..127]	`numberMinted`
		// - [128..191] `numberBurned`
		// - [192..255] `aux`
		mapping(address => uint256) private _packedAddressData;

		// Mapping from token ID to approved address.
		mapping(uint256 => address) private _tokenApprovals;

		// Mapping from owner to operator approvals
		mapping(address => mapping(address => bool)) private _operatorApprovals;

		constructor(string memory name_, string memory symbol_) {
				_name = name_;
				_symbol = symbol_;
				_currentIndex = _startTokenId();
		}

		/**
		 * @dev Returns the starting token ID. 
		 * To change the starting token ID, please override this function.
		 */
		function _startTokenId() internal view virtual returns (uint256) {
				return 0;
		}

		/**
		 * @dev Returns the next token ID to be minted.
		 */
		function _nextTokenId() internal view returns (uint256) {
				return _currentIndex;
		}

		/**
		 * @dev Returns the total number of tokens in existence.
		 * Burned tokens will reduce the count. 
		 * To get the total number of tokens minted, please see `_totalMinted`.
		 */
		function totalSupply() public view override returns (uint256) {
				// Counter underflow is impossible as _burnCounter cannot be incremented
				// more than `_currentIndex - _startTokenId()` times.
				unchecked {
						return _currentIndex - _burnCounter - _startTokenId();
				}
		}

		/**
		 * @dev Returns the total amount of tokens minted in the contract.
		 */
		function _totalMinted() internal view returns (uint256) {
				// Counter underflow is impossible as _currentIndex does not decrement,
				// and it is initialized to `_startTokenId()`
				unchecked {
						return _currentIndex - _startTokenId();
				}
		}

		/**
		 * @dev Returns the total number of tokens burned.
		 */
		function _totalBurned() internal view returns (uint256) {
				return _burnCounter;
		}