Contract 0x23b87748b615096d1a0f48870daee203a720723d 1

 

Contract Overview

PlutusDAO: plsJONES Farm
Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2c3e797f8419fdf76fcc27a9b006c633c45f0f7601975a082bb629aa3fd1b43dDeposit265535252022-09-25 9:51:301 hr 43 mins ago0x3acfdc5f934f0504cb73a332718450a809144371 IN  PlutusDAO: plsJONES Farm0 ETH0.00002386
0x1cb8ef5f3aa5b72339a6f0d5554b3086c85a48b709a51ea31f6ed39b81c6693dHarvest265533062022-09-25 9:50:211 hr 44 mins ago0x3acfdc5f934f0504cb73a332718450a809144371 IN  PlutusDAO: plsJONES Farm0 ETH0.00002898
0x9e8b872f9c208568c44553ac147c0e53bb66651871da61972b1191ae048ed7a3Deposit265436432022-09-25 8:50:342 hrs 44 mins ago0x19a648cb41e2944f4826d86712fbf3b0a19e5fa5 IN  PlutusDAO: plsJONES Farm0 ETH0.00002402
0x0e1e9459fe438baeffa3d5642530a4ff8d48f1d4a045baef145479dd6ac52927Harvest265191452022-09-25 6:29:055 hrs 5 mins ago0x5495ce96bc73beeea0ab285cb34dbdaf356b1f19 IN  PlutusDAO: plsJONES Farm0 ETH0.00002921
0x127db0e1549d5cfe98309144ade2a510f30af64951e2b66f2dab68371f38e6e7Harvest265117152022-09-25 5:39:535 hrs 54 mins ago0xc0ea3704c21163ddac1c662f642aa138233b29c1 IN  PlutusDAO: plsJONES Farm0 ETH0.00003114
0x4ef0cb7970e40e642693df655bb3044dd99898f5a729d674b7b3ae463f1d6221Harvest264972472022-09-25 3:43:097 hrs 51 mins ago0xcf0afa96743819d52515bff99635a7978f2a856f IN  PlutusDAO: plsJONES Farm0 ETH0.00002971
0x78b4bf5d3f6391b1417fe5c0c1baee1b81cd63ab03009d1c72610c68c978dd0dDeposit264869572022-09-25 2:21:509 hrs 13 mins ago0x6db2a4b208d03ca20bc800d42e7f42ec1e54a86b IN  PlutusDAO: plsJONES Farm0 ETH0.00002418
0x90ac96a2943754db56d03f94129336fef000e4a8caf78d6132bff2537ca85789Deposit264855382022-09-25 2:09:269 hrs 25 mins ago0xba1baea54261a0b6e1f8fcfd0aad3dff68da6ae0 IN  PlutusDAO: plsJONES Farm0 ETH0.00002429
0xb5398ae052f65bc26e84be2053e972db57155c9e9979032a895a28916cf1acf2Harvest264854832022-09-25 2:08:569 hrs 25 mins ago0x6db2a4b208d03ca20bc800d42e7f42ec1e54a86b IN  PlutusDAO: plsJONES Farm0 ETH0.00002765
0xf6f376e88bd11da1c18d25ea005ad7331c48a9a082ddac97405f2ddfe63e7436Deposit264478602022-09-24 19:38:0015 hrs 56 mins ago0xc21aa449ebd42255247acb563c4678ede1ebe75e IN  PlutusDAO: plsJONES Farm0 ETH0.00002705
0x9d5cd9da858474b53c6fa930d1059ae294f4524cbb6ec1894dd1f6564217d5ebWithdraw264471252022-09-24 19:30:0216 hrs 4 mins ago0xc21aa449ebd42255247acb563c4678ede1ebe75e IN  PlutusDAO: plsJONES Farm0 ETH0.00002657
0x09186065e30edfdbb0cfe915eb9cc6ac9d3992ce00c7638692d8700bda97e503Harvest263943432022-09-24 13:20:4522 hrs 14 mins ago0xa9d813547686ddb7dc199ed0f567b3f8bc04179a IN  PlutusDAO: plsJONES Farm0 ETH0.00002755
0x699e663f3cf2275f0fcb0b29a4e7b41c3759158608af046a1c0f950d71161125Harvest263885482022-09-24 12:46:0622 hrs 48 mins ago0x1104facf406a1ff5b1e1422c2c0e3b7d61adc487 IN  PlutusDAO: plsJONES Farm0 ETH0.00002928
0x9b2f74b86d7fee732c3da6b0cf25ec69da0735172429349cced1318e30daf443Deposit263857292022-09-24 12:29:5423 hrs 4 mins ago0x1bc3e2c44e0b2dabb1b06a1890273571825d3e03 IN  PlutusDAO: plsJONES Farm0 ETH0.00002459
0x40284074a7eef26b6404dc430fd7e756b41232c1e492937c3d3fb285b5eb6d77Harvest263849232022-09-24 12:24:3023 hrs 10 mins ago0x1bc3e2c44e0b2dabb1b06a1890273571825d3e03 IN  PlutusDAO: plsJONES Farm0 ETH0.00002811
0x9c09f2436a4e706a01ad1e1b4470f5177c4010a3d3889244cc212e7085b0ea48Harvest263690982022-09-24 10:32:471 day 1 hr ago0x950e5bbdadf252609f49b2cd45222cd3280f35d6 IN  PlutusDAO: plsJONES Farm0 ETH0.00003025
0x50a0e3e6f5d50bfb31834623fba30eb5bc46b3a1683f002ff3d6f2ef7d0a2867Deposit263471122022-09-24 8:16:241 day 3 hrs ago0x6a7dbffd83c6808651223efcaf7ea88161290e2b IN  PlutusDAO: plsJONES Farm0 ETH0.00002391
0xed8d7f177be44d163bd500a3c88f74e317e1500c30d9afa3378e60944a487e6fHarvest263459942022-09-24 8:09:001 day 3 hrs ago0x6a7dbffd83c6808651223efcaf7ea88161290e2b IN  PlutusDAO: plsJONES Farm0 ETH0.00002733
0x2bb0c54bb36433c4886ff5860661aeeebc7f739d0220a9a0447b0173dfa996a8Deposit263419102022-09-24 7:40:081 day 3 hrs ago0xfb7405075f2dd0a2aaca6ca2d87d56e09577d6ef IN  PlutusDAO: plsJONES Farm0 ETH0.00002389
0x65b623d7f6cba9fe6d3969b9f06dffe4b1a1b151f0540d387f5d88a4612840f7Harvest263401092022-09-24 7:28:041 day 4 hrs ago0xfb7405075f2dd0a2aaca6ca2d87d56e09577d6ef IN  PlutusDAO: plsJONES Farm0 ETH0.00002713
0xc000e5e947befe6091304b2102f5aaa7c520ce33d1fcc41b2e1a26cbd2298d0aDeposit263369772022-09-24 7:08:591 day 4 hrs ago0xb4192ab96664248c260f9b7e3ef5d55b55b55384 IN  PlutusDAO: plsJONES Farm0 ETH0.0000238
0x126246f75f695fe6a6e7d27fb3de87f489524b6c5cfad866c2cbad3c4734598aHarvest263357542022-09-24 7:00:341 day 4 hrs ago0xb4192ab96664248c260f9b7e3ef5d55b55b55384 IN  PlutusDAO: plsJONES Farm0 ETH0.00002732
0x979642342179d9473eb3f74c1c63051ea72b2d396c69daabad9c7a6f3b3a19d9Deposit262689452022-09-23 21:43:541 day 13 hrs ago0xde93a283495fa2834047b53871a8e4e09f96d841 IN  PlutusDAO: plsJONES Farm0 ETH0.00002915
0x49d5df62e7c078d27ef86933112f69d005b6b6f5f3d009c7539f8b6576897b5aHarvest262639722022-09-23 20:55:211 day 14 hrs ago0xf6746f1472ea920eee7b793a4d48be0fea647bfe IN  PlutusDAO: plsJONES Farm0 ETH0.00003163
0x06dbc2620b41f091fbd916e282c36114963bd09229ee73675d029f6239418a2eDeposit262567102022-09-23 19:47:571 day 15 hrs ago0x6f9883681643daf8704ecbc7351c7f0d7282a685 IN  PlutusDAO: plsJONES Farm0 ETH0.0000332
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x2c3e797f8419fdf76fcc27a9b006c633c45f0f7601975a082bb629aa3fd1b43d265535252022-09-25 9:51:301 hr 43 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x2c3e797f8419fdf76fcc27a9b006c633c45f0f7601975a082bb629aa3fd1b43d265535252022-09-25 9:51:301 hr 43 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x2c3e797f8419fdf76fcc27a9b006c633c45f0f7601975a082bb629aa3fd1b43d265535252022-09-25 9:51:301 hr 43 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x2c3e797f8419fdf76fcc27a9b006c633c45f0f7601975a082bb629aa3fd1b43d265535252022-09-25 9:51:301 hr 43 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x2c3e797f8419fdf76fcc27a9b006c633c45f0f7601975a082bb629aa3fd1b43d265535252022-09-25 9:51:301 hr 43 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x1cb8ef5f3aa5b72339a6f0d5554b3086c85a48b709a51ea31f6ed39b81c6693d265533062022-09-25 9:50:211 hr 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x1cb8ef5f3aa5b72339a6f0d5554b3086c85a48b709a51ea31f6ed39b81c6693d265533062022-09-25 9:50:211 hr 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x1cb8ef5f3aa5b72339a6f0d5554b3086c85a48b709a51ea31f6ed39b81c6693d265533062022-09-25 9:50:211 hr 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x9e8b872f9c208568c44553ac147c0e53bb66651871da61972b1191ae048ed7a3265436432022-09-25 8:50:342 hrs 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x9e8b872f9c208568c44553ac147c0e53bb66651871da61972b1191ae048ed7a3265436432022-09-25 8:50:342 hrs 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x9e8b872f9c208568c44553ac147c0e53bb66651871da61972b1191ae048ed7a3265436432022-09-25 8:50:342 hrs 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x9e8b872f9c208568c44553ac147c0e53bb66651871da61972b1191ae048ed7a3265436432022-09-25 8:50:342 hrs 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x9e8b872f9c208568c44553ac147c0e53bb66651871da61972b1191ae048ed7a3265436432022-09-25 8:50:342 hrs 44 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x0e1e9459fe438baeffa3d5642530a4ff8d48f1d4a045baef145479dd6ac52927265191452022-09-25 6:29:055 hrs 5 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x0e1e9459fe438baeffa3d5642530a4ff8d48f1d4a045baef145479dd6ac52927265191452022-09-25 6:29:055 hrs 5 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x0e1e9459fe438baeffa3d5642530a4ff8d48f1d4a045baef145479dd6ac52927265191452022-09-25 6:29:055 hrs 5 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x127db0e1549d5cfe98309144ade2a510f30af64951e2b66f2dab68371f38e6e7265117152022-09-25 5:39:535 hrs 54 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x127db0e1549d5cfe98309144ade2a510f30af64951e2b66f2dab68371f38e6e7265117152022-09-25 5:39:535 hrs 54 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x127db0e1549d5cfe98309144ade2a510f30af64951e2b66f2dab68371f38e6e7265117152022-09-25 5:39:535 hrs 54 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x4ef0cb7970e40e642693df655bb3044dd99898f5a729d674b7b3ae463f1d6221264972472022-09-25 3:43:097 hrs 51 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x4ef0cb7970e40e642693df655bb3044dd99898f5a729d674b7b3ae463f1d6221264972472022-09-25 3:43:097 hrs 51 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x4ef0cb7970e40e642693df655bb3044dd99898f5a729d674b7b3ae463f1d6221264972472022-09-25 3:43:097 hrs 51 mins ago PlutusDAO: plsJONES Farm Plutus DAO: Pls-Jones Rewards0 ETH
0x78b4bf5d3f6391b1417fe5c0c1baee1b81cd63ab03009d1c72610c68c978dd0d264869572022-09-25 2:21:509 hrs 13 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x78b4bf5d3f6391b1417fe5c0c1baee1b81cd63ab03009d1c72610c68c978dd0d264869572022-09-25 2:21:509 hrs 13 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
0x78b4bf5d3f6391b1417fe5c0c1baee1b81cd63ab03009d1c72610c68c978dd0d264869572022-09-25 2:21:509 hrs 13 mins ago PlutusDAO: plsJONES Farm Plutus DAO: plsJONES Token0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlsJonesPlutusChef

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : PlsJonesPlutusChef.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import { IRewardsDistro } from './PlsJonesRewardsDistro.sol';
import { IWhitelist } from '../Whitelist.sol';

