ETH Price: $3,955.47 (+1.17%)

Token

Infinity-NFT (INFT)
 

Overview

Max Total Supply

412 INFT

Holders

313

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
thomaswilson.eth
Balance
1 INFT
0x703e50af7e055c6c9ac83d72255caacd62400bca
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
XfaiINFT

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, None license
File 1 of 18 : XfaiINFT.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;

import "ERC721Enumerable.sol";

import "IXfaiINFT.sol";
import "IERC20.sol";
import "IXfaiFactory.sol";
import "IWETH.sol";

/**
 * @title Xfai's Infinity NFT contract
 * @author Xfai
 * @notice XfaiINFT is responsible for minting, boosting, and harvesting INFTs
 */
contract XfaiINFT is IXfaiINFT, ERC721Enumerable {
  /**
   * @notice The WETH address.
   * @dev In the case of a chain ID other than Ethereum, the wrapped ERC20 token address of the chain's native coin
   */
  address private WETH;

  /**
   * @notice The ERC20 token used as the underlying token for the INFT
   */
  address private underlyingToken;

  /**
   * @notice The Factory address of the DEX
   */
  address private factory;

  string private baseURI;

  uint private counter;

  /**
   * @notice The reserve of underlyingToken within the INFT contract
   */
  uint public override reserve;

  /**
   * @notice Total amount of issued shares
   */
  uint public override totalSharesIssued;

  /**
   * @notice Initial reserve set at during deployment. Does count as part of INFT reserve
   */
  uint public override initialReserve;

  uint private constant NOT_ENTERED = 1;
  uint private constant ENTERED = 2;
  uint private status;
  uint private expectedMints;

  /**
   * @notice Mapping from token address to harvested amounts. harvestedBalance shows how much of a token has been harvested so far from the contract.
   */
  mapping(address => uint) public override harvestedBalance;

  /**
   * @notice Mapping from token ID to share
   */
  mapping(uint => uint) public override INFTShares;

  /**
   * @notice Mapping from token address to token ID to token share
   */
  mapping(address => mapping(uint => uint)) public override sharesHarvestedByPool;

  /**
   * @notice Mapping from token address to total share for a token
   */
  mapping(address => uint) public override totalSharesHarvestedByPool;

  /**
   * @notice Functions with the onlyOwner modifier can be called only by the factory owner
   */
  modifier onlyOwner() {
    require(msg.sender == IXfaiFactory(factory).getOwner(), 'XfaiINFT: NOT_OWNER');
    _;
  }

  /**
   * @notice Functions with the lock modifier can be called only once within a transaction
   */
  modifier lock() {
    require(status != ENTERED, 'XfaiINFT: REENTRANT_CALL');
    status = ENTERED;
    _;
    status = NOT_ENTERED;
  }

  /**
   * @notice Construct Xfai's DEX Factory
   * @param _factory The address of the Xfai factory contract
   * @param _WETH the wrapped ETH address
   * @param _underlyingToken The address of the ERC20 token used as the underlying token for the INFT
   * @param _initialReserve The initial reserve used during deployment
   * @param _expectedMints The number of pre-mints before minting is available
   */
  constructor(
    address _factory,
    address _WETH,
    address _underlyingToken,
    uint _initialReserve,
    uint _expectedMints
  ) ERC721('Infinity-NFT', 'INFT') {
    status = NOT_ENTERED;
    factory = _factory;
    WETH = _WETH;
    underlyingToken = _underlyingToken;
    initialReserve = _initialReserve;
    expectedMints = _expectedMints;
    totalSharesIssued = 1; // permanently lock one share to prevent zero divisions
  }

  receive() external payable {
    assert(msg.sender == WETH); // only accept ETH via fallback from the WETH contract
  }

  /**
   * @notice preMint is used to mint the legacy NFTs before minting is enabled
   * @dev Can only be called by the owner
   * @param _legacyLNFTHolders the address array of the legacy nft holders
   * @param _initialShares the share array of the legacy nft holders
   */
  function premint(
    address[] memory _legacyLNFTHolders,
    uint[] memory _initialShares
  ) external override onlyOwner {
    require(counter < expectedMints, 'XfaiINFT: PREMINTS_ENDED');
    require(_initialShares.length == _legacyLNFTHolders.length, 'XfaiINFT: INVALID_VALUES');
    for (uint i = 0; i < _initialShares.length; i++) {
      counter += 1;
      _safeMint(_legacyLNFTHolders[i], counter);
      INFTShares[counter] = _initialShares[i];
      totalSharesIssued += _initialShares[i];
    }
  }

  /**
   * @notice Function used to set the baseURI of the NFT
   * @dev setBaseURI can be called only by the contract owner
   * @param _newBaseURI the new baseURI string for the NFT
   */
  function setBaseURI(string memory _newBaseURI) external override onlyOwner {
    baseURI = _newBaseURI;
  }

  function _baseURI() internal view override returns (string memory) {
    return baseURI;
  }

  /**
   * @notice Function used to fetch contract states
   * @return The reserve used during contract initialization, the reserve of the underlying token, and the total number of shares issued
   */
  function getStates() external view override returns (uint, uint, uint) {
    return (initialReserve, reserve, totalSharesIssued);
  }

  /**
   * @notice Computes the amount of _token fees collected for a given _tokenID
   * @param _tokenID The token ID of an INFT
   * @param _token the address of an ERC20 token
   * @return share2amount The total amount of _token that a given _tokenID can harvest
   * @return inftShare The share of an INFT
   * @return harvestedShares The amount of shares harvested for a given pool
   */
  function shareToTokenAmount(
    uint _tokenID,
    address _token
  ) external view override returns (uint share2amount, uint inftShare, uint harvestedShares) {
    inftShare = INFTShares[_tokenID];
    harvestedShares = sharesHarvestedByPool[_token][_tokenID];
    uint tokenBalance = IERC20(_token).balanceOf(address(this));
    uint share = inftShare - harvestedShares;
    uint totalShare = totalSharesIssued - totalSharesHarvestedByPool[_token];
    share2amount = (tokenBalance * share) / totalShare; // zero divisions not possible
  }

  /**
   * @notice Creates a new INFT, the share of which is determined by the amount of the underlying token sent to the Xfai factory
   * @dev This low-level function should be called from a contract which performs important safety checks
   * @param _to The address to which the newly minted INFT should be sent to
   * @return tokenID The id of the newly minted INFT
   * @return share The share value of the INFT
   */
  function mint(address _to) external override lock returns (uint tokenID, uint share) {
    require(counter >= expectedMints, 'XfaiINFT: PREMINTS_ONGOING');
    uint amount = IERC20(underlyingToken).balanceOf(factory) - reserve;
    require(amount != 0, 'XfaiINFT: INSUFICIENT_AMOUNT');
    counter += 1;
    tokenID = counter;
    reserve += amount;
    share = (1e18 * amount) / (reserve + initialReserve);
    INFTShares[tokenID] = share;
    totalSharesIssued += share;
    _safeMint(_to, tokenID);
    emit Mint(msg.sender, _to, share, tokenID);
  }

  /**
   * @notice Boosts the share value of an INFT, the share of which is determined by the amount of the underlying token sent to the DexfaiFactory
   * @dev This low-level function should be called from a contract which performs important safety checks
   * @param _tokenID The token ID of an INFT
   * @return share The share value added to an INFT
   */
  function boost(uint _tokenID) external override lock returns (uint share) {
    require(_tokenID <= counter, 'XfaiINFT: Inexistent_ID');
    uint amount = IERC20(underlyingToken).balanceOf(factory) - reserve;
    require(amount != 0, 'XfaiINFT: INSUFICIENT_AMOUNT');
    reserve += amount;
    share = (1e18 * amount) / (reserve + initialReserve);
    INFTShares[_tokenID] += share;
    totalSharesIssued += share;
    emit Boost(msg.sender, share, _tokenID);
  }

  /**
   * @notice Harvests the fees (in terms of a given ERC20 token) for a given INFT.
   * @param _token An ERC20 token address
   * @param _tokenID The token ID of an INFT
   * @param _amount The amount of _token to harvest
   */
  function _harvest(
    address _token,
    uint _tokenID,
    uint _amount
  ) private returns (uint harvestedTokenShare) {
    require(ownerOf(_tokenID) == msg.sender, 'XfaiINFT: NOT_INFT_OWNER');
    uint tokenBalance = IERC20(_token).balanceOf(address(this));
    uint share = INFTShares[_tokenID] - sharesHarvestedByPool[_token][_tokenID];
    uint totalShare = totalSharesIssued - totalSharesHarvestedByPool[_token];
    uint share2amount = (tokenBalance * share) / totalShare; // zero divisions not possible
    require(_amount <= share2amount, 'XfaiINFT: AMOUNT_EXCEEDS_SHARE');
    harvestedTokenShare = (share * _amount) / share2amount;
    sharesHarvestedByPool[_token][_tokenID] += harvestedTokenShare;
    totalSharesHarvestedByPool[_token] += harvestedTokenShare;
    harvestedBalance[_token] += _amount;
  }

  /**
   * @notice Harvests INFT fees from the INFT contract
   * @param _token The address of an ERC20 token
   * @param _tokenID The ID of the INFT
   * @param _amount The amount to harvest
   */
  function harvestToken(
    address _token,
    uint _tokenID,
    uint _amount
  ) external override lock returns (uint) {
    uint harvestedTokenShare = _harvest(_token, _tokenID, _amount);
    _safeTransfer(_token, ownerOf(_tokenID), _amount);
    emit HarvestToken(_token, _amount, harvestedTokenShare, _tokenID);
    return _amount;
  }

  /**
   * @notice Harvests INFT fees from the INFT contract
   * @param _tokenID The ID of the INFT
   * @param _amount The amount to harvest
   */
  function harvestETH(uint _tokenID, uint _amount) external override lock returns (uint) {
    uint harvestedTokenShare = _harvest(WETH, _tokenID, _amount);
    IWETH(WETH).withdraw(_amount);
    _safeTransferETH(ownerOf(_tokenID), _amount);
    emit HarvestETH(_amount, harvestedTokenShare, _tokenID);
    return _amount;
  }

  function _safeTransfer(address _token, address _to, uint256 _value) internal {
    require(_token.code.length > 0, 'XfaiINFT: TRANSFER_FAILED');
    (bool success, bytes memory data) = _token.call(
      abi.encodeWithSelector(IERC20.transfer.selector, _to, _value)
    );
    require(success && (data.length == 0 || abi.decode(data, (bool))), 'XfaiINFT: TRANSFER_FAILED');
  }

  function _safeTransferETH(address _to, uint _value) internal {
    (bool success, ) = _to.call{value: _value}(new bytes(0));
    require(success, 'XfaiINFT: ETH_TRANSFER_FAILED');
  }
}

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

