Token TheCursedCircus

 

Overview ERC-721

Total Supply:
2,000 TCC

Holders:
488 addresses

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
TheCursedCircus

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 21 : CursedCircus.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC2981.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "./IWrappedFantom.sol";
import "./IElasticLGE.sol";
//import "./MockLGE.sol";
import "./Math.sol";


/* Custom Error Section - Use with ethers.js for custom errors */
// Public Mint is Paused
error MintPaused();

// Cannot mint zero NFTs
error AmountLessThanOne();

// Cannot mint more than maxMintAmount
error AmountOverMax(uint256 amtMint, uint256 maxMint);

// Token not in Auth List
error TokenNotAuthorized();

// Not enough mints left for mint amount
error NotEnoughMintsLeft(uint256 supplyLeft, uint256 amtMint);

// Not enough ftm sent to mint
error InsufficientFTM(uint256 totalCost, uint256 amtFTM);

contract TheCursedCircus is ERC721Enumerable, Ownable, ERC2981 {
  using Strings for uint256;

  string baseURI;
  string public baseExtension = ".json";

  //MockLGE testLGEContract;
  IElasticLGE LGEContract;// = IElasticLGE(0x96662f375a9734654cB57BbFeb31Db9dD7784A7F);
  address public lpPair; // = 0x2b4C76d0dc16BE1C31D4C1DC53bF9B45987Fc75c; - usdcftm pair
  IWrappedFantom wftm;// = IWrappedFantom(0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83);
  //Team wallets
  address private treasuryAddress = 0x111731A388743a75CF60CCA7b140C58e41D83635;
  address[] private team = [
    0x962A2880Eb188AB4C2Cfe9874247fCC60a243d13, //25% Mace
    0x1740Eae421b6540fda3924bE59F549c00AB67575, //30% Noob
    0xEeE32847C124963ACd2b0a36310AE07af6C86a7B, //25% Munchies
    0x3F79ddf852bFbB6d13A704C1EdbE8DfD40B4E088, //10% KB
    0xc78E8ea590C6C75C346FE8c7b1eF302cfFb9aF0a  //10% Corval
  ];

  mapping(address => uint) public collectionsWithDiscount;

  //@audit cost too low?
  mapping(address => uint) public acceptedCurrencies;

  uint256 public immutable maxSupply; //2000
  uint256 public immutable maxMintAmount; //5

  bool public publicPaused = true;
  uint16[2000] private ids;
  uint16 private index = 0;

  constructor(
    string memory _name,
    string memory _symbol,
    string memory _initBaseURI, //""
    address _lpPair,
    address _royaltyAddress,
    address _addressLGE,
    address _wftm,
    uint _royaltiesPercentage,
    uint _maxSupply,
    uint _maxMintAmount
  ) ERC721(_name, _symbol) {
        maxSupply = _maxSupply;
        maxMintAmount = _maxMintAmount;
        lpPair = _lpPair;
        //testLGEContract = MockLGE(_addressLGE);
        LGEContract = IElasticLGE(_addressLGE);
        wftm = IWrappedFantom(_wftm);
        _setReceiver(_royaltyAddress);
        setBaseURI(_initBaseURI);
        _setRoyaltyPercentage(_royaltiesPercentage);
  }

  //address oath = 0x21Ada0D2aC28C3A5Fa3cD2eE30882dA8812279B6;
  //address wftm = 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83;
  function addCurrency(address[] calldata acceptedCurrenciesInput, uint256[] calldata prices) external onlyOwner {
    require(acceptedCurrenciesInput.length == prices.length, "improper length");
    uint len = prices.length;
    for(uint i; i < len; ++i) {
        if (acceptedCurrenciesInput[i] == address(wftm)) {
            acceptedCurrencies[address(0)] = prices[i];
        }
        acceptedCurrencies[acceptedCurrenciesInput[i]] = prices[i];
    }
  }

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

  //Likely need to call twice to mint all 120
  function premintTokens() external onlyOwner {
    uint supply = totalSupply();
    uint len = 0;
    require(supply < 120, "Too many tokens preminted");
    for(uint i = 1; i <= 60; i++) {
      len = ids.length - index++;      
      ids[supply] = uint16(ids[len - 1] == 0 ? len - 1 : ids[len - 1]);
      ids[len - 1] = 0;
      _safeMint(0x1740Eae421b6540fda3924bE59F549c00AB67575, supply + 1);
      supply++;
    }

  }

  function _pickRandomUniqueId(uint256 _random) private returns (uint256 id) {
      uint256 len = ids.length - index++;
      require(len > 0, "no ids left");
      uint256 randomIndex = _random % len;
    /*  if(randomIndex == 0 && index != ids.length){
        randomIndex = 1;
      }*/
      id = ids[randomIndex] != 0 ? ids[randomIndex] : randomIndex;
      ids[randomIndex] = uint16(ids[len - 1] == 0 ? len - 1 : ids[len - 1]);
      ids[len - 1] = 0;
  }

  function _getDiscount(address collection) internal returns(uint percentDiscount) {
    //First check if they have 50% discount from LGE
    //only need to return 1 of the two values. Both will be 0 if not participated
    uint lgePercentDiscount = 100;
    Terms memory termReturn = LGEContract.terms(msg.sender);
    if(collection == address(0)) {
      percentDiscount = 100;
    }
    else if(ERC721(collection).balanceOf(msg.sender) > 0) {
      //Discount is 33%, so need to return 66
      percentDiscount = collectionsWithDiscount[collection];
    }
    if(termReturn.term > 0) {
      lgePercentDiscount = 100 - _curve(termReturn.term);
    }
    else {
      lgePercentDiscount = 100;
    }
    return Math.min(percentDiscount, lgePercentDiscount);
  }

  function _curve(uint term) internal returns (uint) {
    uint discount = (35 + (Math.sqrt(term) / 800));
    if(discount < 35) {
      discount = 35;
    }
    else if(discount > 50) {
      discount = 50;
    }
    return Math.min(50, discount);
  } 

  function mint(address token, uint amount, address collection) external payable {
    //mint is closed
    if(publicPaused)
      revert MintPaused();
    if(amount <= 0)
      revert AmountLessThanOne();
    //require(amount > 0, 'Cannot mint 0');
    if(amount > maxMintAmount) {
      revert AmountOverMax({
        amtMint: amount,
        maxMint: maxMintAmount
      });
    }
    if(acceptedCurrencies[token] == 0)
      revert TokenNotAuthorized();
    //require(acceptedCurrencies[token] > 0, "token not authorized");

    uint256 supply = totalSupply();
    if(supply + amount > maxSupply) {
      revert NotEnoughMintsLeft({
        supplyLeft: maxSupply - supply,
        amtMint: amount
      });
    }

    //All check have passed, we can mint after applying a discount to the cost
    uint discountPercentage = _getDiscount(collection);
    //If no discount, then returned discount percentage is zero. We need to return 100 in order to have the math cancel out to cost * 1

    uint amountFromSender = msg.value;
    if (token == address(0)) {
        if(amountFromSender != amount * acceptedCurrencies[address(wftm)] * discountPercentage / 100)
          revert InsufficientFTM({
            totalCost: amount * acceptedCurrencies[address(wftm)] * discountPercentage / 100,
            amtFTM: amountFromSender
          });
        //require(msg.value == amount * acceptedCurrencies[address(wftm)], "insufficient ftm");
        wftm.deposit{ value: amountFromSender }();
        _mintInternal(amount);
    } else {
        require(IERC20(token).transferFrom(msg.sender, address(this), amount * acceptedCurrencies[token] * discountPercentage / 100), "Payment not successful");
        _mintInternal(amount);
    }

  }

  function _mintInternal(uint _amount) internal {
      for (uint256 i = 1; i <= _amount; ++i) {
          _safeMint(msg.sender, _pickRandomUniqueId(_getRandom()) +1);
      }
  }

  function _getRandom() internal returns (uint) {
      (uint token0, uint token1) = _getRandomNumbers();
      return uint(keccak256(abi.encodePacked(
          token0, token1, msg.sender, totalSupply()
      )));
  }

  function _getRandomNumbers() internal returns (uint, uint) {
      (uint token0, uint token1,) = IUniswapV2Pair(lpPair).getReserves();
      return (token0, token1);
  }

  function walletOfOwner(address _owner)
    public
    view
    returns (uint256[] memory)
  {
    uint256 ownerTokenCount = balanceOf(_owner);
    uint256[] memory tokenIds = new uint256[](ownerTokenCount);
    for (uint256 i; i < ownerTokenCount; i++) {
      tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
    }
    return tokenIds;
  }

  function tokenURI(uint256 tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(
      _exists(tokenId),
      "ERC721Metadata: URI query for nonexistent token"
    );

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

  function setDiscountCollections(address[] calldata _collectionAddresses, uint[] calldata _discounts) public onlyOwner {
    require(_collectionAddresses.length == _discounts.length, "Array lengths don't match");
    uint len = _collectionAddresses.length;
    for(uint i = 0; i < len; i++) {
      collectionsWithDiscount[_collectionAddresses[i]] = _discounts[i];
    }
  }

  function setBaseURI(string memory _newBaseURI) public onlyOwner {
    baseURI = _newBaseURI;
  }

  function pausePublic(bool _state) public onlyOwner {
    publicPaused = _state;
  }

  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, IERC165, ERC165Storage) returns (bool) {
    return super.supportsInterface(interfaceId);
  }

  function withdraw(address token) external onlyOwner {
    require(acceptedCurrencies[token] > 0, "token not authorized");    
    if(token == address(0)) {
        //This should only need to be called if a bug occurs and FTM (not wFTM) is sent to the contract
        payable(msg.sender).transfer(address(this).balance);
    }
    else {
      uint amount = IERC20(token).balanceOf(address(this));
      require(amount > 0);
      uint amountForTreasury = amount / 2;
      uint amountForTeam = amount / 2;
      IERC20(token).transfer(treasuryAddress, amountForTreasury);
      IERC20(token).transfer(team[0], amountForTeam * 25 / 100);
      IERC20(token).transfer(team[1], amountForTeam * 30 / 100);
      IERC20(token).transfer(team[2], amountForTeam * 25 / 100);
      IERC20(token).transfer(team[3], amountForTeam * 10 / 100);
      IERC20(token).transfer(team[4], amountForTeam * 10 / 100);
    }
  }
}

