MATIC Price: $1.01 (-3.07%)
Gas: 251 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Deposit530644072024-02-03 5:39:4154 days ago1706938781IN
0xC6BC7173...e7A0f08E3
0 MATIC0.85530
Deposit503873692023-11-25 21:24:24123 days ago1700947464IN
0xC6BC7173...e7A0f08E3
0 MATIC0.8425606530
Compound478031612023-09-21 8:38:32189 days ago1695285512IN
0xC6BC7173...e7A0f08E3
0 MATIC0.033022587.88003199
Deposit454746372023-07-24 20:11:32247 days ago1690229492IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0058415430
Compound446824452023-07-04 18:36:14267 days ago1688495774IN
0xC6BC7173...e7A0f08E3
0 MATIC0.041266127.25384197
Compound437578252023-06-10 16:46:21291 days ago1686415581IN
0xC6BC7173...e7A0f08E3
0 MATIC0.04602338135.81068593
Deposit407020172023-03-24 5:29:08370 days ago1679635748IN
0xC6BC7173...e7A0f08E3
0 MATIC0.04550
Deposit407020172023-03-24 5:29:08370 days ago1679635748IN
0xC6BC7173...e7A0f08E3
0 MATIC0.02730
Deposit401412012023-03-09 9:51:50385 days ago1678355510IN
0xC6BC7173...e7A0f08E3
0 MATIC0.03875201120.29856223
Deposit400080392023-03-05 21:49:11388 days ago1678052951IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0026943630
Compound400077422023-03-05 21:37:33388 days ago1678052253IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0244923330
Compound396422252023-02-24 3:20:29398 days ago1677208829IN
0xC6BC7173...e7A0f08E3
0 MATIC0.03763381114.08300496
Deposit386383902023-01-28 20:30:36424 days ago1674937836IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0026943630
Deposit386381952023-01-28 20:23:42424 days ago1674937422IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0032073630
Deposit385989532023-01-27 19:54:02425 days ago1674849242IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0418041166.06171158
Deposit385934562023-01-27 16:29:22425 days ago1674836962IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0103020496.36
Compound383770412023-01-22 5:23:11431 days ago1674364991IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0107600430
Deposit382048892023-01-17 20:24:12435 days ago1673987052IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0059870756
Deposit380798092023-01-14 19:31:10438 days ago1673724670IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0032073630
Compound380087822023-01-13 2:32:32440 days ago1673577152IN
0xC6BC7173...e7A0f08E3
0 MATIC0.024597672.05323573
Deposit379911132023-01-12 16:18:17440 days ago1673540297IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0429724149
Deposit377324242023-01-06 6:53:51447 days ago1672988031IN
0xC6BC7173...e7A0f08E3
0 MATIC0.02730
Deposit373281462022-12-27 5:42:46457 days ago1672119766IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0061330657.36554856
Compound371621132022-12-23 2:44:37461 days ago1671763477IN
0xC6BC7173...e7A0f08E3
0 MATIC0.0129535841.66666666
Deposit368781592022-12-15 23:02:04468 days ago1671145324IN
0xC6BC7173...e7A0f08E3
0 MATIC0.02730
View all transactions

Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Bank2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : Bank2.sol
// SPDX-License-Identifier: UNLICENSED
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libs/IBEP20.sol";
import "./libs/SafeBEP20.sol";
import "./libs/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

