Contract 0x39e389a18d5BDd00cBeaC36c9857bCa50Fd72BD4

Contract Overview

Balance:
0.40173795786563341 Ether
Txn Hash
Method
Block
From
To
Value
0xc331e3e0bbe0b55fe3a50a14697f8b0cdb14e5971de80106f1d6535c82159e44Mint Batch104168582022-03-30 12:17:5898 days 6 hrs ago0x580d2ddb6ed71c23059d5d83891d525a3b750a2b IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0324 Ether0.00067955 2.50000002
0xad8378a7b383ae6b4340e8928aa5979fa230145b77d7db9c28e4132a8cd1ae3cMint Batch103848912022-03-24 22:59:02103 days 19 hrs ago0x580d2ddb6ed71c23059d5d83891d525a3b750a2b IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0177 Ether0.00049689 2.50000001
0x34aedd025665bd12856dd8203057f58c170f92d9825952f4f2d8e07497f6028dMint Batch103759162022-03-23 9:31:30105 days 9 hrs ago0xf7e6b1374b2f910413515129fef34c06697a1bd2 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0372 Ether0.00074786 2.75128783
0xffb53685e38e97ea094e0f4856781ddf31f604accd6c613462c4fa3f9ec77f1cMint Batch103759052022-03-23 9:28:45105 days 9 hrs ago0x580d2ddb6ed71c23059d5d83891d525a3b750a2b IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0372 Ether0.00072309 2.66016373
0xe67fe57f02f84d50f4f9a54116ebb1dc3ae735e9d77c9fb0476bd9a78ddd0fcbMint Batch103726922022-03-22 20:04:45105 days 22 hrs ago0xf7e6b1374b2f910413515129fef34c06697a1bd2 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0184 Ether0.00058239 2.50000001
0xac397dd4a39b3194d794cb79a3867c1a57fd3fdeecc2e9d02c62ba641dfcf8e0Mint Batch103722662022-03-22 18:18:07106 days 34 mins ago0x7c2c9edc8b8c81502aa67f31197bface0ab74427 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0183 Ether0.00049689 2.50000003
0xcc2ada523f8e06b7d1601b565b0f2d1c1cc6b0eaeb28a947622503b1ac7873f6Mint Batch103720862022-03-22 17:33:04106 days 1 hr ago0x7c2c9edc8b8c81502aa67f31197bface0ab74427 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0183 Ether0.00049689 2.50000001
0x555698be038e957559c3e411fb17dc81aa6f5f83aad4426c367212e1da9edd89Mint Batch103655052022-03-21 14:06:25107 days 4 hrs ago0x580d2ddb6ed71c23059d5d83891d525a3b750a2b IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0376 Ether0.00076505 2.50000015
0x3f1ca224a86add6a71ff34b1a3b8a79fcf46a79155f610ee2cfdb05570e52e55Mint Batch103654962022-03-21 14:04:10107 days 4 hrs ago0x7c2c9edc8b8c81502aa67f31197bface0ab74427 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.1058 Ether0.00082183 2.50000016
0x505efb75105eed94e9c03c219b55cf514115f8e906fca29b904c0ef95a8ff10aMint Batch103654942022-03-21 14:03:40107 days 4 hrs ago0x7c2c9edc8b8c81502aa67f31197bface0ab74427 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0718 Ether0.00086458 2.50000015
0xbaadfb28f159bda17918a48459f2533ec7950c363482446313efc9cf7df45636Mint Batch103654922022-03-21 14:03:10107 days 4 hrs ago0x7c2c9edc8b8c81502aa67f31197bface0ab74427 IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40.0376 Ether0.00085055 2.50000015
0xd2a3e3481d453a6ddf72a9a373b1b884b626aaf300946f5905d9acbd7b734723Add White List103654672022-03-21 13:56:55107 days 4 hrs ago0x580d2ddb6ed71c23059d5d83891d525a3b750a2b IN  0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether0.0000937 1.00000007
0x88a39475cd8e84915158db828f66d5720e8c06e1ba932ed0d90e120267cfebbf0x61271060103646172022-03-21 10:24:10107 days 8 hrs ago0x580d2ddb6ed71c23059d5d83891d525a3b750a2b IN  Create: FathomyachtClub0 Ether0.01045774 2.50000024
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xbe0535737aff7b54b04897902e5efdf79bebd54159b13c69536f7b671ec6d5de105650742022-04-25 9:12:0372 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xbe0535737aff7b54b04897902e5efdf79bebd54159b13c69536f7b671ec6d5de105650742022-04-25 9:12:0372 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xbe0535737aff7b54b04897902e5efdf79bebd54159b13c69536f7b671ec6d5de105650742022-04-25 9:12:0372 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x16ecb18ed3f33be5a635008dbdb3bccca34724e86b67e261d5b9c26557200caa105650652022-04-25 9:09:4772 days 9 hrs ago 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd4 0x8a753747a1fa494ec906ce90e9f37563a8af630e0 Ether
0x16ecb18ed3f33be5a635008dbdb3bccca34724e86b67e261d5b9c26557200caa105650652022-04-25 9:09:4772 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x16ecb18ed3f33be5a635008dbdb3bccca34724e86b67e261d5b9c26557200caa105650652022-04-25 9:09:4772 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x16ecb18ed3f33be5a635008dbdb3bccca34724e86b67e261d5b9c26557200caa105650652022-04-25 9:09:4772 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x16ecb18ed3f33be5a635008dbdb3bccca34724e86b67e261d5b9c26557200caa105650652022-04-25 9:09:4772 days 9 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xc331e3e0bbe0b55fe3a50a14697f8b0cdb14e5971de80106f1d6535c82159e44104168582022-03-30 12:17:5898 days 6 hrs ago 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40x580d2ddb6ed71c23059d5d83891d525a3b750a2b0.00306897 Ether
0xc331e3e0bbe0b55fe3a50a14697f8b0cdb14e5971de80106f1d6535c82159e44104168582022-03-30 12:17:5898 days 6 hrs ago 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd4 0x8a753747a1fa494ec906ce90e9f37563a8af630e0 Ether
0xc331e3e0bbe0b55fe3a50a14697f8b0cdb14e5971de80106f1d6535c82159e44104168582022-03-30 12:17:5898 days 6 hrs ago 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd4 0x8a753747a1fa494ec906ce90e9f37563a8af630e0 Ether
0x8de56545937ee22650fa4e2e3ff4cdb0087c6d435265d5d996eed8cc73fd7a98103849422022-03-24 23:11:47103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x8de56545937ee22650fa4e2e3ff4cdb0087c6d435265d5d996eed8cc73fd7a98103849422022-03-24 23:11:47103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x8de56545937ee22650fa4e2e3ff4cdb0087c6d435265d5d996eed8cc73fd7a98103849422022-03-24 23:11:47103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x0d4a0bd2136f8bfa4ebe62c4b6f9a70595ccb8740cef796c017540d22b4739ef103849392022-03-24 23:11:02103 days 19 hrs ago 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd4 0x8a753747a1fa494ec906ce90e9f37563a8af630e0 Ether
0x0d4a0bd2136f8bfa4ebe62c4b6f9a70595ccb8740cef796c017540d22b4739ef103849392022-03-24 23:11:02103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x0d4a0bd2136f8bfa4ebe62c4b6f9a70595ccb8740cef796c017540d22b4739ef103849392022-03-24 23:11:02103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x0d4a0bd2136f8bfa4ebe62c4b6f9a70595ccb8740cef796c017540d22b4739ef103849392022-03-24 23:11:02103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0x0d4a0bd2136f8bfa4ebe62c4b6f9a70595ccb8740cef796c017540d22b4739ef103849392022-03-24 23:11:02103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xa9d956bb0a3655d0af96f0d567f273cd630bd11bf51482b39654d93fa23838f9103849292022-03-24 23:08:32103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xa9d956bb0a3655d0af96f0d567f273cd630bd11bf51482b39654d93fa23838f9103849292022-03-24 23:08:32103 days 19 hrs ago 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd4 0x8a753747a1fa494ec906ce90e9f37563a8af630e0 Ether
0xa9d956bb0a3655d0af96f0d567f273cd630bd11bf51482b39654d93fa23838f9103849292022-03-24 23:08:32103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xa9d956bb0a3655d0af96f0d567f273cd630bd11bf51482b39654d93fa23838f9103849292022-03-24 23:08:32103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xa9d956bb0a3655d0af96f0d567f273cd630bd11bf51482b39654d93fa23838f9103849292022-03-24 23:08:32103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
0xa9d956bb0a3655d0af96f0d567f273cd630bd11bf51482b39654d93fa23838f9103849292022-03-24 23:08:32103 days 19 hrs ago 0x66b26f2778e73ff1c638a5f98cc9c8267cfff539 0x39e389a18d5bdd00cbeac36c9857bca50fd72bd40 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FathomyachtClub

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
byzantium EvmVersion
File 1 of 23 : FathomyachtClub.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract FathomyachtClub is ERC721URIStorage, ERC2981, Ownable, ReentrancyGuard, AccessControlEnumerable {
	  // Protect uint using safemath
  using SafeMath for uint256;  

  uint256 public MAX_TOKEN = 10000;
  uint256[] private _tokenIds = [8000, 0, 2000, 4000, 6000];
  uint256[] private _tokens;
  // Mapping that returns tokens array of a holder
  mapping(address => uint256[]) private _tokensOfholder;

	// Log more in depth events such as withdrawals and cancelled txns
  event LogWithdrawal(address indexed withdrawer, address indexed withdrawalAccount, uint amount);
  event LogCanceled();

  // mapping for token to tier number(0: power, 1: yacht, 2: prestige)
  mapping(uint256 => uint8) public _tokenToTier;

  // NFT prices in USD, mapping for tier to price(0: power, 1: yacht, 2: prestige)
  uint256[] private NFT_PRICE = [50, 100, 150, 9999, 9999];
  uint256[] private PRESALE_TIER_MINT_LIMIT = [100, 100, 50, 0, 0];
  uint256[] private PUBLIC_SALE_TIER_MINT_LIMIT = [900, 900, 950, 0, 0];
  // 0: presale start block, 1: public sale start block
  uint256[] private EVENT_BLOCK = [10264904, 10437473];
  // Mapping from address to minted number of NFTs(0: power, 1: yacht, 2: prestige)
  mapping(uint8 => uint256) private _preSaleMintCounter;
  // Mapping from address to minted number of NFTs(0: power, 1: yacht, 2: prestige)
  mapping(uint8 => uint256) private _publicSaleMintCounter;
  // Mapping from address to white list flag(1: added, 0: removed)
  mapping(address => uint8) private _whitelister;

  AggregatorV3Interface internal priceFeed;

  constructor() ERC721("Fathom Yacht Club", "FYC") {
    _setDefaultRoyalty(msg.sender, 1000);
    priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
  }

  modifier ableMintBatch(uint256 number, uint8 tierNumber) {
    require(NFT_PRICE[tierNumber] != 0, "Tier price is not set.");
    require(number <= 2, "You are not allowed to buy more than 2 tokens at once.");
    require(tierNumber >= 0 && tierNumber <= 4, "Invalied tierNumber of array.");
    require(MAX_TOKEN > number + totalSupply() + 1, "Not enough tokens left to buy.");

    uint8 blockStatus = checkBlock(msg.sender);
    // uint8 blockStatus = 1;
    require(blockStatus > 0, "Not available to mint.");
    _;
  }

  modifier ableGetOrSetMintLimit(uint8 _saleNumber, uint8 _tierNumber) {
    require(_saleNumber >= 1 && _saleNumber <= 2, "saleNumber must be larger than 0. 1: Presale, 2: Public sale");
    require(_tierNumber >= 0 && _tierNumber <= 4, "Invalied tierNumber of array.");
    _;
  }

  function checkBlock(address pm_address) internal view returns(uint8) {
    if (block.number >= EVENT_BLOCK[1]) return 2;
    if (block.number >= EVENT_BLOCK[0]) {
      if(_whitelister[pm_address]== 1) return 1;
    }

    return 0;
  }

  function addWhiteList(address[] memory lsts) public onlyOwner {
    uint256 new_len = lsts.length;
    for(uint256 i=0; i<new_len; i++) {
      _whitelister[lsts[i]] = 1;
    }
  }

  function removeWhiteList(address[] memory lsts) public onlyOwner {
    uint256 new_len = lsts.length;
    for(uint256 i=0; i<new_len; i++) {
      _whitelister[lsts[i]] = 0;
    }
  }

  function getTierNumberOf(uint256 _tokenId) public view returns(uint8) {
    return _tokenToTier[_tokenId];
  }

  function getTierPrice(uint8 tierNumber) public view returns(uint256) {
    require(tierNumber >= 0 && tierNumber <= 4, "Invalied tierNumber of array");
    return (NFT_PRICE[tierNumber] * (10 ** 26)) / uint256(getLatestPrice());
  }

  function setTierPrice(uint256 price, uint8 tierNumber) external onlyOwner {
    require(tierNumber >= 0 && tierNumber <= 4, "Invalied tierNumber of array.");
    NFT_PRICE[tierNumber] = price;
  }

  function setMaxLimit(uint256 limit) external onlyOwner {
    MAX_TOKEN = limit;
  }

  /**
    * @dev Set tier mint limit per sale season
    *
    * @param _saleNumber 1: Presale, 2: Public Sale
    * @param _tierNumber 0: Power, 1: Yacht, 2: Prestige, 3: Ultra, 4: Reserve
    */
  function getTierMintLimit(uint8 _saleNumber, uint8 _tierNumber) external view ableGetOrSetMintLimit(_saleNumber, _tierNumber) returns(uint256) {
    if (_saleNumber == 1) return PRESALE_TIER_MINT_LIMIT[_tierNumber];
    else return PUBLIC_SALE_TIER_MINT_LIMIT[_tierNumber];
  }

  /**
    * @dev Set tier mint limit per sale season
    *
    * @param _saleNumber 1: Presale, 2: Public Sale
    * @param _limit target address that will receive the tokens
    * @param _tierNumber 0: Power, 1: Yacht, 2: Prestige, 3: Ultra, 4: Reserve
    */
  function setTierMintLimit(uint8 _saleNumber, uint256 _limit, uint8 _tierNumber) external onlyOwner ableGetOrSetMintLimit(_saleNumber, _tierNumber) {
    if (_saleNumber == 1) PRESALE_TIER_MINT_LIMIT[_tierNumber] = _limit;
    else PUBLIC_SALE_TIER_MINT_LIMIT[_tierNumber] = _limit;
  }

  /**
    * @dev Set tier mint limit per sale season
    *
    * @param _saleNumber 1: Presale, 2: Public Sale
    * @param _blockNumber Block number of sale season
    */
  function setSaleEvent(uint8 _saleNumber, uint256 _blockNumber) external onlyOwner {
    require(_saleNumber >= 1 && _saleNumber <= 2, "saleNumber must be larger than 0. 1: Presale, 2: Public sale");
    EVENT_BLOCK[_saleNumber - 1] = _blockNumber;
  }

  function withDraw() nonReentrant external onlyOwner {
    address payable tgt = payable(owner());
    (bool success1, ) = tgt.call{value:address(this).balance}("");
    require(success1, "Failed to Withdraw Ether");
  }

  function _coreMintBatch(address _to, uint8 tierNumber, uint256 number) internal returns (uint256) {
    uint256[] storage tierMintLimit = PRESALE_TIER_MINT_LIMIT;
    mapping(uint8 => uint256) storage tierMintCounter = _preSaleMintCounter;
    // use public sale variables if the current date is after public sale started
    if (block.number >= EVENT_BLOCK[1]) {
      tierMintLimit = PUBLIC_SALE_TIER_MINT_LIMIT;
      tierMintCounter = _publicSaleMintCounter;
    }
    require(tierMintCounter[tierNumber] < tierMintLimit[tierNumber], "Overflow maximum mint limitation.");

    uint256 newItemId = 0;

    for (uint256 i = 0; i < number; i++) {
      _tokenIds[tierNumber]++;
      newItemId = _tokenIds[tierNumber];
      _mint(_to, newItemId);
      _tokenToTier[newItemId] = tierNumber;
      _tokensOfholder[_to].push(newItemId);
      _tokens.push(newItemId);
    }

    tierMintCounter[tierNumber] = tierMintCounter[tierNumber] + number;

    return newItemId;
  }

  function mintBatch(uint256 number, uint8 tierNumber) public nonReentrant  payable ableMintBatch(number, tierNumber) returns(uint256) {
    require(msg.value >= getTierPrice(tierNumber) * number, "Amount of ether sent not correct.");

    // refund the remainder
    address payable tgt = payable(msg.sender);
    (bool success1, ) = tgt.call{ value: msg.value - getTierPrice(tierNumber) * number }("");
    require(success1, "Failed to refund");

	  // reject payments of 0 ETH
    if (msg.value == 0) revert();

    uint256 newItemId = _coreMintBatch(msg.sender, tierNumber, number);

    return newItemId;
  }

  function mintTo(address to) external payable {
    uint8 tierNumber = getTierNumberByPrice(msg.value);
    require(tierNumber >= 0 && tierNumber <= 4, "Amount of ether sent is not enough.");
    require(MAX_TOKEN > totalSupply() + 1, "Not enough tokens left to buy.");

    _coreMintBatch(to, tierNumber, 1);
  }

  function getTierNumberByPrice(uint256 _price) public view returns (uint8) {
    uint8 tierNumber = 255;

    for(uint8 i = 0; i < NFT_PRICE.length; i++) {
      uint256 nftPrice = (NFT_PRICE[i] * (10 ** 26)) / uint256(getLatestPrice());
      if (_price >= nftPrice) tierNumber = i;
    }

    return tierNumber;
  }

  function getTokens() external view returns(uint256[] memory) {
    return _tokens;
  }

  function getTokensOfHolder(address _address) external view returns(uint256[] memory) {
    return _tokensOfholder[_address];
  }

  function totalSupply() public view returns(uint256) {
    uint256 total = 0;
    for(uint8 i = 0; i < 5; i++) {
      total += (_preSaleMintCounter[i] + _publicSaleMintCounter[i]);
    }
    
    return total;
  }

  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981, AccessControlEnumerable) returns (bool) {
    return super.supportsInterface(interfaceId);
  }

  /**
    * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token.
    */
  function _burn(uint256 tokenId) internal virtual override {
    super._burn(tokenId);
    _resetTokenRoyalty(tokenId);
  }

  function setRoality(address receiver, uint96 feeNumerator) external onlyOwner {
    _setDefaultRoyalty(receiver, feeNumerator);
  }

  function transferFrom(
      address from,
      address to,
      uint256 tokenId
  ) public override {
      //solhint-disable-next-line max-line-length
      require(_isApprovedOrOwner(_msgSender(), tokenId), "FYC: transfer caller is not owner nor approved");

      for(uint256 i = 0; i < _tokensOfholder[from].length; i++) {
        if (_tokensOfholder[from][i] == tokenId) {
          _tokensOfholder[to].push(_tokensOfholder[from][i]);
          _tokensOfholder[from][i] = _tokensOfholder[from][_tokensOfholder[from].length - 1];
          _tokensOfholder[from].pop();
        }
      }

      _transfer(from, to, tokenId);
  }

  function getLatestPrice() public view returns (int) {
    (,int price,,,) = priceFeed.latestRoundData();
    return price;
  }

  function _baseURI() internal pure override returns (string memory) {
    return "https://fyc.mypinata.cloud/ipfs/QmbhXRfyS53JKMpRQBSgs4s4jpTZGLhWPVcrtkYqHvKXQE/";
  }
}

