ETH Price: $3,285.15 (-2.19%)
Gas: 5.76 Gwei

Token

Raptors (RAPTORS)
 

Overview

Max Total Supply

4,042 RAPTORS

Holders

788

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 RAPTORS
0x0a4479c23ee6c7f169e750b3a0c18817756659eF
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:
Raptors

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 19 : Raptors.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// import "erc721a/contracts/ERC721A.sol";
import "./lib/ERC721A.sol";
import "erc721a/contracts/IERC721A.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract Raptors is ERC721A, ERC2981, Ownable, ReentrancyGuard {
  using ECDSA for bytes32;
  using SafeMath for uint256;
  /**
   * @dev MINT DETAILS
   */
  uint256 public constant MAX_RAPTORS = 7777;
  uint256 public constant MAX_MINT = 10;
  uint96 public ROYALTY_BASIS_POINTS = 750;

  /**
   * @dev METADATA
   */
  string private baseURIString;

  /**
   * @dev ADDRESSES
   */
  address public OGREX_ADDRESS;
  address public METALABS_RECEIVER;

  /**
   * @dev CONTRACT STATES
   */
  enum State {
    Setup,
    Live,
    Closed
  }
  State private state;

  mapping(uint256 => bool) public rexForRaptor;

  event BalanceWithdrawn(address receiver, uint256 value);

  constructor() ERC721A("Raptors", "RAPTORS", MAX_MINT) {
    OGREX_ADDRESS = address(0x325bAd883B4E9a35277E99902D94DD18186Ae219);
    METALABS_RECEIVER = address(0xb6ff94521C3ed48e7cAfDBa1Acee0238111Dd329);
    baseURIString = "https://api.jurassicpunks.io/raptor/";
    state = State.Setup;
    _setDefaultRoyalty(METALABS_RECEIVER, ROYALTY_BASIS_POINTS);
  }

  /**
   * @notice Check token URI for given tokenId
   * @param tokenId Raptor token ID
   * @return API endpoint for token metadata
   */
  function tokenURI(
    uint256 tokenId
  ) public view override(ERC721A) returns (string memory) {
    return string(abi.encodePacked(baseTokenURI(), Strings.toString(tokenId)));
  }

  /**
   * @notice Check the token URI
   * @return Base API endpoint for token metadata URI
   */
  function baseTokenURI() public view virtual returns (string memory) {
    return baseURIString;
  }

  /**
   * @notice Update the token URI for the contract
   * @param tokenUriBase_ New metadata endpoint to set for contract
   */
  function setTokenURI(string memory tokenUriBase_) public onlyOwner {
    baseURIString = tokenUriBase_;
  }

  /**
   * @notice Contract Owner function to set the OG-Rex address
    * @param ogrexAddress_ Address of OG-Rex contract
   */
  function setRexAddress(address ogrexAddress_) public onlyOwner {
    OGREX_ADDRESS = ogrexAddress_;
  }

  /**
   * @notice Check current contract state
   * @return state contract state
   */
  function contractState() public view virtual returns (State) {
    return state;
  }

  /**
   * @notice Set contract state to Setup
   */
  function setStateToSetup() public onlyOwner {
    state = State.Setup;
  }

  /**
   * @notice Set contract state to Live
   */
  function setStateToLive() public onlyOwner {
    require(state == State.Setup, "Contract is not in Setup state");
    state = State.Live;
  }

  /**
   * @notice Set contract state to Closed
   */
  function setStateToClosed() public onlyOwner {
    state = State.Closed;
  }

  /**
   * @notice Function to get minted status of OG-Rex
   * @param tokenIds uint256 array of OG-Rex token IDs
   * @return rexStatus bool array of minted Raptor status for OG-Rex
   */
  function getRexMintedStatus(
    uint256[] calldata tokenIds
  ) public view returns (bool[] memory) {
    bool[] memory rexStatus = new bool[](tokenIds.length);
    for (uint256 i = 0; i < tokenIds.length; i++) {
      rexStatus[i] = rexForRaptor[tokenIds[i]];
    }
    return rexStatus;
  }

  /**
   * @notice Function to check if address is owner of OG-Rex
   * @param tokenId OG-Reg token to check for ownership
   * @param _address Address to check for OG-Rex ownership
   */
  function isRexOwner(
    uint256 tokenId,
    address _address
  ) public view returns (bool) {
    address owner = IERC721A(OGREX_ADDRESS).ownerOf(tokenId);
    if (owner == _address) {
      return true;
    } else {
      return false;
    }
  }

  /**
   * @notice Function to check if address is owner of OG-Rex
   * @param tokenId OG-Reg array token to check for ownership
   * @param _address Address to check for OG-Rex ownership
   */
  function isRexBatchOwner(
    uint256[] calldata tokenId,
    address _address
  ) public view returns (bool) {
    for (uint256 i = 0; i < tokenId.length; i++) {
      require(
        isRexOwner(tokenId[i], _address),
        "Address is not owner of OG-REX batch"
      );
    }
    return true;
  }

  /**
   * @notice Function to mint a single Raptor for OG-Rex
   * @param rexId uint256 OG-Rex ID to check for ownership
   */
  function mintRaptor(
    uint256 rexId
  ) public virtual nonReentrant returns (uint256) {
    address recipient = msg.sender;
    require(state == State.Live, "JPunks: Raptors aren't available yet!");
    require(isRexOwner(rexId, recipient), "You are not the owner of OG-Rex");
    require(
      !rexForRaptor[rexId],
      "The Raptor for this OG-Rex has already been minted."
    );
    require(
      totalSupply().add(1) <= MAX_RAPTORS,
      "Sorry, there is not that many Raptors left."
    );

    uint256 raptorRecieved = rexId;

    // _safeMint's second argument now takes in a quantity, not a tokenId.
    _safeMint(recipient, 1);
    rexForRaptor[rexId] = true;

    return raptorRecieved;
  }

  /**
   * @notice Function to mint a batch of Raptors for OG-Rex
   * @param rexIds uint256 array of OG-Rex array ID to check for ownership
   */
  function mintRaptorBatch(
    uint256[] calldata rexIds
  ) public virtual nonReentrant returns (uint256) {
    address recipient = msg.sender;
    require(state == State.Live, "JPunks: Raptors aren't available yet!");
    require(
      isRexBatchOwner(rexIds, recipient),
      "You are not the owner of OG-Rex"
    );
    require(
      totalSupply().add(rexIds.length) <= MAX_RAPTORS,
      "Sorry, there's not that many Raptors left."
    );
    require(
      rexIds.length <= MAX_MINT,
      "You can only mint 10 Raptors at a time."
    );

    uint256 firstRaptorRecieved = rexIds[0];

    for (uint256 i = 0; i < rexIds.length; i++) {
      require(
        !rexForRaptor[rexIds[i]],
        "The Raptor for this OG-Rex has already been minted."
      );
      if (msg.sender == owner()) {
        _safeMint(recipient, 1);
        rexForRaptor[rexIds[i]] = true;
      } else {
        require(
          isRexOwner(rexIds[i], recipient),
          "You are not the owner of this OG-Rex"
        );
        _safeMint(recipient, 1);
        rexForRaptor[rexIds[i]] = true;
      }
    }

    return firstRaptorRecieved;
  }

    /**
   * @notice Sets the royalty basis points of the collection. 100 = 1%
   */
  function setDefaultRoyalty(
    address receiver,
    uint96 feeNumerator
  ) public onlyOwner {
    ROYALTY_BASIS_POINTS = feeNumerator;
    _setDefaultRoyalty(receiver, feeNumerator);
  }

  /**
   * @notice Sets royalty basis points to 0
   */
  function deleteDefaultRoyalty() public onlyOwner {
    ROYALTY_BASIS_POINTS = 0;
    _deleteDefaultRoyalty();
  }

  /**
   * @notice Only Owner Function to withdraw ETH sent to contract
   * @param receiver Address to withdraw ETH to
   */
  function withdrawAllEth(address receiver) public virtual onlyOwner {
    uint256 balance = address(this).balance;
    payable(receiver).transfer(balance);
    emit BalanceWithdrawn(receiver, balance);
  }

  /**
   * @notice Interface for marketplaces
   */
  function supportsInterface(
    bytes4 interfaceId
  ) public view virtual override(ERC2981, ERC721A) returns (bool) {
    return super.supportsInterface(interfaceId);
  }
}

