Blast Sepolia Testnet

Contract

0x58C8918A79da1059C6c9730C79612DB0dd7E0C50
Source Code Source Code

Overview

ETH Balance

0 ETH

Token Holdings

More Info

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Amount
Claim84390322024-07-21 12:25:52558 days ago1721564752IN
0x58C8918A...0dd7E0C50
0 ETH0.000190411.50000025
Claim74902732024-06-29 13:20:34580 days ago1719667234IN
0x58C8918A...0dd7E0C50
0 ETH0.000001170.00106728
Claim67065452024-06-11 9:56:18598 days ago1718099778IN
0x58C8918A...0dd7E0C50
0 ETH0.000000310.00010025
Claim60032312024-05-26 3:12:30614 days ago1716693150IN
0x58C8918A...0dd7E0C50
0 ETH0.000000140.00100025
Claim57923432024-05-21 6:02:54619 days ago1716271374IN
0x58C8918A...0dd7E0C50
0 ETH0.000001340.00097025
Claim57656842024-05-20 15:14:16620 days ago1716218056IN
0x58C8918A...0dd7E0C50
0 ETH0.000012730.00097025
Claim57084802024-05-19 7:27:28621 days ago1716103648IN
0x58C8918A...0dd7E0C50
0 ETH0.000002790.00097026
Claim57084772024-05-19 7:27:22621 days ago1716103642IN
0x58C8918A...0dd7E0C50
0 ETH0.000002880.00097026
Claim57041882024-05-19 5:04:24621 days ago1716095064IN
0x58C8918A...0dd7E0C50
0 ETH0.000001970.00097027
Claim56368642024-05-17 15:40:16622 days ago1715960416IN
0x58C8918A...0dd7E0C50
0 ETH0.000027420.00097025
Claim53371952024-05-10 17:11:18629 days ago1715361078IN
0x58C8918A...0dd7E0C50
0 ETH0.000024540.00097026
Claim53366182024-05-10 16:52:04629 days ago1715359924IN
0x58C8918A...0dd7E0C50
0 ETH0.000008510.00125034
Claim53213292024-05-10 8:22:26630 days ago1715329346IN
0x58C8918A...0dd7E0C50
0 ETH0.00000020.00097025
Claim53110612024-05-10 2:40:10630 days ago1715308810IN
0x58C8918A...0dd7E0C50
0 ETH0.000000120.00097025
Claim52911092024-05-09 15:35:06630 days ago1715268906IN
0x58C8918A...0dd7E0C50
0 ETH0.000001060.00100026
Claim52862662024-05-09 12:53:40631 days ago1715259220IN
0x58C8918A...0dd7E0C50
0 ETH0.000000240.00097026
Claim52664592024-05-09 1:53:26631 days ago1715219606IN
0x58C8918A...0dd7E0C50
0 ETH0.000041720.00100025
Claim52529982024-05-08 18:24:44631 days ago1715192684IN
0x58C8918A...0dd7E0C50
0 ETH0.000120580.00100025
Claim52301272024-05-08 5:42:22632 days ago1715146942IN
0x58C8918A...0dd7E0C50
0 ETH0.000212950.00097025
Claim52247052024-05-08 2:41:38632 days ago1715136098IN
0x58C8918A...0dd7E0C50
0 ETH0.000000330.00097026
Claim52197402024-05-07 23:56:08632 days ago1715126168IN
0x58C8918A...0dd7E0C50
0 ETH0.000000760.00097025
Claim52175292024-05-07 22:42:26632 days ago1715121746IN
0x58C8918A...0dd7E0C50
0 ETH0.000001260.00010025
Claim52085122024-05-07 17:41:52632 days ago1715103712IN
0x58C8918A...0dd7E0C50
0 ETH0.000067830.00097025
Claim51982762024-05-07 12:00:40633 days ago1715083240IN
0x58C8918A...0dd7E0C50
0 ETH0.000205030.00097025
Claim51678072024-05-06 19:05:02633 days ago1715022302IN
0x58C8918A...0dd7E0C50
0 ETH0.000131420.00100025
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To Amount
48454512024-04-29 7:59:50641 days ago1714377590
0x58C8918A...0dd7E0C50
0.003 ETH
48454482024-04-29 7:59:44641 days ago1714377584
0x58C8918A...0dd7E0C50
0.2 ETH
48454172024-04-29 7:58:42641 days ago1714377522
0x58C8918A...0dd7E0C50
0.002 ETH
48453682024-04-29 7:57:04641 days ago1714377424
0x58C8918A...0dd7E0C50
0.02 ETH
48453122024-04-29 7:55:12641 days ago1714377312
0x58C8918A...0dd7E0C50
0.0015 ETH
48452882024-04-29 7:54:24641 days ago1714377264
0x58C8918A...0dd7E0C50
0.05 ETH
48452772024-04-29 7:54:02641 days ago1714377242
0x58C8918A...0dd7E0C50
0.001 ETH
48452702024-04-29 7:53:48641 days ago1714377228
0x58C8918A...0dd7E0C50
0.001 ETH
48452642024-04-29 7:53:36641 days ago1714377216
0x58C8918A...0dd7E0C50
0.6 ETH
48452642024-04-29 7:53:36641 days ago1714377216
0x58C8918A...0dd7E0C50
0.0005 ETH
48452562024-04-29 7:53:20641 days ago1714377200
0x58C8918A...0dd7E0C50
0.001 ETH
48452522024-04-29 7:53:12641 days ago1714377192
0x58C8918A...0dd7E0C50
0.05 ETH
48452322024-04-29 7:52:32641 days ago1714377152
0x58C8918A...0dd7E0C50
0.003 ETH
48452272024-04-29 7:52:22641 days ago1714377142
0x58C8918A...0dd7E0C50
0.05 ETH
48452232024-04-29 7:52:14641 days ago1714377134
0x58C8918A...0dd7E0C50
0.03 ETH
48452112024-04-29 7:51:50641 days ago1714377110
0x58C8918A...0dd7E0C50
0.01 ETH
48450822024-04-29 7:47:32641 days ago1714376852
0x58C8918A...0dd7E0C50
1 ETH
48450602024-04-29 7:46:48641 days ago1714376808
0x58C8918A...0dd7E0C50
0.009 ETH
48450342024-04-29 7:45:56641 days ago1714376756
0x58C8918A...0dd7E0C50
0.01 ETH
48450282024-04-29 7:45:44641 days ago1714376744
0x58C8918A...0dd7E0C50
0.05 ETH
48450162024-04-29 7:45:20641 days ago1714376720
0x58C8918A...0dd7E0C50
0.006 ETH
48450152024-04-29 7:45:18641 days ago1714376718
0x58C8918A...0dd7E0C50
0.00479 ETH
48449922024-04-29 7:44:32641 days ago1714376672
0x58C8918A...0dd7E0C50
0.05 ETH
48449692024-04-29 7:43:46641 days ago1714376626
0x58C8918A...0dd7E0C50
0.05 ETH
48449222024-04-29 7:42:12641 days ago1714376532
0x58C8918A...0dd7E0C50
0.0001 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Presale

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma abicoder v2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import './Blast.sol';
import "./interfaces/IWETH.sol";
import "./interfaces/tokens/IXPlaneToken.sol";