File 2 of 21 : 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 Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        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 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 21 : ERC2981.sol
/***
 *    ███████╗██████╗  ██████╗██████╗  █████╗  █████╗  ██╗
 *    ██╔════╝██╔══██╗██╔════╝╚════██╗██╔══██╗██╔══██╗███║
 *    █████╗  ██████╔╝██║      █████╔╝╚██████║╚█████╔╝╚██║
 *    ██╔══╝  ██╔══██╗██║     ██╔═══╝  ╚═══██║██╔══██╗ ██║
 *    ███████╗██║  ██║╚██████╗███████╗ █████╔╝╚█████╔╝ ██║
 *    ╚══════╝╚═╝  ╚═╝ ╚═════╝╚══════╝ ╚════╝  ╚════╝  ╚═╝
 * Written by MaxflowO2
 * You can follow along at https://github.com/MaxflowO2/ERC2981
 */
pragma solidity ^0.8.4;
// SPDX-License-Identifier: MIT
import "./IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";


abstract contract ERC2981 is IERC2981, ERC165Storage {

  // Bytes4 Code for EIP-2981
  bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

  // Mappings _tokenID -> values
  address receiver;
  uint256 royaltyPercentage;

  constructor() {

    // Using ERC165Storage set EIP-2981
    _registerInterface(_INTERFACE_ID_ERC2981);

  }

  // Set to be internal function _setReceiver
  function _setReceiver(address _address) internal {
    receiver = _address;
  }

  // Set to be internal function _setRoyaltyPercentage
  function _setRoyaltyPercentage(uint256 _royaltyPercentage) internal {
    royaltyPercentage = _royaltyPercentage;
  }

  // Override for royaltyInfo(uint256, uint256)
  // uses SafeMath for uint256
  function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) {
    Receiver = receiver;
    royaltyAmount = _salePrice / 100 * royaltyPercentage;
  }
}