contract Bank2 is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;
    struct UserInfo {
      uint amount;
      uint rewardDebt;//usdc debt
      uint lastwithdraw;
      uint[] pids;
    }
    struct PoolInfo{
      uint initamt;
      uint amount;
      uint startTime;
      uint endTime;
      uint tokenPerSec;//X10^18
      uint accPerShare;
      IBEP20 token;
      uint lastRewardTime;
      address router;
      bool disableCompound;//in case of error
    }
    struct UserPInfo{
      uint rewardDebt;
    }
    struct UsdcPool{
      //usdcPerSec everyweek
      uint idx;
      uint[] wkUnit; //weekly usdcPerSec. 4week cycle
      uint usdcPerTime;//*1e18
      uint startTime;
      uint accUsdcPerShare;
      uint lastRewardTime;
    }

    /**Variables */

    mapping(address=>UserInfo) public userInfo;
    PoolInfo[] public poolInfo;
    mapping(uint=>bool) public skipPool;//in case of stuck in one token.
    mapping(uint =>mapping(address=>UserPInfo)) public userPInfo;
    address[] public lotlist;
    uint public lotstart=1;
    UsdcPool public usdcPool;
    IBEP20 public SING;
    IBEP20 public USDC=IBEP20(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174);
    IBEP20 public wmatic=IBEP20(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270);
    address public singrouter=0xC0788A3aD43d79aa53B09c2EaCc313A787d1d607;//aperouter
    address public devaddr;
    address public winner;
    address public lotwinner;
    uint public winnum;
    uint public totalAmount;
    uint public newRepo;
    uint public currentRepo;
    uint public period;
    uint public endtime;
    uint public totalpayout;
    uint public entryMin=5 ether; //min SING to enroll lotterypot
    uint public lotsize;
    uint public lotrate=200;//bp of total prize.
    address public burnAddress=0x000000000000000000000000000000000000dEaD;
    uint public totalBurnt;
    bool public paused;
    mapping(address => bool) public approvedContracts;
    modifier onlyApprovedContractOrEOA() {
        require(
            tx.origin == msg.sender || approvedContracts[msg.sender],
            "onlyApprovedContractOrEOA"
        );
        _;
    }
    constructor(IBEP20 _lp) public {
      SING=IBEP20(_lp);
      paused=true;
      usdcPool.wkUnit=[0,0,0,0];
      devaddr=address(msg.sender);
      wmatic.approve(singrouter,uint(-1));
      USDC.approve(singrouter,uint(-1));
      lotlist.push(burnAddress);
    }
    modifier ispaused(){
      require(paused==false,"paused");
      _;
    }

    /**View functions  */
    function userinfo(address _user) public view returns(UserInfo memory){
      return userInfo[_user];
    }
    function usdcinfo() public view returns(UsdcPool memory){
      return usdcPool;
    }
    function poolLength() public view returns(uint){
      return poolInfo.length;
    }
    function livepoolIndex() public view returns(uint[] memory,uint){
      uint[] memory index=new uint[](poolInfo.length);
      uint cnt;
      for(uint i=0;i<poolInfo.length;i++){
        if(poolInfo[i].endTime > block.timestamp){
          index[cnt++]=i;
        }
      }
      return (index,cnt);
    }
    function pendingReward(uint _pid,address _user) public view returns (uint256) {
        UserInfo storage user = userInfo[_user];
        PoolInfo storage pool = poolInfo[_pid];
        UserPInfo storage userP=userPInfo[_pid][_user];
        uint256 _accUsdcPerShare = pool.accPerShare;
        if(block.timestamp<=pool.startTime){
          return 0;
        }
        if (block.timestamp > pool.lastRewardTime && pool.amount != 0 ) {
          uint multiplier;
          if(block.timestamp>pool.endTime){
            multiplier=pool.endTime.sub(pool.lastRewardTime);
          }else{
            multiplier = block.timestamp.sub(pool.lastRewardTime);
          }
          uint256 Reward = multiplier.mul(pool.tokenPerSec);
          _accUsdcPerShare = _accUsdcPerShare.add(Reward.mul(1e12).div(pool.amount));
        }
        return user.amount.mul(_accUsdcPerShare).div(1e12).sub(userP.rewardDebt).div(1e18);
    }
    function pendingrewards(address _user) public view returns(uint[] memory){
      uint[] memory pids=userInfo[_user].pids;
      uint[] memory rewards=new uint[](pids.length);
      for(uint i=0;i<pids.length;i++){
        rewards[i]=pendingReward(pids[i],_user);
      }
      return rewards;
    }
    function mytickets(address _user) public view returns(uint[] memory){
      uint[] memory my=new uint[](lotlist.length-lotstart);
      uint count;
      for(uint i=lotstart;i<lotlist.length;i++){
        if(lotlist[i]==_user){
          my[count++]=i;
        }
      }
      return my;
    }
    function totalticket() public view returns(uint){
      return lotlist.length-lotstart;
    }
    function pendingUsdc(address _user) public view returns(uint256){
      UserInfo storage user = userInfo[_user];
      uint256 _accUsdcPerShare = usdcPool.accUsdcPerShare;
      if (block.timestamp > usdcPool.lastRewardTime && totalAmount != 0) {
          uint256 multiplier = block.timestamp.sub(usdcPool.lastRewardTime);
          uint256 UsdcReward = multiplier.mul(usdcPool.usdcPerTime);
          _accUsdcPerShare = _accUsdcPerShare.add(UsdcReward.mul(1e12).div(totalAmount));
      }
      return user.amount.mul(_accUsdcPerShare).div(1e12).sub(user.rewardDebt).div(1e18);
    }

    /**Public functions */

    function updateUsdcPool() internal {
      if (block.timestamp <= usdcPool.lastRewardTime) {
          return;
      }
      if (totalAmount == 0) {
          usdcPool.lastRewardTime = block.timestamp;
          return;
      }
      uint256 multiplier = block.timestamp.sub(usdcPool.lastRewardTime);
      uint256 usdcReward = multiplier.mul(usdcPool.usdcPerTime);
      usdcPool.accUsdcPerShare = usdcPool.accUsdcPerShare.add(usdcReward.mul(1e12).div(totalAmount));
      usdcPool.lastRewardTime = block.timestamp;
    }
    
    function updatePool(uint _pid) internal {
      PoolInfo storage pool = poolInfo[_pid];
      if(pool.lastRewardTime>=pool.endTime || block.timestamp <= pool.lastRewardTime){
        return;
      }
      if (totalAmount == 0 || pool.amount==0) {
        pool.lastRewardTime = block.timestamp;
        return;
      }
      uint multiplier;
      if(block.timestamp>pool.endTime){
        multiplier=pool.endTime.sub(pool.lastRewardTime);
      }else{
        multiplier = block.timestamp.sub(pool.lastRewardTime);
      }
      uint256 Reward = multiplier.mul(pool.tokenPerSec);
      pool.accPerShare = pool.accPerShare.add(Reward.mul(1e12).div(pool.amount));
      
      pool.lastRewardTime = block.timestamp;
      if(block.timestamp>pool.endTime){
        pool.lastRewardTime=pool.endTime;
      }
    }

    function deposit(uint256 _amount) public onlyApprovedContractOrEOA ispaused {
      UserInfo storage user = userInfo[msg.sender];
      updateUsdcPool();
      for(uint i=0;i<user.pids.length;i++){
        uint _pid=user.pids[i];
        if(skipPool[_pid]){continue;}
        updatePool(_pid);
        uint pendingR=user.amount.mul(poolInfo[_pid].accPerShare).div(1e12).sub(userPInfo[_pid][msg.sender].rewardDebt);
        pendingR=pendingR.div(1e18);
        if(pendingR>0){
          poolInfo[_pid].token.safeTransfer(msg.sender,pendingR);
        }
      }
      if (user.amount > 0) {
          uint256 pending = user.amount.mul(usdcPool.accUsdcPerShare).div(1e12).sub(user.rewardDebt);
          pending=pending.div(1e18);
          if(pending > 0) {
              safeUsdcTransfer(msg.sender, pending);
          }
      }
      if(_amount > 0) {
          uint before=SING.balanceOf(address(this));
          SING.safeTransferFrom(address(msg.sender), address(this), _amount);
          SING.safeTransfer(burnAddress , SING.balanceOf(address(this)).sub(before));
          user.amount = user.amount.add(_amount);
          totalBurnt+=_amount;
          totalAmount=totalAmount.add(_amount);
      }

      for(uint i=0;i<user.pids.length;i++){
        uint _pid=user.pids[i];
        if(skipPool[_pid]){continue;}
        poolInfo[_pid].amount+=_amount;
        userPInfo[_pid][msg.sender].rewardDebt=user.amount.mul(poolInfo[_pid].accPerShare).div(1e12);
      }
      user.rewardDebt = user.amount.mul(usdcPool.accUsdcPerShare).div(1e12);
      checkend();
    }
    function enroll(uint _pid) public onlyApprovedContractOrEOA {
      require(_pid<poolInfo.length && poolInfo[_pid].endTime > block.timestamp ,"wrong pid");
      require(skipPool[_pid]==false);
      UserInfo storage user = userInfo[msg.sender];
      for(uint i=0;i<user.pids.length;i++){
        require(user.pids[i]!=_pid,"duplicated pid");
      }
      updatePool(_pid);
      PoolInfo storage pool = poolInfo[_pid];
      pool.amount+=user.amount;
      user.pids.push(_pid);
      userPInfo[_pid][msg.sender].rewardDebt=user.amount.mul(poolInfo[_pid].accPerShare).div(1e12);
    }

    function compound() public onlyApprovedContractOrEOA returns (uint){
      UserInfo storage user = userInfo[msg.sender];
      require(user.amount>0);
      updateUsdcPool();
      uint before=wmatic.balanceOf(address(this));
      for(uint i=0;i<user.pids.length;i++){
        uint _pid=user.pids[i];
        if(skipPool[_pid]){continue;}
        updatePool(_pid);
        PoolInfo memory pool=poolInfo[_pid];
        uint pendingR=user.amount.mul(pool.accPerShare).div(1e12).sub(userPInfo[_pid][msg.sender].rewardDebt);
        pendingR=pendingR.div(1e18);
        if(pool.disableCompound){
          if(pendingR>0){
            pool.token.safeTransfer(msg.sender,pendingR);
          }
        }else{
          _safeSwap(pool.router, pendingR, address(pool.token), address(wmatic));
        }
      }

      uint beforeSing=SING.balanceOf(address(this));
      //wmatic=>SING
      _safeSwap(singrouter, wmatic.balanceOf(address(this)).sub(before), address(wmatic), address(SING));
     
      //USDC=>SING
      uint256 pending = user.amount.mul(usdcPool.accUsdcPerShare).div(1e12).sub(user.rewardDebt);
      pending=pending.div(1e18);
      _safeSwap(singrouter, pending, address(USDC), address(SING));
      uint burningSing=SING.balanceOf(address(this)).sub(beforeSing);
      user.amount+=burningSing.mul(105).div(100);
      user.rewardDebt = user.amount.mul(usdcPool.accUsdcPerShare).div(1e12);
      for(uint i=0;i<user.pids.length;i++){
        uint _pid=user.pids[i];
        if(skipPool[_pid]){continue;}
        poolInfo[_pid].amount+=burningSing.mul(105).div(100);
        userPInfo[_pid][msg.sender].rewardDebt=user.amount.mul(poolInfo[_pid].accPerShare).div(1e12);
      }
      SING.transfer(burnAddress, burningSing);
      totalBurnt+=burningSing;
      totalAmount+=burningSing.mul(105).div(100);

      if(burningSing>entryMin){//enroll for lottery
        lotlist.push(msg.sender);
      }
      checkend();
      return burningSing;
    }
    

    function addRepo(uint _amount) public {
      require(msg.sender==address(SING) || msg.sender==owner());
      uint _lotadd=_amount.mul(lotrate).div(10000);
      lotsize=lotsize.add(_lotadd);
      newRepo=newRepo.add(_amount.sub(_lotadd));
    }

    /**Internal functions */

    function checkend() internal {//already updated pool above.
      deletepids();
      if(endtime<=block.timestamp){
        endtime=block.timestamp.add(period);
        if(newRepo>10**7){//USDC decimal 6 in polygon. should change on other chains.
          safeUsdcTransfer(msg.sender, 10**7);//reward for the first resetter
          newRepo=newRepo.sub(10**7);
        }
        winner=address(msg.sender);
        currentRepo=newRepo.mul(999).div(1000);//in case of error by over-paying
        newRepo=0;
        if(usdcPool.idx==3){
          usdcPool.usdcPerTime-=usdcPool.wkUnit[0];
          usdcPool.idx=0;
          usdcPool.wkUnit[0]=currentRepo.mul(1e18).div(period*4);
          usdcPool.usdcPerTime+=usdcPool.wkUnit[0];
        }else{
          uint idx=usdcPool.idx;
          usdcPool.usdcPerTime=usdcPool.usdcPerTime.sub(usdcPool.wkUnit[idx+1]);
          usdcPool.idx++;
          usdcPool.wkUnit[usdcPool.idx]=currentRepo.mul(1e18).div(period*4);
          usdcPool.usdcPerTime+=usdcPool.wkUnit[usdcPool.idx];
        }
        pickwin();
      }
    }

    function deletepids() internal {
      UserInfo storage user=userInfo[msg.sender];
      for(uint i=0;i<user.pids.length;i++){
        if(poolInfo[user.pids[i]].endTime <= block.timestamp){
          user.pids[i]=user.pids[user.pids.length-1];
          user.pids.pop();
          deletepids();
          break;
        }
      }
    }

    function pickwin() internal {
      uint _mod=lotlist.length-lotstart;
      bytes32 _structHash;
      uint256 _randomNumber;
      _structHash = keccak256(
            abi.encode(
                msg.sender,
                block.difficulty,
                gasleft()
            )
        );
      _randomNumber  = uint256(_structHash);
      assembly {_randomNumber := mod(_randomNumber,_mod )}
      winnum=lotstart+_randomNumber;
      lotwinner=lotlist[winnum];
      safeUsdcTransfer(lotwinner, lotsize);
      lotsize=0;
      lotstart+=_mod;
    }
    function _safeSwap(
        address _router,
        uint256 _amountIn,
        address token0,address token1
    ) internal {
        if(_amountIn>0){          
          address[] memory _path = new address[](2);
          uint bal=IBEP20(token0).balanceOf(address(this));
          if(_amountIn<bal){
            bal=_amountIn;
          }
          _path[0] = token0;
          _path[1] = token1;
          IUniswapV2Router02(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens(
              bal,
              0,
              _path,
              address(this),
              now.add(600)
          );
        }
    }
    function safeUsdcTransfer(address _to, uint256 _amount) internal {
        uint256 balance = USDC.balanceOf(address(this));
        if (_amount > balance) {
            USDC.safeTransfer(_to, balance);
            totalpayout=totalpayout.add(balance);
        } else {
            USDC.safeTransfer(_to, _amount);
            totalpayout=totalpayout.add(_amount);
        }
    }
    
    /*governance functions*/

    function addpool(uint _amount,uint _startTime,uint _endTime,IBEP20 _token,address _router) public onlyOwner{
      require(_startTime>block.timestamp && _endTime>_startTime, "wrong time");
      poolInfo.push(PoolInfo({
        initamt:_amount,
        amount :0,
        startTime:_startTime,
        endTime:_endTime,
        tokenPerSec:_amount.mul(1e18).div(_endTime-_startTime),//X10^18
        accPerShare:0,
        token:_token,
        lastRewardTime: _startTime,
        router:_router,
        disableCompound:false//in case of error
      }));
      _token.approve(_router,uint(-1));
    }
    function start(uint _period) public onlyOwner{
      paused=false;
      period=_period;
      endtime=block.timestamp.add(period);
      currentRepo=newRepo;
      usdcPool.usdcPerTime=currentRepo.mul(1e18).div(period*4);
      usdcPool.wkUnit[0]=usdcPool.usdcPerTime;
      newRepo=0;
    }
    function stopPool(uint _pid) public onlyOwner{
      skipPool[_pid]=!skipPool[_pid];//toggle
    }
    function pause(bool _paused) public onlyOwner{
      paused=_paused;
    }
    function setPeriod(uint _period) public onlyOwner{
      period=_period;
    }
    function setMin(uint _entryMin) public onlyOwner{
      entryMin=_entryMin;
    }
    function disableCompound(uint _pid,bool _disable) public onlyOwner{
      poolInfo[_pid].disableCompound=_disable;
    }
    function setApprovedContract(address _contract, bool _status)
        external
        onlyOwner
    {
        approvedContracts[_contract] = _status;
    }

}