contract Presale is Ownable, ReentrancyGuard, Blast {
  using SafeMath for uint256;
  using SafeERC20 for IERC20;

  struct UserInfo {
    uint256 allocation; // amount taken into account to obtain PLANE (amount spent + discount)
    uint256 contribution; // amount spent to buy PLANE

    uint256 discount; // discount % for this user
    uint256 discountEligibleAmount; // max contribution amount eligible for a discount

    address ref; // referral for this account
    uint256 refEarnings; // referral earnings made by this account
    uint256 claimedRefEarnings; // amount of claimed referral earnings
    bool hasClaimed; // has already claimed its allocation
  }

  IERC20 public immutable PLANE; // PLANE token contract
  IXPlaneToken public immutable XPLANE; // xPLANE token contract
  IERC20 public immutable SALE_TOKEN; // token used to participate
  IERC20 public immutable LP_TOKEN; // PLANE LP address

  uint256 public immutable START_TIME; // sale start time
  uint256 public immutable END_TIME; // sale end time

  uint256 public constant REFERRAL_SHARE = 3; // 3%

  mapping(address => UserInfo) public userInfo; // buyers and referrers info
  uint256 public totalRaised; // raised amount, does not take into account referral shares
  uint256 public totalAllocation; // takes into account discounts

  uint256 public constant MAX_PLANE_TO_DISTRIBUTE = 1500000 ether; // max PLANE amount to distribute during the sale

  // (=300,000 USDC, with USDC having 6 decimals ) amount to reach to distribute max PLANE amount
  uint256 public constant MIN_TOTAL_RAISED_FOR_MAX_PLANE = 15 ether;

  uint256 public constant XPLANE_SHARE = 35; // ~1/3 of PLANE bought is returned as xPLANE

  address public immutable treasury; // treasury multisig, will receive raised amount

  bool public unsoldTokensBurnt;

  address public weth = 0x4200000000000000000000000000000000000023;

  constructor(IERC20 planeToken, IXPlaneToken xPlaneToken, IERC20 saleToken, IERC20 lpToken, uint256 startTime, uint256 endTime, address treasury_) {
    require(startTime < endTime, "invalid dates");
    require(treasury_ != address(0), "invalid treasury");

    PLANE = planeToken;
    XPLANE = xPlaneToken;
    SALE_TOKEN = saleToken;
    LP_TOKEN = lpToken;
    START_TIME = startTime;
    END_TIME = endTime;
    treasury = treasury_;
  }

  /********************************************/
  /****************** EVENTS ******************/
  /********************************************/

  event Buy(address indexed user, uint256 amount);
  event ClaimRefEarnings(address indexed user, uint256 amount);
  event Claim(address indexed user, uint256 planeAmount, uint256 xPlaneAmount);
  event NewRefEarning(address referrer, uint256 amount);
  event DiscountUpdated();

  event EmergencyWithdraw(address token, uint256 amount);

  /***********************************************/
  /****************** MODIFIERS ******************/
  /***********************************************/

  /**
   * @dev Check whether the sale is currently active
   *
   * Will be marked as inactive if PLANE has not been deposited into the contract
   */
  modifier isSaleActive() {
    require(hasStarted() && !hasEnded() && PLANE.balanceOf(address(this)) >= MAX_PLANE_TO_DISTRIBUTE, "isActive: sale is not active");
    _;
  }

  /**
   * @dev Check whether users can claim their purchased PLANE
   *
   * Sale must have ended, and LP tokens must have been formed
   */
  modifier isClaimable(){
    require(hasEnded(), "isClaimable: sale has not ended");
    require(LP_TOKEN.totalSupply() > 0, "isClaimable: no LP tokens");
    _;
  }

  /**************************************************/
  /****************** PUBLIC VIEWS ******************/
  /**************************************************/

  /**
  * @dev Get remaining duration before the end of the sale
  */
  function getRemainingTime() external view returns (uint256){
    if (hasEnded()) return 0;
    return END_TIME.sub(_currentBlockTimestamp());
  }

  /**
  * @dev Returns whether the sale has already started
  */
  function hasStarted() public view returns (bool) {
    return _currentBlockTimestamp() >= START_TIME;
  }

  /**
  * @dev Returns whether the sale has already ended
  */
  function hasEnded() public view returns (bool){
    return END_TIME <= _currentBlockTimestamp();
  }

  /**
  * @dev Returns the amount of PLANE to be distributed based on the current total raised
  */
  function planeToDistribute() public view returns (uint256){
    if (MIN_TOTAL_RAISED_FOR_MAX_PLANE > totalRaised) {
      return MAX_PLANE_TO_DISTRIBUTE.mul(totalRaised).div(MIN_TOTAL_RAISED_FOR_MAX_PLANE);
    }
    return MAX_PLANE_TO_DISTRIBUTE;
  }

  /**
  * @dev Get user share times 1e5
    */
  function getExpectedClaimAmounts(address account) public view returns (uint256 planeAmount, uint256 xPlaneAmount) {
    if(totalAllocation == 0) return (0, 0);

    UserInfo memory user = userInfo[account];
    uint256 totalPlaneAmount = user.allocation.mul(planeToDistribute()).div(totalAllocation);

    xPlaneAmount = totalPlaneAmount.mul(XPLANE_SHARE).div(100);
    planeAmount = totalPlaneAmount.sub(xPlaneAmount);
  }

  /****************************************************************/
  /****************** EXTERNAL PUBLIC FUNCTIONS  ******************/
  /****************************************************************/

  function buyETH(address referralAddress) external isSaleActive nonReentrant payable {
    require(address(SALE_TOKEN) == weth, "buyETH: non-ETH sale");
    uint256 amount = msg.value;
    IWETH(weth).deposit{value: amount}();
    _buy(amount, referralAddress);
  }

/**
 * @dev Purchase an allocation for the sale for a value of "amount" SALE_TOKEN, referred by "referralAddress"
   */
  function buy(uint256 amount, address referralAddress) external isSaleActive nonReentrant {
    SALE_TOKEN.safeTransferFrom(msg.sender, address(this), amount);
    _buy(amount, referralAddress);
  }

  function _buy(uint256 amount, address referralAddress) internal {
    require(amount > 0, "buy: zero amount");

    uint256 participationAmount = amount;
    UserInfo storage user = userInfo[msg.sender];

    // handle user's referral
    if (user.allocation == 0 && user.ref == address(0) && referralAddress != address(0) && referralAddress != msg.sender) {
      // If first buy, and does not have any ref already set
      user.ref = referralAddress;
    }
    referralAddress = user.ref;

    if (referralAddress != address(0)) {
      UserInfo storage referrer = userInfo[referralAddress];

      // compute and send referrer share
      uint256 refShareAmount = REFERRAL_SHARE.mul(amount).div(100);

      referrer.refEarnings = referrer.refEarnings.add(refShareAmount);
      participationAmount = participationAmount.sub(refShareAmount);

      emit NewRefEarning(referralAddress, refShareAmount);
    }

    uint256 allocation = amount;
    if (user.discount > 0 && user.contribution < user.discountEligibleAmount) {

      // Get eligible amount for the active user's discount
      uint256 discountEligibleAmount = user.discountEligibleAmount.sub(user.contribution);
      if (discountEligibleAmount > amount) {
        discountEligibleAmount = amount;
      }
      // Readjust user new allocation
      allocation = allocation.add(discountEligibleAmount.mul(user.discount).div(100));
    }

    // update raised amounts
    user.contribution = user.contribution.add(amount);
    totalRaised = totalRaised.add(amount);

    // update allocations
    user.allocation = user.allocation.add(allocation);
    totalAllocation = totalAllocation.add(allocation);

    emit Buy(msg.sender, amount);
    // transfer contribution to treasury
    SALE_TOKEN.safeTransfer(treasury, participationAmount);
  }

  /**
   * @dev Claim referral earnings
   */
  function claimRefEarnings() public {
    UserInfo storage user = userInfo[msg.sender];
    uint256 toClaim = user.refEarnings.sub(user.claimedRefEarnings);

    if(toClaim > 0){
      user.claimedRefEarnings = user.claimedRefEarnings.add(toClaim);

      emit ClaimRefEarnings(msg.sender, toClaim);
      SALE_TOKEN.safeTransfer(msg.sender, toClaim);
    }
  }

  /**
   * @dev Claim purchased PLANE during the sale
   */
  function claim() external isClaimable {
    UserInfo storage user = userInfo[msg.sender];

    require(totalAllocation > 0 && user.allocation > 0, "claim: zero allocation");
    require(!user.hasClaimed, "claim: already claimed");
    user.hasClaimed = true;

    (uint256 planeAmount, uint256 xPlaneAmount) = getExpectedClaimAmounts(msg.sender);

    emit Claim(msg.sender, planeAmount, xPlaneAmount);

    // approve PLANE conversion to xPLANE
    if (PLANE.allowance(address(this), address(XPLANE)) < xPlaneAmount) {
      PLANE.safeApprove(address(XPLANE), 0);
      PLANE.safeApprove(address(XPLANE), type(uint256).max);
    }

    // send PLANE and xPLANE allocations
    if(xPlaneAmount > 0) XPLANE.convertTo(xPlaneAmount, msg.sender);
    _safeClaimTransfer(msg.sender, planeAmount);
  }

  /****************************************************************/
  /********************** OWNABLE FUNCTIONS  **********************/
  /****************************************************************/

  struct DiscountSettings {
    address account;
    uint256 discount;
    uint256 eligibleAmount;
  }

  /**
   * @dev Assign custom discounts, used for v1 users
   *
   * Based on saved v1 tokens amounts in our snapshot
   */
  function setUsersDiscount(DiscountSettings[] calldata users) public onlyOwner {
    for (uint256 i = 0; i < users.length; ++i) {
      DiscountSettings memory userDiscount = users[i];
      UserInfo storage user = userInfo[userDiscount.account];
      require(userDiscount.discount <= 35, "discount too high");
      user.discount = userDiscount.discount;
      user.discountEligibleAmount = userDiscount.eligibleAmount;
    }

    emit DiscountUpdated();
  }

  /********************************************************/
  /****************** /!\ EMERGENCY ONLY ******************/
  /********************************************************/

  /**
   * @dev Failsafe
   */
  function emergencyWithdrawFunds(address token, uint256 amount) external onlyOwner {
    IERC20(token).safeTransfer(msg.sender, amount);

    emit EmergencyWithdraw(token, amount);
  }

  /**
   * @dev Burn unsold PLANE tokens if MIN_TOTAL_RAISED_FOR_MAX_PLANE has not been reached
   *
   * Must only be called by the owner
   */
  function burnUnsoldTokens() external onlyOwner {
    require(hasEnded(), "burnUnsoldTokens: presale has not ended");
    require(!unsoldTokensBurnt, "burnUnsoldTokens: already burnt");

    uint256 totalSold = planeToDistribute();
    require(totalSold < MAX_PLANE_TO_DISTRIBUTE, "burnUnsoldTokens: no token to burn");

    unsoldTokensBurnt = true;
    PLANE.transfer(0x000000000000000000000000000000000000dEaD, MAX_PLANE_TO_DISTRIBUTE.sub(totalSold));
  }

  /********************************************************/
  /****************** INTERNAL FUNCTIONS ******************/
  /********************************************************/

  /**
   * @dev Safe token transfer function, in case rounding error causes contract to not have enough tokens
   */
  function _safeClaimTransfer(address to, uint256 amount) internal {
    uint256 planeBalance = PLANE.balanceOf(address(this));
    bool transferSuccess = false;

    if (amount > planeBalance) {
      transferSuccess = PLANE.transfer(to, planeBalance);
    } else {
      transferSuccess = PLANE.transfer(to, amount);
    }

    require(transferSuccess, "safeClaimTransfer: Transfer failed");
  }

  /**
   * @dev Utility function to get the current block timestamp
   */
  function _currentBlockTimestamp() internal view virtual returns (uint256) {
    return block.timestamp;
  }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 8 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

import "./interfaces/IBlast.sol";
import "./interfaces/IERC20Rebasing.sol";
import "./interfaces/IBlastPoints.sol";

contract Blast {

    address public collector = 0xC1D7b84fb8fE0691D156eda30f51fD48d219ea94;

    // Blast Native Contracts
    IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002);
    IERC20Rebasing public constant USDBBLAST = IERC20Rebasing(0x4200000000000000000000000000000000000022);
    IERC20Rebasing public constant WETHBLAST = IERC20Rebasing(0x4200000000000000000000000000000000000023);
    IBlastPoints public constant BLASTPOINTS = IBlastPoints(0x2fc95838c71e76ec69ff817983BFf17c710F34E0);

     constructor() public {
         BLAST.configureClaimableYield(); // Configuring the yield for ETH deposits of this contract (if any) to be claimable
         BLAST.configureClaimableGas(); // Configuring the Gas Revenue collected by this contract to be claimable
         BLAST.configureGovernor(collector); // Setting Governor to manage the ETH yield and Gas Revenue. Initially set to the deployer

         WETHBLAST.configure(IERC20Rebasing.YieldMode.CLAIMABLE); // Configuring the yield for WETH deposits of this contract (if any) to be claimable
         USDBBLAST.configure(IERC20Rebasing.YieldMode.CLAIMABLE); // Configuring the yield for USDB deposits of this contract (if any) to be claimable
         BLASTPOINTS.configurePointsOperator(collector); // Configure Blast Points
    }


    /***********************************************/
    /****************** MODIFIERS ******************/
    /***********************************************/

    /**
    * @dev Check if caller is the collector
    */
    modifier onlyCollector() {
        require(collector == msg.sender, "Blast: caller is not the collector");
        _;
    }


    /*******************************************************/
    /****************** COLLECTOR FUNCTIONS ****************/
    /*******************************************************/

    /**
   * @dev Calls claim function of WETH and USDB deposits (if any) for this contract to transfer the yield to the recipient
   *
   * Must only be called by the collector
   */
    function claimWethAndUsdbYield(address recipient, uint256 amount) public onlyCollector  {
       WETHBLAST.claim(recipient, amount);
       USDBBLAST.claim(recipient, amount);
    }

    function setCollector(address _collector) external onlyCollector {
        collector = _collector;
    }

}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