File 5 of 21 : 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 6 of 21 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 7 of 21 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 8 of 21 : IWrappedFantom.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IWrappedFantom {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 9 of 21 : IElasticLGE.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

struct Terms {
    uint shares;
    uint term;
}

interface IElasticLGE {
    function terms(address input) external returns(Terms memory);
}

File 10 of 21 : Math.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library Math {

  function sqrt(uint y) internal pure returns (uint z) {
    if (y > 3) {
        z = y;
        uint x = y / 2 + 1;
        while (x < z) {
            z = x;
            x = (y / x + x) / 2;
        }
    } else if (y != 0) {
        z = 1;
    }
  }

  function max(uint256 a, uint256 b) internal pure returns (uint256) {
    return a >= b ? a : b;
  }

  function min(uint256 a, uint256 b) internal pure returns (uint256) {
    return a < b ? a : b;
  }

}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

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

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be 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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 12 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 15 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 16 of 21 : 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 17 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 18 of 21 : 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 19 of 21 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 20 of 21 : IERC2981.sol
/***
 *    ███████╗██╗██████╗       ██████╗  █████╗  █████╗  ██╗
 *    ██╔════╝██║██╔══██╗      ╚════██╗██╔══██╗██╔══██╗███║
 *    █████╗  ██║██████╔╝█████╗ █████╔╝╚██████║╚█████╔╝╚██║
 *    ██╔══╝  ██║██╔═══╝ ╚════╝██╔═══╝  ╚═══██║██╔══██╗ ██║
 *    ███████╗██║██║           ███████╗ █████╔╝╚█████╔╝ ██║
 *    ╚══════╝╚═╝╚═╝           ╚══════╝ ╚════╝  ╚════╝  ╚═╝                                                        
 * Zach Burks, James Morgan, Blaine Malone, James Seibel,
 * "EIP-2981: NFT Royalty Standard,"
 * Ethereum Improvement Proposals, no. 2981, September 2020. [Online serial].
 * Available: https://eips.ethereum.org/EIPS/eip-2981.
 *
 * Minor edit on comments to mirror the rest of the interfaces
 * by @MaxFlowO2 on 29 Dec 2021 for v2.1
 */

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 21 of 21 : ERC165Storage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)

pragma solidity ^0.8.0;

import "./ERC165.sol";