/**
  Assumptions:
  Total stake: <= 309_485_009 * 1e18 tokens
  Individual stake: <= 309_485_009 * 1e18 tokens
  DPX max supply: 5e23
  JONES max siupply: 1e25
  PLS max supply: 1e26
 */
contract PlsJonesPlutusChef is Ownable {
  uint256 private constant MUL_CONSTANT = 1e14;
  IRewardsDistro public immutable rewardsDistro;
  IERC20 public immutable plsJones;

  // Info of each user.
  struct UserInfo {
    uint96 amount; // Staking tokens the user has provided
    int128 plsRewardDebt;
    int128 plsDpxRewardDebt;
    int128 plsJonesRewardDebt;
    int128 jonesRewardDebt;
  }

  IWhitelist public whitelist;
  address public operator;

  uint128 public accPlsPerShare;
  uint96 private shares; // total staked
  uint32 public lastRewardSecond;

  // Treasury
  uint128 public accPlsDpxPerShare;
  uint128 public accPlsJonesPerShare;

  // Farm
  uint128 public accJonesPerShare;

  mapping(address => UserInfo) public userInfo;

  constructor(address _rewardsDistro, address _plsJones) {
    rewardsDistro = IRewardsDistro(_rewardsDistro);
    plsJones = IERC20(_plsJones);
  }

  function deposit(uint96 _amount) external {
    _isEligibleSender();
    _deposit(msg.sender, _amount);
  }

  function withdraw(uint96 _amount) external {
    _isEligibleSender();
    _withdraw(msg.sender, _amount);
  }

  function harvest() external {
    _isEligibleSender();
    _harvest(msg.sender);
  }

  /**
   * Withdraw without caring about rewards. EMERGENCY ONLY.
   */
  function emergencyWithdraw() external {
    _isEligibleSender();
    UserInfo storage user = userInfo[msg.sender];

    uint96 _amount = user.amount;

    user.amount = 0;
    user.plsRewardDebt = 0;

    if (shares >= _amount) {
      shares -= _amount;
    } else {
      shares = 0;
    }

    plsJones.transfer(msg.sender, _amount);
    emit EmergencyWithdraw(msg.sender, _amount);
  }

  /**
    Keep reward variables up to date. Ran before every mutative function.
   */
  function updateShares() public {
    // if block.timestamp <= lastRewardSecond, already updated.
    if (block.timestamp <= lastRewardSecond) {
      return;
    }

    // if pool has no supply
    if (shares == 0) {
      lastRewardSecond = uint32(block.timestamp);
      return;
    }

    (uint80 pls_, uint80 plsDpx_, uint80 plsJones_, uint80 pendingJonesLessFee_) = rewardsDistro.updateInfo();

    unchecked {
      accPlsPerShare += rewardPerShare(pls_);
      accPlsDpxPerShare += rewardPerShare(plsDpx_);
      accPlsJonesPerShare += rewardPerShare(plsJones_);

      accJonesPerShare += uint128((pendingJonesLessFee_ * MUL_CONSTANT) / shares);
    }

    rewardsDistro.harvestFromUnderlyingFarm();
    lastRewardSecond = uint32(block.timestamp);
  }

  /** OPERATOR */
  function depositFor(address _user, uint88 _amount) external {
    if (msg.sender != operator) revert UNAUTHORIZED();
    _deposit(_user, _amount);
  }

  function withdrawFor(address _user, uint88 _amount) external {
    if (msg.sender != operator) revert UNAUTHORIZED();
    _withdraw(_user, _amount);
  }

  function harvestFor(address _user) external {
    if (msg.sender != operator) revert UNAUTHORIZED();
    _harvest(_user);
  }

  /** VIEWS */

  /**
    Calculates the reward per share since `lastRewardSecond` was updated
  */
  function rewardPerShare(uint80 _rewardRatePerSecond) public view returns (uint128) {
    // duration = block.timestamp - lastRewardSecond;
    // tokenReward = duration * _rewardRatePerSecond;
    // tokenRewardPerShare = (tokenReward * MUL_CONSTANT) / shares;

    unchecked {
      return uint128(((block.timestamp - lastRewardSecond) * uint256(_rewardRatePerSecond) * MUL_CONSTANT) / shares);
    }
  }

  /**
    View function to see pending rewards on frontend
   */
  function pendingRewards(address _user)
    external
    view
    returns (
      uint256 _pendingPls,
      uint256 _pendingPlsDpx,
      uint256 _pendingPlsJones,
      uint256 _pendingJones
    )
  {
    uint256 _accPlsPerShare = accPlsPerShare;
    uint256 _accPlsDpxPerShare = accPlsDpxPerShare;
    uint256 _accPlsJonesPerShare = accPlsJonesPerShare;
    uint256 _accJonesPerShare = accJonesPerShare;

    (uint80 pls_, uint80 plsDpx_, uint80 plsJones_, uint80 pendingJonesLessFee_) = rewardsDistro.updateInfo();

    if (block.timestamp > lastRewardSecond && shares != 0) {
      _accPlsPerShare += rewardPerShare(pls_);
      _accPlsDpxPerShare += rewardPerShare(plsDpx_);
      _accPlsJonesPerShare += rewardPerShare(plsJones_);

      _accJonesPerShare += uint256((pendingJonesLessFee_ * MUL_CONSTANT) / shares);
    }

    UserInfo memory user = userInfo[_user];

    _pendingPls = _calculatePending(user.plsRewardDebt, _accPlsPerShare, user.amount);
    _pendingPlsDpx = _calculatePending(user.plsDpxRewardDebt, _accPlsDpxPerShare, user.amount);
    _pendingPlsJones = _calculatePending(user.plsJonesRewardDebt, _accPlsJonesPerShare, user.amount);
    _pendingJones = _calculatePending(user.jonesRewardDebt, _accJonesPerShare, user.amount);
  }

  /** PRIVATE */
  function _isEligibleSender() private view {
    if (msg.sender != tx.origin && whitelist.isWhitelisted(msg.sender) == false) revert UNAUTHORIZED();
  }

  function _calculatePending(
    int128 _rewardDebt,
    uint256 _accPerShare, // Stay 256;
    uint96 _amount
  ) private pure returns (uint128) {
    if (_rewardDebt < 0) {
      return uint128(_calculateRewardDebt(_accPerShare, _amount)) + uint128(-_rewardDebt);
    } else {
      return uint128(_calculateRewardDebt(_accPerShare, _amount)) - uint128(_rewardDebt);
    }
  }

  function _calculateRewardDebt(uint256 _accPlsPerShare, uint96 _amount) private pure returns (uint256) {
    unchecked {
      return (_amount * _accPlsPerShare) / MUL_CONSTANT;
    }
  }

  function _deposit(address _user, uint96 _amount) private {
    UserInfo storage user = userInfo[_user];
    if (_amount == 0) revert DEPOSIT_ERROR();
    updateShares();

    uint256 _prev = plsJones.balanceOf(address(this));

    unchecked {
      user.amount += _amount;
      shares += _amount;
    }

    user.plsRewardDebt = user.plsRewardDebt + int128(uint128(_calculateRewardDebt(accPlsPerShare, _amount)));

    user.plsDpxRewardDebt = user.plsDpxRewardDebt + int128(uint128(_calculateRewardDebt(accPlsDpxPerShare, _amount)));

    user.plsJonesRewardDebt =
      user.plsJonesRewardDebt +
      int128(uint128(_calculateRewardDebt(accPlsJonesPerShare, _amount)));

    user.jonesRewardDebt = user.jonesRewardDebt + int128(uint128(_calculateRewardDebt(accJonesPerShare, _amount)));

    plsJones.transferFrom(_user, address(this), _amount);

    unchecked {
      if (_prev + _amount != plsJones.balanceOf(address(this))) revert DEPOSIT_ERROR();
    }

    emit Deposit(_user, _amount);
  }

  function _withdraw(address _user, uint96 _amount) private {
    UserInfo storage user = userInfo[_user];
    if (user.amount < _amount || _amount == 0) revert WITHDRAW_ERROR();
    updateShares();

    unchecked {
      user.amount -= _amount;
      shares -= _amount;
    }

    user.plsRewardDebt = user.plsRewardDebt - int128(uint128(_calculateRewardDebt(accPlsPerShare, _amount)));

    user.plsDpxRewardDebt = user.plsDpxRewardDebt - int128(uint128(_calculateRewardDebt(accPlsDpxPerShare, _amount)));

    user.plsJonesRewardDebt =
      user.plsJonesRewardDebt -
      int128(uint128(_calculateRewardDebt(accPlsJonesPerShare, _amount)));

    user.jonesRewardDebt = user.jonesRewardDebt - int128(uint128(_calculateRewardDebt(accJonesPerShare, _amount)));

    plsJones.transfer(_user, _amount);
    emit Withdraw(_user, _amount);
  }

  function _harvest(address _user) private {
    updateShares();
    UserInfo storage user = userInfo[_user];

    uint128 plsPending = _calculatePending(user.plsRewardDebt, accPlsPerShare, user.amount);

    uint128 plsDpxPending = _calculatePending(user.plsDpxRewardDebt, accPlsDpxPerShare, user.amount);

    uint128 plsJonesPending = _calculatePending(user.plsJonesRewardDebt, accPlsJonesPerShare, user.amount);

    uint128 jonesPending = _calculatePending(user.jonesRewardDebt, accJonesPerShare, user.amount);

    user.plsRewardDebt = int128(uint128(_calculateRewardDebt(accPlsPerShare, user.amount)));

    user.plsDpxRewardDebt = int128(uint128(_calculateRewardDebt(accPlsDpxPerShare, user.amount)));

    user.plsJonesRewardDebt = int128(uint128(_calculateRewardDebt(accPlsJonesPerShare, user.amount)));

    user.jonesRewardDebt = int128(uint128(_calculateRewardDebt(accJonesPerShare, user.amount)));

    rewardsDistro.sendRewards(_user, plsPending, plsDpxPending, plsJonesPending, jonesPending);
  }

  /** OWNER FUNCTIONS */
  function setWhitelist(address _whitelist) external onlyOwner {
    whitelist = IWhitelist(_whitelist);
  }

  function setOperator(address _operator) external onlyOwner {
    operator = _operator;
  }

  function setStartTime(uint32 _startTime) external onlyOwner {
    if (lastRewardSecond == 0) {
      lastRewardSecond = _startTime;
    }
  }

  error DEPOSIT_ERROR();
  error WITHDRAW_ERROR();
  error UNAUTHORIZED();

  event Deposit(address indexed _user, uint256 _amount);
  event Withdraw(address indexed _user, uint256 _amount);
  event EmergencyWithdraw(address indexed _user, uint256 _amount);
}