// Blast Contract Interface
interface IBlast{
    function configureClaimableYield() external;
    function configureClaimableGas() external;
    function configureGovernor(address _governor) external;
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IBlastPoints {
	function configurePointsOperator(address operator) external;
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;



interface IERC20Rebasing {

   enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
   }
  // changes the yield mode of the caller and update the balance
  // to reflect the configuration
  function configure(YieldMode) external returns (uint256);
  // "claimable" yield mode accounts can call this this claim their yield
  // to another address
  function claim(address recipient, uint256 amount) external returns (uint256);
  // read the claimable amount for an account
  function getClaimableAmount(address account) external view returns (uint256);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IXPlaneToken is IERC20 {
  function usageAllocations(address userAddress, address usageAddress) external view returns (uint256 allocation);

  function allocateFromUsage(address userAddress, uint256 amount) external;
  function convertTo(uint256 amount, address to) external;
  function deallocateFromUsage(address userAddress, uint256 amount) external;

  function isTransferWhitelisted(address account) external view returns (bool);
}

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

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20","name":"planeToken","type":"address"},{"internalType":"contract IXPlaneToken","name":"xPlaneToken","type":"address"},{"internalType":"contract IERC20","name":"saleToken","type":"address"},{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"treasury_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"planeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xPlaneAmount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRefEarnings","type":"event"},{"anonymous":false,"inputs":[],"name":"DiscountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewRefEarning","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"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLASTPOINTS","outputs":[{"internalType":"contract IBlastPoints","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"END_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LP_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PLANE_TO_DISTRIBUTE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_TOTAL_RAISED_FOR_MAX_PLANE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLANE","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFERRAL_SHARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDBBLAST","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETHBLAST","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"XPLANE","outputs":[{"internalType":"contract IXPlaneToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"XPLANE_SHARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnUnsoldTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"referralAddress","type":"address"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referralAddress","type":"address"}],"name":"buyETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRefEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimWethAndUsdbYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getExpectedClaimAmounts","outputs":[{"internalType":"uint256","name":"planeAmount","type":"uint256"},{"internalType":"uint256","name":"xPlaneAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRemainingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"planeToDistribute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collector","type":"address"}],"name":"setCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"discount","type":"uint256"},{"internalType":"uint256","name":"eligibleAmount","type":"uint256"}],"internalType":"struct Presale.DiscountSettings[]","name":"users","type":"tuple[]"}],"name":"setUsersDiscount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unsoldTokensBurnt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"uint256","name":"contribution","type":"uint256"},{"internalType":"uint256","name":"discount","type":"uint256"},{"internalType":"uint256","name":"discountEligibleAmount","type":"uint256"},{"internalType":"address","name":"ref","type":"address"},{"internalType":"uint256","name":"refEarnings","type":"uint256"},{"internalType":"uint256","name":"claimedRefEarnings","type":"uint256"},{"internalType":"bool","name":"hasClaimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