/**
 * @dev Storage based implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165Storage is ERC165 {
    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

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

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"address","name":"_lpPair","type":"address"},{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"address","name":"_addressLGE","type":"address"},{"internalType":"address","name":"_wftm","type":"address"},{"internalType":"uint256","name":"_royaltiesPercentage","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxMintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AmountLessThanOne","type":"error"},{"inputs":[{"internalType":"uint256","name":"amtMint","type":"uint256"},{"internalType":"uint256","name":"maxMint","type":"uint256"}],"name":"AmountOverMax","type":"error"},{"inputs":[{"internalType":"uint256","name":"totalCost","type":"uint256"},{"internalType":"uint256","name":"amtFTM","type":"uint256"}],"name":"InsufficientFTM","type":"error"},{"inputs":[],"name":"MintPaused","type":"error"},{"inputs":[{"internalType":"uint256","name":"supplyLeft","type":"uint256"},{"internalType":"uint256","name":"amtMint","type":"uint256"}],"name":"NotEnoughMintsLeft","type":"error"},{"inputs":[],"name":"TokenNotAuthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"acceptedCurrencies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"acceptedCurrenciesInput","type":"address[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"addCurrency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"collectionsWithDiscount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"collection","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pausePublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"premintTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"publicPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"Receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"address[]","name":"_collectionAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_discounts","type":"uint256[]"}],"name":"setDiscountCollections","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610100604052600560c081905264173539b7b760d91b60e09081526200002991600f91906200035a565b50601380546001600160a01b03191673111731a388743a75cf60cca7b140c58e41d836351790556040805160a08101825273962a2880eb188ab4c2cfe9874247fcc60a243d138152731740eae421b6540fda3924be59f549c00ab67575602082015273eee32847c124963acd2b0a36310ae07af6c86a7b91810191909152733f79ddf852bfbb6d13a704c1edbe8dfd40b4e088606082015273c78e8ea590c6c75c346fe8c7b1ef302cffb9af0a6080820152620000eb906014906005620003e9565b506017805460ff191660011790556095805461ffff191690553480156200011157600080fd5b5060405162003e1138038062003e11833981016040819052620001349162000542565b89518a908a906200014d9060009060208501906200035a565b508051620001639060019060208401906200035a565b505050620001806200017a6200020a60201b60201c565b6200020e565b6200019263152a902d60e11b62000260565b608082905260a0819052601180546001600160a01b038981166001600160a01b0319928316179092556010805488841690831617905560128054878416908316179055600c8054909116918816919091179055620001f088620002e5565b620001fa83600d55565b5050505050505050505062000679565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160e01b03198082169003620002c05760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b0319166000908152600b60205260409020805460ff19166001179055565b600a546001600160a01b03163314620003415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620002b7565b80516200035690600e9060208401906200035a565b5050565b82805462000368906200063d565b90600052602060002090601f0160209004810192826200038c5760008555620003d7565b82601f10620003a757805160ff1916838001178555620003d7565b82800160010185558215620003d7579182015b82811115620003d7578251825591602001919060010190620003ba565b50620003e592915062000441565b5090565b828054828255906000526020600020908101928215620003d7579160200282015b82811115620003d757825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200040a565b5b80821115620003e5576000815560010162000442565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200048057600080fd5b81516001600160401b03808211156200049d576200049d62000458565b604051601f8301601f19908116603f01168101908282118183101715620004c857620004c862000458565b81604052838152602092508683858801011115620004e557600080fd5b600091505b83821015620005095785820183015181830184015290820190620004ea565b838211156200051b5760008385830101525b9695505050505050565b80516001600160a01b03811681146200053d57600080fd5b919050565b6000806000806000806000806000806101408b8d0312156200056357600080fd5b8a516001600160401b03808211156200057b57600080fd5b620005898e838f016200046e565b9b5060208d0151915080821115620005a057600080fd5b620005ae8e838f016200046e565b9a5060408d0151915080821115620005c557600080fd5b50620005d48d828e016200046e565b985050620005e560608c0162000525565b9650620005f560808c0162000525565b95506200060560a08c0162000525565b94506200061560c08c0162000525565b935060e08b015192506101008b015191506101208b015190509295989b9194979a5092959850565b600181811c908216806200065257607f821691505b6020821081036200067357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051613756620006bb600039600081816103180152818161098801526109c401526000818161060201528181610a370152610a6c01526137566000f3fe6080604052600436106102045760003560e01c806355f804b311610118578063b88d4fde116100a0578063e985e9c51161006f578063e985e9c514610624578063f2e2e2aa1461066d578063f2fde38b1461069a578063f79c173f146106ba578063f9c26995146106da57600080fd5b8063b88d4fde1461059b578063c6682862146105bb578063c87b56dd146105d0578063d5abeb01146105f057600080fd5b8063755f08ba116100e7578063755f08ba146104fb5780638da5cb5b1461051b57806395d89b4114610539578063a22cb4651461054e578063b0bb52911461056e57600080fd5b806355f804b3146104865780636352211e146104a657806370a08231146104c6578063715018a6146104e657600080fd5b806323b872dd1161019b578063438b63001161016a578063438b6300146103d9578063452ed4f1146104065780634f6ccce7146104265780635001b5e81461044657806351cff8d91461046657600080fd5b806323b872dd1461033a5780632a55205a1461035a5780632f745c591461039957806342842e0e146103b957600080fd5b80630bb12bb8116101d75780630bb12bb8146102ba5780630d4d1513146102d457806318160ddd146102e7578063239c70ae1461030657600080fd5b806301ffc9a71461020957806306fdde031461023e578063081812fc14610260578063095ea7b314610298575b600080fd5b34801561021557600080fd5b50610229610224366004612e93565b6106ef565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610253610700565b6040516102359190612f08565b34801561026c57600080fd5b5061028061027b366004612f1b565b610792565b6040516001600160a01b039091168152602001610235565b3480156102a457600080fd5b506102b86102b3366004612f4b565b61082c565b005b3480156102c657600080fd5b506017546102299060ff1681565b6102b86102e2366004612f75565b610941565b3480156102f357600080fd5b506008545b604051908152602001610235565b34801561031257600080fd5b506102f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561034657600080fd5b506102b8610355366004612fb1565b610d01565b34801561036657600080fd5b5061037a610375366004612fed565b610d32565b604080516001600160a01b039093168352602083019190915201610235565b3480156103a557600080fd5b506102f86103b4366004612f4b565b610d65565b3480156103c557600080fd5b506102b86103d4366004612fb1565b610dfb565b3480156103e557600080fd5b506103f96103f436600461300f565b610e16565b604051610235919061302a565b34801561041257600080fd5b50601154610280906001600160a01b031681565b34801561043257600080fd5b506102f8610441366004612f1b565b610eb8565b34801561045257600080fd5b506102b86104613660046130ba565b610f4b565b34801561047257600080fd5b506102b861048136600461300f565b6110b8565b34801561049257600080fd5b506102b86104a13660046131b2565b61164e565b3480156104b257600080fd5b506102806104c1366004612f1b565b61168b565b3480156104d257600080fd5b506102f86104e136600461300f565b611702565b3480156104f257600080fd5b506102b8611789565b34801561050757600080fd5b506102b86105163660046130ba565b6117bf565b34801561052757600080fd5b50600a546001600160a01b0316610280565b34801561054557600080fd5b506102536118b4565b34801561055a57600080fd5b506102b8610569366004613209565b6118c3565b34801561057a57600080fd5b506102f861058936600461300f565b60156020526000908152604090205481565b3480156105a757600080fd5b506102b86105b6366004613240565b6118ce565b3480156105c757600080fd5b50610253611906565b3480156105dc57600080fd5b506102536105eb366004612f1b565b611994565b3480156105fc57600080fd5b506102f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561063057600080fd5b5061022961063f3660046132bc565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561067957600080fd5b506102f861068836600461300f565b60166020526000908152604090205481565b3480156106a657600080fd5b506102b86106b536600461300f565b611a72565b3480156106c657600080fd5b506102b86106d53660046132e6565b611b0a565b3480156106e657600080fd5b506102b8611b47565b60006106fa82611d70565b92915050565b60606000805461070f90613303565b80601f016020809104026020016040519081016040528092919081815260200182805461073b90613303565b80156107885780601f1061075d57610100808354040283529160200191610788565b820191906000526020600020905b81548152906001019060200180831161076b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108105760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108378261168b565b9050806001600160a01b0316836001600160a01b0316036108a45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610807565b336001600160a01b03821614806108c057506108c0813361063f565b6109325760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610807565b61093c8383611da1565b505050565b60175460ff161561096557604051636be9245d60e11b815260040160405180910390fd5b6000821161098657604051632e24020f60e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008211156109f05760405163bcd7dd8160e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006024820152604401610807565b6001600160a01b0383166000908152601660205260408120549003610a28576040516364822e9d60e11b815260040160405180910390fd5b6000610a3360085490565b90507f0000000000000000000000000000000000000000000000000000000000000000610a60848361334d565b1115610ab457610a90817f0000000000000000000000000000000000000000000000000000000000000000613365565b604051633393052560e11b8152600481019190915260248101849052604401610807565b6000610abf83611e0f565b9050346001600160a01b038616610bed576012546001600160a01b03166000908152601660205260409020546064908390610afa908861337c565b610b04919061337c565b610b0e91906133b1565b8114610b76576012546001600160a01b03166000908152601660205260409020546064908390610b3e908861337c565b610b48919061337c565b610b5291906133b1565b604051633a50fa9960e21b8152600481019190915260248101829052604401610807565b601260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610bc657600080fd5b505af1158015610bda573d6000803e3d6000fd5b5050505050610be885611f68565b610cf9565b6001600160a01b0386166000818152601660205260409020546323b872dd90339030906064908790610c1f908c61337c565b610c29919061337c565b610c3391906133b1565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cab91906133c5565b610cf05760405162461bcd60e51b815260206004820152601660248201527514185e5b595b9d081b9bdd081cdd58d8d95cdcd99d5b60521b6044820152606401610807565b610cf985611f68565b505050505050565b610d0b3382611fa1565b610d275760405162461bcd60e51b8152600401610807906133e2565b61093c838383612097565b600c54600d546001600160a01b0390911690600090610d526064856133b1565b610d5c919061337c565b90509250929050565b6000610d7083611702565b8210610dd25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610807565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61093c838383604051806020016040528060008152506118ce565b60606000610e2383611702565b905060008167ffffffffffffffff811115610e4057610e40613126565b604051908082528060200260200182016040528015610e69578160200160208202803683370190505b50905060005b82811015610eb057610e818582610d65565b828281518110610e9357610e93613433565b602090810291909101015280610ea881613449565b915050610e6f565b509392505050565b6000610ec360085490565b8210610f265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610807565b60088281548110610f3957610f39613433565b90600052602060002001549050919050565b600a546001600160a01b03163314610f755760405162461bcd60e51b815260040161080790613462565b828114610fb65760405162461bcd60e51b815260206004820152600f60248201526e0d2dae0e4dee0cae440d8cadccee8d608b1b6044820152606401610807565b8060005b81811015610cf9576012546001600160a01b0316868683818110610fe057610fe0613433565b9050602002016020810190610ff5919061300f565b6001600160a01b03160361104a5783838281811061101557611015613433565b60008052601660209081520291909101357f0263c2b778d062355049effc2dece97bc6547ff8a88a3258daa512061c2153dd55505b83838281811061105c5761105c613433565b905060200201356016600088888581811061107957611079613433565b905060200201602081019061108e919061300f565b6001600160a01b031681526020810191909152604001600020556110b181613449565b9050610fba565b600a546001600160a01b031633146110e25760405162461bcd60e51b815260040161080790613462565b6001600160a01b03811660009081526016602052604090205461113e5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b881b9bdd08185d5d1a1bdc9a5e995960621b6044820152606401610807565b6001600160a01b03811661117c5760405133904780156108fc02916000818181858888f19350505050158015611178573d6000803e3d6000fd5b5050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156111c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e79190613497565b9050600081116111f657600080fd5b60006112036002836133b1565b905060006112126002846133b1565b60135460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810185905291925085169063a9059cbb906044016020604051808303816000875af1158015611267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128b91906133c5565b50836001600160a01b031663a9059cbb60146000815481106112af576112af613433565b6000918252602090912001546001600160a01b031660646112d185601961337c565b6112db91906133b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134a91906133c5565b50836001600160a01b031663a9059cbb601460018154811061136e5761136e613433565b6000918252602090912001546001600160a01b0316606461139085601e61337c565b61139a91906133b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156113e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140991906133c5565b50836001600160a01b031663a9059cbb601460028154811061142d5761142d613433565b6000918252602090912001546001600160a01b0316606461144f85601961337c565b61145991906133b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156114a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c891906133c5565b50836001600160a01b031663a9059cbb60146003815481106114ec576114ec613433565b6000918252602090912001546001600160a01b0316606461150e85600a61337c565b61151891906133b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611563573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158791906133c5565b50836001600160a01b031663a9059cbb60146004815481106115ab576115ab613433565b6000918252602090912001546001600160a01b031660646115cd85600a61337c565b6115d791906133b1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611622573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164691906133c5565b505050505b50565b600a546001600160a01b031633146116785760405162461bcd60e51b815260040161080790613462565b805161117890600e906020840190612de4565b6000818152600260205260408120546001600160a01b0316806106fa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610807565b60006001600160a01b03821661176d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610807565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146117b35760405162461bcd60e51b815260040161080790613462565b6117bd600061223e565b565b600a546001600160a01b031633146117e95760405162461bcd60e51b815260040161080790613462565b8281146118385760405162461bcd60e51b815260206004820152601960248201527f4172726179206c656e6774687320646f6e2774206d61746368000000000000006044820152606401610807565b8260005b81811015610cf95783838281811061185657611856613433565b905060200201356015600088888581811061187357611873613433565b9050602002016020810190611888919061300f565b6001600160a01b03168152602081019190915260400160002055806118ac81613449565b91505061183c565b60606001805461070f90613303565b611178338383612290565b6118d83383611fa1565b6118f45760405162461bcd60e51b8152600401610807906133e2565b6119008484848461235e565b50505050565b600f805461191390613303565b80601f016020809104026020016040519081016040528092919081815260200182805461193f90613303565b801561198c5780601f106119615761010080835404028352916020019161198c565b820191906000526020600020905b81548152906001019060200180831161196f57829003601f168201915b505050505081565b6000818152600260205260409020546060906001600160a01b0316611a135760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610807565b6000611a1d612391565b90506000815111611a3d5760405180602001604052806000815250611a6b565b80611a47846123a0565b600f604051602001611a5b939291906134b0565b6040516020818303038152906040525b9392505050565b600a546001600160a01b03163314611a9c5760405162461bcd60e51b815260040161080790613462565b6001600160a01b038116611b015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610807565b61164b8161223e565b600a546001600160a01b03163314611b345760405162461bcd60e51b815260040161080790613462565b6017805460ff1916911515919091179055565b600a546001600160a01b03163314611b715760405162461bcd60e51b815260040161080790613462565b6000611b7c60085490565b9050600060788210611bd05760405162461bcd60e51b815260206004820152601960248201527f546f6f206d616e7920746f6b656e73207072656d696e746564000000000000006044820152606401610807565b60015b603c811161093c576095805461ffff16906000611bef83613573565b91906101000a81548161ffff021916908361ffff16021790555061ffff166107d0611c1a9190613365565b91506018611c29600184613365565b6107d08110611c3a57611c3a613433565b601081049190910154600f9091166002026101000a900461ffff1615611c9b576018611c67600184613365565b6107d08110611c7857611c78613433565b601091828204019190066002029054906101000a900461ffff1661ffff16611ca6565b611ca6600183613365565b6018846107d08110611cba57611cba613433565b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555060006018600184611cf09190613365565b6107d08110611d0157611d01613433565b601091828204019190066002026101000a81548161ffff021916908361ffff160217905550611d50731740eae421b6540fda3924be59f549c00ab67575846001611d4b919061334d565b6124a1565b82611d5a81613449565b9350508080611d6890613449565b915050611bd3565b6000611d7b826124bb565b806106fa5750506001600160e01b0319166000908152600b602052604090205460ff1690565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611dd68261168b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b601054604051633232066b60e21b815233600482015260009160649183916001600160a01b03169063c8c819ac9060240160408051808303816000875af1158015611e5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e829190613594565b90506001600160a01b038416611e9b5760649250611f28565b6040516370a0823160e01b81523360048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f069190613497565b1115611f28576001600160a01b03841660009081526015602052604090205492505b602081015115611f5157611f3f81602001516124e0565b611f4a906064613365565b9150611f56565b606491505b611f60838361252b565b949350505050565b60015b81811161117857611f9133611f86611f81612541565b6125b0565b611d4b90600161334d565b611f9a81613449565b9050611f6b565b6000818152600260205260408120546001600160a01b031661201a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610807565b60006120258361168b565b9050806001600160a01b0316846001600160a01b0316148061206c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611f605750836001600160a01b031661208584610792565b6001600160a01b031614949350505050565b826001600160a01b03166120aa8261168b565b6001600160a01b03161461210e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610807565b6001600160a01b0382166121705760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610807565b61217b8383836127c6565b612186600082611da1565b6001600160a01b03831660009081526003602052604081208054600192906121af908490613365565b90915550506001600160a01b03821660009081526003602052604081208054600192906121dd90849061334d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036122f15760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610807565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612369848484612097565b6123758484848461287e565b6119005760405162461bcd60e51b8152600401610807906135e3565b6060600e805461070f90613303565b6060816000036123c75750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123f157806123db81613449565b91506123ea9050600a836133b1565b91506123cb565b60008167ffffffffffffffff81111561240c5761240c613126565b6040519080825280601f01601f191660200182016040528015612436576020820181803683370190505b5090505b8415611f605761244b600183613365565b9150612458600a86613635565b61246390603061334d565b60f81b81838151811061247857612478613433565b60200101906001600160f81b031916908160001a90535061249a600a866133b1565b945061243a565b61117882826040518060200160405280600081525061297f565b60006001600160e01b0319821663780e9d6360e01b14806106fa57506106fa826129b2565b6000806103206124ef84612a02565b6124f991906133b1565b61250490602361334d565b9050602381101561251757506023612524565b6032811115612524575060325b611a6b6032825b600081831061253a5781611a6b565b5090919050565b600080600061254e612a72565b9150915081813361255e60085490565b6040805160208101959095528401929092526bffffffffffffffffffffffff19606091821b169083015260748201526094016040516020818303038152906040528051906020012060001c9250505090565b60958054600091829161ffff1690826125c883613573565b91906101000a81548161ffff021916908361ffff16021790555061ffff166107d06125f39190613365565b9050600081116126335760405162461bcd60e51b815260206004820152600b60248201526a1b9bc81a591cc81b19599d60aa1b6044820152606401610807565b600061263f8285613635565b90506018816107d0811061265557612655613433565b601091828204019190066002029054906101000a900461ffff1661ffff1660000361268057806126b3565b6018816107d0811061269457612694613433565b601091828204019190066002029054906101000a900461ffff1661ffff165b925060186126c2600184613365565b6107d081106126d3576126d3613433565b601081049190910154600f9091166002026101000a900461ffff1615612734576018612700600184613365565b6107d0811061271157612711613433565b601091828204019190066002029054906101000a900461ffff1661ffff1661273f565b61273f600183613365565b6018826107d0811061275357612753613433565b601091828204019190066002026101000a81548161ffff021916908361ffff160217905550600060186001846127899190613365565b6107d0811061279a5761279a613433565b601091828204019190066002026101000a81548161ffff021916908361ffff1602179055505050919050565b6001600160a01b0383166128215761281c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612844565b816001600160a01b0316836001600160a01b031614612844576128448382612b06565b6001600160a01b03821661285b5761093c81612ba3565b826001600160a01b0316826001600160a01b03161461093c5761093c8282612c52565b60006001600160a01b0384163b1561297457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906128c2903390899088908890600401613649565b6020604051808303816000875af19250505080156128fd575060408051601f3d908101601f191682019092526128fa91810190613686565b60015b61295a573d80801561292b576040519150601f19603f3d011682016040523d82523d6000602084013e612930565b606091505b5080516000036129525760405162461bcd60e51b8152600401610807906135e3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f60565b506001949350505050565b6129898383612c96565b612996600084848461287e565b61093c5760405162461bcd60e51b8152600401610807906135e3565b60006001600160e01b031982166380ac58cd60e01b14806129e357506001600160e01b03198216635b5e139f60e01b145b806106fa57506301ffc9a760e01b6001600160e01b03198316146106fa565b60006003821115612a635750806000612a1c6002836133b1565b612a2790600161334d565b90505b81811015612a5d57905080600281612a4281866133b1565b612a4c919061334d565b612a5691906133b1565b9050612a2a565b50919050565b8115612a6d575060015b919050565b600080600080601160009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015612acb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aef91906136ba565b506001600160701b03918216969116945092505050565b60006001612b1384611702565b612b1d9190613365565b600083815260076020526040902054909150808214612b70576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612bb590600190613365565b60008381526009602052604081205460088054939450909284908110612bdd57612bdd613433565b906000526020600020015490508060088381548110612bfe57612bfe613433565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612c3657612c3661370a565b6001900381819060005260206000200160009055905550505050565b6000612c5d83611702565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612cec5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610807565b6000818152600260205260409020546001600160a01b031615612d515760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610807565b612d5d600083836127c6565b6001600160a01b0382166000908152600360205260408120805460019290612d8690849061334d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612df090613303565b90600052602060002090601f016020900481019282612e125760008555612e58565b82601f10612e2b57805160ff1916838001178555612e58565b82800160010185558215612e58579182015b82811115612e58578251825591602001919060010190612e3d565b50612e64929150612e68565b5090565b5b80821115612e645760008155600101612e69565b6001600160e01b03198116811461164b57600080fd5b600060208284031215612ea557600080fd5b8135611a6b81612e7d565b60005b83811015612ecb578181015183820152602001612eb3565b838111156119005750506000910152565b60008151808452612ef4816020860160208601612eb0565b601f01601f19169290920160200192915050565b602081526000611a6b6020830184612edc565b600060208284031215612f2d57600080fd5b5035919050565b80356001600160a01b0381168114612a6d57600080fd5b60008060408385031215612f5e57600080fd5b612f6783612f34565b946020939093013593505050565b600080600060608486031215612f8a57600080fd5b612f9384612f34565b925060208401359150612fa860408501612f34565b90509250925092565b600080600060608486031215612fc657600080fd5b612fcf84612f34565b9250612fdd60208501612f34565b9150604084013590509250925092565b6000806040838503121561300057600080fd5b50508035926020909101359150565b60006020828403121561302157600080fd5b611a6b82612f34565b6020808252825182820181905260009190848201906040850190845b8181101561306257835183529284019291840191600101613046565b50909695505050505050565b60008083601f84011261308057600080fd5b50813567ffffffffffffffff81111561309857600080fd5b6020830191508360208260051b85010111156130b357600080fd5b9250929050565b600080600080604085870312156130d057600080fd5b843567ffffffffffffffff808211156130e857600080fd5b6130f48883890161306e565b9096509450602087013591508082111561310d57600080fd5b5061311a8782880161306e565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561315757613157613126565b604051601f8501601f19908116603f0116810190828211818310171561317f5761317f613126565b8160405280935085815286868601111561319857600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156131c457600080fd5b813567ffffffffffffffff8111156131db57600080fd5b8201601f810184136131ec57600080fd5b611f608482356020840161313c565b801515811461164b57600080fd5b6000806040838503121561321c57600080fd5b61322583612f34565b91506020830135613235816131fb565b809150509250929050565b6000806000806080858703121561325657600080fd5b61325f85612f34565b935061326d60208601612f34565b925060408501359150606085013567ffffffffffffffff81111561329057600080fd5b8501601f810187136132a157600080fd5b6132b08782356020840161313c565b91505092959194509250565b600080604083850312156132cf57600080fd5b6132d883612f34565b9150610d5c60208401612f34565b6000602082840312156132f857600080fd5b8135611a6b816131fb565b600181811c9082168061331757607f821691505b602082108103612a5d57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561336057613360613337565b500190565b60008282101561337757613377613337565b500390565b600081600019048311821515161561339657613396613337565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826133c0576133c061339b565b500490565b6000602082840312156133d757600080fd5b8151611a6b816131fb565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006001820161345b5761345b613337565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156134a957600080fd5b5051919050565b6000845160206134c38285838a01612eb0565b8551918401916134d68184848a01612eb0565b8554920191600090600181811c90808316806134f357607f831692505b858310810361351057634e487b7160e01b85526022600452602485fd5b808015613524576001811461353557613562565b60ff19851688528388019550613562565b60008b81526020902060005b8581101561355a5781548a820152908401908801613541565b505083880195505b50939b9a5050505050505050505050565b600061ffff80831681810361358a5761358a613337565b6001019392505050565b6000604082840312156135a657600080fd5b6040516040810181811067ffffffffffffffff821117156135c9576135c9613126565b604052825181526020928301519281019290925250919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826136445761364461339b565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061367c90830184612edc565b9695505050505050565b60006020828403121561369857600080fd5b8151611a6b81612e7d565b80516001600160701b0381168114612a6d57600080fd5b6000806000606084860312156136cf57600080fd5b6136d8846136a3565b92506136e6602085016136a3565b9150604084015163ffffffff811681146136ff57600080fd5b809150509250925092565b634e487b7160e01b600052603160045260246000fdfea26469706673582212204ce8068ea319958168cf75bc0fcca3e6b442a7611611bbb06dad6c291ba7700364736f6c634300080d00330000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000002b4c76d0dc16be1c31d4c1dc53bf9b45987fc75c0000000000000000000000001740eae421b6540fda3924be59f549c00ab6757500000000000000000000000096662f375a9734654cb57bbfeb31db9dd7784a7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000f546865437572736564436972637573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035443430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005868747470733a2f2f6375727365646369726375732e6d7970696e6174612e636c6f75642f697066732f516d55464a6d5247544a65394a556968534e387a69474e55377131384d43584a48634750544b4d74316d34614c752f0000000000000000

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

0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000002b4c76d0dc16be1c31d4c1dc53bf9b45987fc75c0000000000000000000000001740eae421b6540fda3924be59f549c00ab6757500000000000000000000000096662f375a9734654cb57bbfeb31db9dd7784a7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000f546865437572736564436972637573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035443430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005868747470733a2f2f6375727365646369726375732e6d7970696e6174612e636c6f75642f697066732f516d55464a6d5247544a65394a556968534e387a69474e55377131384d43584a48634750544b4d74316d34614c752f0000000000000000

-----Decoded View---------------
Arg [0] : _name (string): TheCursedCircus
Arg [1] : _symbol (string): TCC
Arg [2] : _initBaseURI (string): https://cursedcircus.mypinata.cloud/ipfs/QmUFJmRGTJe9JUihSN8ziGNU7q18MCXJHcGPTKMt1m4aLu/
Arg [3] : _lpPair (address): 0x2b4c76d0dc16be1c31d4c1dc53bf9b45987fc75c
Arg [4] : _royaltyAddress (address): 0x1740eae421b6540fda3924be59f549c00ab67575
Arg [5] : _addressLGE (address): 0x96662f375a9734654cb57bbfeb31db9dd7784a7f
Arg [6] : _wftm (address): 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [7] : _royaltiesPercentage (uint256): 5
Arg [8] : _maxSupply (uint256): 2000
Arg [9] : _maxMintAmount (uint256): 5

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [3] : 0000000000000000000000002b4c76d0dc16be1c31d4c1dc53bf9b45987fc75c
Arg [4] : 0000000000000000000000001740eae421b6540fda3924be59f549c00ab67575
Arg [5] : 00000000000000000000000096662f375a9734654cb57bbfeb31db9dd7784a7f
Arg [6] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [11] : 5468654375727365644369726375730000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 5443430000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000058
Arg [15] : 68747470733a2f2f6375727365646369726375732e6d7970696e6174612e636c
Arg [16] : 6f75642f697066732f516d55464a6d5247544a65394a556968534e387a69474e
Arg [17] : 55377131384d43584a48634750544b4d74316d34614c752f0000000000000000


Loading