pragma solidity ^0.8.0;

import "ERC721.sol";
import "IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
  // Mapping from owner to list of owned token IDs
  mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

  // Mapping from token ID to index of the owner tokens list
  mapping(uint256 => uint256) private _ownedTokensIndex;

  // Array with all token ids, used for enumeration
  uint256[] private _allTokens;

  // Mapping from token id to position in the allTokens array
  mapping(uint256 => uint256) private _allTokensIndex;

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

  /**
   * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
   */
  function tokenOfOwnerByIndex(
    address owner,
    uint256 index
  ) public view virtual override returns (uint256) {
    require(index < ERC721.balanceOf(owner), 'ERC721Enumerable: owner index out of bounds');
    return _ownedTokens[owner][index];
  }

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

  /**
   * @dev See {IERC721Enumerable-tokenByIndex}.
   */
  function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
    require(index < ERC721Enumerable.totalSupply(), 'ERC721Enumerable: global index out of bounds');
    return _allTokens[index];
  }

  /**
   * @dev See {ERC721-_beforeTokenTransfer}.
   */
  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 firstTokenId,
    uint256 batchSize
  ) internal virtual override {
    super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

    if (batchSize > 1) {
      // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
      revert('ERC721Enumerable: consecutive transfers not supported');
    }

    uint256 tokenId = firstTokenId;

    if (from == address(0)) {
      _addTokenToAllTokensEnumeration(tokenId);
    } else if (from != to) {
      _removeTokenFromOwnerEnumeration(from, tokenId);
    }
    if (to == address(0)) {
      _removeTokenFromAllTokensEnumeration(tokenId);
    } else if (to != from) {
      _addTokenToOwnerEnumeration(to, tokenId);
    }
  }

  /**
   * @dev Private function to add a token to this extension's ownership-tracking data structures.
   * @param to address representing the new owner of the given token ID
   * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
   */
  function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
    uint256 length = ERC721.balanceOf(to);
    _ownedTokens[to][length] = tokenId;
    _ownedTokensIndex[tokenId] = length;
  }

  /**
   * @dev Private function to add a token to this extension's token tracking data structures.
   * @param tokenId uint256 ID of the token to be added to the tokens list
   */
  function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
    _allTokensIndex[tokenId] = _allTokens.length;
    _allTokens.push(tokenId);
  }

  /**
   * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
   * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
   * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
   * This has O(1) time complexity, but alters the order of the _ownedTokens array.
   * @param from address representing the previous owner of the given token ID
   * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
   */
  function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
    // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
    // then delete the last slot (swap and pop).

    uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
    uint256 tokenIndex = _ownedTokensIndex[tokenId];

    // When the token to delete is the last token, the swap operation is unnecessary
    if (tokenIndex != lastTokenIndex) {
      uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

      _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
      _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
    }

    // This also deletes the contents at the last position of the array
    delete _ownedTokensIndex[tokenId];
    delete _ownedTokens[from][lastTokenIndex];
  }

  /**
   * @dev Private function to remove a token from this extension's token tracking data structures.
   * This has O(1) time complexity, but alters the order of the _allTokens array.
   * @param tokenId uint256 ID of the token to be removed from the tokens list
   */
  function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
    // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
    // then delete the last slot (swap and pop).

    uint256 lastTokenIndex = _allTokens.length - 1;
    uint256 tokenIndex = _allTokensIndex[tokenId];

    // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
    // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
    // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
    uint256 lastTokenId = _allTokens[lastTokenIndex];

    _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
    _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

    // This also deletes the contents at the last position of the array
    delete _allTokensIndex[tokenId];
    _allTokens.pop();
  }
}

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

pragma solidity ^0.8.0;