File 2 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 11 : PlsJonesRewardsDistro.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import { IJonesStaker } from './JonesStaker.sol';
import { IPendingRewards } from '../PendingRewards.sol';

interface IRewardsDistro {
  function updateInfo()
    external
    view
    returns (
      uint80 pls_,
      uint80 plsDpx_,
      uint80 plsJones_,
      uint80 pendingJonesLessFee_
    );

  function sendRewards(
    address _to,
    uint128 _plsAmt,
    uint128 _plsDpxAmt,
    uint128 _plsJonesAmt,
    uint128 _jonesAmt
  ) external;

  function harvestFromUnderlyingFarm() external;
}

contract PlsJonesRewardsDistro is IRewardsDistro, Ownable {
  IJonesStaker public immutable staker;
  IPendingRewards public immutable pendingRewards;

  IERC20 public immutable pls;
  IERC20 public immutable plsDpx;
  IERC20 public immutable plsJones;
  IERC20 public immutable jones;

  address public plutusChef;
  address public rewardsController;
  uint80 public plsPerSecond;
  uint80 public plsDpxPerSecond;
  uint80 public plsJonesPerSecond;

  constructor(
    address _pendingRewards,
    address _staker,
    address _pls,
    address _plsDpx,
    address _plsJones,
    address _jones
  ) {
    pendingRewards = IPendingRewards(_pendingRewards);
    staker = IJonesStaker(_staker);
    pls = IERC20(_pls);
    plsDpx = IERC20(_plsDpx);
    plsJones = IERC20(_plsJones);
    jones = IERC20(_jones);

    rewardsController = msg.sender;
  }

  function sendRewards(
    address _to,
    uint128 _plsAmt,
    uint128 _plsDpxAmt,
    uint128 _plsJonesAmt,
    uint128 _jonesAmt
  ) external {
    if (msg.sender != plutusChef) revert UNAUTHORIZED();

    if (isNotZero(_plsAmt)) {
      _safeTokenTransfer(pls, _to, _plsAmt);
    }

    // Treasury yields
    if (isNotZero(_plsDpxAmt) || isNotZero(_plsJonesAmt)) {
      _safeTokenTransfer(plsDpx, _to, _plsDpxAmt);
      _safeTokenTransfer(plsJones, _to, _plsJonesAmt);
    }

    // Underlying yields
    if (isNotZero(_jonesAmt)) {
      _safeTokenTransfer(jones, _to, _jonesAmt);
    }
  }

  function harvestFromUnderlyingFarm() external {
    if (msg.sender != plutusChef) revert UNAUTHORIZED();
    staker.harvest();
  }

  /** VIEWS */

  /**
  Returns emissions of all the yield sources for frontend
 */
  function getEmissions()
    external
    view
    returns (
      uint80 pls_,
      uint80 plsDpx_,
      uint80 plsJones_,
      uint80 jones_
    )
  {
    // PLS emissions
    pls_ = plsPerSecond;

    // Treasury yield
    plsDpx_ = plsDpxPerSecond;
    plsJones_ = plsJonesPerSecond;

    // Underlying farm yield less fee
    jones_ = uint80(staker.jonesPerSecondLessFee());
  }

  /**
    Info needed for PlutusChef updates.
   */
  function updateInfo()
    external
    view
    returns (
      uint80 pls_,
      uint80 plsDpx_,
      uint80 plsJones_,
      uint80 pendingJonesLessFee_
    )
  {
    // PLS emissions
    pls_ = plsPerSecond;

    // Treasury yield
    plsDpx_ = plsDpxPerSecond;
    plsJones_ = plsJonesPerSecond;

    // Pending Jones
    pendingJonesLessFee_ = uint80(pendingRewards.pendingJonesLessFee());
  }

  /** PRIVATE FUNCTIONS */
  function isNotZero(uint256 _num) private pure returns (bool result) {
    assembly {
      result := gt(_num, 0)
    }
  }

  function isZero(uint256 _num) private pure returns (bool result) {
    assembly {
      result := iszero(_num)
    }
  }

  function _safeTokenTransfer(
    IERC20 _token,
    address _to,
    uint256 _amount
  ) private {
    uint256 bal = _token.balanceOf(address(this));

    if (_amount > bal) {
      _token.transfer(_to, bal);
    } else {
      _token.transfer(_to, _amount);
    }
  }

  /** CONTROLLER FUNCTIONS */

  function _isRewardsController() private view {
    if (msg.sender != rewardsController) revert UNAUTHORIZED();
  }

  function updatePlsEmission(uint80 _newPlsRate) external {
    _isRewardsController();
    plsPerSecond = _newPlsRate;
  }

  function updatePlsDpxEmissions(uint80 _newPlsDpxRate) external {
    _isRewardsController();
    plsDpxPerSecond = _newPlsDpxRate;
  }

  function updatePlsJonesEmissions(uint80 _newPlsJonesRate) external {
    _isRewardsController();
    plsJonesPerSecond = _newPlsJonesRate;
  }

  /** OWNER FUNCTIONS */

  /**
    Owner can retrieve stuck funds
   */
  function retrieve(IERC20 token) external onlyOwner {
    if (isNotZero(address(this).balance)) {
      payable(owner()).transfer(address(this).balance);
    }

    token.transfer(owner(), token.balanceOf(address(this)));
  }

  function setPlutusChef(address _newPlutusChef) external onlyOwner {
    plutusChef = _newPlutusChef;
  }

  function setRewardsController(address _newController) external onlyOwner {
    rewardsController = _newController;
  }

  error UNAUTHORIZED();
}