610160604052600280546001600160a01b03191673c1d7b84fb8fe0691d156eda30f51fd48d219ea941790556006805474420000000000000000000000000000000000002300610100600160a81b03199091161790553480156200006257600080fd5b5060405162002f7538038062002f75833981016040819052620000859162000441565b6000620000916200043d565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180819055507343000000000000000000000000000000000000026001600160a01b031663f098767a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200013257600080fd5b505af115801562000147573d6000803e3d6000fd5b505050507343000000000000000000000000000000000000026001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200019b57600080fd5b505af1158015620001b0573d6000803e3d6000fd5b505060025460408051631d70c8d360e31b81526001600160a01b03909216600483015251734300000000000000000000000000000000000002935063eb8646989250602480830192600092919082900301818387803b1580156200021357600080fd5b505af115801562000228573d6000803e3d6000fd5b5050604051631a33757d60e01b81527342000000000000000000000000000000000000239250631a33757d915060029060040180828152602001915050602060405180830381600087803b1580156200028057600080fd5b505af115801562000295573d6000803e3d6000fd5b505050506040513d6020811015620002ac57600080fd5b5050604051631a33757d60e01b815273420000000000000000000000000000000000002290631a33757d9060029060040180828152602001915050602060405180830381600087803b1580156200030257600080fd5b505af115801562000317573d6000803e3d6000fd5b505050506040513d60208110156200032e57600080fd5b5050600254604080516336b91f2b60e01b81526001600160a01b03909216600483015251732fc95838c71e76ec69ff817983bff17c710f34e0916336b91f2b91602480830192600092919082900301818387803b1580156200038f57600080fd5b505af1158015620003a4573d6000803e3d6000fd5b50505050818310620003d35760405162461bcd60e51b8152600401620003ca90620004d4565b60405180910390fd5b6001600160a01b038116620003fc5760405162461bcd60e51b8152600401620003ca90620004fb565b6001600160601b0319606097881b811660805295871b861660a05293861b851660c05291851b841660e052610100526101205290911b16610140526200053e565b3390565b600080600080600080600060e0888a0312156200045c578283fd5b8751620004698162000525565b60208901519097506200047c8162000525565b60408901519096506200048f8162000525565b6060890151909550620004a28162000525565b809450506080880151925060a0880151915060c0880151620004c48162000525565b8091505092959891949750929550565b6020808252600d908201526c696e76616c696420646174657360981b604082015260600190565b60208082526010908201526f696e76616c696420747265617375727960801b604082015260600190565b6001600160a01b03811681146200053b57600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c61010051610120516101405160601c6129666200060f60003980610cf35280611ff652508061076152806116c0528061170a52508061079b528061163252508061094c5280611608525080610d9d5280610f17528061132252806115e45280611fd4525080610b035280610bb05280610c055280610c495280610cc45250806106de5280610ad45280610b8e5280610be35280610e11528061121452806114685280611af85280611ba05280611c4752506129666000f3fe6080604052600436106102255760003560e01c806379203dc411610123578063b8ac77a4116100ab578063eb4c357a1161006f578063eb4c357a14610573578063ecb70fb714610588578063efb98bcf1461059d578063f2fde38b146105b2578063fb5b82d0146105d257610225565b8063b8ac77a41461050a578063bfd9041b1461051f578063c5c4744c14610534578063ddaa26ad14610549578063e165f5c11461055e57610225565b8063940bb344116100f2578063940bb3441461049657806397d75776146104ab578063a2fddd6f146104c0578063b10c8fb9146104e0578063b21b5a21146104f557610225565b806379203dc4146104375780637deb60251461044c5780638da5cb5b1461046c578063913e77ad1461048157610225565b80634e71d92d116101b1578063647083ce11610175578063647083ce146103c55780636ee56f33146103da578063715018a6146103ed578063728e616f14610402578063742145461461041757610225565b80634e71d92d1461035c5780635d619ad81461037157806360cfe7551461038657806361d027b31461039b578063641ddc2e146103b057610225565b80631959a002116101f85780631959a002146102ba57806337ba682d146102ee5780633fc8cef31461030357806344691f7e1461031857806348045e111461033a57610225565b806302625d881461022a5780630d18493414610261578063140f0ae7146102835780631831359b146102a5575b600080fd5b34801561023657600080fd5b5061024a610245366004612366565b6105f2565b6040516102589291906127d2565b60405180910390f35b34801561026d57600080fd5b506102766106cd565b60405161025891906127b2565b34801561028f57600080fd5b506102986106dc565b60405161025891906124d6565b3480156102b157600080fd5b50610276610700565b3480156102c657600080fd5b506102da6102d5366004612366565b61070c565b6040516102589897969594939291906127e0565b3480156102fa57600080fd5b5061027661075f565b34801561030f57600080fd5b50610298610783565b34801561032457600080fd5b5061032d610797565b604051610258919061251d565b34801561034657600080fd5b5061035a610355366004612380565b6107ca565b005b34801561036857600080fd5b5061035a61091b565b34801561037d57600080fd5b50610298610cc2565b34801561039257600080fd5b50610298610ce6565b3480156103a757600080fd5b50610298610cf1565b3480156103bc57600080fd5b5061035a610d15565b3480156103d157600080fd5b50610276610dc8565b61035a6103e8366004612366565b610dcd565b3480156103f957600080fd5b5061035a610fe5565b34801561040e57600080fd5b50610298611091565b34801561042357600080fd5b5061035a6104323660046123a9565b6110a9565b34801561044357600080fd5b506102766111ca565b34801561045857600080fd5b5061035a6104673660046124ab565b6111d0565b34801561047857600080fd5b50610298611354565b34801561048d57600080fd5b50610298611363565b3480156104a257600080fd5b5061035a611372565b3480156104b757600080fd5b50610298611514565b3480156104cc57600080fd5b5061035a6104db366004612380565b61151f565b3480156104ec57600080fd5b506102986115d2565b34801561050157600080fd5b506102766115dd565b34801561051657600080fd5b506102986115e2565b34801561052b57600080fd5b50610298611606565b34801561054057600080fd5b5061027661162a565b34801561055557600080fd5b50610276611630565b34801561056a57600080fd5b5061032d611654565b34801561057f57600080fd5b5061027661165d565b34801561059457600080fd5b5061032d6116b4565b3480156105a957600080fd5b506102766116e6565b3480156105be57600080fd5b5061035a6105cd366004612366565b611734565b3480156105de57600080fd5b5061035a6105ed366004612366565b611836565b6000806005546000141561060b575060009050806106c8565b6001600160a01b038084166000908152600360208181526040808420815161010081018352815481526001820154938101939093526002810154918301919091529182015460608201526004820154909316608084015260058082015460a0850152600682015460c085015260079091015460ff16151560e0840152546106a59061069f61069761165d565b8551906118a1565b90611903565b90506106b7606461069f8360236118a1565b92506106c3818461196a565b935050505b915091565b6a013da329b633647180000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b67d02ab486cedc000081565b60036020819052600091825260409091208054600182015460028301549383015460048401546005850154600686015460079096015494969395939492936001600160a01b039092169290919060ff1688565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065461010090046001600160a01b031681565b60007f00000000000000000000000000000000000000000000000000000000000000006107c26119c7565b101590505b90565b6002546001600160a01b031633146108135760405162461bcd60e51b81526004018080602001828103825260228152602001806128d96022913960400191505060405180910390fd5b60408051635569f64b60e11b81526001600160a01b03841660048201526024810183905290516023602160991b019163aad3ec969160448083019260209291908290030181600087803b15801561086957600080fd5b505af115801561087d573d6000803e3d6000fd5b505050506040513d602081101561089357600080fd5b505060408051635569f64b60e11b81526001600160a01b03841660048201526024810183905290516022602160991b019163aad3ec969160448083019260209291908290030181600087803b1580156108eb57600080fd5b505af11580156108ff573d6000803e3d6000fd5b505050506040513d602081101561091557600080fd5b50505050565b6109236116b4565b6109485760405162461bcd60e51b815260040161093f90612633565b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db9190612493565b116109f85760405162461bcd60e51b815260040161093f906125fc565b33600090815260036020526040902060055415801590610a185750805415155b610a345760405162461bcd60e51b815260040161093f90612553565b600781015460ff1615610a595760405162461bcd60e51b815260040161093f9061266a565b60078101805460ff19166001179055600080610a74336105f2565b91509150336001600160a01b03167f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf78383604051610ab39291906127d2565b60405180910390a2604051636eb1769f60e11b815281906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e90610b2b9030907f000000000000000000000000000000000000000000000000000000000000000090600401612503565b60206040518083038186803b158015610b4357600080fd5b505afa158015610b57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7b9190612493565b1015610c2c57610bd66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000060006119cb565b610c2c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006000196119cb565b8015610cb3576040516316874d3760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635a1d34dc90610c8090849033906004016127bb565b600060405180830381600087803b158015610c9a57600080fd5b505af1158015610cae573d6000803e3d6000fd5b505050505b610cbd3383611ade565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6023602160991b0181565b7f000000000000000000000000000000000000000000000000000000000000000081565b33600090815260036020526040812060068101546005820154919291610d3a9161196a565b90508015610dc4576006820154610d519082611cf0565b600683015560405133907fe0b46c91649485ec4f8a85100cc80f5edd3778bee364d122bfaf0065205df56a90610d889084906127b2565b60405180910390a2610dc46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611d4a565b5050565b602381565b610dd5610797565b8015610de65750610de46116b4565b155b8015610e9957506040516370a0823160e01b81526a013da329b6336471800000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610e469030906004016124d6565b60206040518083038186803b158015610e5e57600080fd5b505afa158015610e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e969190612493565b10155b610eb55760405162461bcd60e51b815260040161093f90612734565b60026001541415610f0d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556006547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081166101009092041614610f655760405162461bcd60e51b815260040161093f906126dc565b6000349050600660019054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610fba57600080fd5b505af1158015610fce573d6000803e3d6000fd5b5050505050610fdd8183611d9c565b505060018055565b610fed612022565b6001600160a01b0316610ffe611354565b6001600160a01b031614611047576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b732fc95838c71e76ec69ff817983bff17c710f34e081565b6110b1612022565b6001600160a01b03166110c2611354565b6001600160a01b03161461110b576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b60005b8181101561119c57600083838381811061112457fe5b90506060020180360381019061113a9190612439565b80516001600160a01b0316600090815260036020908152604090912090820151919250906023101561117e5760405162461bcd60e51b815260040161093f90612528565b6020820151600282015560409091015160039091015560010161110e565b506040517fe6e7add12c2bec7372a9746b87dc5ef9b4473697bfe869dafad06298fccd087a90600090a15050565b60055481565b6111d8610797565b80156111e957506111e76116b4565b155b801561129c57506040516370a0823160e01b81526a013da329b6336471800000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112499030906004016124d6565b60206040518083038186803b15801561126157600080fd5b505afa158015611275573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112999190612493565b10155b6112b85760405162461bcd60e51b815260040161093f90612734565b60026001541415611310576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015561134a6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612026565b610fdd8282611d9c565b6000546001600160a01b031690565b6002546001600160a01b031681565b61137a612022565b6001600160a01b031661138b611354565b6001600160a01b0316146113d4576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b6113dc6116b4565b6113f85760405162461bcd60e51b815260040161093f9061276b565b60065460ff161561141b5760405162461bcd60e51b815260040161093f906125c5565b600061142561165d565b90506a013da329b633647180000081106114515760405162461bcd60e51b815260040161093f90612583565b6006805460ff191660011790556001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61dead6114a56a013da329b63364718000008561196a565b6040518363ffffffff1660e01b81526004016114c29291906124ea565b602060405180830381600087803b1580156114dc57600080fd5b505af11580156114f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc49190612419565b6002604360981b0181565b611527612022565b6001600160a01b0316611538611354565b6001600160a01b031614611581576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b6115956001600160a01b0383163383611d4a565b7f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969582826040516115c69291906124ea565b60405180910390a15050565b6022602160991b0181565b600381565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065460ff1681565b600060045467d02ab486cedc000011156116a45761169d67d02ab486cedc000061069f6004546a013da329b63364718000006118a190919063ffffffff16565b90506107c7565b506a013da329b633647180000090565b60006116be6119c7565b7f00000000000000000000000000000000000000000000000000000000000000001115905090565b60006116f06116b4565b156116fd575060006107c7565b61172f6117086119c7565b7f00000000000000000000000000000000000000000000000000000000000000009061196a565b905090565b61173c612022565b6001600160a01b031661174d611354565b6001600160a01b031614611796576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b6001600160a01b0381166117db5760405162461bcd60e51b81526004018080602001828103825260268152602001806128226026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b0316331461187f5760405162461bcd60e51b81526004018080602001828103825260228152602001806128d96022913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000826118b0575060006118fd565b828202828482816118bd57fe5b04146118fa5760405162461bcd60e51b815260040180806020018281038252602181526020018061286e6021913960400191505060405180910390fd5b90505b92915050565b6000808211611959576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161196257fe5b049392505050565b6000828211156119c1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b4290565b801580611a51575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611a2357600080fd5b505afa158015611a37573d6000803e3d6000fd5b505050506040513d6020811015611a4d57600080fd5b5051155b611a8c5760405162461bcd60e51b81526004018080602001828103825260368152602001806128fb6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610cbd90849061207c565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611b2d9030906004016124d6565b60206040518083038186803b158015611b4557600080fd5b505afa158015611b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7d9190612493565b9050600081831115611c305760405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90611bd790879086906004016124ea565b602060405180830381600087803b158015611bf157600080fd5b505af1158015611c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c299190612419565b9050611cd3565b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90611c7e90879087906004016124ea565b602060405180830381600087803b158015611c9857600080fd5b505af1158015611cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd09190612419565b90505b806109155760405162461bcd60e51b815260040161093f9061269a565b6000828201838110156118fa576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610cbd90849061207c565b60008211611dbc5760405162461bcd60e51b815260040161093f9061270a565b3360009081526003602052604090208054839190158015611de8575060048101546001600160a01b0316155b8015611dfc57506001600160a01b03831615155b8015611e1157506001600160a01b0383163314155b15611e34576004810180546001600160a01b0319166001600160a01b0385161790555b60048101546001600160a01b031692508215611ed6576001600160a01b038316600090815260036020819052604082209190611e779060649061069f90896118a1565b6005830154909150611e899082611cf0565b6005830155611e98848261196a565b93507fed705b591bdaba923b0ab0afaedaeefc22fd650b2a9f507b21758f2e7e397af98582604051611ecb9291906124ea565b60405180910390a150505b6002810154849015801590611ef2575081600301548260010154105b15611f4b576000611f148360010154846003015461196a90919063ffffffff16565b905085811115611f215750845b611f47611f40606461069f8660020154856118a190919063ffffffff16565b8390611cf0565b9150505b6001820154611f5a9086611cf0565b6001830155600454611f6c9086611cf0565b6004558154611f7b9082611cf0565b8255600554611f8a9082611cf0565b60055560405133907fe3d4187f6ca4248660cc0ac8b8056515bac4a8132be2eca31d6d0cc170722a7e90611fbf9088906127b2565b60405180910390a261201b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000085611d4a565b5050505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526109159085905b60006120d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661212d9092919063ffffffff16565b805190915015610cbd578080602001905160208110156120f057600080fd5b5051610cbd5760405162461bcd60e51b815260040180806020018281038252602a8152602001806128af602a913960400191505060405180910390fd5b606061213c8484600085612146565b90505b9392505050565b6060824710156121875760405162461bcd60e51b81526004018080602001828103825260268152602001806128486026913960400191505060405180910390fd5b612190856122a1565b6121e1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061221f5780518252601f199092019160209182019101612200565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612281576040519150601f19603f3d011682016040523d82523d6000602084013e612286565b606091505b50915091506122968282866122ab565b979650505050505050565b803b15155b919050565b606083156122ba57508161213f565b8251156122ca5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123145781810151838201526020016122fc565b50505050905090810190601f1680156123415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80356001600160a01b03811681146122a657600080fd5b600060208284031215612377578081fd5b61213f8261234f565b60008060408385031215612392578081fd5b61239b8361234f565b946020939093013593505050565b600080602083850312156123bb578182fd5b823567ffffffffffffffff808211156123d2578384fd5b818501915085601f8301126123e5578384fd5b8135818111156123f3578485fd5b866020606083028501011115612407578485fd5b60209290920196919550909350505050565b60006020828403121561242a578081fd5b815180151581146118fa578182fd5b60006060828403121561244a578081fd5b6040516060810181811067ffffffffffffffff8211171561246757fe5b6040526124738361234f565b815260208301356020820152604083013560408201528091505092915050565b6000602082840312156124a4578081fd5b5051919050565b600080604083850312156124bd578182fd5b823591506124cd6020840161234f565b90509250929050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b901515815260200190565b6020808252601190820152700c8d2e6c6deeadce840e8dede40d0d2ced607b1b604082015260600190565b60208082526016908201527531b630b4b69d103d32b9379030b63637b1b0ba34b7b760511b604082015260600190565b60208082526022908201527f6275726e556e736f6c64546f6b656e733a206e6f20746f6b656e20746f206275604082015261393760f11b606082015260800190565b6020808252601f908201527f6275726e556e736f6c64546f6b656e733a20616c7265616479206275726e7400604082015260600190565b60208082526019908201527f6973436c61696d61626c653a206e6f204c5020746f6b656e7300000000000000604082015260600190565b6020808252601f908201527f6973436c61696d61626c653a2073616c6520686173206e6f7420656e64656400604082015260600190565b60208082526016908201527518db185a5b4e88185b1c9958591e4818db185a5b595960521b604082015260600190565b60208082526022908201527f73616665436c61696d5472616e736665723a205472616e73666572206661696c604082015261195960f21b606082015260800190565b6020808252601490820152736275794554483a206e6f6e2d4554482073616c6560601b604082015260600190565b60208082526010908201526f189d5e4e881e995c9bc8185b5bdd5b9d60821b604082015260600190565b6020808252601c908201527f69734163746976653a2073616c65206973206e6f742061637469766500000000604082015260600190565b60208082526027908201527f6275726e556e736f6c64546f6b656e733a2070726573616c6520686173206e6f6040820152661d08195b99195960ca1b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b9788526020880196909652604087019490945260608601929092526001600160a01b0316608085015260a084015260c0830152151560e0820152610100019056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564426c6173743a2063616c6c6572206973206e6f742074686520636f6c6c6563746f725361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220155b74c4afbb0beaf909ab0463750a33b4f777a6ad692b3de3cbcb77726127b564736f6c63430007060033000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b89500000000000000000000000042000000000000000000000000000000000000230000000000000000000000001dfd37c18269d46c9f612e0086da9dc56027a0b200000000000000000000000000000000000000000000000000000000662cb08000000000000000000000000000000000000000000000000000000000662f5380000000000000000000000000cab4af4b0b9494786a9f3c639ac34aca7c53929b