File 2 of 19 : ERC721A.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.11;

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/token/ERC721/extensions/IERC721Enumerable.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";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Does not support burning tokens to address(0).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using Address for address;
    using Strings for uint256;

    struct TokenOwnership {
        address addr;
        uint64 startTimestamp;
    }

    struct AddressData {
        uint128 balance;
        uint128 numberMinted;
    }

    uint256 private currentIndex = 1;

    uint256 internal immutable maxBatchSize;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

    // Mapping owner address to address data
    mapping(address => AddressData) private _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;

    /**
     * @dev
     * `maxBatchSize` refers to how much a minter can mint at a time.
     */
    constructor(
        string memory name_,
        string memory symbol_,
        uint256 maxBatchSize_
    ) {
        require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero");
        _name = name_;
        _symbol = symbol_;
        maxBatchSize = maxBatchSize_;
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return currentIndex - 1;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view override returns (uint256) {
        require(index < totalSupply(), "ERC721A: global index out of bounds");
        return index;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
     * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
        require(index < balanceOf(owner), "ERC721A: owner index out of bounds");
        uint256 numMintedSoFar = totalSupply();
        uint256 tokenIdsIdx = 0;
        address currOwnershipAddr = address(0);
        for (uint256 i = 0; i < numMintedSoFar; i++) {
            TokenOwnership memory ownership = _ownerships[i];
            if (ownership.addr != address(0)) {
                currOwnershipAddr = ownership.addr;
            }
            if (currOwnershipAddr == owner) {
                if (tokenIdsIdx == index) {
                    return i;
                }
                tokenIdsIdx++;
            }
        }
        revert("ERC721A: unable to get token of owner by index");
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        require(owner != address(0), "ERC721A: balance query for the zero address");
        return uint256(_addressData[owner].balance);
    }

    function _numberMinted(address owner) internal view returns (uint256) {
        require(owner != address(0), "ERC721A: number minted query for the zero address");
        return uint256(_addressData[owner].numberMinted);
    }

    function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        require(_exists(tokenId), "ERC721A: owner query for nonexistent token");

        uint256 lowestTokenToCheck;
        if (tokenId >= maxBatchSize) {
            lowestTokenToCheck = tokenId - maxBatchSize + 1;
        }

        for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
            TokenOwnership memory ownership = _ownerships[curr];
            if (ownership.addr != address(0)) {
                return ownership;
            }
        }

        revert("ERC721A: unable to determine the owner of token");
    }

    /**
     * @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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721A.ownerOf(tokenId);
        require(to != owner, "ERC721A: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721A: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        require(_exists(tokenId), "ERC721A: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721A: approve to caller");

        _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 {
        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        require(
            _checkOnERC721Received(from, to, tokenId, _data),
            "ERC721A: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @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 tokenId < currentIndex && tokenId > 0;
    }

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` cannot be larger than the max batch size.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "ERC721A: mint to the zero address");
        // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
        require(!_exists(startTokenId), "ERC721A: token already minted");
        require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high");

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

        AddressData memory addressData = _addressData[to];
        _addressData[to] = AddressData(
            addressData.balance + uint128(quantity),
            addressData.numberMinted + uint128(quantity)
        );
        _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

        uint256 updatedIndex = startTokenId;

        for (uint256 i = 0; i < quantity; i++) {
            emit Transfer(address(0), to, updatedIndex);
            require(
                _checkOnERC721Received(address(0), to, updatedIndex, _data),
                "ERC721A: transfer to non ERC721Receiver implementer"
            );
            updatedIndex++;
        }

        currentIndex = 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);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            getApproved(tokenId) == _msgSender() ||
            isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(isApprovedOrOwner, "ERC721A: transfer caller is not owner nor approved");

        require(prevOwnership.addr == from, "ERC721A: transfer from incorrect owner");
        require(to != address(0), "ERC721A: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        _ownerships[tokenId] = TokenOwnership(to, 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;
        if (_ownerships[nextTokenId].addr == address(0)) {
            if (_exists(nextTokenId)) {
                _ownerships[nextTokenId] = TokenOwnership(prevOwnership.addr, prevOwnership.startTimestamp);
            }
        }

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

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

    uint256 public nextOwnerToExplicitlySet = 0;

    /**
     * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
     */
    function _setOwnersExplicit(uint256 quantity) internal {
        uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
        require(quantity > 0, "quantity must be nonzero");
        uint256 endIndex = oldNextOwnerToSet + quantity - 1;
        if (endIndex > currentIndex - 1) {
            endIndex = currentIndex - 1;
        }
        // We know if the last one in the group exists, all in the group exist, due to serial ordering.
        require(_exists(endIndex), "not enough minted yet for this cleanup");
        for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
            if (_ownerships[i].addr == address(0)) {
                TokenOwnership memory ownership = ownershipOf(i);
                _ownerships[i] = TokenOwnership(ownership.addr, ownership.startTimestamp);
            }
        }
        nextOwnerToExplicitlySet = endIndex + 1;
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a 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 _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            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("ERC721A: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     *
     * 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`.
     */
    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.
     *
     * 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` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 3 of 19 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';

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

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

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

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

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

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

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

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

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

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

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

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

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

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

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

File 4 of 19 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 19 : 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 6 of 19 : 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 7 of 19 : 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 8 of 19 : 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 9 of 19 : 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 10 of 19 : 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 11 of 19 : 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 12 of 19 : 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 13 of 19 : 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 14 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 15 of 19 : 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 16 of 19 : 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 17 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 18 of 19 : 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 19 of 19 : 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"BalanceWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RAPTORS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METALABS_RECEIVER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OGREX_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTY_BASIS_POINTS","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractState","outputs":[{"internalType":"enum Raptors.State","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getRexMintedStatus","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"},{"internalType":"address","name":"_address","type":"address"}],"name":"isRexBatchOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"isRexOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rexId","type":"uint256"}],"name":"mintRaptor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"rexIds","type":"uint256[]"}],"name":"mintRaptorBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rexForRaptor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ogrexAddress_","type":"address"}],"name":"setRexAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setStateToClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setStateToLive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setStateToSetup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenUriBase_","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"withdrawAllEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405260016000908155600755600c80546001600160601b0319166102ee1790553480156200002f57600080fd5b5060405180604001604052806007815260200166526170746f727360c81b81525060405180604001604052806007815260200166524150544f525360c81b815250600a60008111620000d85760405162461bcd60e51b815260206004820152602760248201527f455243373231413a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b60648201526084015b60405180910390fd5b6001620000e68482620003ab565b506002620000f58382620003ab565b506080525062000107905033620001b3565b6001600b55600e80546001600160a01b031990811673325bad883b4e9a35277e99902d94dd18186ae21917909155600f805490911673b6ff94521c3ed48e7cafdba1acee0238111dd32917905560408051606081019091526024808252620030a86020830139600d906200017c9082620003ab565b50600f805460ff60a01b198116909155600c54620001ad916001600160a01b0316906001600160601b031662000205565b62000477565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620002755760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401620000cf565b6001600160a01b038216620002cd5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620000cf565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200033157607f821691505b6020821081036200035257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003a657600081815260208120601f850160051c81016020861015620003815750805b601f850160051c820191505b81811015620003a2578281556001016200038d565b5050505b505050565b81516001600160401b03811115620003c757620003c762000306565b620003df81620003d884546200031c565b8462000358565b602080601f831160018114620004175760008415620003fe5750858301515b600019600386901b1c1916600185901b178555620003a2565b600085815260208120601f198616915b82811015620004485788860151825594840194600190910190840162000427565b5085821015620004675787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051612c07620004a160003960008181611bac01528181611bd60152611fd70152612c076000f3fe608060405234801561001057600080fd5b50600436106101fe5760003560e01c806380b1bca41161011657806380b1bca4146103f357806385209ee014610406578063891b80b3146104205780638da5cb5b1461043357806395d89b411461043b5780639bf739e414610443578063a22cb46514610456578063aa1b103f14610469578063b88d4fde14610471578063c20c261514610484578063c60ca9b01461048c578063c87b56dd14610495578063d46d79bb146104a8578063d547cfb7146104bb578063d7224ba0146104c3578063d96e5612146104cc578063e0df5b6f146104d4578063e985e9c5146104e7578063f0292a0314610523578063f2fde38b1461052b578063f5a93d3e1461053e57600080fd5b806301cf0b451461020357806301ffc9a71461023b57806304634d8d1461024e57806306fdde031461026357806307e7712814610278578063081812fc14610299578063095ea7b3146102c45780631648d0bb146102d757806318160ddd146102ea5780631a3053da146102f257806323af88271461031257806323b872dd1461031a5780632a55205a1461032d5780632f745c591461034e5780633c404a9c1461036157806342842e0e1461038c5780634f6ccce71461039f578063525c391b146103b25780636352211e146103c557806370a08231146103d8578063715018a6146103eb575b600080fd5b6102266102113660046122ca565b60106020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102266102493660046122f9565b610551565b61026161025c36600461232b565b610562565b005b61026b610593565b60405161023291906123c0565b61028b6102863660046122ca565b610625565b604051908152602001610232565b6102ac6102a73660046122ca565b61077a565b6040516001600160a01b039091168152602001610232565b6102616102d23660046123d3565b610803565b600f546102ac906001600160a01b031681565b61028b610916565b610305610300366004612443565b61092c565b6040516102329190612484565b6102616109f4565b6102616103283660046124ca565b610a19565b61034061033b36600461250b565b610a24565b60405161023292919061252d565b61028b61035c3660046123d3565b610ad2565b600c54610374906001600160601b031681565b6040516001600160601b039091168152602001610232565b61026161039a3660046124ca565b610c47565b61028b6103ad3660046122ca565b610c62565b600e546102ac906001600160a01b031681565b6102ac6103d33660046122ca565b610cca565b61028b6103e6366004612546565b610cdc565b610261610d6d565b61028b610401366004612443565b610d81565b600f54600160a01b900460ff166040516102329190612579565b61022661042e3660046125a1565b61108f565b6102ac611125565b61026b611134565b6102266104513660046125f7565b611143565b61026161046436600461261c565b6111eb565b6102616112ac565b61026161047f3660046126da565b6112ce565b610261611307565b61028b611e6181565b61026b6104a33660046122ca565b611329565b6102616104b6366004612546565b611363565b61026b6113e1565b61028b60075481565b6102616113f0565b6102616104e2366004612759565b61147f565b6102266104f53660046127a1565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61028b600a81565b610261610539366004612546565b611493565b61026161054c366004612546565b61150c565b600061055c82611536565b92915050565b61056a61155b565b600c80546001600160601b0319166001600160601b03831617905561058f82826115ba565b5050565b6060600180546105a2906127cf565b80601f01602080910402602001604051908101604052809291908181526020018280546105ce906127cf565b801561061b5780601f106105f05761010080835404028352916020019161061b565b820191906000526020600020905b8154815290600101906020018083116105fe57829003601f168201915b5050505050905090565b600061062f6116b3565b336001600f54600160a01b900460ff16600281111561065057610650612563565b146106765760405162461bcd60e51b815260040161066d90612809565b60405180910390fd5b6106808382611143565b61069c5760405162461bcd60e51b815260040161066d9061284e565b60008381526010602052604090205460ff16156106cb5760405162461bcd60e51b815260040161066d90612885565b611e616106e160016106db610916565b9061170c565b11156107435760405162461bcd60e51b815260206004820152602b60248201527f536f7272792c207468657265206973206e6f742074686174206d616e7920526160448201526a383a37b939903632b33a1760a91b606482015260840161066d565b8261074f82600161171f565b6000848152601060205260409020805460ff191660011790559150506107756001600b55565b919050565b600061078582611739565b6107e75760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b606482015260840161066d565b506000908152600560205260409020546001600160a01b031690565b600061080e82610cca565b9050806001600160a01b0316836001600160a01b03160361087c5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b606482015260840161066d565b336001600160a01b0382161480610898575061089881336104f5565b6109065760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f6044820152781ddb995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b603a1b606482015260840161066d565b61091183838361174c565b505050565b6000600160005461092791906128ee565b905090565b60606000826001600160401b038111156109485761094861264f565b604051908082528060200260200182016040528015610971578160200160208202803683370190505b50905060005b838110156109ec576010600086868481811061099557610995612901565b90506020020135815260200190815260200160002060009054906101000a900460ff168282815181106109ca576109ca612901565b91151560209283029190910190910152806109e481612917565b915050610977565b509392505050565b6109fc61155b565b600f80546000919060ff60a01b1916600160a01b835b0217905550565b6109118383836117a8565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a995750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610ab8906001600160601b031687612930565b610ac29190612947565b91519350909150505b9250929050565b6000610add83610cdc565b8210610b365760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b606482015260840161066d565b6000610b40610916565b905060008060005b83811015610be7576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610b9a57805192505b876001600160a01b0316836001600160a01b031603610bd457868403610bc65750935061055c92505050565b83610bd081612917565b9450505b5080610bdf81612917565b915050610b48565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b606482015260840161066d565b610911838383604051806020016040528060008152506112ce565b6000610c6c610916565b8210610cc65760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b606482015260840161066d565b5090565b6000610cd582611b2c565b5192915050565b60006001600160a01b038216610d485760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b606482015260840161066d565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b610d7561155b565b610d7f6000611cd3565b565b6000610d8b6116b3565b336001600f54600160a01b900460ff166002811115610dac57610dac612563565b14610dc95760405162461bcd60e51b815260040161066d90612809565b610dd484848361108f565b610df05760405162461bcd60e51b815260040161066d9061284e565b611e61610dff846106db610916565b1115610e605760405162461bcd60e51b815260206004820152602a60248201527f536f7272792c2074686572652773206e6f742074686174206d616e79205261706044820152693a37b939903632b33a1760b11b606482015260840161066d565b600a831115610ec15760405162461bcd60e51b815260206004820152602760248201527f596f752063616e206f6e6c79206d696e7420313020526170746f72732061742060448201526630903a34b6b29760c91b606482015260840161066d565b600084846000818110610ed657610ed6612901565b90506020020135905060005b848110156110815760106000878784818110610f0057610f00612901565b602090810292909201358352508101919091526040016000205460ff1615610f3a5760405162461bcd60e51b815260040161066d90612885565b610f42611125565b6001600160a01b03163303610fa557610f5c83600161171f565b600160106000888885818110610f7457610f74612901565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555061106f565b610fc7868683818110610fba57610fba612901565b9050602002013584611143565b61101f5760405162461bcd60e51b8152602060048201526024808201527f596f7520617265206e6f7420746865206f776e6572206f662074686973204f4760448201526305aa4caf60e31b606482015260840161066d565b61102a83600161171f565b60016010600088888581811061104257611042612901565b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061107981612917565b915050610ee2565b5091505061055c6001600b55565b6000805b8381101561111a576110b0858583818110610fba57610fba612901565b6111085760405162461bcd60e51b8152602060048201526024808201527f41646472657373206973206e6f74206f776e6572206f66204f472d52455820626044820152630c2e8c6d60e31b606482015260840161066d565b8061111281612917565b915050611093565b506001949350505050565b600a546001600160a01b031690565b6060600280546105a2906127cf565b600e546040516331a9108f60e11b81526004810184905260009182916001600160a01b0390911690636352211e90602401602060405180830381865afa158015611191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b59190612969565b9050826001600160a01b0316816001600160a01b0316036111da57600191505061055c565b600091505061055c565b5092915050565b336001600160a01b038316036112405760405162461bcd60e51b815260206004820152601a60248201527922a9219b9918a09d1030b8383937bb32903a379031b0b63632b960311b604482015260640161066d565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112b461155b565b600c80546001600160601b0319169055610d7f6000600855565b6112d98484846117a8565b6112e584848484611d25565b6113015760405162461bcd60e51b815260040161066d90612986565b50505050565b61130f61155b565b600f80546002919060ff60a01b1916600160a01b83610a12565b60606113336113e1565b61133c83611e1f565b60405160200161134d9291906129d9565b6040516020818303038152906040529050919050565b61136b61155b565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156113a3573d6000803e3d6000fd5b507fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f182826040516113d592919061252d565b60405180910390a15050565b6060600d80546105a2906127cf565b6113f861155b565b6000600f54600160a01b900460ff16600281111561141857611418612563565b146114655760405162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374206973206e6f7420696e2053657475702073746174650000604482015260640161066d565b600f80546001919060ff60a01b1916600160a01b83610a12565b61148761155b565b600d61058f8282612a4e565b61149b61155b565b6001600160a01b0381166115005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066d565b61150981611cd3565b50565b61151461155b565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b148061055c575061055c82611eb1565b33611564611125565b6001600160a01b031614610d7f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161066d565b6127106001600160601b03821611156116285760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840161066d565b6001600160a01b03821661167a5760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b604482015260640161066d565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b6002600b54036117055760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161066d565b6002600b55565b60006117188284612b0d565b9392505050565b61058f828260405180602001604052806000815250611f1c565b600080548210801561055c575050151590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006117b382611b2c565b80519091506000906001600160a01b0316336001600160a01b031614806117ea5750336117df8461077a565b6001600160a01b0316145b806117fc575081516117fc90336104f5565b9050806118665760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161066d565b846001600160a01b031682600001516001600160a01b0316146118da5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b606482015260840161066d565b6001600160a01b03841661193e5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b606482015260840161066d565b61194e600084846000015161174c565b6001600160a01b03851660009081526004602052604081208054600192906119809084906001600160801b0316612b20565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b038616600090815260046020526040812080546001945090926119cc91859116612b40565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526003909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055611a53846001612b0d565b6000818152600360205260409020549091506001600160a01b0316611ae257611a7b81611739565b15611ae25760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600390935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6040805180820190915260008082526020820152611b4982611739565b611ba85760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b606482015260840161066d565b60007f00000000000000000000000000000000000000000000000000000000000000008310611c0957611bfb7f0000000000000000000000000000000000000000000000000000000000000000846128ee565b611c06906001612b0d565b90505b825b818110611c72576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215611c5f57949350505050565b5080611c6a81612b60565b915050611c0b565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b606482015260840161066d565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160a01b0384163b1561111a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611d69903390899088908890600401612b77565b6020604051808303816000875af1925050508015611da4575060408051601f3d908101601f19168201909252611da191810190612bb4565b60015b611e01573d808015611dd2576040519150601f19603f3d011682016040523d82523d6000602084013e611dd7565b606091505b508051600003611df95760405162461bcd60e51b815260040161066d90612986565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606000611e2c836121f4565b60010190506000816001600160401b03811115611e4b57611e4b61264f565b6040519080825280601f01601f191660200182016040528015611e75576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611e7f57509392505050565b60006001600160e01b031982166380ac58cd60e01b1480611ee257506001600160e01b03198216635b5e139f60e01b145b80611efd57506001600160e01b0319821663780e9d6360e01b145b8061055c57506301ffc9a760e01b6001600160e01b031983161461055c565b6000546001600160a01b038416611f7f5760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161066d565b611f8881611739565b15611fd55760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e746564000000604482015260640161066d565b7f00000000000000000000000000000000000000000000000000000000000000008311156120505760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b606482015260840161066d565b6001600160a01b0384166000908152600460209081526040918290208251808401845290546001600160801b038082168352600160801b90910416918101919091528151808301909252805190919081906120ac908790612b40565b6001600160801b031681526020018583602001516120ca9190612b40565b6001600160801b039081169091526001600160a01b0380881660008181526004602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526003909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156121e95760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46121ad6000888488611d25565b6121c95760405162461bcd60e51b815260040161066d90612986565b816121d381612917565b92505080806121e190612917565b915050612160565b506000819055611b24565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106122335772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b831061225d576904ee2d6d415b85acef8160201b830492506020015b662386f26fc10000831061227b57662386f26fc10000830492506010015b6305f5e1008310612293576305f5e100830492506008015b61271083106122a757612710830492506004015b606483106122b9576064830492506002015b600a831061055c5760010192915050565b6000602082840312156122dc57600080fd5b5035919050565b6001600160e01b03198116811461150957600080fd5b60006020828403121561230b57600080fd5b8135611718816122e3565b6001600160a01b038116811461150957600080fd5b6000806040838503121561233e57600080fd5b823561234981612316565b915060208301356001600160601b038116811461236557600080fd5b809150509250929050565b60005b8381101561238b578181015183820152602001612373565b50506000910152565b600081518084526123ac816020860160208601612370565b601f01601f19169290920160200192915050565b6020815260006117186020830184612394565b600080604083850312156123e657600080fd5b82356123f181612316565b946020939093013593505050565b60008083601f84011261241157600080fd5b5081356001600160401b0381111561242857600080fd5b6020830191508360208260051b8501011115610acb57600080fd5b6000806020838503121561245657600080fd5b82356001600160401b0381111561246c57600080fd5b612478858286016123ff565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156124be5783511515835292840192918401916001016124a0565b50909695505050505050565b6000806000606084860312156124df57600080fd5b83356124ea81612316565b925060208401356124fa81612316565b929592945050506040919091013590565b6000806040838503121561251e57600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b60006020828403121561255857600080fd5b813561171881612316565b634e487b7160e01b600052602160045260246000fd5b602081016003831061259b57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806000604084860312156125b657600080fd5b83356001600160401b038111156125cc57600080fd5b6125d8868287016123ff565b90945092505060208401356125ec81612316565b809150509250925092565b6000806040838503121561260a57600080fd5b82359150602083013561236581612316565b6000806040838503121561262f57600080fd5b823561263a81612316565b91506020830135801515811461236557600080fd5b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561267f5761267f61264f565b604051601f8501601f19908116603f011681019082821181831017156126a7576126a761264f565b816040528093508581528686860111156126c057600080fd5b858560208301376000602087830101525050509392505050565b600080600080608085870312156126f057600080fd5b84356126fb81612316565b9350602085013561270b81612316565b92506040850135915060608501356001600160401b0381111561272d57600080fd5b8501601f8101871361273e57600080fd5b61274d87823560208401612665565b91505092959194509250565b60006020828403121561276b57600080fd5b81356001600160401b0381111561278157600080fd5b8201601f8101841361279257600080fd5b611e1784823560208401612665565b600080604083850312156127b457600080fd5b82356127bf81612316565b9150602083013561236581612316565b600181811c908216806127e357607f821691505b60208210810361280357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526025908201527f4a50756e6b733a20526170746f7273206172656e277420617661696c61626c65604082015264207965742160d81b606082015260800190565b6020808252601f908201527f596f7520617265206e6f7420746865206f776e6572206f66204f472d52657800604082015260600190565b60208082526033908201527f54686520526170746f7220666f722074686973204f472d526578206861732061604082015272363932b0b23c903132b2b71036b4b73a32b21760691b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561055c5761055c6128d8565b634e487b7160e01b600052603260045260246000fd5b600060018201612929576129296128d8565b5060010190565b808202811582820484141761055c5761055c6128d8565b60008261296457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561297b57600080fd5b815161171881612316565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b600083516129eb818460208801612370565b8351908301906129ff818360208801612370565b01949350505050565b601f82111561091157600081815260208120601f850160051c81016020861015612a2f5750805b601f850160051c820191505b81811015611b2457828155600101612a3b565b81516001600160401b03811115612a6757612a6761264f565b612a7b81612a7584546127cf565b84612a08565b602080601f831160018114612ab05760008415612a985750858301515b600019600386901b1c1916600185901b178555611b24565b600085815260208120601f198616915b82811015612adf57888601518255948401946001909101908401612ac0565b5085821015612afd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561055c5761055c6128d8565b6001600160801b038281168282160390808211156111e4576111e46128d8565b6001600160801b038181168382160190808211156111e4576111e46128d8565b600081612b6f57612b6f6128d8565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612baa90830184612394565b9695505050505050565b600060208284031215612bc657600080fd5b8151611718816122e356fea26469706673582212208418a419a9c829259ba190777aeaccc886ecdd8947c8242ac7030f9a5c6bc48664736f6c6343000811003368747470733a2f2f6170692e6a7572617373696370756e6b732e696f2f726170746f722f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101fe5760003560e01c806380b1bca41161011657806380b1bca4146103f357806385209ee014610406578063891b80b3146104205780638da5cb5b1461043357806395d89b411461043b5780639bf739e414610443578063a22cb46514610456578063aa1b103f14610469578063b88d4fde14610471578063c20c261514610484578063c60ca9b01461048c578063c87b56dd14610495578063d46d79bb146104a8578063d547cfb7146104bb578063d7224ba0146104c3578063d96e5612146104cc578063e0df5b6f146104d4578063e985e9c5146104e7578063f0292a0314610523578063f2fde38b1461052b578063f5a93d3e1461053e57600080fd5b806301cf0b451461020357806301ffc9a71461023b57806304634d8d1461024e57806306fdde031461026357806307e7712814610278578063081812fc14610299578063095ea7b3146102c45780631648d0bb146102d757806318160ddd146102ea5780631a3053da146102f257806323af88271461031257806323b872dd1461031a5780632a55205a1461032d5780632f745c591461034e5780633c404a9c1461036157806342842e0e1461038c5780634f6ccce71461039f578063525c391b146103b25780636352211e146103c557806370a08231146103d8578063715018a6146103eb575b600080fd5b6102266102113660046122ca565b60106020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102266102493660046122f9565b610551565b61026161025c36600461232b565b610562565b005b61026b610593565b60405161023291906123c0565b61028b6102863660046122ca565b610625565b604051908152602001610232565b6102ac6102a73660046122ca565b61077a565b6040516001600160a01b039091168152602001610232565b6102616102d23660046123d3565b610803565b600f546102ac906001600160a01b031681565b61028b610916565b610305610300366004612443565b61092c565b6040516102329190612484565b6102616109f4565b6102616103283660046124ca565b610a19565b61034061033b36600461250b565b610a24565b60405161023292919061252d565b61028b61035c3660046123d3565b610ad2565b600c54610374906001600160601b031681565b6040516001600160601b039091168152602001610232565b61026161039a3660046124ca565b610c47565b61028b6103ad3660046122ca565b610c62565b600e546102ac906001600160a01b031681565b6102ac6103d33660046122ca565b610cca565b61028b6103e6366004612546565b610cdc565b610261610d6d565b61028b610401366004612443565b610d81565b600f54600160a01b900460ff166040516102329190612579565b61022661042e3660046125a1565b61108f565b6102ac611125565b61026b611134565b6102266104513660046125f7565b611143565b61026161046436600461261c565b6111eb565b6102616112ac565b61026161047f3660046126da565b6112ce565b610261611307565b61028b611e6181565b61026b6104a33660046122ca565b611329565b6102616104b6366004612546565b611363565b61026b6113e1565b61028b60075481565b6102616113f0565b6102616104e2366004612759565b61147f565b6102266104f53660046127a1565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61028b600a81565b610261610539366004612546565b611493565b61026161054c366004612546565b61150c565b600061055c82611536565b92915050565b61056a61155b565b600c80546001600160601b0319166001600160601b03831617905561058f82826115ba565b5050565b6060600180546105a2906127cf565b80601f01602080910402602001604051908101604052809291908181526020018280546105ce906127cf565b801561061b5780601f106105f05761010080835404028352916020019161061b565b820191906000526020600020905b8154815290600101906020018083116105fe57829003601f168201915b5050505050905090565b600061062f6116b3565b336001600f54600160a01b900460ff16600281111561065057610650612563565b146106765760405162461bcd60e51b815260040161066d90612809565b60405180910390fd5b6106808382611143565b61069c5760405162461bcd60e51b815260040161066d9061284e565b60008381526010602052604090205460ff16156106cb5760405162461bcd60e51b815260040161066d90612885565b611e616106e160016106db610916565b9061170c565b11156107435760405162461bcd60e51b815260206004820152602b60248201527f536f7272792c207468657265206973206e6f742074686174206d616e7920526160448201526a383a37b939903632b33a1760a91b606482015260840161066d565b8261074f82600161171f565b6000848152601060205260409020805460ff191660011790559150506107756001600b55565b919050565b600061078582611739565b6107e75760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b606482015260840161066d565b506000908152600560205260409020546001600160a01b031690565b600061080e82610cca565b9050806001600160a01b0316836001600160a01b03160361087c5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b606482015260840161066d565b336001600160a01b0382161480610898575061089881336104f5565b6109065760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f6044820152781ddb995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b603a1b606482015260840161066d565b61091183838361174c565b505050565b6000600160005461092791906128ee565b905090565b60606000826001600160401b038111156109485761094861264f565b604051908082528060200260200182016040528015610971578160200160208202803683370190505b50905060005b838110156109ec576010600086868481811061099557610995612901565b90506020020135815260200190815260200160002060009054906101000a900460ff168282815181106109ca576109ca612901565b91151560209283029190910190910152806109e481612917565b915050610977565b509392505050565b6109fc61155b565b600f80546000919060ff60a01b1916600160a01b835b0217905550565b6109118383836117a8565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a995750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610ab8906001600160601b031687612930565b610ac29190612947565b91519350909150505b9250929050565b6000610add83610cdc565b8210610b365760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b606482015260840161066d565b6000610b40610916565b905060008060005b83811015610be7576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610b9a57805192505b876001600160a01b0316836001600160a01b031603610bd457868403610bc65750935061055c92505050565b83610bd081612917565b9450505b5080610bdf81612917565b915050610b48565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b606482015260840161066d565b610911838383604051806020016040528060008152506112ce565b6000610c6c610916565b8210610cc65760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b606482015260840161066d565b5090565b6000610cd582611b2c565b5192915050565b60006001600160a01b038216610d485760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b606482015260840161066d565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b610d7561155b565b610d7f6000611cd3565b565b6000610d8b6116b3565b336001600f54600160a01b900460ff166002811115610dac57610dac612563565b14610dc95760405162461bcd60e51b815260040161066d90612809565b610dd484848361108f565b610df05760405162461bcd60e51b815260040161066d9061284e565b611e61610dff846106db610916565b1115610e605760405162461bcd60e51b815260206004820152602a60248201527f536f7272792c2074686572652773206e6f742074686174206d616e79205261706044820152693a37b939903632b33a1760b11b606482015260840161066d565b600a831115610ec15760405162461bcd60e51b815260206004820152602760248201527f596f752063616e206f6e6c79206d696e7420313020526170746f72732061742060448201526630903a34b6b29760c91b606482015260840161066d565b600084846000818110610ed657610ed6612901565b90506020020135905060005b848110156110815760106000878784818110610f0057610f00612901565b602090810292909201358352508101919091526040016000205460ff1615610f3a5760405162461bcd60e51b815260040161066d90612885565b610f42611125565b6001600160a01b03163303610fa557610f5c83600161171f565b600160106000888885818110610f7457610f74612901565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555061106f565b610fc7868683818110610fba57610fba612901565b9050602002013584611143565b61101f5760405162461bcd60e51b8152602060048201526024808201527f596f7520617265206e6f7420746865206f776e6572206f662074686973204f4760448201526305aa4caf60e31b606482015260840161066d565b61102a83600161171f565b60016010600088888581811061104257611042612901565b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061107981612917565b915050610ee2565b5091505061055c6001600b55565b6000805b8381101561111a576110b0858583818110610fba57610fba612901565b6111085760405162461bcd60e51b8152602060048201526024808201527f41646472657373206973206e6f74206f776e6572206f66204f472d52455820626044820152630c2e8c6d60e31b606482015260840161066d565b8061111281612917565b915050611093565b506001949350505050565b600a546001600160a01b031690565b6060600280546105a2906127cf565b600e546040516331a9108f60e11b81526004810184905260009182916001600160a01b0390911690636352211e90602401602060405180830381865afa158015611191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b59190612969565b9050826001600160a01b0316816001600160a01b0316036111da57600191505061055c565b600091505061055c565b5092915050565b336001600160a01b038316036112405760405162461bcd60e51b815260206004820152601a60248201527922a9219b9918a09d1030b8383937bb32903a379031b0b63632b960311b604482015260640161066d565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112b461155b565b600c80546001600160601b0319169055610d7f6000600855565b6112d98484846117a8565b6112e584848484611d25565b6113015760405162461bcd60e51b815260040161066d90612986565b50505050565b61130f61155b565b600f80546002919060ff60a01b1916600160a01b83610a12565b60606113336113e1565b61133c83611e1f565b60405160200161134d9291906129d9565b6040516020818303038152906040529050919050565b61136b61155b565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156113a3573d6000803e3d6000fd5b507fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f182826040516113d592919061252d565b60405180910390a15050565b6060600d80546105a2906127cf565b6113f861155b565b6000600f54600160a01b900460ff16600281111561141857611418612563565b146114655760405162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374206973206e6f7420696e2053657475702073746174650000604482015260640161066d565b600f80546001919060ff60a01b1916600160a01b83610a12565b61148761155b565b600d61058f8282612a4e565b61149b61155b565b6001600160a01b0381166115005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066d565b61150981611cd3565b50565b61151461155b565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b148061055c575061055c82611eb1565b33611564611125565b6001600160a01b031614610d7f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161066d565b6127106001600160601b03821611156116285760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840161066d565b6001600160a01b03821661167a5760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b604482015260640161066d565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b6002600b54036117055760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161066d565b6002600b55565b60006117188284612b0d565b9392505050565b61058f828260405180602001604052806000815250611f1c565b600080548210801561055c575050151590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006117b382611b2c565b80519091506000906001600160a01b0316336001600160a01b031614806117ea5750336117df8461077a565b6001600160a01b0316145b806117fc575081516117fc90336104f5565b9050806118665760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161066d565b846001600160a01b031682600001516001600160a01b0316146118da5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b606482015260840161066d565b6001600160a01b03841661193e5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b606482015260840161066d565b61194e600084846000015161174c565b6001600160a01b03851660009081526004602052604081208054600192906119809084906001600160801b0316612b20565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b038616600090815260046020526040812080546001945090926119cc91859116612b40565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526003909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055611a53846001612b0d565b6000818152600360205260409020549091506001600160a01b0316611ae257611a7b81611739565b15611ae25760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600390935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6040805180820190915260008082526020820152611b4982611739565b611ba85760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b606482015260840161066d565b60007f000000000000000000000000000000000000000000000000000000000000000a8310611c0957611bfb7f000000000000000000000000000000000000000000000000000000000000000a846128ee565b611c06906001612b0d565b90505b825b818110611c72576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215611c5f57949350505050565b5080611c6a81612b60565b915050611c0b565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b606482015260840161066d565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160a01b0384163b1561111a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611d69903390899088908890600401612b77565b6020604051808303816000875af1925050508015611da4575060408051601f3d908101601f19168201909252611da191810190612bb4565b60015b611e01573d808015611dd2576040519150601f19603f3d011682016040523d82523d6000602084013e611dd7565b606091505b508051600003611df95760405162461bcd60e51b815260040161066d90612986565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606000611e2c836121f4565b60010190506000816001600160401b03811115611e4b57611e4b61264f565b6040519080825280601f01601f191660200182016040528015611e75576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611e7f57509392505050565b60006001600160e01b031982166380ac58cd60e01b1480611ee257506001600160e01b03198216635b5e139f60e01b145b80611efd57506001600160e01b0319821663780e9d6360e01b145b8061055c57506301ffc9a760e01b6001600160e01b031983161461055c565b6000546001600160a01b038416611f7f5760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161066d565b611f8881611739565b15611fd55760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e746564000000604482015260640161066d565b7f000000000000000000000000000000000000000000000000000000000000000a8311156120505760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b606482015260840161066d565b6001600160a01b0384166000908152600460209081526040918290208251808401845290546001600160801b038082168352600160801b90910416918101919091528151808301909252805190919081906120ac908790612b40565b6001600160801b031681526020018583602001516120ca9190612b40565b6001600160801b039081169091526001600160a01b0380881660008181526004602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526003909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156121e95760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46121ad6000888488611d25565b6121c95760405162461bcd60e51b815260040161066d90612986565b816121d381612917565b92505080806121e190612917565b915050612160565b506000819055611b24565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106122335772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b831061225d576904ee2d6d415b85acef8160201b830492506020015b662386f26fc10000831061227b57662386f26fc10000830492506010015b6305f5e1008310612293576305f5e100830492506008015b61271083106122a757612710830492506004015b606483106122b9576064830492506002015b600a831061055c5760010192915050565b6000602082840312156122dc57600080fd5b5035919050565b6001600160e01b03198116811461150957600080fd5b60006020828403121561230b57600080fd5b8135611718816122e3565b6001600160a01b038116811461150957600080fd5b6000806040838503121561233e57600080fd5b823561234981612316565b915060208301356001600160601b038116811461236557600080fd5b809150509250929050565b60005b8381101561238b578181015183820152602001612373565b50506000910152565b600081518084526123ac816020860160208601612370565b601f01601f19169290920160200192915050565b6020815260006117186020830184612394565b600080604083850312156123e657600080fd5b82356123f181612316565b946020939093013593505050565b60008083601f84011261241157600080fd5b5081356001600160401b0381111561242857600080fd5b6020830191508360208260051b8501011115610acb57600080fd5b6000806020838503121561245657600080fd5b82356001600160401b0381111561246c57600080fd5b612478858286016123ff565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156124be5783511515835292840192918401916001016124a0565b50909695505050505050565b6000806000606084860312156124df57600080fd5b83356124ea81612316565b925060208401356124fa81612316565b929592945050506040919091013590565b6000806040838503121561251e57600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b60006020828403121561255857600080fd5b813561171881612316565b634e487b7160e01b600052602160045260246000fd5b602081016003831061259b57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806000604084860312156125b657600080fd5b83356001600160401b038111156125cc57600080fd5b6125d8868287016123ff565b90945092505060208401356125ec81612316565b809150509250925092565b6000806040838503121561260a57600080fd5b82359150602083013561236581612316565b6000806040838503121561262f57600080fd5b823561263a81612316565b91506020830135801515811461236557600080fd5b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561267f5761267f61264f565b604051601f8501601f19908116603f011681019082821181831017156126a7576126a761264f565b816040528093508581528686860111156126c057600080fd5b858560208301376000602087830101525050509392505050565b600080600080608085870312156126f057600080fd5b84356126fb81612316565b9350602085013561270b81612316565b92506040850135915060608501356001600160401b0381111561272d57600080fd5b8501601f8101871361273e57600080fd5b61274d87823560208401612665565b91505092959194509250565b60006020828403121561276b57600080fd5b81356001600160401b0381111561278157600080fd5b8201601f8101841361279257600080fd5b611e1784823560208401612665565b600080604083850312156127b457600080fd5b82356127bf81612316565b9150602083013561236581612316565b600181811c908216806127e357607f821691505b60208210810361280357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526025908201527f4a50756e6b733a20526170746f7273206172656e277420617661696c61626c65604082015264207965742160d81b606082015260800190565b6020808252601f908201527f596f7520617265206e6f7420746865206f776e6572206f66204f472d52657800604082015260600190565b60208082526033908201527f54686520526170746f7220666f722074686973204f472d526578206861732061604082015272363932b0b23c903132b2b71036b4b73a32b21760691b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561055c5761055c6128d8565b634e487b7160e01b600052603260045260246000fd5b600060018201612929576129296128d8565b5060010190565b808202811582820484141761055c5761055c6128d8565b60008261296457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561297b57600080fd5b815161171881612316565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b600083516129eb818460208801612370565b8351908301906129ff818360208801612370565b01949350505050565b601f82111561091157600081815260208120601f850160051c81016020861015612a2f5750805b601f850160051c820191505b81811015611b2457828155600101612a3b565b81516001600160401b03811115612a6757612a6761264f565b612a7b81612a7584546127cf565b84612a08565b602080601f831160018114612ab05760008415612a985750858301515b600019600386901b1c1916600185901b178555611b24565b600085815260208120601f198616915b82811015612adf57888601518255948401946001909101908401612ac0565b5085821015612afd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561055c5761055c6128d8565b6001600160801b038281168282160390808211156111e4576111e46128d8565b6001600160801b038181168382160190808211156111e4576111e46128d8565b600081612b6f57612b6f6128d8565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612baa90830184612394565b9695505050505050565b600060208284031215612bc657600080fd5b8151611718816122e356fea26469706673582212208418a419a9c829259ba190777aeaccc886ecdd8947c8242ac7030f9a5c6bc48664736f6c63430008110033

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

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