File 2 of 9 : Ownable.sol
// 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;
    }
}

File 3 of 9 : SafeMath.sol
// 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;
    }
}

File 4 of 9 : Address.sol
// 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);
            }
        }
    }
}

File 5 of 9 : Context.sol
// 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 6 of 9 : 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;
    }
}

File 7 of 9 : IBEP20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.4;

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

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

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

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

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

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

File 8 of 9 : IUniswapV2Router02.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

pragma solidity >=0.6.2;

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 9 of 9 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IBEP20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

    function safeTransferFrom(IBEP20 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
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IBEP20 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),
            "SafeBEP20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IBEP20 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(IBEP20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeBEP20: 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(IBEP20 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, "SafeBEP20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeBEP20: BEP20 operation did not succeed");
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IBEP20","name":"_lp","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"SING","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addRepo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"contract IBEP20","name":"_token","type":"address"},{"internalType":"address","name":"_router","type":"address"}],"name":"addpool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentRepo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"bool","name":"_disable","type":"bool"}],"name":"disableCompound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endtime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"enroll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"livepoolIndex","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lotlist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lotrate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lotsize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lotstart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lotwinner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"mytickets","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newRepo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingUsdc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingrewards","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"initamt","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"tokenPerSec","type":"uint256"},{"internalType":"uint256","name":"accPerShare","type":"uint256"},{"internalType":"contract IBEP20","name":"token","type":"address"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"address","name":"router","type":"address"},{"internalType":"bool","name":"disableCompound","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setApprovedContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_entryMin","type":"uint256"}],"name":"setMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"singrouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"skipPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"stopPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurnt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalpayout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalticket","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":"usdcPool","outputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"usdcPerTime","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"accUsdcPerShare","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdcinfo","outputs":[{"components":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256[]","name":"wkUnit","type":"uint256[]"},{"internalType":"uint256","name":"usdcPerTime","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"accUsdcPerShare","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"}],"internalType":"struct Bank2.UsdcPool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"lastwithdraw","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userPInfo","outputs":[{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userinfo","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"lastwithdraw","type":"uint256"},{"internalType":"uint256[]","name":"pids","type":"uint256[]"}],"internalType":"struct Bank2.UserInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"winner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"winnum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wmatic","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040526001600755600f80546001600160a01b0319908116732791bca1f2de4661ed88a30c99a7a9449aa8417417909155601080548216730d500b1d8e8ef31e21c99d1db9a6444d3adf127017905560118054821673c0788a3ad43d79aa53b09c2eacc313a787d1d607179055674563918244f40000601c5560c8601e55601f805490911661dead1790553480156200009957600080fd5b50604051620036e0380380620036e0833981016040819052620000bc916200039a565b6000620000c862000301565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001808055600e80546001600160a01b0319166001600160a01b0384161790556021805460ff191690911790556040805160808101825260008082526020820181905291810182905260608101919091526200017390600990600462000305565b50601280546001600160a01b0319163317905560105460115460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392620001c09291169060001990600401620003c3565b602060405180830381600087803b158015620001db57600080fd5b505af1158015620001f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000216919062000371565b50600f5460115460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392620002519291169060001990600401620003c3565b602060405180830381600087803b1580156200026c57600080fd5b505af115801562000281573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002a7919062000371565b5050601f54600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b03909216919091179055620003dc565b3390565b82805482825590600052602060002090810192821562000348579160200282015b8281111562000348578251829060ff1690559160200191906001019062000326565b50620003569291506200035a565b5090565b5b808211156200035657600081556001016200035b565b60006020828403121562000383578081fd5b8151801515811462000393578182fd5b9392505050565b600060208284031215620003ac578081fd5b81516001600160a01b038116811462000393578182fd5b6001600160a01b03929092168252602082015260400190565b6132f480620003ec6000396000f3fe608060405234801561001057600080fd5b506004361061030c5760003560e01c80637e5ec07a1161019d578063ccd5db2f116100e9578063f10c993c116100a2578063f69e20461161007c578063f69e204614610620578063fb41be1614610628578063fc91f64214610630578063ff464806146106435761030c565b8063f10c993c146105f2578063f2fde38b146105fa578063f57d585b1461060d5761030c565b8063ccd5db2f146105a3578063d49e77cd146105b9578063dfbf53ae146105c1578063e37ac5d7146105c9578063e49bd61e146105d1578063ef78d4fd146105ea5761030c565b8063966ff65011610156578063a75e510711610130578063a75e510714610560578063a95cad6814610575578063b5dbfb251461057d578063b6b55f25146105905761030c565b8063966ff6501461053257806398969e821461053a578063a1ff5e0a1461054d5761030c565b80637e5ec07a146104d4578063896d59a0146104dc57806389a30271146104ef5780638da5cb5b146104f75780639446ec9f146104ff57806395805dad1461051f5761030c565b80633380e42a1161025c5780635c975abb116102155780635ffd993b116101ef5780635ffd993b1461049e57806370d5ae05146104b1578063715018a6146104b9578063782c27a9146104c15761030c565b80635c975abb146104705780635def5f5e146104785780635fc93c2d1461048b5761030c565b80633380e42a146104055780633606ef0b1461040d578063390710bc1461042d57806345dc3dd81461043557806353f298e6146104485780635c8c2083146104685761030c565b80631526fe27116102c95780631a39d8ef116102a35780631a39d8ef146103cd57806326749ad7146103d55780632ca126f8146103f5578063331f7d9d146103fd5761030c565b80631526fe271461037a57806316ba8cb9146103a35780631959a002146103ab5761030c565b806302329a2914610311578063081e3eda146103265780630ba23681146103445780630f3a9f651461034c5780630f4d03571461035f5780630fce4ef114610372575b600080fd5b61032461031f366004612bec565b61064b565b005b61032e6106a6565b60405161033b9190613167565b60405180910390f35b61032e6106ac565b61032461035a366004612c24565b6106b2565b61032461036d366004612c24565b6106f6565b61032e610755565b61038d610388366004612c24565b61075b565b60405161033b9a99989796959493929190613219565b61032e6107cc565b6103be6103b9366004612b98565b6107d2565b60405161033b939291906131e0565b61032e6107f2565b6103e86103e3366004612b98565b6107f8565b60405161033b9190612dee565b61032e61080d565b61032e610813565b61032e61081d565b61042061041b366004612b98565b610823565b60405161033b9190612db9565b61032e610936565b610324610443366004612c24565b61093c565b61045b610456366004612c24565b610980565b60405161033b9190612d47565b61045b6109a7565b6103e86109b6565b61032e610486366004612b98565b6109bf565b61032e610499366004612c54565b610a8d565b6103246104ac366004612bb4565b610aaa565b61045b610b14565b610324610b23565b6103e86104cf366004612c24565b610bac565b61045b610bc1565b6103246104ea366004612c24565b610bd0565b61045b610c57565b61045b610c66565b61051261050d366004612b98565b610c75565b60405161033b919061312e565b61032461052d366004612c24565b610d13565b61032e610dbb565b61032e610548366004612c54565b610dc1565b61032461055b366004612c78565b610f17565b610568610f90565b60405161033b91906130d4565b61032e611034565b61042061058b366004612b98565b61103a565b61032461059e366004612c24565b6110fe565b6105ab611546565b60405161033b929190612dcc565b61045b6115fb565b61045b61160a565b61032e611619565b6105d961161f565b60405161033b9594939291906131f6565b61032e611631565b61045b611637565b610324610608366004612b98565b611646565b61032461061b366004612c24565b611706565b61032e6118b0565b61045b611ed2565b61032461063e366004612c9c565b611ee1565b61032e6120f9565b6106536120ff565b6001600160a01b0316610664610c66565b6001600160a01b0316146106935760405162461bcd60e51b815260040161068a90612fee565b60405180910390fd5b6021805460ff1916911515919091179055565b60035490565b60155481565b6106ba6120ff565b6001600160a01b03166106cb610c66565b6001600160a01b0316146106f15760405162461bcd60e51b815260040161068a90612fee565b601955565b6106fe6120ff565b6001600160a01b031661070f610c66565b6001600160a01b0316146107355760405162461bcd60e51b815260040161068a90612fee565b6000908152600460205260409020805460ff19811660ff90911615179055565b601c5481565b6003818154811061076857fe5b6000918252602090912060099091020180546001820154600283015460038401546004850154600586015460068701546007880154600890980154969850949693959294919390926001600160a01b0392831692811690600160a01b900460ff168a565b601e5481565b600260208190526000918252604090912080546001820154919092015483565b60165481565b60226020526000908152604090205460ff1681565b601a5481565b6007546006540390565b60175481565b60608060026000846001600160a01b03166001600160a01b0316815260200190815260200160002060030180548060200260200160405190810160405280929190818152602001828054801561089857602002820191906000526020600020905b815481526020019060010190808311610884575b505050505090506060815167ffffffffffffffff811180156108b957600080fd5b506040519080825280602002602001820160405280156108e3578160200160208202803683370190505b50905060005b825181101561092e5761090f83828151811061090157fe5b602002602001015186610dc1565b82828151811061091b57fe5b60209081029190910101526001016108e9565b509392505050565b601d5481565b6109446120ff565b6001600160a01b0316610955610c66565b6001600160a01b03161461097b5760405162461bcd60e51b815260040161068a90612fee565b601c55565b6006818154811061098d57fe5b6000918252602090912001546001600160a01b0316905081565b6014546001600160a01b031681565b60215460ff1681565b6001600160a01b0381166000908152600260205260408120600c54600d54421180156109ec575060165415155b15610a4b57600d54600090610a02904290612103565b600a54909150600090610a1690839061212b565b9050610a46610a3f601654610a3964e8d4a510008561212b90919063ffffffff16565b9061216c565b849061219e565b925050505b610a85670de0b6b3a7640000610a398460010154610a7f64e8d4a51000610a3987896000015461212b90919063ffffffff16565b90612103565b949350505050565b600560209081526000928352604080842090915290825290205481565b610ab26120ff565b6001600160a01b0316610ac3610c66565b6001600160a01b031614610ae95760405162461bcd60e51b815260040161068a90612fee565b6001600160a01b03919091166000908152602260205260409020805460ff1916911515919091179055565b601f546001600160a01b031681565b610b2b6120ff565b6001600160a01b0316610b3c610c66565b6001600160a01b031614610b625760405162461bcd60e51b815260040161068a90612fee565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60046020526000908152604090205460ff1681565b6011546001600160a01b031681565b600e546001600160a01b0316331480610c015750610bec610c66565b6001600160a01b0316336001600160a01b0316145b610c0a57600080fd5b6000610c27612710610a39601e548561212b90919063ffffffff16565b601d54909150610c37908261219e565b601d55610c50610c478383612103565b6017549061219e565b6017555050565b600f546001600160a01b031681565b6000546001600160a01b031690565b610c7d612ad3565b6001600160a01b0382166000908152600260208181526040928390208351608081018552815481526001820154818401529281015483850152600381018054855181850281018501909652808652939491936060860193830182828015610d0357602002820191906000526020600020905b815481526020019060010190808311610cef575b5050505050815250509050919050565b610d1b6120ff565b6001600160a01b0316610d2c610c66565b6001600160a01b031614610d525760405162461bcd60e51b815260040161068a90612fee565b6021805460ff191690556019819055610d6b428261219e565b601a556017546018819055601954610d9591600490910290610a3990670de0b6b3a764000061212b565b600a81905560098054600090610da757fe5b600091825260208220019190915560175550565b60205481565b6001600160a01b03811660009081526002602052604081206003805483919086908110610dea57fe5b60009182526020808320888452600580835260408086206001600160a01b038b16875290935291909320600990920290920191820154600283015492935090914211610e3d576000945050505050610f11565b826007015442118015610e535750600183015415155b15610ed65760008360030154421115610e805760078401546003850154610e7991612103565b9050610e93565b6007840154610e90904290612103565b90505b6000610eac85600401548361212b90919063ffffffff16565b9050610ed1610a3f8660010154610a3964e8d4a510008561212b90919063ffffffff16565b925050505b610f0a670de0b6b3a7640000610a398460000154610a7f64e8d4a51000610a39878b6000015461212b90919063ffffffff16565b9450505050505b92915050565b610f1f6120ff565b6001600160a01b0316610f30610c66565b6001600160a01b031614610f565760405162461bcd60e51b815260040161068a90612fee565b8060038381548110610f6457fe5b906000526020600020906009020160080160146101000a81548160ff0219169083151502179055505050565b610f98612afb565b60086040518060c00160405290816000820154815260200160018201805480602002602001604051908101604052809291908181526020018280548015610ffe57602002820191906000526020600020905b815481526020019060010190808311610fea575b50505050508152602001600282015481526020016003820154815260200160048201548152602001600582015481525050905090565b60075481565b60075460065460609182910367ffffffffffffffff8111801561105c57600080fd5b50604051908082528060200260200182016040528015611086578160200160208202803683370190505b506007549091506000905b6006548110156110f557846001600160a01b0316600682815481106110b257fe5b6000918252602090912001546001600160a01b031614156110ed57808383806001019450815181106110e057fe5b6020026020010181815250505b600101611091565b50909392505050565b3233148061111b57503360009081526022602052604090205460ff165b6111375760405162461bcd60e51b815260040161068a90613023565b60215460ff161561115a5760405162461bcd60e51b815260040161068a90613091565b3360009081526002602052604090206111716121c3565b60005b600382015481101561127c57600082600301828154811061119157fe5b6000918252602080832090910154808352600490915260409091205490915060ff16156111be5750611274565b6111c78161223e565b60008181526005602090815260408083203384529091528120546003805461121f9291610a7f9164e8d4a5100091610a39918890811061120357fe5b600091825260209091206005600990920201015489549061212b565b905061123381670de0b6b3a764000061216c565b905080156112715761127133826003858154811061124d57fe5b60009182526020909120600660099092020101546001600160a01b03169190612353565b50505b600101611174565b508054156112db5760006112b38260010154610a7f64e8d4a51000610a39600860040154876000015461212b90919063ffffffff16565b90506112c781670de0b6b3a764000061216c565b905080156112d9576112d933826123ae565b505b811561144957600e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611312903090600401612d47565b60206040518083038186803b15801561132a57600080fd5b505afa15801561133e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113629190612c3c565b600e5490915061137d906001600160a01b0316333086612491565b601f54600e546040516370a0823160e01b8152611421926001600160a01b039081169261140e928692909116906370a08231906113be903090600401612d47565b60206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7f9190612c3c565b600e546001600160a01b03169190612353565b815461142d908461219e565b82556020805484019055601654611444908461219e565b601655505b60005b600382015481101561151b57600082600301828154811061146957fe5b6000918252602080832090910154808352600490915260409091205490915060ff16156114965750611513565b83600382815481106114a457fe5b9060005260206000209060090201600101600082825401925050819055506114f764e8d4a51000610a39600384815481106114db57fe5b600091825260209091206005600990920201015486549061212b565b6000918252600560209081526040808420338552909152909120555b60010161144c565b50600c5481546115359164e8d4a5100091610a399161212b565b60018201556115426124b2565b5050565b60606000606060038054905067ffffffffffffffff8111801561156857600080fd5b50604051908082528060200260200182016040528015611592578160200160208202803683370190505b5090506000805b6003548110156115f15742600382815481106115b157fe5b90600052602060002090600902016003015411156115e957808383806001019450815181106115dc57fe5b6020026020010181815250505b600101611599565b5090925090509091565b6012546001600160a01b031681565b6013546001600160a01b031681565b60185481565b600854600a54600b54600c54600d5485565b60195481565b600e546001600160a01b031681565b61164e6120ff565b6001600160a01b031661165f610c66565b6001600160a01b0316146116855760405162461bcd60e51b815260040161068a90612fee565b6001600160a01b0381166116ab5760405162461bcd60e51b815260040161068a90612e76565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3233148061172357503360009081526022602052604090205460ff165b61173f5760405162461bcd60e51b815260040161068a90613023565b6003548110801561176d5750426003828154811061175957fe5b906000526020600020906009020160030154115b6117895760405162461bcd60e51b815260040161068a906130b1565b60008181526004602052604090205460ff16156117a557600080fd5b336000908152600260205260408120905b600382015481101561180357828260030182815481106117d257fe5b906000526020600020015414156117fb5760405162461bcd60e51b815260040161068a90612f85565b6001016117b6565b5061180d8261223e565b60006003838154811061181c57fe5b6000918252602080832085546009939093020160018181018054909401909355600380870180549485018155855291909320909101859055805491925061188e9164e8d4a5100091610a39918790811061187257fe5b600091825260209091206005600990920201015485549061212b565b6000938452600560209081526040808620338752909152909320929092555050565b6000323314806118cf57503360009081526022602052604090205460ff165b6118eb5760405162461bcd60e51b815260040161068a90613023565b336000908152600260205260409020805461190557600080fd5b61190d6121c3565b6010546040516370a0823160e01b81526000916001600160a01b0316906370a082319061193e903090600401612d47565b60206040518083038186803b15801561195657600080fd5b505afa15801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e9190612c3c565b905060005b6003830154811015611b355760008360030182815481106119b057fe5b6000918252602080832090910154808352600490915260409091205490915060ff16156119dd5750611b2d565b6119e68161223e565b6119ee612b31565b600382815481106119fb57fe5b60009182526020808320604080516101408101825260099490940290910180548452600181015484840152600281015484830152600381015460608501526004810154608085015260058082015460a0860190815260068301546001600160a01b0390811660c0880152600784015460e0880152600890930154928316610100870152600160a01b90920460ff161515610120860152878652835281852033865290925283205490518854929450611ac192610a7f9164e8d4a5100091610a399161212b565b9050611ad581670de0b6b3a764000061216c565b905081610120015115611b06578015611b015760c0820151611b01906001600160a01b03163383612353565b611b29565b61010082015160c0830151601054611b29929184916001600160a01b0316612672565b5050505b600101611993565b50600e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611b67903090600401612d47565b60206040518083038186803b158015611b7f57600080fd5b505afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190612c3c565b6011546010546040516370a0823160e01b8152929350611c12926001600160a01b0392831692611bfa9287929116906370a08231906113be903090600401612d47565b601054600e546001600160a01b039182169116612672565b6000611c418460010154610a7f64e8d4a51000610a39600860040154896000015461212b90919063ffffffff16565b9050611c5581670de0b6b3a764000061216c565b601154600f54600e54929350611c7c926001600160a01b0392831692859281169116612672565b600e546040516370a0823160e01b8152600091611cb39185916001600160a01b0316906370a08231906113be903090600401612d47565b9050611cc56064610a3983606961212b565b855401808655600c54611ce39164e8d4a5100091610a39919061212b565b600186015560005b6003860154811015611dc9576000866003018281548110611d0857fe5b6000918252602080832090910154808352600490915260409091205490915060ff1615611d355750611dc1565b611d456064610a3985606961212b565b60038281548110611d5257fe5b906000526020600020906009020160010160008282540192505081905550611da564e8d4a51000610a3960038481548110611d8957fe5b60009182526020909120600560099092020101548a549061212b565b6000918252600560209081526040808420338552909152909120555b600101611ceb565b50600e54601f5460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92611e00929116908590600401612da0565b602060405180830381600087803b158015611e1a57600080fd5b505af1158015611e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e529190612c08565b506020805482019055611e6b6064610a3983606961212b565b601680549091019055601c54811115611ec157600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b031916331790555b611ec96124b2565b94505050505090565b6010546001600160a01b031681565b611ee96120ff565b6001600160a01b0316611efa610c66565b6001600160a01b031614611f205760405162461bcd60e51b815260040161068a90612fee565b4284118015611f2e57508383115b611f4a5760405162461bcd60e51b815260040161068a90612f2a565b600360405180610140016040528087815260200160008152602001868152602001858152602001611f92878703610a39670de0b6b3a76400008b61212b90919063ffffffff16565b8152600060208083018290526001600160a01b03808816604080860182905260608087018d905289841660808089019190915260a0978801879052895460018181018c559a885296869020895160099098020196875594880151988601989098558681015160028601559686015160038501559185015160048085019190915593850151600584015560c08501516006840180549183166001600160a01b031992831617905560e0860151600785015561010086015160089094018054610120909701511515600160a01b0260ff60a01b199590931696909116959095179290921691909117909255915163095ea7b360e01b8152909163095ea7b39161209f9185916000199101612da0565b602060405180830381600087803b1580156120b957600080fd5b505af11580156120cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f19190612c08565b505050505050565b601b5481565b3390565b6000828211156121255760405162461bcd60e51b815260040161068a90612ef3565b50900390565b60008261213a57506000610f11565b8282028284828161214757fe5b04146121655760405162461bcd60e51b815260040161068a90612fad565b9392505050565b600080821161218d5760405162461bcd60e51b815260040161068a90612f4e565b81838161219657fe5b049392505050565b6000828201838110156121655760405162461bcd60e51b815260040161068a90612ebc565b600d5442116121d15761223c565b6016546121e15742600d5561223c565b600d546000906121f2904290612103565b600a5490915060009061220690839061212b565b9050612232612229601654610a3964e8d4a510008561212b90919063ffffffff16565b600c549061219e565b600c55505042600d555b565b60006003828154811061224d57fe5b9060005260206000209060090201905080600301548160070154101580612278575080600701544211155b156122835750612350565b601654158061229457506001810154155b156122a55742600790910155612350565b600081600301544211156122cd57600782015460038301546122c691612103565b90506122e0565b60078201546122dd904290612103565b90505b60006122f983600401548361212b90919063ffffffff16565b905061232961231e8460010154610a3964e8d4a510008561212b90919063ffffffff16565b60058501549061219e565b600584015542600784018190556003840154101561234c57600383015460078401555b5050505b50565b6123a98363a9059cbb60e01b8484604051602401612372929190612da0565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526127e8565b505050565b600f546040516370a0823160e01b81526000916001600160a01b0316906370a08231906123df903090600401612d47565b60206040518083038186803b1580156123f757600080fd5b505afa15801561240b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242f9190612c3c565b90508082111561246557600f54612450906001600160a01b03168483612353565b601b5461245d908261219e565b601b556123a9565b600f5461247c906001600160a01b03168484612353565b601b54612489908361219e565b601b55505050565b61234c846323b872dd60e01b85858560405160240161237293929190612d7c565b6124ba612877565b42601a541161223c576019546124d190429061219e565b601a55601754629896801015612502576124ee33629896806123ae565b6017546124fe9062989680612103565b6017555b601380546001600160a01b0319163317905560175461252b906103e890610a39906103e761212b565b6018556000601755600854600314156125c9576009805460009061254b57fe5b6000918252602082200154600a80549190910390556008556019546018546125839160040290610a3990670de0b6b3a764000061212b565b6009805460009061259057fe5b906000526020600020018190555060086001016000815481106125af57fe5b600091825260209091200154600a8054909101905561266a565b600854600980546125f79190600184019081106125e257fe5b600091825260209091200154600a5490612103565b600a556008805460010190556019546018546126239160040290610a3990670de0b6b3a764000061212b565b60085460098054909190811061263557fe5b60009182526020909120015560085460098054909190811061265357fe5b600091825260209091200154600a80549091019055505b61223c612944565b821561234c57604080516002808252606080830184529260208301908036833750506040516370a0823160e01b81529192506000916001600160a01b03861691506370a08231906126c7903090600401612d47565b60206040518083038186803b1580156126df57600080fd5b505afa1580156126f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127179190612c3c565b9050808510156127245750835b838260008151811061273257fe5b60200260200101906001600160a01b031690816001600160a01b031681525050828260018151811061276057fe5b6001600160a01b0392831660209182029290920101528616635c11d795826000853061278e4261025861219e565b6040518663ffffffff1660e01b81526004016127ae959493929190613170565b600060405180830381600087803b1580156127c857600080fd5b505af11580156127dc573d6000803e3d6000fd5b50505050505050505050565b606061283d826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129ea9092919063ffffffff16565b8051909150156123a9578080602001905181019061285b9190612c08565b6123a95760405162461bcd60e51b815260040161068a90612e2c565b336000908152600260205260408120905b6003820154811015611542574260038360030183815481106128a657fe5b9060005260206000200154815481106128bb57fe5b9060005260206000209060090201600301541161293c5760038201805460001981019081106128e657fe5b906000526020600020015482600301828154811061290057fe5b6000918252602090912001556003820180548061291957fe5b60019003818190600052602060002001600090559055612937612877565b611542565b600101612888565b6007546006540360008033445a60405160200161296393929190612d5b565b60408051601f1981840301815291905280516020909101206007548482069081016015819055600680549395509193509091811061299d57fe5b600091825260209091200154601480546001600160a01b0319166001600160a01b039283161790819055601d546129d89291909116906123ae565b50506000601d55600780549091019055565b6060610a858484600085856129fe85612a94565b612a1a5760405162461bcd60e51b815260040161068a9061305a565b60006060866001600160a01b03168587604051612a379190612d2b565b60006040518083038185875af1925050503d8060008114612a74576040519150601f19603f3d011682016040523d82523d6000602084013e612a79565b606091505b5091509150612a89828286612a9a565b979650505050505050565b3b151590565b60608315612aa9575081612165565b825115612ab95782518084602001fd5b8160405162461bcd60e51b815260040161068a9190612df9565b6040518060800160405280600081526020016000815260200160008152602001606081525090565b6040518060c001604052806000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b031681526020016000815260200160006001600160a01b031681526020016000151581525090565b600060208284031215612ba9578081fd5b81356121658161329b565b60008060408385031215612bc6578081fd5b8235612bd18161329b565b91506020830135612be1816132b0565b809150509250929050565b600060208284031215612bfd578081fd5b8135612165816132b0565b600060208284031215612c19578081fd5b8151612165816132b0565b600060208284031215612c35578081fd5b5035919050565b600060208284031215612c4d578081fd5b5051919050565b60008060408385031215612c66578182fd5b823591506020830135612be18161329b565b60008060408385031215612c8a578182fd5b823591506020830135612be1816132b0565b600080600080600060a08688031215612cb3578081fd5b8535945060208601359350604086013592506060860135612cd38161329b565b91506080860135612ce38161329b565b809150509295509295909350565b6000815180845260208085019450808401835b83811015612d2057815187529582019590820190600101612d04565b509495945050505050565b60008251612d3d81846020870161326f565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6000602082526121656020830184612cf1565b600060408252612ddf6040830185612cf1565b90508260208301529392505050565b901515815260200190565b6000602082528251806020840152612e1881604085016020870161326f565b601f01601f19169190910160400192915050565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600a908201526977726f6e672074696d6560b01b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600e908201526d191d5c1b1a58d85d1959081c1a5960921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f6f6e6c79417070726f766564436f6e74726163744f72454f4100000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600690820152651c185d5cd95960d21b604082015260600190565b6020808252600990820152681ddc9bdb99c81c1a5960ba1b604082015260600190565b60006020825282516020830152602083015160c060408401526130fa60e0840182612cf1565b90506040840151606084015260608401516080840152608084015160a084015260a084015160c08401528091505092915050565b6000602082528251602083015260208301516040830152604083015160608301526060830151608080840152610a8560a0840182612cf1565b90815260200190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156131bf5784516001600160a01b03168352938301939183019160010161319a565b50506001600160a01b03969096166060850152505050608001529392505050565b9283526020830191909152604082015260600190565b948552602085019390935260408401919091526060830152608082015260a00190565b998a5260208a019890985260408901969096526060880194909452608087019290925260a08601526001600160a01b0390811660c086015260e08501919091521661010083015215156101208201526101400190565b60005b8381101561328a578181015183820152602001613272565b8381111561234c5750506000910152565b6001600160a01b038116811461235057600080fd5b801515811461235057600080fdfea264697066735822122011f041719825d223f87e21617786392ec9a4ba96f25a59c4d12a620e580f990864736f6c634300060c0033000000000000000000000000cb898b0efb084df14dd8e018da37b4d0f06ab26d

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061030c5760003560e01c80637e5ec07a1161019d578063ccd5db2f116100e9578063f10c993c116100a2578063f69e20461161007c578063f69e204614610620578063fb41be1614610628578063fc91f64214610630578063ff464806146106435761030c565b8063f10c993c146105f2578063f2fde38b146105fa578063f57d585b1461060d5761030c565b8063ccd5db2f146105a3578063d49e77cd146105b9578063dfbf53ae146105c1578063e37ac5d7146105c9578063e49bd61e146105d1578063ef78d4fd146105ea5761030c565b8063966ff65011610156578063a75e510711610130578063a75e510714610560578063a95cad6814610575578063b5dbfb251461057d578063b6b55f25146105905761030c565b8063966ff6501461053257806398969e821461053a578063a1ff5e0a1461054d5761030c565b80637e5ec07a146104d4578063896d59a0146104dc57806389a30271146104ef5780638da5cb5b146104f75780639446ec9f146104ff57806395805dad1461051f5761030c565b80633380e42a1161025c5780635c975abb116102155780635ffd993b116101ef5780635ffd993b1461049e57806370d5ae05146104b1578063715018a6146104b9578063782c27a9146104c15761030c565b80635c975abb146104705780635def5f5e146104785780635fc93c2d1461048b5761030c565b80633380e42a146104055780633606ef0b1461040d578063390710bc1461042d57806345dc3dd81461043557806353f298e6146104485780635c8c2083146104685761030c565b80631526fe27116102c95780631a39d8ef116102a35780631a39d8ef146103cd57806326749ad7146103d55780632ca126f8146103f5578063331f7d9d146103fd5761030c565b80631526fe271461037a57806316ba8cb9146103a35780631959a002146103ab5761030c565b806302329a2914610311578063081e3eda146103265780630ba23681146103445780630f3a9f651461034c5780630f4d03571461035f5780630fce4ef114610372575b600080fd5b61032461031f366004612bec565b61064b565b005b61032e6106a6565b60405161033b9190613167565b60405180910390f35b61032e6106ac565b61032461035a366004612c24565b6106b2565b61032461036d366004612c24565b6106f6565b61032e610755565b61038d610388366004612c24565b61075b565b60405161033b9a99989796959493929190613219565b61032e6107cc565b6103be6103b9366004612b98565b6107d2565b60405161033b939291906131e0565b61032e6107f2565b6103e86103e3366004612b98565b6107f8565b60405161033b9190612dee565b61032e61080d565b61032e610813565b61032e61081d565b61042061041b366004612b98565b610823565b60405161033b9190612db9565b61032e610936565b610324610443366004612c24565b61093c565b61045b610456366004612c24565b610980565b60405161033b9190612d47565b61045b6109a7565b6103e86109b6565b61032e610486366004612b98565b6109bf565b61032e610499366004612c54565b610a8d565b6103246104ac366004612bb4565b610aaa565b61045b610b14565b610324610b23565b6103e86104cf366004612c24565b610bac565b61045b610bc1565b6103246104ea366004612c24565b610bd0565b61045b610c57565b61045b610c66565b61051261050d366004612b98565b610c75565b60405161033b919061312e565b61032461052d366004612c24565b610d13565b61032e610dbb565b61032e610548366004612c54565b610dc1565b61032461055b366004612c78565b610f17565b610568610f90565b60405161033b91906130d4565b61032e611034565b61042061058b366004612b98565b61103a565b61032461059e366004612c24565b6110fe565b6105ab611546565b60405161033b929190612dcc565b61045b6115fb565b61045b61160a565b61032e611619565b6105d961161f565b60405161033b9594939291906131f6565b61032e611631565b61045b611637565b610324610608366004612b98565b611646565b61032461061b366004612c24565b611706565b61032e6118b0565b61045b611ed2565b61032461063e366004612c9c565b611ee1565b61032e6120f9565b6106536120ff565b6001600160a01b0316610664610c66565b6001600160a01b0316146106935760405162461bcd60e51b815260040161068a90612fee565b60405180910390fd5b6021805460ff1916911515919091179055565b60035490565b60155481565b6106ba6120ff565b6001600160a01b03166106cb610c66565b6001600160a01b0316146106f15760405162461bcd60e51b815260040161068a90612fee565b601955565b6106fe6120ff565b6001600160a01b031661070f610c66565b6001600160a01b0316146107355760405162461bcd60e51b815260040161068a90612fee565b6000908152600460205260409020805460ff19811660ff90911615179055565b601c5481565b6003818154811061076857fe5b6000918252602090912060099091020180546001820154600283015460038401546004850154600586015460068701546007880154600890980154969850949693959294919390926001600160a01b0392831692811690600160a01b900460ff168a565b601e5481565b600260208190526000918252604090912080546001820154919092015483565b60165481565b60226020526000908152604090205460ff1681565b601a5481565b6007546006540390565b60175481565b60608060026000846001600160a01b03166001600160a01b0316815260200190815260200160002060030180548060200260200160405190810160405280929190818152602001828054801561089857602002820191906000526020600020905b815481526020019060010190808311610884575b505050505090506060815167ffffffffffffffff811180156108b957600080fd5b506040519080825280602002602001820160405280156108e3578160200160208202803683370190505b50905060005b825181101561092e5761090f83828151811061090157fe5b602002602001015186610dc1565b82828151811061091b57fe5b60209081029190910101526001016108e9565b509392505050565b601d5481565b6109446120ff565b6001600160a01b0316610955610c66565b6001600160a01b03161461097b5760405162461bcd60e51b815260040161068a90612fee565b601c55565b6006818154811061098d57fe5b6000918252602090912001546001600160a01b0316905081565b6014546001600160a01b031681565b60215460ff1681565b6001600160a01b0381166000908152600260205260408120600c54600d54421180156109ec575060165415155b15610a4b57600d54600090610a02904290612103565b600a54909150600090610a1690839061212b565b9050610a46610a3f601654610a3964e8d4a510008561212b90919063ffffffff16565b9061216c565b849061219e565b925050505b610a85670de0b6b3a7640000610a398460010154610a7f64e8d4a51000610a3987896000015461212b90919063ffffffff16565b90612103565b949350505050565b600560209081526000928352604080842090915290825290205481565b610ab26120ff565b6001600160a01b0316610ac3610c66565b6001600160a01b031614610ae95760405162461bcd60e51b815260040161068a90612fee565b6001600160a01b03919091166000908152602260205260409020805460ff1916911515919091179055565b601f546001600160a01b031681565b610b2b6120ff565b6001600160a01b0316610b3c610c66565b6001600160a01b031614610b625760405162461bcd60e51b815260040161068a90612fee565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60046020526000908152604090205460ff1681565b6011546001600160a01b031681565b600e546001600160a01b0316331480610c015750610bec610c66565b6001600160a01b0316336001600160a01b0316145b610c0a57600080fd5b6000610c27612710610a39601e548561212b90919063ffffffff16565b601d54909150610c37908261219e565b601d55610c50610c478383612103565b6017549061219e565b6017555050565b600f546001600160a01b031681565b6000546001600160a01b031690565b610c7d612ad3565b6001600160a01b0382166000908152600260208181526040928390208351608081018552815481526001820154818401529281015483850152600381018054855181850281018501909652808652939491936060860193830182828015610d0357602002820191906000526020600020905b815481526020019060010190808311610cef575b5050505050815250509050919050565b610d1b6120ff565b6001600160a01b0316610d2c610c66565b6001600160a01b031614610d525760405162461bcd60e51b815260040161068a90612fee565b6021805460ff191690556019819055610d6b428261219e565b601a556017546018819055601954610d9591600490910290610a3990670de0b6b3a764000061212b565b600a81905560098054600090610da757fe5b600091825260208220019190915560175550565b60205481565b6001600160a01b03811660009081526002602052604081206003805483919086908110610dea57fe5b60009182526020808320888452600580835260408086206001600160a01b038b16875290935291909320600990920290920191820154600283015492935090914211610e3d576000945050505050610f11565b826007015442118015610e535750600183015415155b15610ed65760008360030154421115610e805760078401546003850154610e7991612103565b9050610e93565b6007840154610e90904290612103565b90505b6000610eac85600401548361212b90919063ffffffff16565b9050610ed1610a3f8660010154610a3964e8d4a510008561212b90919063ffffffff16565b925050505b610f0a670de0b6b3a7640000610a398460000154610a7f64e8d4a51000610a39878b6000015461212b90919063ffffffff16565b9450505050505b92915050565b610f1f6120ff565b6001600160a01b0316610f30610c66565b6001600160a01b031614610f565760405162461bcd60e51b815260040161068a90612fee565b8060038381548110610f6457fe5b906000526020600020906009020160080160146101000a81548160ff0219169083151502179055505050565b610f98612afb565b60086040518060c00160405290816000820154815260200160018201805480602002602001604051908101604052809291908181526020018280548015610ffe57602002820191906000526020600020905b815481526020019060010190808311610fea575b50505050508152602001600282015481526020016003820154815260200160048201548152602001600582015481525050905090565b60075481565b60075460065460609182910367ffffffffffffffff8111801561105c57600080fd5b50604051908082528060200260200182016040528015611086578160200160208202803683370190505b506007549091506000905b6006548110156110f557846001600160a01b0316600682815481106110b257fe5b6000918252602090912001546001600160a01b031614156110ed57808383806001019450815181106110e057fe5b6020026020010181815250505b600101611091565b50909392505050565b3233148061111b57503360009081526022602052604090205460ff165b6111375760405162461bcd60e51b815260040161068a90613023565b60215460ff161561115a5760405162461bcd60e51b815260040161068a90613091565b3360009081526002602052604090206111716121c3565b60005b600382015481101561127c57600082600301828154811061119157fe5b6000918252602080832090910154808352600490915260409091205490915060ff16156111be5750611274565b6111c78161223e565b60008181526005602090815260408083203384529091528120546003805461121f9291610a7f9164e8d4a5100091610a39918890811061120357fe5b600091825260209091206005600990920201015489549061212b565b905061123381670de0b6b3a764000061216c565b905080156112715761127133826003858154811061124d57fe5b60009182526020909120600660099092020101546001600160a01b03169190612353565b50505b600101611174565b508054156112db5760006112b38260010154610a7f64e8d4a51000610a39600860040154876000015461212b90919063ffffffff16565b90506112c781670de0b6b3a764000061216c565b905080156112d9576112d933826123ae565b505b811561144957600e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611312903090600401612d47565b60206040518083038186803b15801561132a57600080fd5b505afa15801561133e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113629190612c3c565b600e5490915061137d906001600160a01b0316333086612491565b601f54600e546040516370a0823160e01b8152611421926001600160a01b039081169261140e928692909116906370a08231906113be903090600401612d47565b60206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7f9190612c3c565b600e546001600160a01b03169190612353565b815461142d908461219e565b82556020805484019055601654611444908461219e565b601655505b60005b600382015481101561151b57600082600301828154811061146957fe5b6000918252602080832090910154808352600490915260409091205490915060ff16156114965750611513565b83600382815481106114a457fe5b9060005260206000209060090201600101600082825401925050819055506114f764e8d4a51000610a39600384815481106114db57fe5b600091825260209091206005600990920201015486549061212b565b6000918252600560209081526040808420338552909152909120555b60010161144c565b50600c5481546115359164e8d4a5100091610a399161212b565b60018201556115426124b2565b5050565b60606000606060038054905067ffffffffffffffff8111801561156857600080fd5b50604051908082528060200260200182016040528015611592578160200160208202803683370190505b5090506000805b6003548110156115f15742600382815481106115b157fe5b90600052602060002090600902016003015411156115e957808383806001019450815181106115dc57fe5b6020026020010181815250505b600101611599565b5090925090509091565b6012546001600160a01b031681565b6013546001600160a01b031681565b60185481565b600854600a54600b54600c54600d5485565b60195481565b600e546001600160a01b031681565b61164e6120ff565b6001600160a01b031661165f610c66565b6001600160a01b0316146116855760405162461bcd60e51b815260040161068a90612fee565b6001600160a01b0381166116ab5760405162461bcd60e51b815260040161068a90612e76565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3233148061172357503360009081526022602052604090205460ff165b61173f5760405162461bcd60e51b815260040161068a90613023565b6003548110801561176d5750426003828154811061175957fe5b906000526020600020906009020160030154115b6117895760405162461bcd60e51b815260040161068a906130b1565b60008181526004602052604090205460ff16156117a557600080fd5b336000908152600260205260408120905b600382015481101561180357828260030182815481106117d257fe5b906000526020600020015414156117fb5760405162461bcd60e51b815260040161068a90612f85565b6001016117b6565b5061180d8261223e565b60006003838154811061181c57fe5b6000918252602080832085546009939093020160018181018054909401909355600380870180549485018155855291909320909101859055805491925061188e9164e8d4a5100091610a39918790811061187257fe5b600091825260209091206005600990920201015485549061212b565b6000938452600560209081526040808620338752909152909320929092555050565b6000323314806118cf57503360009081526022602052604090205460ff165b6118eb5760405162461bcd60e51b815260040161068a90613023565b336000908152600260205260409020805461190557600080fd5b61190d6121c3565b6010546040516370a0823160e01b81526000916001600160a01b0316906370a082319061193e903090600401612d47565b60206040518083038186803b15801561195657600080fd5b505afa15801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e9190612c3c565b905060005b6003830154811015611b355760008360030182815481106119b057fe5b6000918252602080832090910154808352600490915260409091205490915060ff16156119dd5750611b2d565b6119e68161223e565b6119ee612b31565b600382815481106119fb57fe5b60009182526020808320604080516101408101825260099490940290910180548452600181015484840152600281015484830152600381015460608501526004810154608085015260058082015460a0860190815260068301546001600160a01b0390811660c0880152600784015460e0880152600890930154928316610100870152600160a01b90920460ff161515610120860152878652835281852033865290925283205490518854929450611ac192610a7f9164e8d4a5100091610a399161212b565b9050611ad581670de0b6b3a764000061216c565b905081610120015115611b06578015611b015760c0820151611b01906001600160a01b03163383612353565b611b29565b61010082015160c0830151601054611b29929184916001600160a01b0316612672565b5050505b600101611993565b50600e546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611b67903090600401612d47565b60206040518083038186803b158015611b7f57600080fd5b505afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190612c3c565b6011546010546040516370a0823160e01b8152929350611c12926001600160a01b0392831692611bfa9287929116906370a08231906113be903090600401612d47565b601054600e546001600160a01b039182169116612672565b6000611c418460010154610a7f64e8d4a51000610a39600860040154896000015461212b90919063ffffffff16565b9050611c5581670de0b6b3a764000061216c565b601154600f54600e54929350611c7c926001600160a01b0392831692859281169116612672565b600e546040516370a0823160e01b8152600091611cb39185916001600160a01b0316906370a08231906113be903090600401612d47565b9050611cc56064610a3983606961212b565b855401808655600c54611ce39164e8d4a5100091610a39919061212b565b600186015560005b6003860154811015611dc9576000866003018281548110611d0857fe5b6000918252602080832090910154808352600490915260409091205490915060ff1615611d355750611dc1565b611d456064610a3985606961212b565b60038281548110611d5257fe5b906000526020600020906009020160010160008282540192505081905550611da564e8d4a51000610a3960038481548110611d8957fe5b60009182526020909120600560099092020101548a549061212b565b6000918252600560209081526040808420338552909152909120555b600101611ceb565b50600e54601f5460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb92611e00929116908590600401612da0565b602060405180830381600087803b158015611e1a57600080fd5b505af1158015611e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e529190612c08565b506020805482019055611e6b6064610a3983606961212b565b601680549091019055601c54811115611ec157600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b031916331790555b611ec96124b2565b94505050505090565b6010546001600160a01b031681565b611ee96120ff565b6001600160a01b0316611efa610c66565b6001600160a01b031614611f205760405162461bcd60e51b815260040161068a90612fee565b4284118015611f2e57508383115b611f4a5760405162461bcd60e51b815260040161068a90612f2a565b600360405180610140016040528087815260200160008152602001868152602001858152602001611f92878703610a39670de0b6b3a76400008b61212b90919063ffffffff16565b8152600060208083018290526001600160a01b03808816604080860182905260608087018d905289841660808089019190915260a0978801879052895460018181018c559a885296869020895160099098020196875594880151988601989098558681015160028601559686015160038501559185015160048085019190915593850151600584015560c08501516006840180549183166001600160a01b031992831617905560e0860151600785015561010086015160089094018054610120909701511515600160a01b0260ff60a01b199590931696909116959095179290921691909117909255915163095ea7b360e01b8152909163095ea7b39161209f9185916000199101612da0565b602060405180830381600087803b1580156120b957600080fd5b505af11580156120cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f19190612c08565b505050505050565b601b5481565b3390565b6000828211156121255760405162461bcd60e51b815260040161068a90612ef3565b50900390565b60008261213a57506000610f11565b8282028284828161214757fe5b04146121655760405162461bcd60e51b815260040161068a90612fad565b9392505050565b600080821161218d5760405162461bcd60e51b815260040161068a90612f4e565b81838161219657fe5b049392505050565b6000828201838110156121655760405162461bcd60e51b815260040161068a90612ebc565b600d5442116121d15761223c565b6016546121e15742600d5561223c565b600d546000906121f2904290612103565b600a5490915060009061220690839061212b565b9050612232612229601654610a3964e8d4a510008561212b90919063ffffffff16565b600c549061219e565b600c55505042600d555b565b60006003828154811061224d57fe5b9060005260206000209060090201905080600301548160070154101580612278575080600701544211155b156122835750612350565b601654158061229457506001810154155b156122a55742600790910155612350565b600081600301544211156122cd57600782015460038301546122c691612103565b90506122e0565b60078201546122dd904290612103565b90505b60006122f983600401548361212b90919063ffffffff16565b905061232961231e8460010154610a3964e8d4a510008561212b90919063ffffffff16565b60058501549061219e565b600584015542600784018190556003840154101561234c57600383015460078401555b5050505b50565b6123a98363a9059cbb60e01b8484604051602401612372929190612da0565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526127e8565b505050565b600f546040516370a0823160e01b81526000916001600160a01b0316906370a08231906123df903090600401612d47565b60206040518083038186803b1580156123f757600080fd5b505afa15801561240b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242f9190612c3c565b90508082111561246557600f54612450906001600160a01b03168483612353565b601b5461245d908261219e565b601b556123a9565b600f5461247c906001600160a01b03168484612353565b601b54612489908361219e565b601b55505050565b61234c846323b872dd60e01b85858560405160240161237293929190612d7c565b6124ba612877565b42601a541161223c576019546124d190429061219e565b601a55601754629896801015612502576124ee33629896806123ae565b6017546124fe9062989680612103565b6017555b601380546001600160a01b0319163317905560175461252b906103e890610a39906103e761212b565b6018556000601755600854600314156125c9576009805460009061254b57fe5b6000918252602082200154600a80549190910390556008556019546018546125839160040290610a3990670de0b6b3a764000061212b565b6009805460009061259057fe5b906000526020600020018190555060086001016000815481106125af57fe5b600091825260209091200154600a8054909101905561266a565b600854600980546125f79190600184019081106125e257fe5b600091825260209091200154600a5490612103565b600a556008805460010190556019546018546126239160040290610a3990670de0b6b3a764000061212b565b60085460098054909190811061263557fe5b60009182526020909120015560085460098054909190811061265357fe5b600091825260209091200154600a80549091019055505b61223c612944565b821561234c57604080516002808252606080830184529260208301908036833750506040516370a0823160e01b81529192506000916001600160a01b03861691506370a08231906126c7903090600401612d47565b60206040518083038186803b1580156126df57600080fd5b505afa1580156126f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127179190612c3c565b9050808510156127245750835b838260008151811061273257fe5b60200260200101906001600160a01b031690816001600160a01b031681525050828260018151811061276057fe5b6001600160a01b0392831660209182029290920101528616635c11d795826000853061278e4261025861219e565b6040518663ffffffff1660e01b81526004016127ae959493929190613170565b600060405180830381600087803b1580156127c857600080fd5b505af11580156127dc573d6000803e3d6000fd5b50505050505050505050565b606061283d826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129ea9092919063ffffffff16565b8051909150156123a9578080602001905181019061285b9190612c08565b6123a95760405162461bcd60e51b815260040161068a90612e2c565b336000908152600260205260408120905b6003820154811015611542574260038360030183815481106128a657fe5b9060005260206000200154815481106128bb57fe5b9060005260206000209060090201600301541161293c5760038201805460001981019081106128e657fe5b906000526020600020015482600301828154811061290057fe5b6000918252602090912001556003820180548061291957fe5b60019003818190600052602060002001600090559055612937612877565b611542565b600101612888565b6007546006540360008033445a60405160200161296393929190612d5b565b60408051601f1981840301815291905280516020909101206007548482069081016015819055600680549395509193509091811061299d57fe5b600091825260209091200154601480546001600160a01b0319166001600160a01b039283161790819055601d546129d89291909116906123ae565b50506000601d55600780549091019055565b6060610a858484600085856129fe85612a94565b612a1a5760405162461bcd60e51b815260040161068a9061305a565b60006060866001600160a01b03168587604051612a379190612d2b565b60006040518083038185875af1925050503d8060008114612a74576040519150601f19603f3d011682016040523d82523d6000602084013e612a79565b606091505b5091509150612a89828286612a9a565b979650505050505050565b3b151590565b60608315612aa9575081612165565b825115612ab95782518084602001fd5b8160405162461bcd60e51b815260040161068a9190612df9565b6040518060800160405280600081526020016000815260200160008152602001606081525090565b6040518060c001604052806000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b031681526020016000815260200160006001600160a01b031681526020016000151581525090565b600060208284031215612ba9578081fd5b81356121658161329b565b60008060408385031215612bc6578081fd5b8235612bd18161329b565b91506020830135612be1816132b0565b809150509250929050565b600060208284031215612bfd578081fd5b8135612165816132b0565b600060208284031215612c19578081fd5b8151612165816132b0565b600060208284031215612c35578081fd5b5035919050565b600060208284031215612c4d578081fd5b5051919050565b60008060408385031215612c66578182fd5b823591506020830135612be18161329b565b60008060408385031215612c8a578182fd5b823591506020830135612be1816132b0565b600080600080600060a08688031215612cb3578081fd5b8535945060208601359350604086013592506060860135612cd38161329b565b91506080860135612ce38161329b565b809150509295509295909350565b6000815180845260208085019450808401835b83811015612d2057815187529582019590820190600101612d04565b509495945050505050565b60008251612d3d81846020870161326f565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6000602082526121656020830184612cf1565b600060408252612ddf6040830185612cf1565b90508260208301529392505050565b901515815260200190565b6000602082528251806020840152612e1881604085016020870161326f565b601f01601f19169190910160400192915050565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600a908201526977726f6e672074696d6560b01b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600e908201526d191d5c1b1a58d85d1959081c1a5960921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f6f6e6c79417070726f766564436f6e74726163744f72454f4100000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600690820152651c185d5cd95960d21b604082015260600190565b6020808252600990820152681ddc9bdb99c81c1a5960ba1b604082015260600190565b60006020825282516020830152602083015160c060408401526130fa60e0840182612cf1565b90506040840151606084015260608401516080840152608084015160a084015260a084015160c08401528091505092915050565b6000602082528251602083015260208301516040830152604083015160608301526060830151608080840152610a8560a0840182612cf1565b90815260200190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156131bf5784516001600160a01b03168352938301939183019160010161319a565b50506001600160a01b03969096166060850152505050608001529392505050565b9283526020830191909152604082015260600190565b948552602085019390935260408401919091526060830152608082015260a00190565b998a5260208a019890985260408901969096526060880194909452608087019290925260a08601526001600160a01b0390811660c086015260e08501919091521661010083015215156101208201526101400190565b60005b8381101561328a578181015183820152602001613272565b8381111561234c5750506000910152565b6001600160a01b038116811461235057600080fd5b801515811461235057600080fdfea264697066735822122011f041719825d223f87e21617786392ec9a4ba96f25a59c4d12a620e580f990864736f6c634300060c0033

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

000000000000000000000000cb898b0efb084df14dd8e018da37b4d0f06ab26d

-----Decoded View---------------
Arg [0] : _lp (address): 0xCB898b0eFb084Df14dd8E018dA37B4d0f06aB26D

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000cb898b0efb084df14dd8e018da37b4d0f06ab26d


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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.