File 5 of 11 : Whitelist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';

interface IWhitelist {
  function isWhitelisted(address) external view returns (bool);
}

contract Whitelist is IWhitelist, Ownable {
  mapping(address => bool) public isWhitelisted;

  constructor(address _gov) {
    transferOwnership(_gov);
  }

  function whitelistAdd(address _addr) external onlyOwner {
    isWhitelisted[_addr] = true;
    emit AddedToWhitelist(_addr);
  }

  function whitelistRemove(address _addr) external onlyOwner {
    isWhitelisted[_addr] = false;
    emit RemovedFromWhitelist(_addr);
  }

  event RemovedFromWhitelist(address indexed _addr);
  event AddedToWhitelist(address indexed _addr);
}

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

pragma solidity ^0.8.0;

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

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

File 7 of 11 : JonesStaker.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '../interfaces/IStaker.sol';
import './IMillinerV2.sol';

interface IJonesStaker {
  function harvest() external;

  function pendingRewardsLessFee() external view returns (uint256);

  function jonesPerSecondLessFee() external view returns (uint256);
}

contract JonesStaker is IStaker, IJonesStaker, Ownable {
  uint256 public constant POOL_ID = 1;
  uint256 private constant FEE_DIVISOR = 1e4;

  // WETH-JONES SLP: 0xe8EE01aE5959D3231506FcDeF2d5F3E85987a39c
  IERC20 public immutable stakingToken;

  // JONES: 0x10393c20975cF177a3513071bC110f7962CD67da
  IERC20 public immutable rewardToken;

  // MillinerV2: 0xb94d1959084081c5a11C460012Ab522F5a0FD756
  IMillinerV2 public immutable underlyingFarm;

  address public operator;
  address public feeCollector;
  address public rewardsDistro;

  uint128 public fee; // fee in bp
  uint128 public totalHarvested;

  constructor(
    address _feeCollector,
    address _stakingToken,
    address _rewardToken,
    address _underlyingFarm
  ) {
    feeCollector = _feeCollector;

    stakingToken = IERC20(_stakingToken);
    rewardToken = IERC20(_rewardToken);
    underlyingFarm = IMillinerV2(_underlyingFarm);
    fee = 1000; // 10%

    stakingToken.approve(address(underlyingFarm), type(uint256).max);
  }

  function stake(uint256 _amount) external {
    if (msg.sender != operator) {
      revert UNAUTHORIZED();
    }

    underlyingFarm.deposit(POOL_ID, _amount);
    emit Staked(_amount);
  }

  function withdraw(uint256 _amount, address _to) external {
    if (msg.sender != operator) {
      revert UNAUTHORIZED();
    }

    underlyingFarm.withdraw(POOL_ID, _amount);
    stakingToken.transfer(_to, _amount);
    emit Withdrew(_to, _amount);
  }

  function harvest() external {
    if (msg.sender != rewardsDistro) revert UNAUTHORIZED();
    _harvest();
  }

  /** VIEWS */
  function pendingRewardsLessFee() external view returns (uint256) {
    unchecked {
      return (underlyingFarm.pendingJones(POOL_ID, address(this)) * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
    }
  }

  function jonesPerSecondLessFee() external view returns (uint256) {
    unchecked {
      return (underlyingFarm.jonesPerSecond() * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
    }
  }

  /** PRIVATE FUNCTIONS */
  function _harvest() private {
    underlyingFarm.harvest(POOL_ID);

    uint256 rewardAmt = rewardToken.balanceOf(address(this));
    uint256 rewardAmtLessFee;

    if (isNotZero(rewardAmt)) {
      unchecked {
        uint256 feePayable = (rewardAmt * fee) / FEE_DIVISOR;

        rewardAmtLessFee = rewardAmt - feePayable;
        totalHarvested += uint128(rewardAmtLessFee);

        if (isNotZero(feePayable)) {
          rewardToken.transfer(feeCollector, feePayable);
        }

        rewardToken.transfer(address(rewardsDistro), rewardAmtLessFee);
        emit Harvested(address(rewardToken), rewardAmtLessFee);
      }
    }
  }

  /** CHECKS */
  function isNotZero(uint256 _num) private pure returns (bool result) {
    assembly {
      result := gt(_num, 0)
    }
  }

  function isZero(uint256 _num) private pure returns (bool result) {
    assembly {
      result := iszero(_num)
    }
  }

  /** OWNER FUNCTIONS */

  /**
    Retrieve stuck funds or new reward tokens
   */
  function retrieve(IERC20 token) external onlyOwner {
    if (isNotZero(address(this).balance)) {
      payable(owner()).transfer(address(this).balance);
    }

    token.transfer(owner(), token.balanceOf(address(this)));
  }

  /**
    Exit farm for veBoost migration
   */
  function exit() external onlyOwner {
    uint256 balance = underlyingFarm.deposited(POOL_ID, address(this));
    address owner = owner();

    underlyingFarm.withdraw(POOL_ID, balance);
    stakingToken.transfer(owner, balance);
    emit ExitedStaking(owner, balance);

    _harvest();
  }

  function setFee(uint128 _fee) external onlyOwner {
    if (_fee > FEE_DIVISOR) {
      revert INVALID_FEE();
    }

    emit FeeChanged(_fee, fee);
    fee = _fee;
  }

  function ownerHarvest() external onlyOwner {
    _harvest();
  }

  function setOperator(address _newOperator) external onlyOwner {
    emit OperatorChanged(_newOperator, operator);
    operator = _newOperator;
  }

  function setFeeCollector(address _newFeeCollector) external onlyOwner {
    emit FeeCollectorChanged(_newFeeCollector, feeCollector);
    feeCollector = _newFeeCollector;
  }

  function setRewardsDistro(address _newRewardsDistro) external onlyOwner {
    emit RewardsDistroChanged(_newRewardsDistro, rewardsDistro);
    rewardsDistro = _newRewardsDistro;
  }

  event Staked(uint256 _amt);
  event Withdrew(address indexed _to, uint256 _amt);
  event OperatorChanged(address indexed _new, address _old);
  event FeeCollectorChanged(address indexed _new, address _old);
  event RewardsDistroChanged(address indexed _new, address _old);
  event FeeChanged(uint256 indexed _new, uint256 _old);
  event ExitedStaking(address indexed _to, uint256 _amt);
  event Harvested(address indexed _token, uint256 _amt);

  error UNAUTHORIZED();
  error INVALID_FEE();
}

File 8 of 11 : PendingRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import './plsJONES/IMillinerV2.sol';
import './plsDPX/IDpxStakingRewards.sol';

interface IStaker {
  function fee() external view returns (uint256);
}

interface IPendingRewards {
  function pendingDpxRewardsLessFee() external view returns (uint256 _pendingDpx, uint256 _pendingRdpx);

  function pendingJonesLessFee() external view returns (uint256 _pendingJones);
}

contract PendingRewards is IPendingRewards {
  uint256 private constant FEE_DIVISOR = 1e4;

  address private constant JONES_STAKER = 0x668BB973c3e35759269DAc6D5BF118EA9729110E;
  IMillinerV2 private constant MILLINER_V2 = IMillinerV2(0xb94d1959084081c5a11C460012Ab522F5a0FD756);
  uint256 private constant POOL_ID = 1;

  address private constant DPX_STAKER = 0xC046F44ED68014f048ECa0010A642749Ebe34b03;
  IDpxStakingRewards private constant DPX_STAKING_REWARDS =
    IDpxStakingRewards(0xc6D714170fE766691670f12c2b45C1f34405AAb6);

  function pendingDpxRewardsLessFee() external view returns (uint256 _pendingDpx, uint256 _pendingRdpx) {
    uint256 fee = IStaker(DPX_STAKER).fee();
    (uint256 dpxEarned, uint256 rdpxEarned) = DPX_STAKING_REWARDS.earned(DPX_STAKER);

    unchecked {
      _pendingDpx = (dpxEarned * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
      _pendingRdpx = (rdpxEarned * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
    }
  }

  function pendingJonesLessFee() external view returns (uint256 _pendingJones) {
    unchecked {
      _pendingJones =
        (MILLINER_V2.pendingJones(POOL_ID, JONES_STAKER) * (FEE_DIVISOR - IStaker(JONES_STAKER).fee())) /
        FEE_DIVISOR;
    }
  }
}

File 9 of 11 : IStaker.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IStaker {
  function stake(uint256) external;

  function withdraw(uint256, address) external;

  function exit() external;
}

File 10 of 11 : IMillinerV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IMillinerV2 {
  function deposit(uint256 _pid, uint256 _amount) external;

  function compound(uint256 _pid) external;

  function withdraw(uint256 _pid, uint256 _amount) external;

  function emergencyWithdraw(uint256 _pid) external;

  function harvest(uint256 _pid) external;

  /** VIEWS */

  function deposited(uint256 _pid, address _user) external view returns (uint256);

  function jonesPerSecond() external view returns (uint256);

  function pendingJones(uint256 _pid, address _user) external view returns (uint256);
}

File 11 of 11 : IDpxStakingRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IDpxStakingRewards {
  function stake(uint256) external;

  function exit() external;

  function compound() external;

  function withdraw(uint256) external;

  function getReward(uint256) external;

  /** VIEWS */

  function balanceOf(address account) external view returns (uint256);

  function rewardRateDPX() external view returns (uint256);

  function rewardRateRDPX() external view returns (uint256);

  function earned(address account) external view returns (uint256 DPXtokensEarned, uint256 RDPXtokensEarned);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsDistro","type":"address"},{"internalType":"address","name":"_plsJones","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DEPOSIT_ERROR","type":"error"},{"inputs":[],"name":"UNAUTHORIZED","type":"error"},{"inputs":[],"name":"WITHDRAW_ERROR","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"accJonesPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPlsDpxPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPlsJonesPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPlsPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"_amount","type":"uint96"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint88","name":"_amount","type":"uint88"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"harvestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRewardSecond","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"_pendingPls","type":"uint256"},{"internalType":"uint256","name":"_pendingPlsDpx","type":"uint256"},{"internalType":"uint256","name":"_pendingPlsJones","type":"uint256"},{"internalType":"uint256","name":"_pendingJones","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"plsJones","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint80","name":"_rewardRatePerSecond","type":"uint80"}],"name":"rewardPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistro","outputs":[{"internalType":"contract IRewardsDistro","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_startTime","type":"uint32"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelist","type":"address"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint96","name":"amount","type":"uint96"},{"internalType":"int128","name":"plsRewardDebt","type":"int128"},{"internalType":"int128","name":"plsDpxRewardDebt","type":"int128"},{"internalType":"int128","name":"plsJonesRewardDebt","type":"int128"},{"internalType":"int128","name":"jonesRewardDebt","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelist","outputs":[{"internalType":"contract IWhitelist","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"_amount","type":"uint96"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint88","name":"_amount","type":"uint88"}],"name":"withdrawFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162002042380380620020428339810160408190526200003491620000c4565b6200003f3362000057565b6001600160a01b039182166080521660a052620000fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000bf57600080fd5b919050565b60008060408385031215620000d857600080fd5b620000e383620000a7565b9150620000f360208401620000a7565b90509250929050565b60805160a051611ee162000161600039600081816101e701528181610cd7015281816115eb01528181611713015281816119990152611a2b01526000818161034d01528181610535015281816106d7015281816107c601526112c90152611ee16000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c8063715018a6116100ee578063db2e21bc11610097578063e4eae6b711610071578063e4eae6b714610442578063e872375414610455578063f2fde38b14610468578063fbe1ebec1461047b57600080fd5b8063db2e21bc14610414578063dee4dea01461041c578063e305e54a1461042f57600080fd5b80638da5cb5b116100c85780638da5cb5b146103dd57806393e59dc1146103ee578063b3ab15fb1461040157600080fd5b8063715018a6146103af57806379017d1b146103b7578063854cff2f146103ca57600080fd5b8063436d9bcf1161015b578063536785ff11610135578063536785ff14610348578063570ca7351461036f57806358341182146103825780636993420a1461039c57600080fd5b8063436d9bcf146103015780634641257d1461031457806350b6f4d11461031c57600080fd5b80631959a0021161018c5780631959a002146102345780632a410068146102c457806331d7a262146102ce57600080fd5b80621db0ba146101b257806303e62707146101e25780630a7979b114610221575b600080fd5b6003546101c5906001600160801b031681565b6040516001600160801b0390911681526020015b60405180910390f35b6102097f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101d9565b6101c561022f366004611b3c565b61048e565b610289610242366004611b75565b6006602052600090815260409020805460018201546002909201546001600160601b03821692600160601b909204600f90810b9280820b92600160801b909104820b910b85565b604080516001600160601b039096168652600f94850b602087015292840b92850192909252820b6060840152900b608082015260a0016101d9565b6102cc6104df565b005b6102e16102dc366004611b75565b610761565b6040805194855260208501939093529183015260608201526080016101d9565b6004546101c5906001600160801b031681565b6102cc610a1d565b60035461033390600160e01b900463ffffffff1681565b60405163ffffffff90911681526020016101d9565b6102097f000000000000000000000000000000000000000000000000000000000000000081565b600254610209906001600160a01b031681565b6004546101c590600160801b90046001600160801b031681565b6005546101c5906001600160801b031681565b6102cc610a30565b6102cc6103c5366004611b90565b610a99565b6102cc6103d8366004611b75565b610adf565b6000546001600160a01b0316610209565b600154610209906001600160a01b031681565b6102cc61040f366004611b75565b610b68565b6102cc610bf1565b6102cc61042a366004611bd7565b610d9e565b6102cc61043d366004611b90565b610db3565b6102cc610450366004611bd7565b610df5565b6102cc610463366004611c00565b610e07565b6102cc610476366004611b75565b610e97565b6102cc610489366004611b75565b610f76565b6003546000906001600160601b03600160801b8204169063ffffffff600160e01b90910416420369ffffffffffffffffffff841602655af3107a400002816104d8576104d8611c26565b0492915050565b600354600160e01b900463ffffffff1642116104f757565b600354600160801b90046001600160601b031661052d57600380546001600160e01b0316600160e01b4263ffffffff1602179055565b6000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b7c9252c6040518163ffffffff1660e01b815260040160806040518083038186803b15801561058c57600080fd5b505afa1580156105a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c49190611c3c565b93509350935093506105d58461048e565b600380546001600160801b031981166001600160801b0391821693909301169190911790556106038361048e565b600480546001600160801b031981166001600160801b0391821693909301169190911790556106318261048e565b600480546001600160801b03600160801b80830482169094018116840291161790556003546001600160601b039190041669ffffffffffffffffffff8216655af3107a4000028161068457610684611c26565b600580546001600160801b03198116939092046001600160801b0392831601909116919091179055604080517f7568645900000000000000000000000000000000000000000000000000000000815290517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691637568645991600480830192600092919082900301818387803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b5050600380546001600160e01b0316600160e01b4263ffffffff1602179055505050505050565b60035460048054600554604080517fb7c9252c00000000000000000000000000000000000000000000000000000000815290516000958695869586956001600160801b039384169584831695600160801b9093048516949091169287928392839283927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169263b7c9252c9281810192608092909190829003018186803b15801561081357600080fd5b505afa158015610827573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084b9190611c3c565b60035493975091955093509150600160e01b900463ffffffff16421180156108845750600354600160801b90046001600160601b031615155b1561092a576108928461048e565b6108a5906001600160801b031689611cb1565b97506108b08361048e565b6108c3906001600160801b031688611cb1565b96506108ce8261048e565b6108e1906001600160801b031687611cb1565b600354909650600160801b90046001600160601b0316610913655af3107a400069ffffffffffffffffffff8416611cc9565b61091d9190611ce8565b6109279086611cb1565b94505b6001600160a01b038d16600090815260066020908152604091829020825160a08101845281546001600160601b038116808352600160601b909104600f90810b948301859052600184015480820b96840196909652600160801b909504850b606083015260029092015490930b60808401526109a891908b90610faa565b6001600160801b03169c506109c68160400151898360000151610faa565b6001600160801b03169b506109e48160600151888360000151610faa565b6001600160801b03169a50610a028160800151878360000151610faa565b6001600160801b031699505050505050505050509193509193565b610a25611008565b610a2e336110c7565b565b6000546001600160a01b03163314610a8f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610a2e6000611331565b6002546001600160a01b03163314610ac45760405163075fd2b160e01b815260040160405180910390fd5b610adb82826affffffffffffffffffffff1661138e565b5050565b6000546001600160a01b03163314610b395760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a86565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610bc25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a86565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610bf9611008565b33600090815260066020526040902080547fffffffff00000000000000000000000000000000000000000000000000000000811682556003546001600160601b0391821691600160801b909104168111610c9a5780600360108282829054906101000a90046001600160601b0316610c719190611d0a565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610cb3565b600380546bffffffffffffffffffffffff60801b191690555b60405163a9059cbb60e01b81523360048201526001600160601b03821660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5b9190611d32565b506040516001600160601b038216815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a25050565b610da6611008565b610db0338261138e565b50565b6002546001600160a01b03163314610dde5760405163075fd2b160e01b815260040160405180910390fd5b610adb82826affffffffffffffffffffff166116b4565b610dfd611008565b610db033826116b4565b6000546001600160a01b03163314610e615760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a86565b600354600160e01b900463ffffffff16610db0576003805463ffffffff8316600160e01b026001600160e01b0390911617905550565b6000546001600160a01b03163314610ef15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a86565b6001600160a01b038116610f6d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a86565b610db081611331565b6002546001600160a01b03163314610fa15760405163075fd2b160e01b815260040160405180910390fd5b610db0816110c7565b60008084600f0b1215610fe457610fc084611d54565b610fdd90655af3107a40006001600160601b038516860204611d84565b9050611001565b610fdd84655af3107a40006001600160601b038516860204611daf565b9392505050565b3332148015906110a957506001546040517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911690633af32abf9060240160206040518083038186803b15801561106f57600080fd5b505afa158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a79190611d32565b155b15610a2e5760405163075fd2b160e01b815260040160405180910390fd5b6110cf6104df565b6001600160a01b0381166000908152600660205260408120805460035491929161111691600160601b8104600f0b916001600160801b0316906001600160601b0316610faa565b6001830154600454845492935060009261114692600f0b916001600160801b0316906001600160601b0316610faa565b6001840154600454855492935060009261118092600160801b90819004600f0b92046001600160801b0316906001600160601b0316610faa565b600285015460055486549293506000926111b092600f0b916001600160801b0316906001600160601b0316610faa565b6003548654655af3107a40006001600160601b038083166001600160801b0394851681028390048516600160601b027fffffffff00000000000000000000000000000000ffffffffffffffffffffffff90941684178b556004805460018d0180549188169690941690921794850284900486166001600160801b0319928316811784558154600160801b90819004881687028690048816021790925560055460028c018054909216908616909402929092048416929092179055604080517f390a03520000000000000000000000000000000000000000000000000000000081526001600160a01b038b8116938201939093528884166024820152878416604482015286841660648201529284166084840152519293507f0000000000000000000000000000000000000000000000000000000000000000169163390a03529160a48082019260009290919082900301818387803b15801561131157600080fd5b505af1158015611325573d6000803e3d6000fd5b50505050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216600090815260066020526040902080546001600160601b03808416911610806113c857506001600160601b038216155b156113ff576040517f9b54028b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114076104df565b80546bffffffffffffffffffffffff1981166001600160601b039182168490038216178255600380546bffffffffffffffffffffffff60801b198116600160801b8083048516879003851602908117909255655af3107a40006001600160801b0391821691909216179184169190910204815461148e9190600160601b9004600f0b611dcf565b81547fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b0392831602178255600454655af3107a400091166001600160601b038416020460018201546114f09190600f0b611dcf565b6001820180546001600160801b0319166001600160801b03928316179055600454655af3107a4000600160801b9091049091166001600160601b038416020460018201546115489190600160801b9004600f0b611dcf565b6001820180546001600160801b03928316600160801b02908316179055600554611589911683655af3107a40006001600160601b0391909116919091020490565b600282015461159b9190600f0b611dcf565b6002820180546001600160801b0319166001600160801b039290921691909117905560405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03841660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561162f57600080fd5b505af1158015611643573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116679190611d32565b506040516001600160601b03831681526001600160a01b038416907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2505050565b6001600160a01b03821660009081526006602052604090206001600160601b0382166116f35760405163fd9eaf9160e01b815260040160405180910390fd5b6116fb6104df565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561175d57600080fd5b505afa158015611771573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117959190611e31565b82546bffffffffffffffffffffffff1981166001600160601b0391821686018216178455600380546bffffffffffffffffffffffff60801b198116600160801b80830485168901851602908117909255929350655af3107a40006001600160801b0393841693909116929092179085160204825461181d9190600160601b9004600f0b611e4a565b82547fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b0392831602178355600454655af3107a400091166001600160601b0385160204600183015461187f9190600f0b611e4a565b6001830180546001600160801b0319166001600160801b03928316179055600454655af3107a4000600160801b9091049091166001600160601b038516020460018301546118d79190600160801b9004600f0b611e4a565b6001830180546001600160801b03928316600160801b02908316179055600554611918911684655af3107a40006001600160601b0391909116919091020490565b600283015461192a9190600f0b611e4a565b6002830180546001600160801b0319166001600160801b03929092169190911790556040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301523060248301526001600160601b03851660448301527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401602060405180830381600087803b1580156119dd57600080fd5b505af11580156119f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a159190611d32565b506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015611a7557600080fd5b505afa158015611a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aad9190611e31565b836001600160601b0316820114611ad75760405163fd9eaf9160e01b815260040160405180910390fd5b6040516001600160601b03841681526001600160a01b038516907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a250505050565b69ffffffffffffffffffff81168114610db057600080fd5b600060208284031215611b4e57600080fd5b813561100181611b24565b80356001600160a01b0381168114611b7057600080fd5b919050565b600060208284031215611b8757600080fd5b61100182611b59565b60008060408385031215611ba357600080fd5b611bac83611b59565b915060208301356affffffffffffffffffffff81168114611bcc57600080fd5b809150509250929050565b600060208284031215611be957600080fd5b81356001600160601b038116811461100157600080fd5b600060208284031215611c1257600080fd5b813563ffffffff8116811461100157600080fd5b634e487b7160e01b600052601260045260246000fd5b60008060008060808587031215611c5257600080fd5b8451611c5d81611b24565b6020860151909450611c6e81611b24565b6040860151909350611c7f81611b24565b6060860151909250611c9081611b24565b939692955090935050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611cc457611cc4611c9b565b500190565b6000816000190483118215151615611ce357611ce3611c9b565b500290565b600082611d0557634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160601b0383811690831681811015611d2a57611d2a611c9b565b039392505050565b600060208284031215611d4457600080fd5b8151801515811461100157600080fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19811415611d7b57611d7b611c9b565b60000392915050565b60006001600160801b03808316818516808303821115611da657611da6611c9b565b01949350505050565b60006001600160801b0383811690831681811015611d2a57611d2a611c9b565b600081600f0b83600f0b60008112816f7fffffffffffffffffffffffffffffff1901831281151615611e0357611e03611c9b565b816f7fffffffffffffffffffffffffffffff018313811615611e2757611e27611c9b565b5090039392505050565b600060208284031215611e4357600080fd5b5051919050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff03821381151615611e7d57611e7d611c9b565b826f7fffffffffffffffffffffffffffffff19038212811615611ea257611ea2611c9b565b5001939250505056fea264697066735822122010bfd890589bea1a677f4d11f5ce29ac9f1bba42d3aea26a0655f2017bc6448864736f6c634300080900330000000000000000000000006cb81093f91c9cdb08d2b190830484d8180d5544000000000000000000000000e7f6c3c1f0018e4c08acc52965e5cbff99e34a44

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

0000000000000000000000006cb81093f91c9cdb08d2b190830484d8180d5544000000000000000000000000e7f6c3c1f0018e4c08acc52965e5cbff99e34a44

-----Decoded View---------------
Arg [0] : _rewardsDistro (address): 0x6cb81093f91c9cdb08d2b190830484d8180d5544
Arg [1] : _plsJones (address): 0xe7f6c3c1f0018e4c08acc52965e5cbff99e34a44

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006cb81093f91c9cdb08d2b190830484d8180d5544
Arg [1] : 000000000000000000000000e7f6c3c1f0018e4c08acc52965e5cbff99e34a44


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.