Deployed Bytecode

0x6080604052600436106102255760003560e01c806379203dc411610123578063b8ac77a4116100ab578063eb4c357a1161006f578063eb4c357a14610573578063ecb70fb714610588578063efb98bcf1461059d578063f2fde38b146105b2578063fb5b82d0146105d257610225565b8063b8ac77a41461050a578063bfd9041b1461051f578063c5c4744c14610534578063ddaa26ad14610549578063e165f5c11461055e57610225565b8063940bb344116100f2578063940bb3441461049657806397d75776146104ab578063a2fddd6f146104c0578063b10c8fb9146104e0578063b21b5a21146104f557610225565b806379203dc4146104375780637deb60251461044c5780638da5cb5b1461046c578063913e77ad1461048157610225565b80634e71d92d116101b1578063647083ce11610175578063647083ce146103c55780636ee56f33146103da578063715018a6146103ed578063728e616f14610402578063742145461461041757610225565b80634e71d92d1461035c5780635d619ad81461037157806360cfe7551461038657806361d027b31461039b578063641ddc2e146103b057610225565b80631959a002116101f85780631959a002146102ba57806337ba682d146102ee5780633fc8cef31461030357806344691f7e1461031857806348045e111461033a57610225565b806302625d881461022a5780630d18493414610261578063140f0ae7146102835780631831359b146102a5575b600080fd5b34801561023657600080fd5b5061024a610245366004612366565b6105f2565b6040516102589291906127d2565b60405180910390f35b34801561026d57600080fd5b506102766106cd565b60405161025891906127b2565b34801561028f57600080fd5b506102986106dc565b60405161025891906124d6565b3480156102b157600080fd5b50610276610700565b3480156102c657600080fd5b506102da6102d5366004612366565b61070c565b6040516102589897969594939291906127e0565b3480156102fa57600080fd5b5061027661075f565b34801561030f57600080fd5b50610298610783565b34801561032457600080fd5b5061032d610797565b604051610258919061251d565b34801561034657600080fd5b5061035a610355366004612380565b6107ca565b005b34801561036857600080fd5b5061035a61091b565b34801561037d57600080fd5b50610298610cc2565b34801561039257600080fd5b50610298610ce6565b3480156103a757600080fd5b50610298610cf1565b3480156103bc57600080fd5b5061035a610d15565b3480156103d157600080fd5b50610276610dc8565b61035a6103e8366004612366565b610dcd565b3480156103f957600080fd5b5061035a610fe5565b34801561040e57600080fd5b50610298611091565b34801561042357600080fd5b5061035a6104323660046123a9565b6110a9565b34801561044357600080fd5b506102766111ca565b34801561045857600080fd5b5061035a6104673660046124ab565b6111d0565b34801561047857600080fd5b50610298611354565b34801561048d57600080fd5b50610298611363565b3480156104a257600080fd5b5061035a611372565b3480156104b757600080fd5b50610298611514565b3480156104cc57600080fd5b5061035a6104db366004612380565b61151f565b3480156104ec57600080fd5b506102986115d2565b34801561050157600080fd5b506102766115dd565b34801561051657600080fd5b506102986115e2565b34801561052b57600080fd5b50610298611606565b34801561054057600080fd5b5061027661162a565b34801561055557600080fd5b50610276611630565b34801561056a57600080fd5b5061032d611654565b34801561057f57600080fd5b5061027661165d565b34801561059457600080fd5b5061032d6116b4565b3480156105a957600080fd5b506102766116e6565b3480156105be57600080fd5b5061035a6105cd366004612366565b611734565b3480156105de57600080fd5b5061035a6105ed366004612366565b611836565b6000806005546000141561060b575060009050806106c8565b6001600160a01b038084166000908152600360208181526040808420815161010081018352815481526001820154938101939093526002810154918301919091529182015460608201526004820154909316608084015260058082015460a0850152600682015460c085015260079091015460ff16151560e0840152546106a59061069f61069761165d565b8551906118a1565b90611903565b90506106b7606461069f8360236118a1565b92506106c3818461196a565b935050505b915091565b6a013da329b633647180000081565b7f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a81565b67d02ab486cedc000081565b60036020819052600091825260409091208054600182015460028301549383015460048401546005850154600686015460079096015494969395939492936001600160a01b039092169290919060ff1688565b7f00000000000000000000000000000000000000000000000000000000662f538081565b60065461010090046001600160a01b031681565b60007f00000000000000000000000000000000000000000000000000000000662cb0806107c26119c7565b101590505b90565b6002546001600160a01b031633146108135760405162461bcd60e51b81526004018080602001828103825260228152602001806128d96022913960400191505060405180910390fd5b60408051635569f64b60e11b81526001600160a01b03841660048201526024810183905290516023602160991b019163aad3ec969160448083019260209291908290030181600087803b15801561086957600080fd5b505af115801561087d573d6000803e3d6000fd5b505050506040513d602081101561089357600080fd5b505060408051635569f64b60e11b81526001600160a01b03841660048201526024810183905290516022602160991b019163aad3ec969160448083019260209291908290030181600087803b1580156108eb57600080fd5b505af11580156108ff573d6000803e3d6000fd5b505050506040513d602081101561091557600080fd5b50505050565b6109236116b4565b6109485760405162461bcd60e51b815260040161093f90612633565b60405180910390fd5b60007f0000000000000000000000001dfd37c18269d46c9f612e0086da9dc56027a0b26001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db9190612493565b116109f85760405162461bcd60e51b815260040161093f906125fc565b33600090815260036020526040902060055415801590610a185750805415155b610a345760405162461bcd60e51b815260040161093f90612553565b600781015460ff1615610a595760405162461bcd60e51b815260040161093f9061266a565b60078101805460ff19166001179055600080610a74336105f2565b91509150336001600160a01b03167f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf78383604051610ab39291906127d2565b60405180910390a2604051636eb1769f60e11b815281906001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a169063dd62ed3e90610b2b9030907f000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b89590600401612503565b60206040518083038186803b158015610b4357600080fd5b505afa158015610b57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7b9190612493565b1015610c2c57610bd66001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a167f000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b89560006119cb565b610c2c6001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a167f000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b8956000196119cb565b8015610cb3576040516316874d3760e21b81526001600160a01b037f000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b8951690635a1d34dc90610c8090849033906004016127bb565b600060405180830381600087803b158015610c9a57600080fd5b505af1158015610cae573d6000803e3d6000fd5b505050505b610cbd3383611ade565b505050565b7f000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b89581565b6023602160991b0181565b7f000000000000000000000000cab4af4b0b9494786a9f3c639ac34aca7c53929b81565b33600090815260036020526040812060068101546005820154919291610d3a9161196a565b90508015610dc4576006820154610d519082611cf0565b600683015560405133907fe0b46c91649485ec4f8a85100cc80f5edd3778bee364d122bfaf0065205df56a90610d889084906127b2565b60405180910390a2610dc46001600160a01b037f0000000000000000000000004200000000000000000000000000000000000023163383611d4a565b5050565b602381565b610dd5610797565b8015610de65750610de46116b4565b155b8015610e9957506040516370a0823160e01b81526a013da329b6336471800000906001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a16906370a0823190610e469030906004016124d6565b60206040518083038186803b158015610e5e57600080fd5b505afa158015610e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e969190612493565b10155b610eb55760405162461bcd60e51b815260040161093f90612734565b60026001541415610f0d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556006547f00000000000000000000000042000000000000000000000000000000000000236001600160a01b039081166101009092041614610f655760405162461bcd60e51b815260040161093f906126dc565b6000349050600660019054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610fba57600080fd5b505af1158015610fce573d6000803e3d6000fd5b5050505050610fdd8183611d9c565b505060018055565b610fed612022565b6001600160a01b0316610ffe611354565b6001600160a01b031614611047576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b732fc95838c71e76ec69ff817983bff17c710f34e081565b6110b1612022565b6001600160a01b03166110c2611354565b6001600160a01b03161461110b576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b60005b8181101561119c57600083838381811061112457fe5b90506060020180360381019061113a9190612439565b80516001600160a01b0316600090815260036020908152604090912090820151919250906023101561117e5760405162461bcd60e51b815260040161093f90612528565b6020820151600282015560409091015160039091015560010161110e565b506040517fe6e7add12c2bec7372a9746b87dc5ef9b4473697bfe869dafad06298fccd087a90600090a15050565b60055481565b6111d8610797565b80156111e957506111e76116b4565b155b801561129c57506040516370a0823160e01b81526a013da329b6336471800000906001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a16906370a08231906112499030906004016124d6565b60206040518083038186803b15801561126157600080fd5b505afa158015611275573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112999190612493565b10155b6112b85760405162461bcd60e51b815260040161093f90612734565b60026001541415611310576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015561134a6001600160a01b037f000000000000000000000000420000000000000000000000000000000000002316333085612026565b610fdd8282611d9c565b6000546001600160a01b031690565b6002546001600160a01b031681565b61137a612022565b6001600160a01b031661138b611354565b6001600160a01b0316146113d4576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b6113dc6116b4565b6113f85760405162461bcd60e51b815260040161093f9061276b565b60065460ff161561141b5760405162461bcd60e51b815260040161093f906125c5565b600061142561165d565b90506a013da329b633647180000081106114515760405162461bcd60e51b815260040161093f90612583565b6006805460ff191660011790556001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a1663a9059cbb61dead6114a56a013da329b63364718000008561196a565b6040518363ffffffff1660e01b81526004016114c29291906124ea565b602060405180830381600087803b1580156114dc57600080fd5b505af11580156114f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc49190612419565b6002604360981b0181565b611527612022565b6001600160a01b0316611538611354565b6001600160a01b031614611581576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b6115956001600160a01b0383163383611d4a565b7f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969582826040516115c69291906124ea565b60405180910390a15050565b6022602160991b0181565b600381565b7f000000000000000000000000420000000000000000000000000000000000002381565b7f0000000000000000000000001dfd37c18269d46c9f612e0086da9dc56027a0b281565b60045481565b7f00000000000000000000000000000000000000000000000000000000662cb08081565b60065460ff1681565b600060045467d02ab486cedc000011156116a45761169d67d02ab486cedc000061069f6004546a013da329b63364718000006118a190919063ffffffff16565b90506107c7565b506a013da329b633647180000090565b60006116be6119c7565b7f00000000000000000000000000000000000000000000000000000000662f53801115905090565b60006116f06116b4565b156116fd575060006107c7565b61172f6117086119c7565b7f00000000000000000000000000000000000000000000000000000000662f53809061196a565b905090565b61173c612022565b6001600160a01b031661174d611354565b6001600160a01b031614611796576040805162461bcd60e51b8152602060048201819052602482015260008051602061288f833981519152604482015290519081900360640190fd5b6001600160a01b0381166117db5760405162461bcd60e51b81526004018080602001828103825260268152602001806128226026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b0316331461187f5760405162461bcd60e51b81526004018080602001828103825260228152602001806128d96022913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000826118b0575060006118fd565b828202828482816118bd57fe5b04146118fa5760405162461bcd60e51b815260040180806020018281038252602181526020018061286e6021913960400191505060405180910390fd5b90505b92915050565b6000808211611959576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161196257fe5b049392505050565b6000828211156119c1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b4290565b801580611a51575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611a2357600080fd5b505afa158015611a37573d6000803e3d6000fd5b505050506040513d6020811015611a4d57600080fd5b5051155b611a8c5760405162461bcd60e51b81526004018080602001828103825260368152602001806128fb6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610cbd90849061207c565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a16906370a0823190611b2d9030906004016124d6565b60206040518083038186803b158015611b4557600080fd5b505afa158015611b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7d9190612493565b9050600081831115611c305760405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a169063a9059cbb90611bd790879086906004016124ea565b602060405180830381600087803b158015611bf157600080fd5b505af1158015611c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c299190612419565b9050611cd3565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a169063a9059cbb90611c7e90879087906004016124ea565b602060405180830381600087803b158015611c9857600080fd5b505af1158015611cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd09190612419565b90505b806109155760405162461bcd60e51b815260040161093f9061269a565b6000828201838110156118fa576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610cbd90849061207c565b60008211611dbc5760405162461bcd60e51b815260040161093f9061270a565b3360009081526003602052604090208054839190158015611de8575060048101546001600160a01b0316155b8015611dfc57506001600160a01b03831615155b8015611e1157506001600160a01b0383163314155b15611e34576004810180546001600160a01b0319166001600160a01b0385161790555b60048101546001600160a01b031692508215611ed6576001600160a01b038316600090815260036020819052604082209190611e779060649061069f90896118a1565b6005830154909150611e899082611cf0565b6005830155611e98848261196a565b93507fed705b591bdaba923b0ab0afaedaeefc22fd650b2a9f507b21758f2e7e397af98582604051611ecb9291906124ea565b60405180910390a150505b6002810154849015801590611ef2575081600301548260010154105b15611f4b576000611f148360010154846003015461196a90919063ffffffff16565b905085811115611f215750845b611f47611f40606461069f8660020154856118a190919063ffffffff16565b8390611cf0565b9150505b6001820154611f5a9086611cf0565b6001830155600454611f6c9086611cf0565b6004558154611f7b9082611cf0565b8255600554611f8a9082611cf0565b60055560405133907fe3d4187f6ca4248660cc0ac8b8056515bac4a8132be2eca31d6d0cc170722a7e90611fbf9088906127b2565b60405180910390a261201b6001600160a01b037f0000000000000000000000004200000000000000000000000000000000000023167f000000000000000000000000cab4af4b0b9494786a9f3c639ac34aca7c53929b85611d4a565b5050505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526109159085905b60006120d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661212d9092919063ffffffff16565b805190915015610cbd578080602001905160208110156120f057600080fd5b5051610cbd5760405162461bcd60e51b815260040180806020018281038252602a8152602001806128af602a913960400191505060405180910390fd5b606061213c8484600085612146565b90505b9392505050565b6060824710156121875760405162461bcd60e51b81526004018080602001828103825260268152602001806128486026913960400191505060405180910390fd5b612190856122a1565b6121e1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061221f5780518252601f199092019160209182019101612200565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612281576040519150601f19603f3d011682016040523d82523d6000602084013e612286565b606091505b50915091506122968282866122ab565b979650505050505050565b803b15155b919050565b606083156122ba57508161213f565b8251156122ca5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123145781810151838201526020016122fc565b50505050905090810190601f1680156123415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80356001600160a01b03811681146122a657600080fd5b600060208284031215612377578081fd5b61213f8261234f565b60008060408385031215612392578081fd5b61239b8361234f565b946020939093013593505050565b600080602083850312156123bb578182fd5b823567ffffffffffffffff808211156123d2578384fd5b818501915085601f8301126123e5578384fd5b8135818111156123f3578485fd5b866020606083028501011115612407578485fd5b60209290920196919550909350505050565b60006020828403121561242a578081fd5b815180151581146118fa578182fd5b60006060828403121561244a578081fd5b6040516060810181811067ffffffffffffffff8211171561246757fe5b6040526124738361234f565b815260208301356020820152604083013560408201528091505092915050565b6000602082840312156124a4578081fd5b5051919050565b600080604083850312156124bd578182fd5b823591506124cd6020840161234f565b90509250929050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b901515815260200190565b6020808252601190820152700c8d2e6c6deeadce840e8dede40d0d2ced607b1b604082015260600190565b60208082526016908201527531b630b4b69d103d32b9379030b63637b1b0ba34b7b760511b604082015260600190565b60208082526022908201527f6275726e556e736f6c64546f6b656e733a206e6f20746f6b656e20746f206275604082015261393760f11b606082015260800190565b6020808252601f908201527f6275726e556e736f6c64546f6b656e733a20616c7265616479206275726e7400604082015260600190565b60208082526019908201527f6973436c61696d61626c653a206e6f204c5020746f6b656e7300000000000000604082015260600190565b6020808252601f908201527f6973436c61696d61626c653a2073616c6520686173206e6f7420656e64656400604082015260600190565b60208082526016908201527518db185a5b4e88185b1c9958591e4818db185a5b595960521b604082015260600190565b60208082526022908201527f73616665436c61696d5472616e736665723a205472616e73666572206661696c604082015261195960f21b606082015260800190565b6020808252601490820152736275794554483a206e6f6e2d4554482073616c6560601b604082015260600190565b60208082526010908201526f189d5e4e881e995c9bc8185b5bdd5b9d60821b604082015260600190565b6020808252601c908201527f69734163746976653a2073616c65206973206e6f742061637469766500000000604082015260600190565b60208082526027908201527f6275726e556e736f6c64546f6b656e733a2070726573616c6520686173206e6f6040820152661d08195b99195960ca1b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b9788526020880196909652604087019490945260608601929092526001600160a01b0316608085015260a084015260c0830152151560e0820152610100019056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564426c6173743a2063616c6c6572206973206e6f742074686520636f6c6c6563746f725361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220155b74c4afbb0beaf909ab0463750a33b4f777a6ad692b3de3cbcb77726127b564736f6c63430007060033

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