import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "Address.sol";
import "Context.sol";
import "Strings.sol";
import "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: address zero is not a valid owner');
    return _balances[owner];
  }

  /**
   * @dev See {IERC721-ownerOf}.
   */
  function ownerOf(uint256 tokenId) public view virtual override returns (address) {
    address owner = _ownerOf(tokenId);
    require(owner != address(0), 'ERC721: invalid token ID');
    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) {
    _requireMinted(tokenId);

    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 overridden 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 token owner or approved for all'
    );

    _approve(to, tokenId);
  }

  /**
   * @dev See {IERC721-getApproved}.
   */
  function getApproved(uint256 tokenId) public view virtual override returns (address) {
    _requireMinted(tokenId);

    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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
   */
  function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
    return _owners[tokenId];
  }

  /**
   * @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 _ownerOf(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) {
    address owner = ERC721.ownerOf(tokenId);
    return (spender == owner ||
      isApprovedForAll(owner, spender) ||
      getApproved(tokenId) == 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, 1);

    // Check that tokenId was not minted by `_beforeTokenTransfer` hook
    require(!_exists(tokenId), 'ERC721: token already minted');

    unchecked {
      // Will not overflow unless all 2**256 token ids are minted to the same owner.
      // Given that tokens are minted one by one, it is impossible in practice that
      // this ever happens. Might change if we allow batch minting.
      // The ERC fails to describe this case.
      _balances[to] += 1;
    }

    _owners[tokenId] = to;

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

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

  /**
   * @dev Destroys `tokenId`.
   * The approval is cleared when the token is burned.
   * This is an internal function that does not check if the sender is authorized to operate on the token.
   *
   * Requirements:
   *
   * - `tokenId` must exist.
   *
   * Emits a {Transfer} event.
   */
  function _burn(uint256 tokenId) internal virtual {
    address owner = ERC721.ownerOf(tokenId);

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

    // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
    owner = ERC721.ownerOf(tokenId);

    // Clear approvals
    delete _tokenApprovals[tokenId];

    unchecked {
      // Cannot overflow, as that would require more tokens to be burned/transferred
      // out than the owner initially received through minting and transferring in.
      _balances[owner] -= 1;
    }
    delete _owners[tokenId];

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

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

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

    // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
    require(ERC721.ownerOf(tokenId) == from, 'ERC721: transfer from incorrect owner');

    // Clear approvals from the previous owner
    delete _tokenApprovals[tokenId];

    unchecked {
      // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
      // `from`'s balance is the number of token held, which is at least one before the current
      // transfer.
      // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
      // all 2**256 token ids to be minted, which in practice is impossible.
      _balances[from] -= 1;
      _balances[to] += 1;
    }
    _owners[tokenId] = to;

    emit Transfer(from, to, tokenId);

    _afterTokenTransfer(from, to, tokenId, 1);
  }

  /**
   * @dev Approve `to` to operate on `tokenId`
   *
   * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.
   */
  function _requireMinted(uint256 tokenId) internal view virtual {
    require(_exists(tokenId), 'ERC721: invalid token ID');
  }

  /**
   * @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 {
          /// @solidity memory-safe-assembly
          assembly {
            revert(add(32, reason), mload(reason))
          }
        }
      }
    } else {
      return true;
    }
  }

  /**
   * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
   * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
   *
   * Calling conditions:
   *
   * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
   * - When `from` is zero, the tokens will be minted for `to`.
   * - When `to` is zero, ``from``'s tokens will be burned.
   * - `from` and `to` are never both zero.
   * - `batchSize` is non-zero.
   *
   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
   */
  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 /* firstTokenId */,
    uint256 batchSize
  ) internal virtual {
    if (batchSize > 1) {
      if (from != address(0)) {
        _balances[from] -= batchSize;
      }
      if (to != address(0)) {
        _balances[to] += batchSize;
      }
    }
  }

  /**
   * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
   * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
   *
   * Calling conditions:
   *
   * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
   * - When `from` is zero, the tokens were minted for `to`.
   * - When `to` is zero, ``from``'s tokens were burned.
   * - `from` and `to` are never both zero.
   * - `batchSize` is non-zero.
   *
   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
   */
  function _afterTokenTransfer(
    address from,
    address to,
    uint256 firstTokenId,
    uint256 batchSize
  ) internal virtual {}
}

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

pragma solidity ^0.8.19;

import "IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
  /**
   * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
   */
  event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

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

  /**
   * @dev Transfers `tokenId` token from `from` to `to`.
   *
   * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
   * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
   * understand this adds an external call which potentially creates a reentrancy vulnerability.
   *
   * Requirements:
   *
   * - `from` cannot be the zero address.
   * - `to` cannot be the zero address.
   * - `tokenId` token must be owned by `from`.
   * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
   *
   * Emits a {Transfer} event.
   */
  function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

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

pragma solidity ^0.8.19;

