ETH Price: $2,488.67 (-1.16%)

HeyEdu Genesis (HeyEdu Genesis)
 

Overview

TokenID

1498

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
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:
HeyEduGenesis

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 400 runs

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

// Deploy and contract customizations by: Artur Chmaro
// ERC721A creator: Chiru Labs

pragma solidity ^0.8.13;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

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

interface HeyEduFounders {
    function burn(uint256 tokenId) external;
}

contract HeyEduGenesis is Context, ERC165, IERC721, IERC721Metadata, Ownable, DefaultOperatorFilterer, ERC2981 {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    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;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;
    
    uint256 private _totalMintedCounter = 0;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    string private _base_uri = "https://nfthooks.xyz/api/nftping/";

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) public _addressData;

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

    // Flag that indicates if mint still possible
    bool public mintPaused;

    // Price for minting token with ETH (in WEI)
    uint256 public mintPrice;

    // address to which ETH is transffered after mint
    address payable private treasuryAddr;

    // returns contract metadata
    string private _contractURI;

    address public founderAddr;

    address private voucherSigner;
    
    uint256 private _goldIndex = 1;

    uint256 public immutable maxSupply = 5000;

    mapping(uint256 => bool) private usedNonces;

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

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 501;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        return _totalMintedCounter - _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165, ERC2981) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }

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

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

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

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

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * 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) {
        uint256 curr = tokenId;

        unchecked {
            if (1 <= curr && curr < 5001 ) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // 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.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

    /**
     * @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, tokenId.toString(), ".json")) : '';
    }

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

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

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

        _approve(to, tokenId, owner);
    }

    /**
     * @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 onlyAllowedOperatorApproval(operator) {
        if (operator == _msgSender()) revert ApproveToCaller();

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

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

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

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override onlyAllowedOperator(from) {
        _transfer(from, to, tokenId);
        if (to.isContract() && !_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 &&
            !_ownerships[tokenId].burned;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        
        _beforeTokenTransfers(address(0), to, startTokenId, quantity);
        _totalMintedCounter += quantity;
        require(_totalMintedCounter <= maxSupply, "max supply reached");

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

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

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

    function _mintGold(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _goldIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        
        _beforeTokenTransfers(address(0), to, startTokenId, quantity);
        _totalMintedCounter += quantity;
        require(_totalMintedCounter <= maxSupply, "max supply reached");

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

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

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex != end);
                // Reentrancy protection
                if (_goldIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _goldIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }


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

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // 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 {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

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

    /**
     * @dev This is 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 {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

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

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // 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 {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        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 Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

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

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

    function batchAddToWhitelist(
      address [] calldata recipients,
      uint64 [] calldata quantities
    ) public onlyOwner {
      for(uint64 i = 0; i < recipients.length; i++) {
        _addressData[recipients[i]].aux = quantities[i];
      }
    }

    function changeBaseUri(
      string calldata newBaseUri
    ) public onlyOwner {
        _base_uri = newBaseUri;
    }

    function mint(uint64 amount) public {
      require(amount > 0, "amount must be higher than zero");
      require(mintPaused == false, "mint paused");
      require(_addressData[msg.sender].aux >= amount, "caller not whitelisted");
      _addressData[msg.sender].aux = _addressData[msg.sender].aux - amount;
      _safeMint(msg.sender, amount);
    }

    function batchMint(address [] calldata _recipients) public {
      require(mintPaused == false, "mint paused");
      require(_addressData[msg.sender].aux >= _recipients.length, "caller not whitelisted for enough copies");

      for(uint i = 0; i < _recipients.length; i++) {
        _addressData[msg.sender].aux = _addressData[msg.sender].aux - 1;
        _safeMint(_recipients[i], 1);
      }
    }

    function setMintPaused(
      bool _flag
    ) public onlyOwner {
        mintPaused = _flag;
    }

    function setMintPrice(
      uint _price
    ) public onlyOwner {
        mintPrice = _price;
    }

    function setTreasuryAddr(
      address payable _addr
    ) public onlyOwner {
        treasuryAddr = _addr;
    }

    function purchaseMint(uint amount) payable public {
      require(mintPaused == false, "mint paused");
      require(mintPrice > 0, "sale not active");
      require(amount > 0, "purchase at least one");
      require(msg.value == amount * mintPrice, "wrong amount of ETH sent");

      (bool sent, bytes memory data) = treasuryAddr.call{value: msg.value}("");
      require(sent, "Failed to send Ether");
      _safeMint(msg.sender, amount);
    }

    function setContractURI(
      string memory _uri
    ) public onlyOwner {
        _contractURI = _uri;
    }

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    function setFounderAddr(address _addr) public onlyOwner {
        founderAddr = _addr;
    }

    function setVoucherSigner(address _addr) public onlyOwner {
        voucherSigner = _addr;
    }

    function swapFounder(uint256 [] calldata _founderIds ) public {
        HeyEduFounders nftContract = HeyEduFounders(founderAddr);

        for(uint64 i = 0; i < _founderIds.length; i++) {
          nftContract.burn(_founderIds[i]);
        }

        _mintGold(msg.sender, _founderIds.length, '', true);
    }

    function isVoucherValid(address receiver, uint256 amount, uint256 nonce, bytes memory signature) private view returns(bool) {
      address signedBy = ECDSA.recover(
        ECDSA.toEthSignedMessageHash(
          keccak256(abi.encodePacked(receiver, amount, nonce))
        ), 
        signature
      );
      
      return signedBy == voucherSigner; 
    }

    function voucherMint(address receiver, uint256 amount, uint256 nonce, bytes memory signature) public {
        require(usedNonces[nonce] == false, "nonce was used before");
        require(
            isVoucherValid(receiver, amount, nonce, signature), 
            "voucher invalid"
        );
        usedNonces[nonce] = true;

        _safeMint(receiver, amount);
    }

    function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) public onlyOwner {
      _setDefaultRoyalty(_receiver, _feeNumerator);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 3 of 18 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 4 of 18 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 5 of 18 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

File 6 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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);
}

File 7 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 10 of 18 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 11 of 18 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 18 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 14 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 15 of 18 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol";
/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 * @dev    Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    /// @dev The constructor that is called when the contract is being deployed.
    constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}
}

File 16 of 18 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 17 of 18 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 18 of 18 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if an operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_addressData","outputs":[{"internalType":"uint64","name":"balance","type":"uint64"},{"internalType":"uint64","name":"numberMinted","type":"uint64"},{"internalType":"uint64","name":"numberBurned","type":"uint64"},{"internalType":"uint64","name":"aux","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint64[]","name":"quantities","type":"uint64[]"}],"name":"batchAddToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseUri","type":"string"}],"name":"changeBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"founderAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"amount","type":"uint64"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"purchaseMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setFounderAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setMintPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_addr","type":"address"}],"name":"setTreasuryAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setVoucherSigner","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":[{"internalType":"uint256[]","name":"_founderIds","type":"uint256[]"}],"name":"swapFounder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"voucherMint","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6000600455610100604052602160a081815290620034be60c039600890620000289082620002f9565b5060016013556113886080523480156200004157600080fd5b50604051620034df380380620034df833981016040819052620000649162000474565b733cc6cdda760b79bafa08df41ecfa224f810dceb66001620000863362000204565b6daaeb6d7670e522a718067333cd4e3b15620001cb5780156200011957604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620000fa57600080fd5b505af11580156200010f573d6000803e3d6000fd5b50505050620001cb565b6001600160a01b038216156200016a5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000df565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001b157600080fd5b505af1158015620001c6573d6000803e3d6000fd5b505050505b5060069050620001dc8382620002f9565b506007620001eb8282620002f9565b506101f56003555050600d805460ff19169055620004de565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200027f57607f821691505b602082108103620002a057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002f457600081815260208120601f850160051c81016020861015620002cf5750805b601f850160051c820191505b81811015620002f057828155600101620002db565b5050505b505050565b81516001600160401b0381111562000315576200031562000254565b6200032d816200032684546200026a565b84620002a6565b602080601f8311600181146200036557600084156200034c5750858301515b600019600386901b1c1916600185901b178555620002f0565b600085815260208120601f198616915b82811015620003965788860151825594840194600190910190840162000375565b5085821015620003b55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f830112620003d757600080fd5b81516001600160401b0380821115620003f457620003f462000254565b604051601f8301601f19908116603f011681019082821181831017156200041f576200041f62000254565b816040528381526020925086838588010111156200043c57600080fd5b600091505b8382101562000460578582018301518183018401529082019062000441565b600093810190920192909252949350505050565b600080604083850312156200048857600080fd5b82516001600160401b0380821115620004a057600080fd5b620004ae86838701620003c5565b93506020850151915080821115620004c557600080fd5b50620004d485828601620003c5565b9150509250929050565b608051612fb662000508600039600081816106cf01528181611c70015261221c0152612fb66000f3fe6080604052600436106102305760003560e01c80638da5cb5b1161012e578063b88d4fde116100ab578063e8a3d4851161006f578063e8a3d48514610711578063e985e9c514610726578063f2fde38b1461076f578063f4a0a5281461078f578063fb9d09c8146107af57600080fd5b8063b88d4fde1461065d578063c87b56dd1461067d578063c9b5e5551461069d578063d5abeb01146106bd578063d67b06c1146106f157600080fd5b8063a7e05b9c116100f2578063a7e05b9c14610555578063ae2c34ca14610575578063af6e40d014610595578063b07eb4a3146105b5578063b69355011461063d57600080fd5b80638da5cb5b146104c2578063938e3d7b146104e057806395d89b411461050057806399ff682e14610515578063a22cb4651461053557600080fd5b806342842e0e116101bc5780636817c76c116101805780636817c76c1461043d57806370a0823114610453578063715018a6146104735780637e4831d3146104885780638a6bb239146104a257600080fd5b806342842e0e146103aa578063492d306b146103ca5780635edf4c8f146103ea5780636352211e1461040a57806363d34f001461042a57600080fd5b8063095ea7b311610203578063095ea7b3146102e657806318160ddd1461030657806323b872dd146103295780632a55205a1461034957806341f434341461038857600080fd5b806301ffc9a71461023557806304634d8d1461026a57806306fdde031461028c578063081812fc146102ae575b600080fd5b34801561024157600080fd5b50610255610250366004612666565b6107cf565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b5061028a610285366004612698565b610830565b005b34801561029857600080fd5b506102a1610846565b604051610261919061272d565b3480156102ba57600080fd5b506102ce6102c9366004612740565b6108d8565b6040516001600160a01b039091168152602001610261565b3480156102f257600080fd5b5061028a610301366004612759565b61091c565b34801561031257600080fd5b5061031b6109d1565b604051908152602001610261565b34801561033557600080fd5b5061028a610344366004612785565b6109e8565b34801561035557600080fd5b506103696103643660046127c6565b610a0d565b604080516001600160a01b039093168352602083019190915201610261565b34801561039457600080fd5b506102ce6daaeb6d7670e522a718067333cd4e81565b3480156103b657600080fd5b5061028a6103c5366004612785565b610abb565b3480156103d657600080fd5b5061028a6103e53660046127e8565b610af0565b3480156103f657600080fd5b5061028a610405366004612859565b610b0a565b34801561041657600080fd5b506102ce610425366004612740565b610b34565b61028a610438366004612740565b610b46565b34801561044957600080fd5b5061031b600e5481565b34801561045f57600080fd5b5061031b61046e366004612859565b610d2d565b34801561047f57600080fd5b5061028a610d7b565b34801561049457600080fd5b50600d546102559060ff1681565b3480156104ae57600080fd5b5061028a6104bd3660046128ba565b610d8f565b3480156104ce57600080fd5b506000546001600160a01b03166102ce565b3480156104ec57600080fd5b5061028a6104fb3660046129b0565b610e66565b34801561050c57600080fd5b506102a1610e7a565b34801561052157600080fd5b5061028a6105303660046129f8565b610e89565b34801561054157600080fd5b5061028a610550366004612a47565b610f5d565b34801561056157600080fd5b5061028a610570366004612859565b610ffd565b34801561058157600080fd5b5061028a610590366004612a95565b611027565b3480156105a157600080fd5b5061028a6105b0366004612859565b6110f3565b3480156105c157600080fd5b5061060a6105d0366004612859565b600a602052600090815260409020546001600160401b0380821691600160401b8104821691600160801b8204811691600160c01b90041684565b604080516001600160401b0395861681529385166020850152918416918301919091529091166060820152608001610261565b34801561064957600080fd5b5061028a610658366004612af7565b61111d565b34801561066957600080fd5b5061028a610678366004612b14565b611138565b34801561068957600080fd5b506102a1610698366004612740565b61119d565b3480156106a957600080fd5b506011546102ce906001600160a01b031681565b3480156106c957600080fd5b5061031b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fd57600080fd5b5061028a61070c3660046129f8565b611221565b34801561071d57600080fd5b506102a1611390565b34801561073257600080fd5b50610255610741366004612b67565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b34801561077b57600080fd5b5061028a61078a366004612859565b61139f565b34801561079b57600080fd5b5061028a6107aa366004612740565b611418565b3480156107bb57600080fd5b5061028a6107ca366004612b95565b611425565b60006001600160e01b031982166380ac58cd60e01b148061080057506001600160e01b03198216635b5e139f60e01b145b8061081b57506001600160e01b0319821663152a902d60e11b145b8061082a575061082a82611595565b92915050565b6108386115ca565b6108428282611624565b5050565b60606006805461085590612bbe565b80601f016020809104026020016040519081016040528092919081815260200182805461088190612bbe565b80156108ce5780601f106108a3576101008083540402835291602001916108ce565b820191906000526020600020905b8154815290600101906020018083116108b157829003601f168201915b5050505050905090565b60006108e382611721565b610900576040516333d1c03960e21b815260040160405180910390fd5b506000908152600b60205260409020546001600160a01b031690565b816109268161175b565b600061093183610b34565b9050806001600160a01b0316846001600160a01b0316036109655760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906109a257506001600160a01b0381166000908152600c6020908152604080832033845290915290205460ff16155b156109c0576040516367d9dca160e11b815260040160405180910390fd5b6109cb848483611814565b50505050565b60006005546004546109e39190612c0e565b905090565b826001600160a01b0381163314610a0257610a023361175b565b6109cb848484611870565b60008281526002602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a825750604080518082019091526001546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610aa1906001600160601b031687612c21565b610aab9190612c38565b91519350909150505b9250929050565b826001600160a01b0381163314610ad557610ad53361175b565b6109cb84848460405180602001604052806000815250611138565b610af86115ca565b6008610b05828483612ca8565b505050565b610b126115ca565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610b3f82611a79565b5192915050565b600d5460ff1615610b8c5760405162461bcd60e51b815260206004820152600b60248201526a1b5a5b9d081c185d5cd95960aa1b60448201526064015b60405180910390fd5b6000600e5411610bd05760405162461bcd60e51b815260206004820152600f60248201526e73616c65206e6f742061637469766560881b6044820152606401610b83565b60008111610c205760405162461bcd60e51b815260206004820152601560248201527f7075726368617365206174206c65617374206f6e6500000000000000000000006044820152606401610b83565b600e54610c2d9082612c21565b3414610c7b5760405162461bcd60e51b815260206004820152601860248201527f77726f6e6720616d6f756e74206f66204554482073656e7400000000000000006044820152606401610b83565b600f5460405160009182916001600160a01b039091169034908381818185875af1925050503d8060008114610ccc576040519150601f19603f3d011682016040523d82523d6000602084013e610cd1565b606091505b509150915081610d235760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610b83565b610b053384611ba0565b60006001600160a01b038216610d56576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600a60205260409020546001600160401b031690565b610d836115ca565b610d8d6000611bba565b565b610d976115ca565b60005b6001600160401b038116841115610e5f578282826001600160401b0316818110610dc657610dc6612d67565b9050602002016020810190610ddb9190612b95565b600a60008787856001600160401b0316818110610dfa57610dfa612d67565b9050602002016020810190610e0f9190612859565b6001600160a01b03168152602081019190915260400160002080546001600160401b0392909216600160c01b026001600160c01b0390921691909117905580610e5781612d7d565b915050610d9a565b5050505050565b610e6e6115ca565b60106108428282612da3565b60606007805461085590612bbe565b6011546001600160a01b031660005b6001600160401b038116831115610f3d57816001600160a01b03166342966c688585846001600160401b0316818110610ed357610ed3612d67565b905060200201356040518263ffffffff1660e01b8152600401610ef891815260200190565b600060405180830381600087803b158015610f1257600080fd5b505af1158015610f26573d6000803e3d6000fd5b505050508080610f3590612d7d565b915050610e98565b50610b053384849050604051806020016040528060008152506001611c0a565b81610f678161175b565b336001600160a01b03841603610f905760405163b06307db60e01b815260040160405180910390fd5b336000818152600c602090815260408083206001600160a01b03881680855290835292819020805460ff191687151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6110056115ca565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526014602052604090205460ff16156110865760405162461bcd60e51b815260206004820152601560248201527f6e6f6e6365207761732075736564206265666f726500000000000000000000006044820152606401610b83565b61109284848484611e54565b6110d05760405162461bcd60e51b815260206004820152600f60248201526e1d9bdd58da195c881a5b9d985b1a59608a1b6044820152606401610b83565b6000828152601460205260409020805460ff191660011790556109cb8484611ba0565b6110fb6115ca565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6111256115ca565b600d805460ff1916911515919091179055565b836001600160a01b0381163314611152576111523361175b565b61115d858585611870565b6001600160a01b0384163b1515801561117f575061117d85858585611f1a565b155b15610e5f576040516368d2bf6b60e11b815260040160405180910390fd5b60606111a882611721565b6111c557604051630a14c4b560e41b815260040160405180910390fd5b60006111cf612002565b905080516000036111ef576040518060200160405280600081525061121a565b806111f984612011565b60405160200161120a929190612e62565b6040516020818303038152906040525b9392505050565b600d5460ff16156112625760405162461bcd60e51b815260206004820152600b60248201526a1b5a5b9d081c185d5cd95960aa1b6044820152606401610b83565b336000908152600a6020526040902054600160c01b90046001600160401b03168111156112e25760405162461bcd60e51b815260206004820152602860248201527f63616c6c6572206e6f742077686974656c697374656420666f7220656e6f75676044820152676820636f7069657360c01b6064820152608401610b83565b60005b81811015610b0557336000908152600a602052604090205461131990600190600160c01b90046001600160401b0316612ea1565b336000908152600a6020526040902080546001600160401b0392909216600160c01b026001600160c01b0390921691909117905561137e83838381811061136257611362612d67565b90506020020160208101906113779190612859565b6001611ba0565b8061138881612ec8565b9150506112e5565b60606010805461085590612bbe565b6113a76115ca565b6001600160a01b03811661140c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b83565b61141581611bba565b50565b6114206115ca565b600e55565b6000816001600160401b03161161147e5760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d75737420626520686967686572207468616e207a65726f006044820152606401610b83565b600d5460ff16156114bf5760405162461bcd60e51b815260206004820152600b60248201526a1b5a5b9d081c185d5cd95960aa1b6044820152606401610b83565b336000908152600a60205260409020546001600160401b03808316600160c01b9092041610156115315760405162461bcd60e51b815260206004820152601660248201527f63616c6c6572206e6f742077686974656c6973746564000000000000000000006044820152606401610b83565b336000908152600a602052604090205461155c908290600160c01b90046001600160401b0316612ea1565b336000818152600a6020526040902080546001600160c01b0316600160c01b6001600160401b0394851602179055611415918316611ba0565b60006001600160e01b0319821663152a902d60e11b148061082a57506301ffc9a760e01b6001600160e01b031983161461082a565b6000546001600160a01b03163314610d8d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b83565b6127106001600160601b03821611156116925760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610b83565b6001600160a01b0382166116e85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b83565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600155565b6000816101f511158015611736575060035482105b801561082a575050600090815260096020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b1561141557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156117c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ec9190612ee1565b61141557604051633b79c77360e21b81526001600160a01b0382166004820152602401610b83565b6000828152600b602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061187b82611a79565b9050836001600160a01b031681600001516001600160a01b0316146118b25760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806118ee57506001600160a01b0385166000908152600c6020908152604080832033845290915290205460ff165b806119095750336118fe846108d8565b6001600160a01b0316145b90508061192957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661195057604051633a954ecd60e21b815260040160405180910390fd5b61195c60008487611814565b6001600160a01b038581166000908152600a60209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600990945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611a30576003548214611a3057805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610e5f565b60408051606081018252600080825260208201819052918101919091528160018110801590611aa9575061138981105b15611b8757600081815260096020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611b855780516001600160a01b031615611b1c579392505050565b5060001901600081815260096020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611b80579392505050565b611b1c565b505b604051636f96cda160e11b815260040160405180910390fd5b6108428282604051806020016040528060008152506120a3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6013546001600160a01b038516611c3357604051622e076360e81b815260040160405180910390fd5b83600003611c545760405163b562e8dd60e01b815260040160405180910390fd5b8360046000828254611c669190612efe565b90915550506004547f00000000000000000000000000000000000000000000000000000000000000001015611cd25760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610b83565b6001600160a01b0385166000818152600a6020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600990925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015611d7e57506001600160a01b0387163b15155b15611e06575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611dcf6000888480600101955088611f1a565b611dec576040516368d2bf6b60e11b815260040160405180910390fd5b808203611d84578260135414611e0157600080fd5b611e4b565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203611e07575b50601355610e5f565b6040516bffffffffffffffffffffffff19606086901b16602082015260348101849052605481018390526000908190611efd90611ef790607401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b846120b0565b6012546001600160a01b039182169116149150505b949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611f4f903390899088908890600401612f11565b6020604051808303816000875af1925050508015611f8a575060408051601f3d908101601f19168201909252611f8791810190612f4d565b60015b611fe8573d808015611fb8576040519150601f19603f3d011682016040523d82523d6000602084013e611fbd565b606091505b508051600003611fe0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f12565b60606008805461085590612bbe565b6060600061201e836120d4565b60010190506000816001600160401b0381111561203d5761203d612925565b6040519080825280601f01601f191660200182016040528015612067576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461207157509392505050565b610b0583838360016121b6565b60008060006120bf8585612400565b915091506120cc81612442565b509392505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061211d577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612149576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061216757662386f26fc10000830492506010015b6305f5e100831061217f576305f5e100830492506008015b612710831061219357612710830492506004015b606483106121a5576064830492506002015b600a831061082a5760010192915050565b6003546001600160a01b0385166121df57604051622e076360e81b815260040160405180910390fd5b836000036122005760405163b562e8dd60e01b815260040160405180910390fd5b83600460008282546122129190612efe565b90915550506004547f0000000000000000000000000000000000000000000000000000000000000000101561227e5760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610b83565b6001600160a01b0385166000818152600a6020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600990925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561232a57506001600160a01b0387163b15155b156123b2575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461237b6000888480600101955088611f1a565b612398576040516368d2bf6b60e11b815260040160405180910390fd5b8082036123305782600354146123ad57600080fd5b6123f7565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082036123b3575b50600355610e5f565b60008082516041036124365760208301516040840151606085015160001a61242a8782858561258c565b94509450505050610ab4565b50600090506002610ab4565b600081600481111561245657612456612f6a565b0361245e5750565b600181600481111561247257612472612f6a565b036124bf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b83565b60028160048111156124d3576124d3612f6a565b036125205760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b83565b600381600481111561253457612534612f6a565b036114155760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b83565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156125c35750600090506003612647565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612617573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661264057600060019250925050612647565b9150600090505b94509492505050565b6001600160e01b03198116811461141557600080fd5b60006020828403121561267857600080fd5b813561121a81612650565b6001600160a01b038116811461141557600080fd5b600080604083850312156126ab57600080fd5b82356126b681612683565b915060208301356001600160601b03811681146126d257600080fd5b809150509250929050565b60005b838110156126f85781810151838201526020016126e0565b50506000910152565b600081518084526127198160208601602086016126dd565b601f01601f19169290920160200192915050565b60208152600061121a6020830184612701565b60006020828403121561275257600080fd5b5035919050565b6000806040838503121561276c57600080fd5b823561277781612683565b946020939093013593505050565b60008060006060848603121561279a57600080fd5b83356127a581612683565b925060208401356127b581612683565b929592945050506040919091013590565b600080604083850312156127d957600080fd5b50508035926020909101359150565b600080602083850312156127fb57600080fd5b82356001600160401b038082111561281257600080fd5b818501915085601f83011261282657600080fd5b81358181111561283557600080fd5b86602082850101111561284757600080fd5b60209290920196919550909350505050565b60006020828403121561286b57600080fd5b813561121a81612683565b60008083601f84011261288857600080fd5b5081356001600160401b0381111561289f57600080fd5b6020830191508360208260051b8501011115610ab457600080fd5b600080600080604085870312156128d057600080fd5b84356001600160401b03808211156128e757600080fd5b6128f388838901612876565b9096509450602087013591508082111561290c57600080fd5b5061291987828801612876565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561295557612955612925565b604051601f8501601f19908116603f0116810190828211818310171561297d5761297d612925565b8160405280935085815286868601111561299657600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156129c257600080fd5b81356001600160401b038111156129d857600080fd5b8201601f810184136129e957600080fd5b611f128482356020840161293b565b60008060208385031215612a0b57600080fd5b82356001600160401b03811115612a2157600080fd5b612a2d85828601612876565b90969095509350505050565b801515811461141557600080fd5b60008060408385031215612a5a57600080fd5b8235612a6581612683565b915060208301356126d281612a39565b600082601f830112612a8657600080fd5b61121a8383356020850161293b565b60008060008060808587031215612aab57600080fd5b8435612ab681612683565b9350602085013592506040850135915060608501356001600160401b03811115612adf57600080fd5b612aeb87828801612a75565b91505092959194509250565b600060208284031215612b0957600080fd5b813561121a81612a39565b60008060008060808587031215612b2a57600080fd5b8435612b3581612683565b93506020850135612b4581612683565b92506040850135915060608501356001600160401b03811115612adf57600080fd5b60008060408385031215612b7a57600080fd5b8235612b8581612683565b915060208301356126d281612683565b600060208284031215612ba757600080fd5b81356001600160401b038116811461121a57600080fd5b600181811c90821680612bd257607f821691505b602082108103612bf257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561082a5761082a612bf8565b808202811582820484141761082a5761082a612bf8565b600082612c5557634e487b7160e01b600052601260045260246000fd5b500490565b601f821115610b0557600081815260208120601f850160051c81016020861015612c815750805b601f850160051c820191505b81811015612ca057828155600101612c8d565b505050505050565b6001600160401b03831115612cbf57612cbf612925565b612cd383612ccd8354612bbe565b83612c5a565b6000601f841160018114612d075760008515612cef5750838201355b600019600387901b1c1916600186901b178355610e5f565b600083815260209020601f19861690835b82811015612d385786850135825560209485019460019092019101612d18565b5086821015612d555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b03808316818103612d9957612d99612bf8565b6001019392505050565b81516001600160401b03811115612dbc57612dbc612925565b612dd081612dca8454612bbe565b84612c5a565b602080601f831160018114612e055760008415612ded5750858301515b600019600386901b1c1916600185901b178555612ca0565b600085815260208120601f198616915b82811015612e3457888601518255948401946001909101908401612e15565b5085821015612e525787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008351612e748184602088016126dd565b835190830190612e888183602088016126dd565b64173539b7b760d91b9101908152600501949350505050565b6001600160401b03828116828216039080821115612ec157612ec1612bf8565b5092915050565b600060018201612eda57612eda612bf8565b5060010190565b600060208284031215612ef357600080fd5b815161121a81612a39565b8082018082111561082a5761082a612bf8565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612f436080830184612701565b9695505050505050565b600060208284031215612f5f57600080fd5b815161121a81612650565b634e487b7160e01b600052602160045260246000fdfea264697066735822122095498a72aed699d2fdad2d8ce9b53197e4ac635a3f8243069d5316d43a42a33364736f6c6343000812003368747470733a2f2f6e6674686f6f6b732e78797a2f6170692f6e667470696e672f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000e4865794564752047656e65736973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4865794564752047656e65736973000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102305760003560e01c80638da5cb5b1161012e578063b88d4fde116100ab578063e8a3d4851161006f578063e8a3d48514610711578063e985e9c514610726578063f2fde38b1461076f578063f4a0a5281461078f578063fb9d09c8146107af57600080fd5b8063b88d4fde1461065d578063c87b56dd1461067d578063c9b5e5551461069d578063d5abeb01146106bd578063d67b06c1146106f157600080fd5b8063a7e05b9c116100f2578063a7e05b9c14610555578063ae2c34ca14610575578063af6e40d014610595578063b07eb4a3146105b5578063b69355011461063d57600080fd5b80638da5cb5b146104c2578063938e3d7b146104e057806395d89b411461050057806399ff682e14610515578063a22cb4651461053557600080fd5b806342842e0e116101bc5780636817c76c116101805780636817c76c1461043d57806370a0823114610453578063715018a6146104735780637e4831d3146104885780638a6bb239146104a257600080fd5b806342842e0e146103aa578063492d306b146103ca5780635edf4c8f146103ea5780636352211e1461040a57806363d34f001461042a57600080fd5b8063095ea7b311610203578063095ea7b3146102e657806318160ddd1461030657806323b872dd146103295780632a55205a1461034957806341f434341461038857600080fd5b806301ffc9a71461023557806304634d8d1461026a57806306fdde031461028c578063081812fc146102ae575b600080fd5b34801561024157600080fd5b50610255610250366004612666565b6107cf565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b5061028a610285366004612698565b610830565b005b34801561029857600080fd5b506102a1610846565b604051610261919061272d565b3480156102ba57600080fd5b506102ce6102c9366004612740565b6108d8565b6040516001600160a01b039091168152602001610261565b3480156102f257600080fd5b5061028a610301366004612759565b61091c565b34801561031257600080fd5b5061031b6109d1565b604051908152602001610261565b34801561033557600080fd5b5061028a610344366004612785565b6109e8565b34801561035557600080fd5b506103696103643660046127c6565b610a0d565b604080516001600160a01b039093168352602083019190915201610261565b34801561039457600080fd5b506102ce6daaeb6d7670e522a718067333cd4e81565b3480156103b657600080fd5b5061028a6103c5366004612785565b610abb565b3480156103d657600080fd5b5061028a6103e53660046127e8565b610af0565b3480156103f657600080fd5b5061028a610405366004612859565b610b0a565b34801561041657600080fd5b506102ce610425366004612740565b610b34565b61028a610438366004612740565b610b46565b34801561044957600080fd5b5061031b600e5481565b34801561045f57600080fd5b5061031b61046e366004612859565b610d2d565b34801561047f57600080fd5b5061028a610d7b565b34801561049457600080fd5b50600d546102559060ff1681565b3480156104ae57600080fd5b5061028a6104bd3660046128ba565b610d8f565b3480156104ce57600080fd5b506000546001600160a01b03166102ce565b3480156104ec57600080fd5b5061028a6104fb3660046129b0565b610e66565b34801561050c57600080fd5b506102a1610e7a565b34801561052157600080fd5b5061028a6105303660046129f8565b610e89565b34801561054157600080fd5b5061028a610550366004612a47565b610f5d565b34801561056157600080fd5b5061028a610570366004612859565b610ffd565b34801561058157600080fd5b5061028a610590366004612a95565b611027565b3480156105a157600080fd5b5061028a6105b0366004612859565b6110f3565b3480156105c157600080fd5b5061060a6105d0366004612859565b600a602052600090815260409020546001600160401b0380821691600160401b8104821691600160801b8204811691600160c01b90041684565b604080516001600160401b0395861681529385166020850152918416918301919091529091166060820152608001610261565b34801561064957600080fd5b5061028a610658366004612af7565b61111d565b34801561066957600080fd5b5061028a610678366004612b14565b611138565b34801561068957600080fd5b506102a1610698366004612740565b61119d565b3480156106a957600080fd5b506011546102ce906001600160a01b031681565b3480156106c957600080fd5b5061031b7f000000000000000000000000000000000000000000000000000000000000138881565b3480156106fd57600080fd5b5061028a61070c3660046129f8565b611221565b34801561071d57600080fd5b506102a1611390565b34801561073257600080fd5b50610255610741366004612b67565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b34801561077b57600080fd5b5061028a61078a366004612859565b61139f565b34801561079b57600080fd5b5061028a6107aa366004612740565b611418565b3480156107bb57600080fd5b5061028a6107ca366004612b95565b611425565b60006001600160e01b031982166380ac58cd60e01b148061080057506001600160e01b03198216635b5e139f60e01b145b8061081b57506001600160e01b0319821663152a902d60e11b145b8061082a575061082a82611595565b92915050565b6108386115ca565b6108428282611624565b5050565b60606006805461085590612bbe565b80601f016020809104026020016040519081016040528092919081815260200182805461088190612bbe565b80156108ce5780601f106108a3576101008083540402835291602001916108ce565b820191906000526020600020905b8154815290600101906020018083116108b157829003601f168201915b5050505050905090565b60006108e382611721565b610900576040516333d1c03960e21b815260040160405180910390fd5b506000908152600b60205260409020546001600160a01b031690565b816109268161175b565b600061093183610b34565b9050806001600160a01b0316846001600160a01b0316036109655760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906109a257506001600160a01b0381166000908152600c6020908152604080832033845290915290205460ff16155b156109c0576040516367d9dca160e11b815260040160405180910390fd5b6109cb848483611814565b50505050565b60006005546004546109e39190612c0e565b905090565b826001600160a01b0381163314610a0257610a023361175b565b6109cb848484611870565b60008281526002602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a825750604080518082019091526001546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610aa1906001600160601b031687612c21565b610aab9190612c38565b91519350909150505b9250929050565b826001600160a01b0381163314610ad557610ad53361175b565b6109cb84848460405180602001604052806000815250611138565b610af86115ca565b6008610b05828483612ca8565b505050565b610b126115ca565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610b3f82611a79565b5192915050565b600d5460ff1615610b8c5760405162461bcd60e51b815260206004820152600b60248201526a1b5a5b9d081c185d5cd95960aa1b60448201526064015b60405180910390fd5b6000600e5411610bd05760405162461bcd60e51b815260206004820152600f60248201526e73616c65206e6f742061637469766560881b6044820152606401610b83565b60008111610c205760405162461bcd60e51b815260206004820152601560248201527f7075726368617365206174206c65617374206f6e6500000000000000000000006044820152606401610b83565b600e54610c2d9082612c21565b3414610c7b5760405162461bcd60e51b815260206004820152601860248201527f77726f6e6720616d6f756e74206f66204554482073656e7400000000000000006044820152606401610b83565b600f5460405160009182916001600160a01b039091169034908381818185875af1925050503d8060008114610ccc576040519150601f19603f3d011682016040523d82523d6000602084013e610cd1565b606091505b509150915081610d235760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610b83565b610b053384611ba0565b60006001600160a01b038216610d56576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600a60205260409020546001600160401b031690565b610d836115ca565b610d8d6000611bba565b565b610d976115ca565b60005b6001600160401b038116841115610e5f578282826001600160401b0316818110610dc657610dc6612d67565b9050602002016020810190610ddb9190612b95565b600a60008787856001600160401b0316818110610dfa57610dfa612d67565b9050602002016020810190610e0f9190612859565b6001600160a01b03168152602081019190915260400160002080546001600160401b0392909216600160c01b026001600160c01b0390921691909117905580610e5781612d7d565b915050610d9a565b5050505050565b610e6e6115ca565b60106108428282612da3565b60606007805461085590612bbe565b6011546001600160a01b031660005b6001600160401b038116831115610f3d57816001600160a01b03166342966c688585846001600160401b0316818110610ed357610ed3612d67565b905060200201356040518263ffffffff1660e01b8152600401610ef891815260200190565b600060405180830381600087803b158015610f1257600080fd5b505af1158015610f26573d6000803e3d6000fd5b505050508080610f3590612d7d565b915050610e98565b50610b053384849050604051806020016040528060008152506001611c0a565b81610f678161175b565b336001600160a01b03841603610f905760405163b06307db60e01b815260040160405180910390fd5b336000818152600c602090815260408083206001600160a01b03881680855290835292819020805460ff191687151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6110056115ca565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526014602052604090205460ff16156110865760405162461bcd60e51b815260206004820152601560248201527f6e6f6e6365207761732075736564206265666f726500000000000000000000006044820152606401610b83565b61109284848484611e54565b6110d05760405162461bcd60e51b815260206004820152600f60248201526e1d9bdd58da195c881a5b9d985b1a59608a1b6044820152606401610b83565b6000828152601460205260409020805460ff191660011790556109cb8484611ba0565b6110fb6115ca565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6111256115ca565b600d805460ff1916911515919091179055565b836001600160a01b0381163314611152576111523361175b565b61115d858585611870565b6001600160a01b0384163b1515801561117f575061117d85858585611f1a565b155b15610e5f576040516368d2bf6b60e11b815260040160405180910390fd5b60606111a882611721565b6111c557604051630a14c4b560e41b815260040160405180910390fd5b60006111cf612002565b905080516000036111ef576040518060200160405280600081525061121a565b806111f984612011565b60405160200161120a929190612e62565b6040516020818303038152906040525b9392505050565b600d5460ff16156112625760405162461bcd60e51b815260206004820152600b60248201526a1b5a5b9d081c185d5cd95960aa1b6044820152606401610b83565b336000908152600a6020526040902054600160c01b90046001600160401b03168111156112e25760405162461bcd60e51b815260206004820152602860248201527f63616c6c6572206e6f742077686974656c697374656420666f7220656e6f75676044820152676820636f7069657360c01b6064820152608401610b83565b60005b81811015610b0557336000908152600a602052604090205461131990600190600160c01b90046001600160401b0316612ea1565b336000908152600a6020526040902080546001600160401b0392909216600160c01b026001600160c01b0390921691909117905561137e83838381811061136257611362612d67565b90506020020160208101906113779190612859565b6001611ba0565b8061138881612ec8565b9150506112e5565b60606010805461085590612bbe565b6113a76115ca565b6001600160a01b03811661140c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b83565b61141581611bba565b50565b6114206115ca565b600e55565b6000816001600160401b03161161147e5760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d75737420626520686967686572207468616e207a65726f006044820152606401610b83565b600d5460ff16156114bf5760405162461bcd60e51b815260206004820152600b60248201526a1b5a5b9d081c185d5cd95960aa1b6044820152606401610b83565b336000908152600a60205260409020546001600160401b03808316600160c01b9092041610156115315760405162461bcd60e51b815260206004820152601660248201527f63616c6c6572206e6f742077686974656c6973746564000000000000000000006044820152606401610b83565b336000908152600a602052604090205461155c908290600160c01b90046001600160401b0316612ea1565b336000818152600a6020526040902080546001600160c01b0316600160c01b6001600160401b0394851602179055611415918316611ba0565b60006001600160e01b0319821663152a902d60e11b148061082a57506301ffc9a760e01b6001600160e01b031983161461082a565b6000546001600160a01b03163314610d8d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b83565b6127106001600160601b03821611156116925760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610b83565b6001600160a01b0382166116e85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b83565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600155565b6000816101f511158015611736575060035482105b801561082a575050600090815260096020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b1561141557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156117c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ec9190612ee1565b61141557604051633b79c77360e21b81526001600160a01b0382166004820152602401610b83565b6000828152600b602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061187b82611a79565b9050836001600160a01b031681600001516001600160a01b0316146118b25760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806118ee57506001600160a01b0385166000908152600c6020908152604080832033845290915290205460ff165b806119095750336118fe846108d8565b6001600160a01b0316145b90508061192957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661195057604051633a954ecd60e21b815260040160405180910390fd5b61195c60008487611814565b6001600160a01b038581166000908152600a60209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600990945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611a30576003548214611a3057805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610e5f565b60408051606081018252600080825260208201819052918101919091528160018110801590611aa9575061138981105b15611b8757600081815260096020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611b855780516001600160a01b031615611b1c579392505050565b5060001901600081815260096020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611b80579392505050565b611b1c565b505b604051636f96cda160e11b815260040160405180910390fd5b6108428282604051806020016040528060008152506120a3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6013546001600160a01b038516611c3357604051622e076360e81b815260040160405180910390fd5b83600003611c545760405163b562e8dd60e01b815260040160405180910390fd5b8360046000828254611c669190612efe565b90915550506004547f00000000000000000000000000000000000000000000000000000000000013881015611cd25760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610b83565b6001600160a01b0385166000818152600a6020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600990925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015611d7e57506001600160a01b0387163b15155b15611e06575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611dcf6000888480600101955088611f1a565b611dec576040516368d2bf6b60e11b815260040160405180910390fd5b808203611d84578260135414611e0157600080fd5b611e4b565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203611e07575b50601355610e5f565b6040516bffffffffffffffffffffffff19606086901b16602082015260348101849052605481018390526000908190611efd90611ef790607401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b846120b0565b6012546001600160a01b039182169116149150505b949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611f4f903390899088908890600401612f11565b6020604051808303816000875af1925050508015611f8a575060408051601f3d908101601f19168201909252611f8791810190612f4d565b60015b611fe8573d808015611fb8576040519150601f19603f3d011682016040523d82523d6000602084013e611fbd565b606091505b508051600003611fe0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f12565b60606008805461085590612bbe565b6060600061201e836120d4565b60010190506000816001600160401b0381111561203d5761203d612925565b6040519080825280601f01601f191660200182016040528015612067576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461207157509392505050565b610b0583838360016121b6565b60008060006120bf8585612400565b915091506120cc81612442565b509392505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061211d577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612149576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061216757662386f26fc10000830492506010015b6305f5e100831061217f576305f5e100830492506008015b612710831061219357612710830492506004015b606483106121a5576064830492506002015b600a831061082a5760010192915050565b6003546001600160a01b0385166121df57604051622e076360e81b815260040160405180910390fd5b836000036122005760405163b562e8dd60e01b815260040160405180910390fd5b83600460008282546122129190612efe565b90915550506004547f0000000000000000000000000000000000000000000000000000000000001388101561227e5760405162461bcd60e51b81526020600482015260126024820152711b585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610b83565b6001600160a01b0385166000818152600a6020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600990925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561232a57506001600160a01b0387163b15155b156123b2575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461237b6000888480600101955088611f1a565b612398576040516368d2bf6b60e11b815260040160405180910390fd5b8082036123305782600354146123ad57600080fd5b6123f7565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082036123b3575b50600355610e5f565b60008082516041036124365760208301516040840151606085015160001a61242a8782858561258c565b94509450505050610ab4565b50600090506002610ab4565b600081600481111561245657612456612f6a565b0361245e5750565b600181600481111561247257612472612f6a565b036124bf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b83565b60028160048111156124d3576124d3612f6a565b036125205760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b83565b600381600481111561253457612534612f6a565b036114155760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b83565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156125c35750600090506003612647565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612617573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661264057600060019250925050612647565b9150600090505b94509492505050565b6001600160e01b03198116811461141557600080fd5b60006020828403121561267857600080fd5b813561121a81612650565b6001600160a01b038116811461141557600080fd5b600080604083850312156126ab57600080fd5b82356126b681612683565b915060208301356001600160601b03811681146126d257600080fd5b809150509250929050565b60005b838110156126f85781810151838201526020016126e0565b50506000910152565b600081518084526127198160208601602086016126dd565b601f01601f19169290920160200192915050565b60208152600061121a6020830184612701565b60006020828403121561275257600080fd5b5035919050565b6000806040838503121561276c57600080fd5b823561277781612683565b946020939093013593505050565b60008060006060848603121561279a57600080fd5b83356127a581612683565b925060208401356127b581612683565b929592945050506040919091013590565b600080604083850312156127d957600080fd5b50508035926020909101359150565b600080602083850312156127fb57600080fd5b82356001600160401b038082111561281257600080fd5b818501915085601f83011261282657600080fd5b81358181111561283557600080fd5b86602082850101111561284757600080fd5b60209290920196919550909350505050565b60006020828403121561286b57600080fd5b813561121a81612683565b60008083601f84011261288857600080fd5b5081356001600160401b0381111561289f57600080fd5b6020830191508360208260051b8501011115610ab457600080fd5b600080600080604085870312156128d057600080fd5b84356001600160401b03808211156128e757600080fd5b6128f388838901612876565b9096509450602087013591508082111561290c57600080fd5b5061291987828801612876565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561295557612955612925565b604051601f8501601f19908116603f0116810190828211818310171561297d5761297d612925565b8160405280935085815286868601111561299657600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156129c257600080fd5b81356001600160401b038111156129d857600080fd5b8201601f810184136129e957600080fd5b611f128482356020840161293b565b60008060208385031215612a0b57600080fd5b82356001600160401b03811115612a2157600080fd5b612a2d85828601612876565b90969095509350505050565b801515811461141557600080fd5b60008060408385031215612a5a57600080fd5b8235612a6581612683565b915060208301356126d281612a39565b600082601f830112612a8657600080fd5b61121a8383356020850161293b565b60008060008060808587031215612aab57600080fd5b8435612ab681612683565b9350602085013592506040850135915060608501356001600160401b03811115612adf57600080fd5b612aeb87828801612a75565b91505092959194509250565b600060208284031215612b0957600080fd5b813561121a81612a39565b60008060008060808587031215612b2a57600080fd5b8435612b3581612683565b93506020850135612b4581612683565b92506040850135915060608501356001600160401b03811115612adf57600080fd5b60008060408385031215612b7a57600080fd5b8235612b8581612683565b915060208301356126d281612683565b600060208284031215612ba757600080fd5b81356001600160401b038116811461121a57600080fd5b600181811c90821680612bd257607f821691505b602082108103612bf257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561082a5761082a612bf8565b808202811582820484141761082a5761082a612bf8565b600082612c5557634e487b7160e01b600052601260045260246000fd5b500490565b601f821115610b0557600081815260208120601f850160051c81016020861015612c815750805b601f850160051c820191505b81811015612ca057828155600101612c8d565b505050505050565b6001600160401b03831115612cbf57612cbf612925565b612cd383612ccd8354612bbe565b83612c5a565b6000601f841160018114612d075760008515612cef5750838201355b600019600387901b1c1916600186901b178355610e5f565b600083815260209020601f19861690835b82811015612d385786850135825560209485019460019092019101612d18565b5086821015612d555760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b03808316818103612d9957612d99612bf8565b6001019392505050565b81516001600160401b03811115612dbc57612dbc612925565b612dd081612dca8454612bbe565b84612c5a565b602080601f831160018114612e055760008415612ded5750858301515b600019600386901b1c1916600185901b178555612ca0565b600085815260208120601f198616915b82811015612e3457888601518255948401946001909101908401612e15565b5085821015612e525787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008351612e748184602088016126dd565b835190830190612e888183602088016126dd565b64173539b7b760d91b9101908152600501949350505050565b6001600160401b03828116828216039080821115612ec157612ec1612bf8565b5092915050565b600060018201612eda57612eda612bf8565b5060010190565b600060208284031215612ef357600080fd5b815161121a81612a39565b8082018082111561082a5761082a612bf8565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612f436080830184612701565b9695505050505050565b600060208284031215612f5f57600080fd5b815161121a81612650565b634e487b7160e01b600052602160045260246000fdfea264697066735822122095498a72aed699d2fdad2d8ce9b53197e4ac635a3f8243069d5316d43a42a33364736f6c63430008120033

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

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000e4865794564752047656e65736973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4865794564752047656e65736973000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): HeyEdu Genesis
Arg [1] : symbol_ (string): HeyEdu Genesis

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [3] : 4865794564752047656e65736973000000000000000000000000000000000000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [5] : 4865794564752047656e65736973000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ 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.