File 2 of 23 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 3 of 23 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 substraction 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 4 of 23 : 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 5 of 23 : 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 6 of 23 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 7 of 23 : 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 8 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 23 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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)
        external
        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:
     *
     * - `tokenId` must be already minted.
     * - `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 10 of 23 : 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 11 of 23 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 12 of 23 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 14 of 23 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // 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 Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @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 ||
            super.supportsInterface(interfaceId);
    }

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

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @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 = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_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 {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _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 {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: 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`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * 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
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @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.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 15 of 23 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 16 of 23 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./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 payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 17 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 18 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

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

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

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

File 19 of 23 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 20 of 23 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 21 of 23 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

File 22 of 23 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 23 of 23 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

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

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":[],"name":"LogCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":true,"internalType":"address","name":"withdrawalAccount","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogWithdrawal","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokenToTier","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"lsts","type":"address[]"}],"name":"addWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_saleNumber","type":"uint8"},{"internalType":"uint8","name":"_tierNumber","type":"uint8"}],"name":"getTierMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getTierNumberByPrice","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTierNumberOf","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"tierNumber","type":"uint8"}],"name":"getTierPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getTokensOfHolder","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","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":"number","type":"uint256"},{"internalType":"uint8","name":"tierNumber","type":"uint8"}],"name":"mintBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"lsts","type":"address[]"}],"name":"removeWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setMaxLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setRoality","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_saleNumber","type":"uint8"},{"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"setSaleEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_saleNumber","type":"uint8"},{"internalType":"uint256","name":"_limit","type":"uint256"},{"internalType":"uint8","name":"_tierNumber","type":"uint8"}],"name":"setTierMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint8","name":"tierNumber","type":"uint8"}],"name":"setTierPrice","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":"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":[],"name":"withDraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

612710600d55610120604052611f406080908152600060a0526107d060c052610fa060e052611770610100526200003b90600e90600562000405565b506040805160a081018252603281526064602082015260969181019190915261270f6060820181905260808201526200007990601290600562000405565b506040805160a081018252606480825260208201526032918101919091526000606082018190526080820152620000b59060139060056200045b565b506040805160a08101825261038480825260208201526103b6918101919091526000606082018190526080820152620000f390601490600562000405565b5060408051808201909152629ca1488152629f436160208201526200011d9060159060026200049e565b503480156200012b57600080fd5b50604080518082018252601181527f466174686f6d20596163687420436c756200000000000000000000000000000060208083019182528351808501909452600384527f4659430000000000000000000000000000000000000000000000000000000000908401528151919291620001a691600091620004e3565b508051620001bc906001906020840190620004e3565b505050620001eb620001dc62000233640100000000026401000000009004565b64010000000062000237810204565b6001600a5562000207336103e864010000000062000289810204565b60198054600160a060020a031916738a753747a1fa494ec906ce90e9f37563a8af630e179055620005cd565b3390565b60098054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200029c640100000000620003ff810204565b6001606060020a0316816001606060020a0316111562000343576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c6550726963650000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600160a060020a038216620003b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200033a565b60408051808201909152600160a060020a039092168083526001606060020a0390911660209092018290527401000000000000000000000000000000000000000090910217600755565b61271090565b82805482825590600052602060002090810192821562000449579160200282015b8281111562000449578251829061ffff1690559160200191906001019062000426565b506200045792915062000560565b5090565b82805482825590600052602060002090810192821562000449579160200282015b8281111562000449578251829060ff169055916020019190600101906200047c565b82805482825590600052602060002090810192821562000449579160200282015b8281111562000449578251829062ffffff16905591602001919060010190620004bf565b828054620004f19062000577565b90600052602060002090601f01602090048101928262000515576000855562000449565b82601f106200053057805160ff191683800117855562000449565b8280016001018555821562000449579182015b828111156200044957825182559160200191906001019062000543565b5b8082111562000457576000815560010162000561565b6002810460018216806200058c57607f821691505b60208210811415620005c7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b613ea380620005dd6000396000f3fe60806040526004361061028f576000357c010000000000000000000000000000000000000000000000000000000090048063669aa2a31161016c578063a217fddf116100de578063c87b56dd11610097578063c87b56dd1461079e578063ca15c873146107be578063d547741f146107de578063e240a6ca146107fe578063e985e9c51461082e578063f2fde38b1461087757600080fd5b8063a217fddf14610701578063a22cb46514610716578063aa6ca80814610736578063b88d4fde1461074b578063bf8bcee41461076b578063c1a071f11461078b57600080fd5b80638da5cb5b116101305780638da5cb5b146106595780638e15f473146106775780639010d07c1461068c57806391d14854146106ac578063956c9c6d146106cc57806395d89b41146106ec57600080fd5b8063669aa2a3146105cb5780636e1bd323146105fb57806370a0823114610611578063715018a614610631578063755edd171461064657600080fd5b80632f2ff15d116102055780634815df1d116101c95780634815df1d146104fe5780634c70821c1461051e5780635586402d1461053e5780635e1045ec1461055e5780636352211e1461057e57806364e4907c1461059e57600080fd5b80632f2ff15d1461044c57806336568abe1461046c578063397457911461048c578063423d8922146104ac57806342842e0e146104de57600080fd5b80630fdb1c10116102575780630fdb1c101461036557806318160ddd1461037a578063196834f01461039d57806323b872dd146103bd578063248a9ca3146103dd5780632a55205a1461040d57600080fd5b806301ffc9a71461029457806306231317146102c957806306fdde03146102eb578063081812fc1461030d578063095ea7b314610345575b600080fd5b3480156102a057600080fd5b506102b46102af366004613504565b610897565b60405190151581526020015b60405180910390f35b3480156102d557600080fd5b506102e96102e4366004613537565b6108a8565b005b3480156102f757600080fd5b50610300610946565b6040516102c091906135b9565b34801561031957600080fd5b5061032d6103283660046135cc565b6109d8565b604051600160a060020a0390911681526020016102c0565b34801561035157600080fd5b506102e96103603660046135fc565b610a81565b34801561037157600080fd5b506102e9610bb9565b34801561038657600080fd5b5061038f610d06565b6040519081526020016102c0565b3480156103a957600080fd5b506102e96103b8366004613618565b610d64565b3480156103c957600080fd5b506102e96103d8366004613654565b610e50565b3480156103e957600080fd5b5061038f6103f83660046135cc565b6000908152600b602052604090206001015490565b34801561041957600080fd5b5061042d610428366004613690565b61105e565b60408051600160a060020a0390931683526020830191909152016102c0565b34801561045857600080fd5b506102e96104673660046136b2565b61113b565b34801561047857600080fd5b506102e96104873660046136b2565b611161565b34801561049857600080fd5b506102e96104a7366004613728565b6111f0565b3480156104b857600080fd5b506104cc6104c73660046135cc565b611295565b60405160ff90911681526020016102c0565b3480156104ea57600080fd5b506102e96104f9366004613654565b61131a565b34801561050a57600080fd5b506102e96105193660046137d4565b611335565b34801561052a57600080fd5b5061038f61053936600461381c565b61136c565b34801561054a57600080fd5b5061038f610559366004613846565b611420565b34801561056a57600080fd5b506102e9610579366004613728565b6114c2565b34801561058a57600080fd5b5061032d6105993660046135cc565b611567565b3480156105aa57600080fd5b506105be6105b9366004613861565b6115f5565b6040516102c0919061387c565b3480156105d757600080fd5b506104cc6105e63660046135cc565b60009081526011602052604090205460ff1690565b34801561060757600080fd5b5061038f600d5481565b34801561061d57600080fd5b5061038f61062c366004613861565b611661565b34801561063d57600080fd5b506102e96116fe565b6102e9610654366004613861565b611737565b34801561066557600080fd5b50600954600160a060020a031661032d565b34801561068357600080fd5b5061038f611833565b34801561069857600080fd5b5061032d6106a7366004613690565b6118d4565b3480156106b857600080fd5b506102b46106c73660046136b2565b6118f3565b3480156106d857600080fd5b506102e96106e73660046138c0565b61191e565b3480156106f857600080fd5b50610300611989565b34801561070d57600080fd5b5061038f600081565b34801561072257600080fd5b506102e96107313660046138e3565b611998565b34801561074257600080fd5b506105be6119a3565b34801561075757600080fd5b506102e9610766366004613914565b6119fa565b34801561077757600080fd5b506102e96107863660046135cc565b611a8b565b61038f6107993660046138c0565b611abd565b3480156107aa57600080fd5b506103006107b93660046135cc565b611e73565b3480156107ca57600080fd5b5061038f6107d93660046135cc565b611ffc565b3480156107ea57600080fd5b506102e96107f93660046136b2565b612013565b34801561080a57600080fd5b506104cc6108193660046135cc565b60116020526000908152604090205460ff1681565b34801561083a57600080fd5b506102b46108493660046139d4565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561088357600080fd5b506102e9610892366004613861565b612039565b60006108a2826120f1565b92915050565b600954600160a060020a031633146108de5760405160e560020a62461bcd0281526004016108d5906139fe565b60405180910390fd5b60018260ff16101580156108f6575060028260ff1611155b6109155760405160e560020a62461bcd0281526004016108d590613a33565b806015610923600185613aa9565b60ff168154811061093657610936613acc565b6000918252602090912001555050565b60606000805461095590613ae5565b80601f016020809104026020016040519081016040528092919081815260200182805461098190613ae5565b80156109ce5780601f106109a3576101008083540402835291602001916109ce565b820191906000526020600020905b8154815290600101906020018083116109b157829003601f168201915b5050505050905090565b600081815260026020526040812054600160a060020a0316610a655760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016108d5565b50600090815260046020526040902054600160a060020a031690565b6000610a8c82611567565b905080600160a060020a031683600160a060020a03161415610b195760405160e560020a62461bcd02815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016108d5565b33600160a060020a0382161480610b355750610b358133610849565b610baa5760405160e560020a62461bcd02815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108d5565b610bb4838361212f565b505050565b6002600a541415610c0f5760405160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d5565b6002600a55600954600160a060020a03163314610c415760405160e560020a62461bcd0281526004016108d5906139fe565b6000610c55600954600160a060020a031690565b604051909150600090600160a060020a038316903031908381818185875af1925050503d8060008114610ca4576040519150601f19603f3d011682016040523d82523d6000602084013e610ca9565b606091505b5050905080610cfd5760405160e560020a62461bcd02815260206004820152601860248201527f4661696c656420746f205769746864726177204574686572000000000000000060448201526064016108d5565b50506001600a55565b600080805b60058160ff161015610d5e5760ff8116600090815260176020908152604080832054601690925290912054610d409190613b1d565b610d4a9083613b1d565b915080610d5681613b35565b915050610d0b565b50919050565b600954600160a060020a03163314610d915760405160e560020a62461bcd0281526004016108d5906139fe565b828160018260ff1610158015610dab575060028260ff1611155b610dca5760405160e560020a62461bcd0281526004016108d590613a33565b60048160ff161115610df15760405160e560020a62461bcd0281526004016108d590613b55565b8460ff1660011415610e25578360138460ff1681548110610e1457610e14613acc565b600091825260209091200155610e49565b8360148460ff1681548110610e3c57610e3c613acc565b6000918252602090912001555b5050505050565b610e5a33826121aa565b610ecf5760405160e560020a62461bcd02815260206004820152602e60248201527f4659433a207472616e736665722063616c6c6572206973206e6f74206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016108d5565b60005b600160a060020a03841660009081526010602052604090205481101561105257600160a060020a0384166000908152601060205260409020805483919083908110610f1f57610f1f613acc565b9060005260206000200154141561104057600160a060020a0380841660009081526010602052604080822092871682529020805483908110610f6357610f63613acc565b60009182526020808320909101548354600181810186559484528284200155600160a060020a0387168252601090526040902080549091610fa391613b8c565b81548110610fb357610fb3613acc565b90600052602060002001546010600086600160a060020a0316600160a060020a031681526020019081526020016000208281548110610ff457610ff4613acc565b6000918252602080832090910192909255600160a060020a038616815260109091526040902080548061102957611029613ba3565b600190038181906000526020600020016000905590555b8061104a81613bbc565b915050610ed2565b50610bb48383836122b1565b6000828152600860209081526040808320815180830190925254600160a060020a038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916110ff575060408051808201909152600754600160a060020a03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090611123906bffffffffffffffffffffffff1687613bd7565b61112d9190613c0f565b915196919550909350505050565b6000828152600b60205260409020600101546111578133612491565b610bb483836124f8565b600160a060020a03811633146111e25760405160e560020a62461bcd02815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108d5565b6111ec828261251a565b5050565b600954600160a060020a0316331461121d5760405160e560020a62461bcd0281526004016108d5906139fe565b805160005b81811015610bb45760006018600085848151811061124257611242613acc565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550808061128d90613bbc565b915050611222565b600060ff815b60125460ff821610156113135760006112b2611833565b60128360ff16815481106112c8576112c8613acc565b90600052602060002001546a52b7d2dcc80cd2e40000006112e99190613bd7565b6112f39190613c0f565b9050808510611300578192505b508061130b81613b35565b91505061129b565b5092915050565b610bb4838383604051806020016040528060008152506119fa565b600954600160a060020a031633146113625760405160e560020a62461bcd0281526004016108d5906139fe565b6111ec828261253c565b6000828260018260ff1610158015611388575060028260ff1611155b6113a75760405160e560020a62461bcd0281526004016108d590613a33565b60048160ff1611156113ce5760405160e560020a62461bcd0281526004016108d590613b55565b8460ff16600114156114025760138460ff16815481106113f0576113f0613acc565b90600052602060002001549250611418565b60148460ff16815481106113f0576113f0613acc565b505092915050565b600060048260ff1611156114795760405160e560020a62461bcd02815260206004820152601c60248201527f496e76616c69656420746965724e756d626572206f662061727261790000000060448201526064016108d5565b611481611833565b60128360ff168154811061149757611497613acc565b90600052602060002001546a52b7d2dcc80cd2e40000006114b89190613bd7565b6108a29190613c0f565b600954600160a060020a031633146114ef5760405160e560020a62461bcd0281526004016108d5906139fe565b805160005b81811015610bb45760016018600085848151811061151457611514613acc565b6020026020010151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550808061155f90613bbc565b9150506114f4565b600081815260026020526040812054600160a060020a0316806108a25760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108d5565b600160a060020a03811660009081526010602090815260409182902080548351818402810184019094528084526060939283018282801561165557602002820191906000526020600020905b815481526020019060010190808311611641575b50505050509050919050565b6000600160a060020a0382166116e25760405160e560020a62461bcd02815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016108d5565b50600160a060020a031660009081526003602052604090205490565b600954600160a060020a0316331461172b5760405160e560020a62461bcd0281526004016108d5906139fe565b611735600061266d565b565b600061174234611295565b905060048160ff1611156117c15760405160e560020a62461bcd02815260206004820152602360248201527f416d6f756e74206f662065746865722073656e74206973206e6f7420656e6f7560448201527f67682e000000000000000000000000000000000000000000000000000000000060648201526084016108d5565b6117c9610d06565b6117d4906001613b1d565b600d54116118275760405160e560020a62461bcd02815260206004820152601e60248201527f4e6f7420656e6f75676820746f6b656e73206c65667420746f206275792e000060448201526064016108d5565b610bb4828260016126cc565b600080601960009054906101000a9004600160a060020a0316600160a060020a031663feaf968c6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160a060405180830381865afa1580156118a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c99190613c3d565b509195945050505050565b6000828152600c602052604081206118ec90836128e0565b9392505050565b6000918252600b60209081526040808420600160a060020a0393909316845291905290205460ff1690565b600954600160a060020a0316331461194b5760405160e560020a62461bcd0281526004016108d5906139fe565b60048160ff1611156119725760405160e560020a62461bcd0281526004016108d590613b55565b8160128260ff168154811061093657610936613acc565b60606001805461095590613ae5565b6111ec3383836128ec565b6060600f8054806020026020016040519081016040528092919081815260200182805480156109ce57602002820191906000526020600020905b8154815260200190600101908083116119dd575050505050905090565b611a0433836121aa565b611a795760405160e560020a62461bcd02815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108d5565b611a85848484846129be565b50505050565b600954600160a060020a03163314611ab85760405160e560020a62461bcd0281526004016108d5906139fe565b600d55565b60006002600a541415611b155760405160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d5565b6002600a81905550828260128160ff1681548110611b3557611b35613acc565b906000526020600020015460001415611b935760405160e560020a62461bcd02815260206004820152601660248201527f54696572207072696365206973206e6f74207365742e0000000000000000000060448201526064016108d5565b6002821115611c0d5760405160e560020a62461bcd02815260206004820152603660248201527f596f7520617265206e6f7420616c6c6f77656420746f20627579206d6f72652060448201527f7468616e203220746f6b656e73206174206f6e63652e0000000000000000000060648201526084016108d5565b60048160ff161115611c345760405160e560020a62461bcd0281526004016108d590613b55565b611c3c610d06565b611c469083613b1d565b611c51906001613b1d565b600d5411611ca45760405160e560020a62461bcd02815260206004820152601e60248201527f4e6f7420656e6f75676820746f6b656e73206c65667420746f206275792e000060448201526064016108d5565b6000611caf336129f4565b905060008160ff1611611d075760405160e560020a62461bcd02815260206004820152601660248201527f4e6f7420617661696c61626c6520746f206d696e742e0000000000000000000060448201526064016108d5565b85611d1186611420565b611d1b9190613bd7565b341015611d935760405160e560020a62461bcd02815260206004820152602160248201527f416d6f756e74206f662065746865722073656e74206e6f7420636f727265637460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016108d5565b3360008188611da189611420565b611dab9190613bd7565b611db59034613b8c565b604051600081818185875af1925050503d8060008114611df1576040519150601f19603f3d011682016040523d82523d6000602084013e611df6565b606091505b5050905080611e4a5760405160e560020a62461bcd02815260206004820152601060248201527f4661696c656420746f20726566756e640000000000000000000000000000000060448201526064016108d5565b34611e5457600080fd5b6000611e6133898b6126cc565b6001600a559998505050505050505050565b600081815260026020526040902054606090600160a060020a0316611f035760405160e560020a62461bcd02815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e00000000000000000000000000000060648201526084016108d5565b60008281526006602052604081208054611f1c90613ae5565b80601f0160208091040260200160405190810160405280929190818152602001828054611f4890613ae5565b8015611f955780601f10611f6a57610100808354040283529160200191611f95565b820191906000526020600020905b815481529060010190602001808311611f7857829003601f168201915b505050505090506000611fa6612a7c565b9050805160001415611fb9575092915050565b815115611feb578082604051602001611fd3929190613c8d565b60405160208183030381529060405292505050919050565b611ff484612a9c565b949350505050565b6000818152600c602052604081206108a290612b87565b6000828152600b602052604090206001015461202f8133612491565b610bb4838361251a565b600954600160a060020a031633146120665760405160e560020a62461bcd0281526004016108d5906139fe565b600160a060020a0381166120e55760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108d5565b6120ee8161266d565b50565b6000600160e060020a031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806108a257506108a282612b91565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038416908117909155819061217182611567565b600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260026020526040812054600160a060020a03166122375760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016108d5565b600061224283611567565b905080600160a060020a031684600160a060020a0316148061227d575083600160a060020a0316612272846109d8565b600160a060020a0316145b80611ff45750600160a060020a0380821660009081526005602090815260408083209388168352929052205460ff16611ff4565b82600160a060020a03166122c482611567565b600160a060020a0316146123435760405160e560020a62461bcd02815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016108d5565b600160a060020a0382166123c15760405160e560020a62461bcd028152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016108d5565b6123cc60008261212f565b600160a060020a03831660009081526003602052604081208054600192906123f5908490613b8c565b9091555050600160a060020a0382166000908152600360205260408120805460019290612423908490613b1d565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61249b82826118f3565b6111ec576124b381600160a060020a03166014612bcf565b6124be836020612bcf565b6040516020016124cf929190613cbc565b60408051601f198184030181529082905260e560020a62461bcd0282526108d5916004016135b9565b6125028282612dd1565b6000828152600c60205260409020610bb49082612e57565b6125248282612e6c565b6000828152600c60205260409020610bb49082612ed3565b6127106bffffffffffffffffffffffff821611156125c55760405160e560020a62461bcd02815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c6550726963650000000000000000000000000000000000000000000060648201526084016108d5565b600160a060020a03821661261e5760405160e560020a62461bcd02815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108d5565b60408051808201909152600160a060020a039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600755565b60098054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b601580546000916013916016919060019081106126eb576126eb613acc565b9060005260206000200154431061270457506014905060175b818560ff168154811061271957612719613acc565b600091825260208083209091015460ff8816835290839052604090912054106127ad5760405160e560020a62461bcd02815260206004820152602160248201527f4f766572666c6f77206d6178696d756d206d696e74206c696d69746174696f6e60448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016108d5565b6000805b8581101561289f57600e8760ff16815481106127cf576127cf613acc565b600091825260208220018054916127e583613bbc565b9190505550600e8760ff168154811061280057612800613acc565b906000526020600020015491506128178883612ee8565b6000828152601160209081526040808320805460ff191660ff8c16179055600160a060020a038b168352601082528220805460018181018355918452918320909101849055600f805491820181559091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018290558061289781613bbc565b9150506127b1565b5060ff86166000908152602083905260409020546128be908690613b1d565b60ff871660009081526020939093526040909220919091559150509392505050565b60006118ec838361303d565b81600160a060020a031683600160a060020a031614156129515760405160e560020a62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108d5565b600160a060020a03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6129c98484846122b1565b6129d584848484613067565b611a855760405160e560020a62461bcd0281526004016108d590613d3d565b60006015600181548110612a0a57612a0a613acc565b90600052602060002001544310612a2357506002919050565b6015600081548110612a3757612a37613acc565b90600052602060002001544310612a7457600160a060020a03821660009081526018602052604090205460ff1660011415612a7457506001919050565b506000919050565b60606040518060800160405280604f8152602001613e1f604f9139905090565b600081815260026020526040902054606090600160a060020a0316612b2c5760405160e560020a62461bcd02815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016108d5565b6000612b36612a7c565b90506000815111612b5657604051806020016040528060008152506118ec565b80612b608461319a565b604051602001612b71929190613c8d565b6040516020818303038152906040529392505050565b60006108a2825490565b6000600160e060020a031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806108a257506108a2826132d3565b60606000612bde836002613bd7565b612be9906002613b1d565b67ffffffffffffffff811115612c0157612c016136de565b6040519080825280601f01601f191660200182016040528015612c2b576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612c6257612c62613acc565b6020010190600160f860020a031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612cad57612cad613acc565b6020010190600160f860020a031916908160001a9053506000612cd1846002613bd7565b612cdc906001613b1d565b90505b6001811115612d7f577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612d1d57612d1d613acc565b1a7f010000000000000000000000000000000000000000000000000000000000000002828281518110612d5257612d52613acc565b6020010190600160f860020a031916908160001a905350601090940493612d7881613d9a565b9050612cdf565b5083156118ec5760405160e560020a62461bcd02815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108d5565b612ddb82826118f3565b6111ec576000828152600b60209081526040808320600160a060020a03851684529091529020805460ff19166001179055612e133390565b600160a060020a031681600160a060020a0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006118ec83600160a060020a038416613311565b612e7682826118f3565b156111ec576000828152600b60209081526040808320600160a060020a0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006118ec83600160a060020a038416613360565b600160a060020a038216612f415760405160e560020a62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108d5565b600081815260026020526040902054600160a060020a031615612fa95760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108d5565b600160a060020a0382166000908152600360205260408120805460019290612fd2908490613b1d565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082600001828154811061305457613054613acc565b9060005260206000200154905092915050565b6000600160a060020a0384163b1561318f576040517f150b7a02000000000000000000000000000000000000000000000000000000008152600160a060020a0385169063150b7a02906130c4903390899088908890600401613db1565b6020604051808303816000875af19250505080156130ff575060408051601f3d908101601f191682019092526130fc91810190613ded565b60015b61315c573d80801561312d576040519150601f19603f3d011682016040523d82523d6000602084013e613132565b606091505b5080516131545760405160e560020a62461bcd0281526004016108d590613d3d565b805181602001fd5b600160e060020a0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611ff4565b506001949350505050565b6060816131da57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561320457806131ee81613bbc565b91506131fd9050600a83613c0f565b91506131de565b60008167ffffffffffffffff81111561321f5761321f6136de565b6040519080825280601f01601f191660200182016040528015613249576020820181803683370190505b5090505b8415611ff45761325e600183613b8c565b915061326b600a86613e0a565b613276906030613b1d565b7f0100000000000000000000000000000000000000000000000000000000000000028183815181106132aa576132aa613acc565b6020010190600160f860020a031916908160001a9053506132cc600a86613c0f565b945061324d565b6000600160e060020a031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806108a257506108a282613453565b6000818152600183016020526040812054613358575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108a2565b5060006108a2565b60008181526001830160205260408120548015613449576000613384600183613b8c565b855490915060009061339890600190613b8c565b90508181146133fd5760008660000182815481106133b8576133b8613acc565b90600052602060002001549050808760000184815481106133db576133db613acc565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061340e5761340e613ba3565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108a2565b60009150506108a2565b6000600160e060020a031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806134b65750600160e060020a031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806108a257507f01ffc9a700000000000000000000000000000000000000000000000000000000600160e060020a03198316146108a2565b600160e060020a0319811681146120ee57600080fd5b60006020828403121561351657600080fd5b81356118ec816134ee565b803560ff8116811461353257600080fd5b919050565b6000806040838503121561354a57600080fd5b61355383613521565b946020939093013593505050565b60005b8381101561357c578181015183820152602001613564565b83811115611a855750506000910152565b600081518084526135a5816020860160208601613561565b601f01601f19169290920160200192915050565b6020815260006118ec602083018461358d565b6000602082840312156135de57600080fd5b5035919050565b8035600160a060020a038116811461353257600080fd5b6000806040838503121561360f57600080fd5b613553836135e5565b60008060006060848603121561362d57600080fd5b61363684613521565b92506020840135915061364b60408501613521565b90509250925092565b60008060006060848603121561366957600080fd5b613672846135e5565b9250613680602085016135e5565b9150604084013590509250925092565b600080604083850312156136a357600080fd5b50508035926020909101359150565b600080604083850312156136c557600080fd5b823591506136d5602084016135e5565b90509250929050565b60e060020a634e487b7102600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613720576137206136de565b604052919050565b6000602080838503121561373b57600080fd5b823567ffffffffffffffff8082111561375357600080fd5b818501915085601f83011261376757600080fd5b813581811115613779576137796136de565b83810291506137898483016136f7565b81815291830184019184810190888411156137a357600080fd5b938501935b838510156137c8576137b9856135e5565b825293850193908501906137a8565b98975050505050505050565b600080604083850312156137e757600080fd5b6137f0836135e5565b915060208301356bffffffffffffffffffffffff8116811461381157600080fd5b809150509250929050565b6000806040838503121561382f57600080fd5b61383883613521565b91506136d560208401613521565b60006020828403121561385857600080fd5b6118ec82613521565b60006020828403121561387357600080fd5b6118ec826135e5565b6020808252825182820181905260009190848201906040850190845b818110156138b457835183529284019291840191600101613898565b50909695505050505050565b600080604083850312156138d357600080fd5b823591506136d560208401613521565b600080604083850312156138f657600080fd5b6138ff836135e5565b91506020830135801515811461381157600080fd5b6000806000806080858703121561392a57600080fd5b613933856135e5565b935060206139428187016135e5565b935060408601359250606086013567ffffffffffffffff8082111561396657600080fd5b818801915088601f83011261397a57600080fd5b81358181111561398c5761398c6136de565b61399e601f8201601f191685016136f7565b915080825289848285010111156139b457600080fd5b808484018584013760008482840101525080935050505092959194509250565b600080604083850312156139e757600080fd5b6139f0836135e5565b91506136d5602084016135e5565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252603c908201527f73616c654e756d626572206d757374206265206c6172676572207468616e203060408201527f2e20313a2050726573616c652c20323a205075626c69632073616c6500000000606082015260800190565b60e060020a634e487b7102600052601160045260246000fd5b600060ff821660ff841680821015613ac357613ac3613a90565b90039392505050565b60e060020a634e487b7102600052603260045260246000fd5b600281046001821680613af957607f821691505b60208210811415610d5e5760e060020a634e487b7102600052602260045260246000fd5b60008219821115613b3057613b30613a90565b500190565b600060ff821660ff811415613b4c57613b4c613a90565b60010192915050565b6020808252601d908201527f496e76616c69656420746965724e756d626572206f662061727261792e000000604082015260600190565b600082821015613b9e57613b9e613a90565b500390565b60e060020a634e487b7102600052603160045260246000fd5b6000600019821415613bd057613bd0613a90565b5060010190565b6000816000190483118215151615613bf157613bf1613a90565b500290565b60e060020a634e487b7102600052601260045260246000fd5b600082613c1e57613c1e613bf6565b500490565b805169ffffffffffffffffffff8116811461353257600080fd5b600080600080600060a08688031215613c5557600080fd5b613c5e86613c23565b9450602086015193506040860151925060608601519150613c8160808701613c23565b90509295509295909350565b60008351613c9f818460208801613561565b835190830190613cb3818360208801613561565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613cf4816017850160208801613561565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613d31816028840160208801613561565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b600081613da957613da9613a90565b506000190190565b6000600160a060020a03808716835280861660208401525083604083015260806060830152613de3608083018461358d565b9695505050505050565b600060208284031215613dff57600080fd5b81516118ec816134ee565b600082613e1957613e19613bf6565b50069056fe68747470733a2f2f6679632e6d7970696e6174612e636c6f75642f697066732f516d6268585266795335334a4b4d705251425367733473346a70545a474c685750566372746b597148764b5851452fa26469706673582212206167d26afaf57472ede7609a78e37449ce2a43ebe2d3f0350a208d71fd4af91b64736f6c634300080b0033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.