/**
 * @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 6 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.19;

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

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

pragma solidity ^0.8.19;

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 8 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
   *
   * IMPORTANT: because control is transferred to `recipient`, care must be
   * taken to not create reentrancy vulnerabilities. Consider using
   * {ReentrancyGuard} or the
   * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
   */
  function sendValue(address payable recipient, uint256 amount) internal {
    require(address(this).balance >= amount, 'Address: insufficient balance');

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "OZMath.sol";

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "IERC165.sol";

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

File 13 of 18 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.19;

import "IERC721.sol";

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

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

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

File 14 of 18 : IXfaiINFT.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.19;
import "IERC721Enumerable.sol";

interface IXfaiINFT is IERC721Enumerable {
  function reserve() external view returns (uint);

  function totalSharesIssued() external view returns (uint);

  function initialReserve() external view returns (uint);

  function harvestedBalance(address _token) external view returns (uint);

  function INFTShares(uint _id) external view returns (uint);

  function sharesHarvestedByPool(address _token, uint _id) external view returns (uint);

  function totalSharesHarvestedByPool(address _token) external view returns (uint);

  function setBaseURI(string memory _baseURI) external;

  function getStates() external view returns (uint, uint, uint);

  function shareToTokenAmount(
    uint _tokenID,
    address _token
  ) external view returns (uint share2amount, uint inftShare, uint harvestedShares);

  function premint(address[] memory _legacyLNFTHolders, uint[] memory _initialShares) external;

  function mint(address _to) external returns (uint tokenID, uint share);

  function boost(uint _tokenID) external returns (uint share);

  function harvestToken(address _token, uint _tokenID, uint _amount) external returns (uint);

  function harvestETH(uint _tokenID, uint _amount) external returns (uint);

  event Mint(address indexed from, address indexed to, uint share, uint id);
  event Boost(address indexed from, uint share, uint id);
  event HarvestToken(address token, uint harvestedAmount, uint harvestedShare, uint id);
  event HarvestETH(uint harvestedAmount, uint harvestedShare, uint id);
}

File 15 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
  /**
   * @dev Emitted when `value` tokens are moved from one account (`from`) to
   * another (`to`).
   *
   * Note that `value` may be zero.
   */
  event Transfer(address indexed from, address indexed to, uint256 value);

  /**
   * @dev Emitted when the allowance of a `spender` for an `owner` is set by
   * a call to {approve}. `value` is the new allowance.
   */
  event Approval(address indexed owner, address indexed spender, uint256 value);

  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns the amount of tokens owned by `account`.
   */
  function balanceOf(address account) external view returns (uint256);

  /**
   * @dev Moves `amount` tokens from the caller's account to `to`.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transfer(address to, uint256 amount) external returns (bool);

  /**
   * @dev Returns the remaining number of tokens that `spender` will be
   * allowed to spend on behalf of `owner` through {transferFrom}. This is
   * zero by default.
   *
   * This value changes when {approve} or {transferFrom} are called.
   */
  function allowance(address owner, address spender) external view returns (uint256);

  /**
   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * IMPORTANT: Beware that changing an allowance with this method brings the risk
   * that someone may use both the old and the new allowance by unfortunate
   * transaction ordering. One possible solution to mitigate this race
   * condition is to first reduce the spender's allowance to 0 and set the
   * desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   *
   * Emits an {Approval} event.
   */
  function approve(address spender, uint256 amount) external returns (bool);

  /**
   * @dev Moves `amount` tokens from `from` to `to` using the
   * allowance mechanism. `amount` is then deducted from the caller's
   * allowance.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 16 of 18 : IXfaiFactory.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.19;

interface IXfaiFactory {
  function getPool(address _token) external view returns (address pool);

  function allPools(uint256) external view returns (address pool);

  function poolCodeHash() external pure returns (bytes32);

  function allPoolsLength() external view returns (uint);

  function createPool(address _token) external returns (address pool);

  function setXfaiCore(address _core) external;

  function getXfaiCore() external view returns (address);

  function setOwner(address _owner) external;

  function getOwner() external view returns (address);

  event ChangedOwner(address indexed owner);
  event ChangedCore(address indexed core);
  event Whitelisting(bool state);
  event PoolCreated(address indexed token, address indexed pool, uint allPoolsSize);
}

File 17 of 18 : IWETH.sol
// SPDX-License-Identifier: GPL-3.0-only

pragma solidity ^0.8.19;

import "IERC20Metadata.sol";

interface IWETH is IERC20Metadata {
  function deposit() external payable;

  function transfer(address to, uint value) external returns (bool);

  function withdraw(uint) external;
}

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

pragma solidity ^0.8.0;

import "IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
  /**
   * @dev Returns the name of the token.
   */
  function name() external view returns (string memory);

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

  /**
   * @dev Returns the decimals places of the token.
   */
  function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_underlyingToken","type":"address"},{"internalType":"uint256","name":"_initialReserve","type":"uint256"},{"internalType":"uint256","name":"_expectedMints","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"share","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Boost","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"harvestedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"harvestedShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"HarvestETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"harvestedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"harvestedShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"HarvestToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"share","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Mint","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"INFTShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"boost","outputs":[{"internalType":"uint256","name":"share","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStates","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"harvestETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"harvestToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"harvestedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"_to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"share","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"_legacyLNFTHolders","type":"address[]"},{"internalType":"uint256[]","name":"_initialShares","type":"uint256[]"}],"name":"premint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserve","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"shareToTokenAmount","outputs":[{"internalType":"uint256","name":"share2amount","type":"uint256"},{"internalType":"uint256","name":"inftShare","type":"uint256"},{"internalType":"uint256","name":"harvestedShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"sharesHarvestedByPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalSharesHarvestedByPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSharesIssued","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506040516200406b3803806200406b83398101604081905262000034916200010d565b6040518060400160405280600c81526020016b125b999a5b9a5d1e4b53919560a21b815250604051806040016040528060048152602001631253919560e21b81525081600090816200008791906200020f565b5060016200009682826200020f565b505060016012819055600c80546001600160a01b03199081166001600160a01b03998a1617909155600a8054821697891697909717909655600b8054909616949096169390931790935560115550601355601055620002db565b80516001600160a01b03811681146200010857600080fd5b919050565b600080600080600060a086880312156200012657600080fd5b6200013186620000f0565b94506200014160208701620000f0565b93506200015160408701620000f0565b6060870151608090970151959894975095949392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200019557607f821691505b602082108103620001b657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200020a57600081815260208120601f850160051c81016020861015620001e55750805b601f850160051c820191505b818110156200020657828155600101620001f1565b5050505b505050565b81516001600160401b038111156200022b576200022b6200016a565b62000243816200023c845462000180565b84620001bc565b602080601f8311600181146200027b5760008415620002625750858301515b600019600386901b1c1916600185901b17855562000206565b600085815260208120601f198616915b82811015620002ac578886015182559484019460019091019084016200028b565b5085821015620002cb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b613d8080620002eb6000396000f3fe6080604052600436106101dc5760003560e01c806360f4867411610102578063b88d4fde11610095578063d8ab827411610064578063d8ab827414610608578063e6fd298214610623578063e985e9c514610639578063fab2cb361461068f57600080fd5b8063b88d4fde14610585578063bdba1561146105a5578063c87b56dd146105d2578063cd3293de146105f257600080fd5b8063871f1940116100d1578063871f19401461050357806395d89b4114610523578063a22cb46514610538578063a8b9d9d51461055857600080fd5b806360f48674146104535780636352211e1461048e5780636a627842146104ae57806370a08231146104e357600080fd5b80631b55d19e1161017a5780632f745c59116101495780632f745c59146103d357806342842e0e146103f35780634f6ccce71461041357806355f804b31461043357600080fd5b80631b55d19e1461035357806323b872dd146103735780632dd5a938146103935780632e27e3a7146103b357600080fd5b8063095ea7b3116101b6578063095ea7b3146102ab57806311865c43146102cb57806318160ddd146103115780631ac9afdb1461032657600080fd5b806301ffc9a71461020f57806306fdde0314610244578063081812fc1461026657600080fd5b3661020a57600a5473ffffffffffffffffffffffffffffffffffffffff1633146102085761020861338f565b005b600080fd5b34801561021b57600080fd5b5061022f61022a3660046133ec565b6106a5565b60405190151581526020015b60405180910390f35b34801561025057600080fd5b50610259610701565b60405161023b9190613477565b34801561027257600080fd5b5061028661028136600461348a565b610793565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023b565b3480156102b757600080fd5b506102086102c63660046134c5565b6107c7565b3480156102d757600080fd5b506103036102e63660046134c5565b601660209081526000928352604080842090915290825290205481565b60405190815260200161023b565b34801561031d57600080fd5b50600854610303565b34801561033257600080fd5b506103036103413660046134f1565b60146020526000908152604090205481565b34801561035f57600080fd5b5061030361036e36600461348a565b610958565b34801561037f57600080fd5b5061020861038e36600461350e565b610c18565b34801561039f57600080fd5b506103036103ae36600461354f565b610cb9565b3480156103bf57600080fd5b506102086103ce36600461367e565b610e37565b3480156103df57600080fd5b506103036103ee3660046134c5565b6110f5565b3480156103ff57600080fd5b5061020861040e36600461350e565b6111c4565b34801561041f57600080fd5b5061030361042e36600461348a565b6111df565b34801561043f57600080fd5b5061020861044e3660046137b6565b61129d565b34801561045f57600080fd5b5061047361046e3660046137ff565b6113d2565b6040805193845260208401929092529082015260600161023b565b34801561049a57600080fd5b506102866104a936600461348a565b6114f1565b3480156104ba57600080fd5b506104ce6104c93660046134f1565b61157d565b6040805192835260208301919091520161023b565b3480156104ef57600080fd5b506103036104fe3660046134f1565b61186e565b34801561050f57600080fd5b5061030361051e36600461382f565b61193c565b34801561052f57600080fd5b50610259611a3c565b34801561054457600080fd5b50610208610553366004613872565b611a4b565b34801561056457600080fd5b506103036105733660046134f1565b60176020526000908152604090205481565b34801561059157600080fd5b506102086105a03660046138a0565b611a56565b3480156105b157600080fd5b506103036105c036600461348a565b60156020526000908152604090205481565b3480156105de57600080fd5b506102596105ed36600461348a565b611afe565b3480156105fe57600080fd5b50610303600f5481565b34801561061457600080fd5b50601154600f54601054610473565b34801561062f57600080fd5b5061030360115481565b34801561064557600080fd5b5061022f610654366004613920565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561069b57600080fd5b5061030360105481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806106fb57506106fb82611b65565b92915050565b6060600080546107109061394e565b80601f016020809104026020016040519081016040528092919081815260200182805461073c9061394e565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b5050505050905090565b600061079e82611c48565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006107d2826114f1565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821614806108bd57506108bd8133610654565b610949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161088b565b6109538383611cd6565b505050565b60006002601254036109c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b6002601255600e54821115610a37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f58666169494e46543a20496e6578697374656e745f4944000000000000000000604482015260640161088b565b600f54600b54600c546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526000939291909116906370a0823190602401602060405180830381865afa158015610ab2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad691906139a1565b610ae091906139e9565b905080600003610b4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f58666169494e46543a20494e535546494349454e545f414d4f554e5400000000604482015260640161088b565b80600f6000828254610b5e91906139fc565b9091555050601154600f54610b7391906139fc565b610b8582670de0b6b3a7640000613a0f565b610b8f9190613a26565b915081601560008581526020019081526020016000206000828254610bb491906139fc565b925050819055508160106000828254610bcd91906139fc565b9091555050604080518381526020810185905233917faadc628cb4fd3bb7a62795eb460290459458bdc6f387ffde727c740f42c18337910160405180910390a2506001601255919050565b610c223382611d76565b610cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161088b565b610953838383611e36565b6000600260125403610d27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b6002601255600a54600090610d539073ffffffffffffffffffffffffffffffffffffffff16858561213e565b600a546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810186905291925073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b158015610dc057600080fd5b505af1158015610dd4573d6000803e3d6000fd5b50505050610dea610de4856114f1565b8461243c565b60408051848152602081018390529081018590527ffd1a3a6d5498bdf58109d329c7c185fa6652cb8ae241a662e3772c559c8c86a69060600160405180910390a150506001601255919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec89190613a61565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f58666169494e46543a204e4f545f4f574e455200000000000000000000000000604482015260640161088b565b601354600e5410610fc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205052454d494e54535f454e4445440000000000000000604482015260640161088b565b8151815114611034576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a20494e56414c49445f56414c5545530000000000000000604482015260640161088b565b60005b8151811015610953576001600e600082825461105391906139fc565b9250508190555061107f83828151811061106f5761106f613a7e565b6020026020010151600e54612520565b81818151811061109157611091613a7e565b602002602001015160156000600e548152602001908152602001600020819055508181815181106110c4576110c4613a7e565b6020026020010151601060008282546110dd91906139fc565b909155508190506110ed81613aad565b915050611037565b60006111008361186e565b821061118e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161088b565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b61095383838360405180602001604052806000815250611a56565b60006111ea60085490565b8210611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161088b565b6008828154811061128b5761128b613a7e565b90600052602060002001549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e9190613a61565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f58666169494e46543a204e4f545f4f574e455200000000000000000000000000604482015260640161088b565b600d6113ce8282613b33565b5050565b60008281526015602090815260408083205473ffffffffffffffffffffffffffffffffffffffff8516808552601684528285208786529093528184205491517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152909284916370a0823190602401602060405180830381865afa158015611464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148891906139a1565b9050600061149683856139e9565b73ffffffffffffffffffffffffffffffffffffffff871660009081526017602052604081205460105492935090916114ce91906139e9565b9050806114db8385613a0f565b6114e59190613a26565b95505050509250925092565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806106fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161088b565b6000806002601254036115ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b6002601255601354600e54101561165f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f58666169494e46543a205052454d494e54535f4f4e474f494e47000000000000604482015260640161088b565b600f54600b54600c546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526000939291909116906370a0823190602401602060405180830381865afa1580156116da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fe91906139a1565b61170891906139e9565b905080600003611774576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f58666169494e46543a20494e535546494349454e545f414d4f554e5400000000604482015260640161088b565b6001600e600082825461178791906139fc565b92505081905550600e54925080600f60008282546117a591906139fc565b9091555050601154600f546117ba91906139fc565b6117cc82670de0b6b3a7640000613a0f565b6117d69190613a26565b60008481526015602052604081208290556010805492945084929091906117fe9084906139fc565b9091555061180e90508484612520565b604080518381526020810185905273ffffffffffffffffffffffffffffffffffffffff86169133917f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee910160405180910390a35060016012559092909150565b600073ffffffffffffffffffffffffffffffffffffffff8216611913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e65720000000000000000000000000000000000000000000000606482015260840161088b565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60006002601254036119aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b600260125560006119bc85858561213e565b90506119d1856119cb866114f1565b8561253a565b6040805173ffffffffffffffffffffffffffffffffffffffff8716815260208101859052908101829052606081018590527fe611dbd9386c5163f399f1a4548786381fad79b3b33a9c512654c98e2446d85c9060800160405180910390a15050600160125592915050565b6060600180546107109061394e565b6113ce33838361272b565b611a603383611d76565b611aec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161088b565b611af884848484612858565b50505050565b6060611b0982611c48565b6000611b136128fb565b90506000815111611b335760405180602001604052806000815250611b5e565b80611b3d8461290a565b604051602001611b4e929190613c4d565b6040516020818303038152906040525b9392505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611bf857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806106fb57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106fb565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16611cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161088b565b50565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190611d30826114f1565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d82836114f1565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611df0575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b80611e2e57508373ffffffffffffffffffffffffffffffffffffffff16611e1684610793565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16611e56826114f1565b73ffffffffffffffffffffffffffffffffffffffff1614611ef9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161088b565b73ffffffffffffffffffffffffffffffffffffffff8216611f9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161088b565b611fa883838360016129c8565b8273ffffffffffffffffffffffffffffffffffffffff16611fc8826114f1565b73ffffffffffffffffffffffffffffffffffffffff161461206b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161088b565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60003361214a846114f1565b73ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a204e4f545f494e46545f4f574e45520000000000000000604482015260640161088b565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa158015612234573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225891906139a1565b73ffffffffffffffffffffffffffffffffffffffff86166000908152601660209081526040808320888452825280832054601590925282205492935090916122a091906139e9565b73ffffffffffffffffffffffffffffffffffffffff871660009081526017602052604081205460105492935090916122d891906139e9565b90506000816122e78486613a0f565b6122f19190613a26565b90508086111561235d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f58666169494e46543a20414d4f554e545f455843454544535f53484152450000604482015260640161088b565b806123688785613a0f565b6123729190613a26565b73ffffffffffffffffffffffffffffffffffffffff891660009081526016602090815260408083208b84529091528120805492975087929091906123b79084906139fc565b909155505073ffffffffffffffffffffffffffffffffffffffff8816600090815260176020526040812080548792906123f19084906139fc565b909155505073ffffffffffffffffffffffffffffffffffffffff88166000908152601460205260408120805488929061242b9084906139fc565b909155509498975050505050505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516124739190613c7c565b60006040518083038185875af1925050503d80600081146124b0576040519150601f19603f3d011682016040523d82523d6000602084013e6124b5565b606091505b5050905080610953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f58666169494e46543a204554485f5452414e534645525f4641494c4544000000604482015260640161088b565b6113ce828260405180602001604052806000815250612b71565b60008373ffffffffffffffffffffffffffffffffffffffff163b116125bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f58666169494e46543a205452414e534645525f4641494c454400000000000000604482015260640161088b565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916126529190613c7c565b6000604051808303816000865af19150503d806000811461268f576040519150601f19603f3d011682016040523d82523d6000602084013e612694565b606091505b50915091508180156126be5750805115806126be5750808060200190518101906126be9190613c98565b612724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f58666169494e46543a205452414e534645525f4641494c454400000000000000604482015260640161088b565b5050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036127c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161088b565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612863848484611e36565b61286f84848484612c14565b611af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161088b565b6060600d80546107109061394e565b6060600061291783612e07565b600101905060008167ffffffffffffffff81111561293757612937613571565b6040519080825280601f01601f191660200182016040528015612961576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461296b57509392505050565b6129d484848484612ee9565b6001811115612a65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f727465640000000000000000000000606482015260840161088b565b8173ffffffffffffffffffffffffffffffffffffffff8516612ace57612ac981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612b0b565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612b0b57612b0b8582612fa5565b73ffffffffffffffffffffffffffffffffffffffff8416612b3457612b2f8161305c565b612724565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461272457612724848261310b565b612b7b838361315c565b612b886000848484612c14565b610953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161088b565b600073ffffffffffffffffffffffffffffffffffffffff84163b15612dfc576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290612c8b903390899088908890600401613cb5565b6020604051808303816000875af1925050508015612ce4575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612ce191810190613cfe565b60015b612db1573d808015612d12576040519150601f19603f3d011682016040523d82523d6000602084013e612d17565b606091505b508051600003612da9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161088b565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611e2e565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612e50577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612e7c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e9a57662386f26fc10000830492506010015b6305f5e1008310612eb2576305f5e100830492506008015b6127108310612ec657612710830492506004015b60648310612ed8576064830492506002015b600a83106106fb5760010192915050565b6001811115611af85773ffffffffffffffffffffffffffffffffffffffff841615612f495773ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604081208054839290612f439084906139e9565b90915550505b73ffffffffffffffffffffffffffffffffffffffff831615611af85773ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054839290612f9a9084906139fc565b909155505050505050565b60006001612fb28461186e565b612fbc91906139e9565b60008381526007602052604090205490915080821461301c5773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b60085460009061306e906001906139e9565b6000838152600960205260408120546008805493945090928490811061309657613096613a7e565b9060005260206000200154905080600883815481106130b7576130b7613a7e565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806130ef576130ef613d1b565b6001900381819060005260206000200160009055905550505050565b60006131168361186e565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b73ffffffffffffffffffffffffffffffffffffffff82166131d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161088b565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613265576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161088b565b6132736000838360016129c8565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156132ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161088b565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611cd357600080fd5b6000602082840312156133fe57600080fd5b8135611b5e816133be565b60005b8381101561342457818101518382015260200161340c565b50506000910152565b60008151808452613445816020860160208601613409565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611b5e602083018461342d565b60006020828403121561349c57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114611cd357600080fd5b600080604083850312156134d857600080fd5b82356134e3816134a3565b946020939093013593505050565b60006020828403121561350357600080fd5b8135611b5e816134a3565b60008060006060848603121561352357600080fd5b833561352e816134a3565b9250602084013561353e816134a3565b929592945050506040919091013590565b6000806040838503121561356257600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156135e7576135e7613571565b604052919050565b600067ffffffffffffffff82111561360957613609613571565b5060051b60200190565b600082601f83011261362457600080fd5b81356020613639613634836135ef565b6135a0565b82815260059290921b8401810191818101908684111561365857600080fd5b8286015b84811015613673578035835291830191830161365c565b509695505050505050565b6000806040838503121561369157600080fd5b823567ffffffffffffffff808211156136a957600080fd5b818501915085601f8301126136bd57600080fd5b813560206136cd613634836135ef565b82815260059290921b840181019181810190898411156136ec57600080fd5b948201945b83861015613713578535613704816134a3565b825294820194908201906136f1565b9650508601359250508082111561372957600080fd5b5061373685828601613613565b9150509250929050565b600067ffffffffffffffff83111561375a5761375a613571565b61378b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116016135a0565b905082815283838301111561379f57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156137c857600080fd5b813567ffffffffffffffff8111156137df57600080fd5b8201601f810184136137f057600080fd5b611e2e84823560208401613740565b6000806040838503121561381257600080fd5b823591506020830135613824816134a3565b809150509250929050565b60008060006060848603121561384457600080fd5b833561384f816134a3565b95602085013595506040909401359392505050565b8015158114611cd357600080fd5b6000806040838503121561388557600080fd5b8235613890816134a3565b9150602083013561382481613864565b600080600080608085870312156138b657600080fd5b84356138c1816134a3565b935060208501356138d1816134a3565b925060408501359150606085013567ffffffffffffffff8111156138f457600080fd5b8501601f8101871361390557600080fd5b61391487823560208401613740565b91505092959194509250565b6000806040838503121561393357600080fd5b823561393e816134a3565b91506020830135613824816134a3565b600181811c9082168061396257607f821691505b60208210810361399b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602082840312156139b357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156106fb576106fb6139ba565b808201808211156106fb576106fb6139ba565b80820281158282048414176106fb576106fb6139ba565b600082613a5c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215613a7357600080fd5b8151611b5e816134a3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613ade57613ade6139ba565b5060010190565b601f82111561095357600081815260208120601f850160051c81016020861015613b0c5750805b601f850160051c820191505b81811015613b2b57828155600101613b18565b505050505050565b815167ffffffffffffffff811115613b4d57613b4d613571565b613b6181613b5b845461394e565b84613ae5565b602080601f831160018114613bb45760008415613b7e5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613b2b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613c0157888601518255948401946001909101908401613be2565b5085821015613c3d57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008351613c5f818460208801613409565b835190830190613c73818360208801613409565b01949350505050565b60008251613c8e818460208701613409565b9190910192915050565b600060208284031215613caa57600080fd5b8151611b5e81613864565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613cf4608083018461342d565b9695505050505050565b600060208284031215613d1057600080fd5b8151611b5e816133be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212204e0aeba41b16305a4d36857d285c89367d4700d0f776cc57e5d61cfcfb30a7bc64736f6c634300081300330000000000000000000000000b51d00ef3df0b66766938220542185f6fdbc0b7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000004aa41bc1649c9c3177ed16caaa11482295fc7441000000000000000000000000000000000000000000cc0925dcb2f0e3dde55e4a000000000000000000000000000000000000000000000000000000000000019b

Deployed Bytecode

0x6080604052600436106101dc5760003560e01c806360f4867411610102578063b88d4fde11610095578063d8ab827411610064578063d8ab827414610608578063e6fd298214610623578063e985e9c514610639578063fab2cb361461068f57600080fd5b8063b88d4fde14610585578063bdba1561146105a5578063c87b56dd146105d2578063cd3293de146105f257600080fd5b8063871f1940116100d1578063871f19401461050357806395d89b4114610523578063a22cb46514610538578063a8b9d9d51461055857600080fd5b806360f48674146104535780636352211e1461048e5780636a627842146104ae57806370a08231146104e357600080fd5b80631b55d19e1161017a5780632f745c59116101495780632f745c59146103d357806342842e0e146103f35780634f6ccce71461041357806355f804b31461043357600080fd5b80631b55d19e1461035357806323b872dd146103735780632dd5a938146103935780632e27e3a7146103b357600080fd5b8063095ea7b3116101b6578063095ea7b3146102ab57806311865c43146102cb57806318160ddd146103115780631ac9afdb1461032657600080fd5b806301ffc9a71461020f57806306fdde0314610244578063081812fc1461026657600080fd5b3661020a57600a5473ffffffffffffffffffffffffffffffffffffffff1633146102085761020861338f565b005b600080fd5b34801561021b57600080fd5b5061022f61022a3660046133ec565b6106a5565b60405190151581526020015b60405180910390f35b34801561025057600080fd5b50610259610701565b60405161023b9190613477565b34801561027257600080fd5b5061028661028136600461348a565b610793565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023b565b3480156102b757600080fd5b506102086102c63660046134c5565b6107c7565b3480156102d757600080fd5b506103036102e63660046134c5565b601660209081526000928352604080842090915290825290205481565b60405190815260200161023b565b34801561031d57600080fd5b50600854610303565b34801561033257600080fd5b506103036103413660046134f1565b60146020526000908152604090205481565b34801561035f57600080fd5b5061030361036e36600461348a565b610958565b34801561037f57600080fd5b5061020861038e36600461350e565b610c18565b34801561039f57600080fd5b506103036103ae36600461354f565b610cb9565b3480156103bf57600080fd5b506102086103ce36600461367e565b610e37565b3480156103df57600080fd5b506103036103ee3660046134c5565b6110f5565b3480156103ff57600080fd5b5061020861040e36600461350e565b6111c4565b34801561041f57600080fd5b5061030361042e36600461348a565b6111df565b34801561043f57600080fd5b5061020861044e3660046137b6565b61129d565b34801561045f57600080fd5b5061047361046e3660046137ff565b6113d2565b6040805193845260208401929092529082015260600161023b565b34801561049a57600080fd5b506102866104a936600461348a565b6114f1565b3480156104ba57600080fd5b506104ce6104c93660046134f1565b61157d565b6040805192835260208301919091520161023b565b3480156104ef57600080fd5b506103036104fe3660046134f1565b61186e565b34801561050f57600080fd5b5061030361051e36600461382f565b61193c565b34801561052f57600080fd5b50610259611a3c565b34801561054457600080fd5b50610208610553366004613872565b611a4b565b34801561056457600080fd5b506103036105733660046134f1565b60176020526000908152604090205481565b34801561059157600080fd5b506102086105a03660046138a0565b611a56565b3480156105b157600080fd5b506103036105c036600461348a565b60156020526000908152604090205481565b3480156105de57600080fd5b506102596105ed36600461348a565b611afe565b3480156105fe57600080fd5b50610303600f5481565b34801561061457600080fd5b50601154600f54601054610473565b34801561062f57600080fd5b5061030360115481565b34801561064557600080fd5b5061022f610654366004613920565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561069b57600080fd5b5061030360105481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806106fb57506106fb82611b65565b92915050565b6060600080546107109061394e565b80601f016020809104026020016040519081016040528092919081815260200182805461073c9061394e565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b5050505050905090565b600061079e82611c48565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006107d2826114f1565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821614806108bd57506108bd8133610654565b610949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161088b565b6109538383611cd6565b505050565b60006002601254036109c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b6002601255600e54821115610a37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f58666169494e46543a20496e6578697374656e745f4944000000000000000000604482015260640161088b565b600f54600b54600c546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526000939291909116906370a0823190602401602060405180830381865afa158015610ab2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad691906139a1565b610ae091906139e9565b905080600003610b4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f58666169494e46543a20494e535546494349454e545f414d4f554e5400000000604482015260640161088b565b80600f6000828254610b5e91906139fc565b9091555050601154600f54610b7391906139fc565b610b8582670de0b6b3a7640000613a0f565b610b8f9190613a26565b915081601560008581526020019081526020016000206000828254610bb491906139fc565b925050819055508160106000828254610bcd91906139fc565b9091555050604080518381526020810185905233917faadc628cb4fd3bb7a62795eb460290459458bdc6f387ffde727c740f42c18337910160405180910390a2506001601255919050565b610c223382611d76565b610cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161088b565b610953838383611e36565b6000600260125403610d27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b6002601255600a54600090610d539073ffffffffffffffffffffffffffffffffffffffff16858561213e565b600a546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810186905291925073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b158015610dc057600080fd5b505af1158015610dd4573d6000803e3d6000fd5b50505050610dea610de4856114f1565b8461243c565b60408051848152602081018390529081018590527ffd1a3a6d5498bdf58109d329c7c185fa6652cb8ae241a662e3772c559c8c86a69060600160405180910390a150506001601255919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec89190613a61565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f58666169494e46543a204e4f545f4f574e455200000000000000000000000000604482015260640161088b565b601354600e5410610fc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205052454d494e54535f454e4445440000000000000000604482015260640161088b565b8151815114611034576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a20494e56414c49445f56414c5545530000000000000000604482015260640161088b565b60005b8151811015610953576001600e600082825461105391906139fc565b9250508190555061107f83828151811061106f5761106f613a7e565b6020026020010151600e54612520565b81818151811061109157611091613a7e565b602002602001015160156000600e548152602001908152602001600020819055508181815181106110c4576110c4613a7e565b6020026020010151601060008282546110dd91906139fc565b909155508190506110ed81613aad565b915050611037565b60006111008361186e565b821061118e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161088b565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b61095383838360405180602001604052806000815250611a56565b60006111ea60085490565b8210611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161088b565b6008828154811061128b5761128b613a7e565b90600052602060002001549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e9190613a61565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f58666169494e46543a204e4f545f4f574e455200000000000000000000000000604482015260640161088b565b600d6113ce8282613b33565b5050565b60008281526015602090815260408083205473ffffffffffffffffffffffffffffffffffffffff8516808552601684528285208786529093528184205491517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152909284916370a0823190602401602060405180830381865afa158015611464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148891906139a1565b9050600061149683856139e9565b73ffffffffffffffffffffffffffffffffffffffff871660009081526017602052604081205460105492935090916114ce91906139e9565b9050806114db8385613a0f565b6114e59190613a26565b95505050509250925092565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806106fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161088b565b6000806002601254036115ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b6002601255601354600e54101561165f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f58666169494e46543a205052454d494e54535f4f4e474f494e47000000000000604482015260640161088b565b600f54600b54600c546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526000939291909116906370a0823190602401602060405180830381865afa1580156116da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fe91906139a1565b61170891906139e9565b905080600003611774576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f58666169494e46543a20494e535546494349454e545f414d4f554e5400000000604482015260640161088b565b6001600e600082825461178791906139fc565b92505081905550600e54925080600f60008282546117a591906139fc565b9091555050601154600f546117ba91906139fc565b6117cc82670de0b6b3a7640000613a0f565b6117d69190613a26565b60008481526015602052604081208290556010805492945084929091906117fe9084906139fc565b9091555061180e90508484612520565b604080518381526020810185905273ffffffffffffffffffffffffffffffffffffffff86169133917f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee910160405180910390a35060016012559092909150565b600073ffffffffffffffffffffffffffffffffffffffff8216611913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e65720000000000000000000000000000000000000000000000606482015260840161088b565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60006002601254036119aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a205245454e5452414e545f43414c4c0000000000000000604482015260640161088b565b600260125560006119bc85858561213e565b90506119d1856119cb866114f1565b8561253a565b6040805173ffffffffffffffffffffffffffffffffffffffff8716815260208101859052908101829052606081018590527fe611dbd9386c5163f399f1a4548786381fad79b3b33a9c512654c98e2446d85c9060800160405180910390a15050600160125592915050565b6060600180546107109061394e565b6113ce33838361272b565b611a603383611d76565b611aec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161088b565b611af884848484612858565b50505050565b6060611b0982611c48565b6000611b136128fb565b90506000815111611b335760405180602001604052806000815250611b5e565b80611b3d8461290a565b604051602001611b4e929190613c4d565b6040516020818303038152906040525b9392505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611bf857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806106fb57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106fb565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16611cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161088b565b50565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190611d30826114f1565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d82836114f1565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611df0575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b80611e2e57508373ffffffffffffffffffffffffffffffffffffffff16611e1684610793565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16611e56826114f1565b73ffffffffffffffffffffffffffffffffffffffff1614611ef9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161088b565b73ffffffffffffffffffffffffffffffffffffffff8216611f9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161088b565b611fa883838360016129c8565b8273ffffffffffffffffffffffffffffffffffffffff16611fc8826114f1565b73ffffffffffffffffffffffffffffffffffffffff161461206b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161088b565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60003361214a846114f1565b73ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f58666169494e46543a204e4f545f494e46545f4f574e45520000000000000000604482015260640161088b565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa158015612234573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225891906139a1565b73ffffffffffffffffffffffffffffffffffffffff86166000908152601660209081526040808320888452825280832054601590925282205492935090916122a091906139e9565b73ffffffffffffffffffffffffffffffffffffffff871660009081526017602052604081205460105492935090916122d891906139e9565b90506000816122e78486613a0f565b6122f19190613a26565b90508086111561235d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f58666169494e46543a20414d4f554e545f455843454544535f53484152450000604482015260640161088b565b806123688785613a0f565b6123729190613a26565b73ffffffffffffffffffffffffffffffffffffffff891660009081526016602090815260408083208b84529091528120805492975087929091906123b79084906139fc565b909155505073ffffffffffffffffffffffffffffffffffffffff8816600090815260176020526040812080548792906123f19084906139fc565b909155505073ffffffffffffffffffffffffffffffffffffffff88166000908152601460205260408120805488929061242b9084906139fc565b909155509498975050505050505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516124739190613c7c565b60006040518083038185875af1925050503d80600081146124b0576040519150601f19603f3d011682016040523d82523d6000602084013e6124b5565b606091505b5050905080610953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f58666169494e46543a204554485f5452414e534645525f4641494c4544000000604482015260640161088b565b6113ce828260405180602001604052806000815250612b71565b60008373ffffffffffffffffffffffffffffffffffffffff163b116125bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f58666169494e46543a205452414e534645525f4641494c454400000000000000604482015260640161088b565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916126529190613c7c565b6000604051808303816000865af19150503d806000811461268f576040519150601f19603f3d011682016040523d82523d6000602084013e612694565b606091505b50915091508180156126be5750805115806126be5750808060200190518101906126be9190613c98565b612724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f58666169494e46543a205452414e534645525f4641494c454400000000000000604482015260640161088b565b5050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036127c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161088b565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612863848484611e36565b61286f84848484612c14565b611af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161088b565b6060600d80546107109061394e565b6060600061291783612e07565b600101905060008167ffffffffffffffff81111561293757612937613571565b6040519080825280601f01601f191660200182016040528015612961576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461296b57509392505050565b6129d484848484612ee9565b6001811115612a65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f727465640000000000000000000000606482015260840161088b565b8173ffffffffffffffffffffffffffffffffffffffff8516612ace57612ac981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612b0b565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614612b0b57612b0b8582612fa5565b73ffffffffffffffffffffffffffffffffffffffff8416612b3457612b2f8161305c565b612724565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461272457612724848261310b565b612b7b838361315c565b612b886000848484612c14565b610953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161088b565b600073ffffffffffffffffffffffffffffffffffffffff84163b15612dfc576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290612c8b903390899088908890600401613cb5565b6020604051808303816000875af1925050508015612ce4575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612ce191810190613cfe565b60015b612db1573d808015612d12576040519150601f19603f3d011682016040523d82523d6000602084013e612d17565b606091505b508051600003612da9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161088b565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611e2e565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612e50577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612e7c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e9a57662386f26fc10000830492506010015b6305f5e1008310612eb2576305f5e100830492506008015b6127108310612ec657612710830492506004015b60648310612ed8576064830492506002015b600a83106106fb5760010192915050565b6001811115611af85773ffffffffffffffffffffffffffffffffffffffff841615612f495773ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604081208054839290612f439084906139e9565b90915550505b73ffffffffffffffffffffffffffffffffffffffff831615611af85773ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054839290612f9a9084906139fc565b909155505050505050565b60006001612fb28461186e565b612fbc91906139e9565b60008381526007602052604090205490915080821461301c5773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b60085460009061306e906001906139e9565b6000838152600960205260408120546008805493945090928490811061309657613096613a7e565b9060005260206000200154905080600883815481106130b7576130b7613a7e565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806130ef576130ef613d1b565b6001900381819060005260206000200160009055905550505050565b60006131168361186e565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b73ffffffffffffffffffffffffffffffffffffffff82166131d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161088b565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613265576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161088b565b6132736000838360016129c8565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156132ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161088b565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611cd357600080fd5b6000602082840312156133fe57600080fd5b8135611b5e816133be565b60005b8381101561342457818101518382015260200161340c565b50506000910152565b60008151808452613445816020860160208601613409565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611b5e602083018461342d565b60006020828403121561349c57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114611cd357600080fd5b600080604083850312156134d857600080fd5b82356134e3816134a3565b946020939093013593505050565b60006020828403121561350357600080fd5b8135611b5e816134a3565b60008060006060848603121561352357600080fd5b833561352e816134a3565b9250602084013561353e816134a3565b929592945050506040919091013590565b6000806040838503121561356257600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156135e7576135e7613571565b604052919050565b600067ffffffffffffffff82111561360957613609613571565b5060051b60200190565b600082601f83011261362457600080fd5b81356020613639613634836135ef565b6135a0565b82815260059290921b8401810191818101908684111561365857600080fd5b8286015b84811015613673578035835291830191830161365c565b509695505050505050565b6000806040838503121561369157600080fd5b823567ffffffffffffffff808211156136a957600080fd5b818501915085601f8301126136bd57600080fd5b813560206136cd613634836135ef565b82815260059290921b840181019181810190898411156136ec57600080fd5b948201945b83861015613713578535613704816134a3565b825294820194908201906136f1565b9650508601359250508082111561372957600080fd5b5061373685828601613613565b9150509250929050565b600067ffffffffffffffff83111561375a5761375a613571565b61378b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116016135a0565b905082815283838301111561379f57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156137c857600080fd5b813567ffffffffffffffff8111156137df57600080fd5b8201601f810184136137f057600080fd5b611e2e84823560208401613740565b6000806040838503121561381257600080fd5b823591506020830135613824816134a3565b809150509250929050565b60008060006060848603121561384457600080fd5b833561384f816134a3565b95602085013595506040909401359392505050565b8015158114611cd357600080fd5b6000806040838503121561388557600080fd5b8235613890816134a3565b9150602083013561382481613864565b600080600080608085870312156138b657600080fd5b84356138c1816134a3565b935060208501356138d1816134a3565b925060408501359150606085013567ffffffffffffffff8111156138f457600080fd5b8501601f8101871361390557600080fd5b61391487823560208401613740565b91505092959194509250565b6000806040838503121561393357600080fd5b823561393e816134a3565b91506020830135613824816134a3565b600181811c9082168061396257607f821691505b60208210810361399b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602082840312156139b357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156106fb576106fb6139ba565b808201808211156106fb576106fb6139ba565b80820281158282048414176106fb576106fb6139ba565b600082613a5c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215613a7357600080fd5b8151611b5e816134a3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613ade57613ade6139ba565b5060010190565b601f82111561095357600081815260208120601f850160051c81016020861015613b0c5750805b601f850160051c820191505b81811015613b2b57828155600101613b18565b505050505050565b815167ffffffffffffffff811115613b4d57613b4d613571565b613b6181613b5b845461394e565b84613ae5565b602080601f831160018114613bb45760008415613b7e5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613b2b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613c0157888601518255948401946001909101908401613be2565b5085821015613c3d57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008351613c5f818460208801613409565b835190830190613c73818360208801613409565b01949350505050565b60008251613c8e818460208701613409565b9190910192915050565b600060208284031215613caa57600080fd5b8151611b5e81613864565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613cf4608083018461342d565b9695505050505050565b600060208284031215613d1057600080fd5b8151611b5e816133be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212204e0aeba41b16305a4d36857d285c89367d4700d0f776cc57e5d61cfcfb30a7bc64736f6c63430008130033

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

0000000000000000000000000b51d00ef3df0b66766938220542185f6fdbc0b7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000004aa41bc1649c9c3177ed16caaa11482295fc7441000000000000000000000000000000000000000000cc0925dcb2f0e3dde55e4a000000000000000000000000000000000000000000000000000000000000019b

-----Decoded View---------------
Arg [0] : _factory (address): 0x0b51D00eF3Df0B66766938220542185F6fDbC0B7
Arg [1] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _underlyingToken (address): 0x4aa41bC1649C9C3177eD16CaaA11482295fC7441
Arg [3] : _initialReserve (uint256): 246664066932299001370074698
Arg [4] : _expectedMints (uint256): 411

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000b51d00ef3df0b66766938220542185f6fdbc0b7
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 0000000000000000000000004aa41bc1649c9c3177ed16caaa11482295fc7441
Arg [3] : 000000000000000000000000000000000000000000cc0925dcb2f0e3dde55e4a
Arg [4] : 000000000000000000000000000000000000000000000000000000000000019b


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

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