000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b89500000000000000000000000042000000000000000000000000000000000000230000000000000000000000001dfd37c18269d46c9f612e0086da9dc56027a0b200000000000000000000000000000000000000000000000000000000662cb08000000000000000000000000000000000000000000000000000000000662f5380000000000000000000000000cab4af4b0b9494786a9f3c639ac34aca7c53929b

-----Decoded View---------------
Arg [0] : planeToken (address): 0xdD4159eEF90E96f0a7a9D20383532cf716E1CB4a
Arg [1] : xPlaneToken (address): 0xeA4954DFd3372795D63B62598eDfDf5eF274B895
Arg [2] : saleToken (address): 0x4200000000000000000000000000000000000023
Arg [3] : lpToken (address): 0x1dfd37c18269D46C9F612E0086da9DC56027A0B2
Arg [4] : startTime (uint256): 1714204800
Arg [5] : endTime (uint256): 1714377600
Arg [6] : treasury_ (address): 0xCab4AF4B0b9494786A9F3C639ac34aca7c53929B

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000dd4159eef90e96f0a7a9d20383532cf716e1cb4a
Arg [1] : 000000000000000000000000ea4954dfd3372795d63b62598edfdf5ef274b895
Arg [2] : 0000000000000000000000004200000000000000000000000000000000000023
Arg [3] : 0000000000000000000000001dfd37c18269d46c9f612e0086da9dc56027a0b2
Arg [4] : 00000000000000000000000000000000000000000000000000000000662cb080
Arg [5] : 00000000000000000000000000000000000000000000000000000000662f5380
Arg [6] : 000000000000000000000000cab4af4b0b9494786a9f3c639ac34aca7c53929b


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
0x58C8918A79da1059C6c9730C79612DB0dd7E0C50
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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