Contract 0x29640422bb775917102079cf259cc8f5ca7dbce8

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0aClaim All277852682022-10-01 13:20:183 days 23 hrs ago0x20695042ad37fd25c834c708f21eec3104f74525 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001293
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938Claim All271577822022-09-28 7:53:227 days 4 hrs ago0x66eaddf4486ff607b9d67856db2ca7cf862160e1 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.0000193
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511dClaim All270800462022-09-28 0:39:267 days 12 hrs ago0xbe1e5a07c3af9b648b2dec7f193bc0835646725e IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.0000187
0x0202bec01968750ac601c5a0a326b09776dc9003d18a937715d77e05a0d52fb9Claim All262707702022-09-23 21:57:2611 days 14 hrs ago0x6d25322df1ffa4681aa387269b54d02f7dd8fa7b IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00003078
0x75cc251ff4cdd8726e1fd4e5359c290cd39237e2e65bfb43c390cfeb3ef751dcClaim All261922192022-09-23 13:39:3011 days 23 hrs ago0xbc9dbaa7bceedaf6675a99adc3617fbfb42dbd9c IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00003077
0xb3eccc0db9114a69cad1d0bd1008c7cdbdce65554a73f2276dccfa0d5998ed79Claim All260453322022-09-22 21:28:1012 days 15 hrs ago0xc21e6324d109ac35ea787e3b6906c5bbf55a71db IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001452
0x1d8e6d3fcd6703679a0a9f89783e80e7776585843746931da00a61a09e262fcfClaim All258803822022-09-22 5:28:0213 days 7 hrs ago0xb19be18a7d279432f607676acd34c62ff932daba IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00000963
0xc3f8f15fb4d3879513d6701a5b84128214e5cb9546b9a77128bc366109f0d0c9Claim All257025142022-09-21 13:16:1213 days 23 hrs ago0x8bf934b39bafce014afd26d55227f8f805b14b3d IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.0000241
0xc74ca54aa9a56fb3499b84eec49dd885c8a5f676aeac7b79ed044c14806259ddClaim All256896372022-09-21 11:52:5914 days 58 mins ago0x47e858bc6ac9d8d6617cc6b2d263ed38d6b9ab0c IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00002723
0x3d37c4cd901ee4fd64ac0cb22322ab473b4c1a3c6ec8f8711e33d1445c4f2db1Claim All256857662022-09-21 11:25:4114 days 1 hr ago0x7cda932a7ee2481ea55892c4d1068d6a3c311612 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00469322
0x4bc3d4a1b1e7e3acea074d532e27c6baf2112753210f50df7ef1674ec44b2f5eClaim All251135082022-09-18 11:44:4217 days 1 hr ago0x6a7dbffd83c6808651223efcaf7ea88161290e2b IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001413
0x848d8bc51145ed3521b487e6e3167f354289f66dd52b56094a9ad7e1eeb8a05dClaim All248562822022-09-16 8:38:2419 days 4 hrs ago0x4a4abc2439620b311e6e044aa22841126ceb9cf3 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001062
0x669c17daaae99d6f279ae86dcbffdaff61344b58e385d81b35f698e4708dfb17Claim All248041622022-09-15 21:28:1319 days 15 hrs ago0x134f06a09dd9a16b3597810c3990b28447017f49 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001775
0xc1d1679996d729ef832a0e83d786b02f59f504a6ab0a55a5bb408b56f422cb89Claim All245863612022-09-14 10:42:5021 days 2 hrs ago0xd9e38d3487298f9cfb2109f83d93196be5ad7cd3 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.0000166
0xbcabb3f35ce7706612cd2dd15536c138e138c0b468fad374ae4649059de8e90aClaim All243993732022-09-13 10:48:5422 days 2 hrs ago0x6a7dbffd83c6808651223efcaf7ea88161290e2b IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001562
0x20c2d5291e9ebc91c4a86e9f4aa319a083111e511a1f47257feaad77ce36de07Claim All242571452022-09-12 13:28:0022 days 23 hrs ago0x8951880b1de9ef4c9fc94f4d4af7c1f82caf1882 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00002884
0x76048fe33901496dccba3f63a5e50bf9451b5735bf57b6ad161ef7420ce35bc8Claim All242567482022-09-12 13:25:0922 days 23 hrs ago0x1d347dc7933a74fd792cc29df2bf5a8c5f6284ed IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00004241
0x4201a2662cd8defddf39354439e478af4c8b0634a9ba285a56daf4378a129b26Claim All242296422022-09-12 9:44:1723 days 3 hrs ago0x35d1921b91c1fc5d265e3fb358361d0ca58c2b78 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00001725
0x8bad1ad039c6dfd940589028d0803b8e078be8edaeaaafc1ece889e39cf63910Claim All235844442022-09-08 13:14:2826 days 23 hrs ago0x6a7dbffd83c6808651223efcaf7ea88161290e2b IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00002004
0x4dfc6019ade1e410711f94764c957d479404f95f50c5c4665be757227121de9cClaim All228576542022-09-04 20:16:4830 days 16 hrs ago0x5bd3e2fafbb189b5c1a8963f356fafeaefcf3ea5 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00053696
0x2dc6115a7df399aa1838c782257ef7b160e9a1957a348ff9a9d3d4bd41880d12Claim All227855222022-09-04 10:49:5631 days 2 hrs ago0x6a7dbffd83c6808651223efcaf7ea88161290e2b IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00044564
0xad3780c7c23753578578f8c733ec52fee14fbb4872ea826d4056a87e8afa8f9aClaim All225954112022-09-03 5:55:3032 days 6 hrs ago0xb19be18a7d279432f607676acd34c62ff932daba IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00025764
0x7468561054650c93139556f5805e0f2548284c5f318179c7cb81bea8446bfbf5Claim All225628342022-09-02 23:04:3132 days 13 hrs ago0x6b482256f935295d802694af95b84ed741de3573 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00003554
0x0f8fc439491f775d336c584bb6f49518abd6042d055cbae5089cb08e90706e95Claim All225034682022-09-02 14:29:5832 days 22 hrs ago0xc21e6324d109ac35ea787e3b6906c5bbf55a71db IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00003298
0xdfce4ca125f9d3881b85d3dc481883927f224dda0dd087a151622259803e11f0Claim All224089222022-09-01 23:57:0133 days 12 hrs ago0x134f06a09dd9a16b3597810c3990b28447017f49 IN  0x29640422bb775917102079cf259cc8f5ca7dbce80 ETH0.00002629
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsJONES Token0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsDPX Token0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0xe81aaf2b9ab1cbde088844bcc85fc947d51b254de39df160cfb28429ff6dae0a277852682022-10-01 13:20:183 days 23 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsJONES Token0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsDPX Token0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x045ab0481de1a80820d5f8e64c436aed1083b42e034a952737a2140fa12f4938271577822022-09-28 7:53:227 days 4 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511d270800462022-09-28 0:39:267 days 12 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsJONES Token0 ETH
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511d270800462022-09-28 0:39:267 days 12 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsDPX Token0 ETH
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511d270800462022-09-28 0:39:267 days 12 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511d270800462022-09-28 0:39:267 days 12 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511d270800462022-09-28 0:39:267 days 12 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x12eedcc9b20dcafe0cfac6fee1af615f4d5181482431625f2714b65ddf62511d270800462022-09-28 0:39:267 days 12 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
0x0202bec01968750ac601c5a0a326b09776dc9003d18a937715d77e05a0d52fb9262707702022-09-23 21:57:2611 days 14 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsJONES Token0 ETH
0x0202bec01968750ac601c5a0a326b09776dc9003d18a937715d77e05a0d52fb9262707702022-09-23 21:57:2611 days 14 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: plsDPX Token0 ETH
0x0202bec01968750ac601c5a0a326b09776dc9003d18a937715d77e05a0d52fb9262707702022-09-23 21:57:2611 days 14 hrs ago 0x29640422bb775917102079cf259cc8f5ca7dbce8 Plutus DAO: Plutus Epoch Staking (3 Month)0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EpochStakingRewardsV2

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 4 : EpochStakingRewardsV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

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

interface IPlutusEpochStaking {
  function stakedDetails(address _user) external view returns (uint112 amount, uint32 lastCheckpoint);

  function epochCheckpoints(uint32 _epoch)
    external
    view
    returns (
      uint32 startedAt,
      uint32 endedAt,
      uint112 totalStaked
    );

  function currentTotalStaked() external view returns (uint112);

  function stakedCheckpoints(address _addr, uint32 _epoch) external view returns (uint112 _amount);
}

interface IEpochStakingRewards {
  function claimDetails(address _addr, uint32 _epoch)
    external
    view
    returns (
      bool _fullyClaimed,
      uint32 _lastClaimedTimestamp,
      uint96 _plsDpxClaimedAmt,
      uint96 _plsJonesClaimedAmt
    );

  function epochRewards(uint32 _epoch)
    external
    view
    returns (
      uint32 _addedAtTimestamp,
      uint96 _plsDpx,
      uint96 _plsJones
    );

  function epoch() external view returns (uint32);

  function totalPlsDpxRewards() external view returns (uint96);

  function totalPlsJonesRewards() external view returns (uint96);
}

contract EpochStakingRewardsV2 is Ownable {
  uint256 private constant EPOCH_DURATION = 2_628_000 seconds;

  IERC20 public immutable plsDPX;
  IERC20 public immutable plsJONES;
  IPlutusEpochStaking public immutable staking;
  IEpochStakingRewards private immutable oldRewards;

  struct Reward {
    uint32 addedAtTimestamp;
    uint96 plsDpx;
    uint96 plsJones;
  }

  struct ClaimDetails {
    bool fullyClaimed;
    uint32 lastClaimedTimestamp;
    uint96 plsDpxClaimedAmt;
    uint96 plsJonesClaimedAmt;
  }

  uint32 public epoch;
  uint96 public totalPlsDpxRewards;
  uint96 public totalPlsJonesRewards;

  // Address => Epoch => Claim Details
  mapping(address => mapping(uint32 => ClaimDetails)) public claimDetails;

  // Epoch => Reward
  mapping(uint32 => Reward) public epochRewards;

  mapping(address => bool) public migrated;

  constructor(
    address _plsDpx,
    address _plsJones,
    address _staking,
    address _oldRewards
  ) {
    plsDPX = IERC20(_plsDpx);
    plsJONES = IERC20(_plsJones);
    staking = IPlutusEpochStaking(_staking);
    oldRewards = IEpochStakingRewards(_oldRewards);
    _migrateStorage();
  }

  function claimAll() external {
    _migrateClaimDetails(msg.sender);
    uint32 _epoch = epoch;

    unchecked {
      for (uint32 i = 0; i <= _epoch; i++) {
        if (!claimDetails[msg.sender][i].fullyClaimed) {
          _claimRewards(i);
        }
      }
    }
  }

  function _claimRewards(uint32 _epoch) internal {
    ClaimDetails memory _claimDetails = claimDetails[msg.sender][_epoch];
    Reward memory rewardsForEpoch = epochRewards[_epoch];

    // User rewards for epoch
    uint256 userPlsDpxShare = calculateShare(msg.sender, _epoch, rewardsForEpoch.plsDpx);
    uint256 userPlsJonesShare = calculateShare(msg.sender, _epoch, rewardsForEpoch.plsJones);

    require(userPlsDpxShare > 0 || userPlsJonesShare > 0, 'No rewards');

    uint256 claimablePlsDpx; // user portion claimable
    uint256 claimablePlsJones; // user portion claimable

    // Claim prorated amount for current epoch
    uint256 vestedDuration;

    unchecked {
      if (_claimDetails.lastClaimedTimestamp > rewardsForEpoch.addedAtTimestamp) {
        vestedDuration = block.timestamp - _claimDetails.lastClaimedTimestamp;
      } else {
        vestedDuration = block.timestamp - rewardsForEpoch.addedAtTimestamp;
      }

      claimablePlsDpx += (userPlsDpxShare * vestedDuration) / EPOCH_DURATION;
      claimablePlsJones += (userPlsJonesShare * vestedDuration) / EPOCH_DURATION;
    }

    bool _fullyClaimed;

    if (claimablePlsDpx > userPlsDpxShare - _claimDetails.plsDpxClaimedAmt) {
      // if claimable asset calculated is > claimable amt
      claimablePlsDpx = uint96(userPlsDpxShare - _claimDetails.plsDpxClaimedAmt);
      _fullyClaimed = true;
    } else {
      claimablePlsDpx = uint96(claimablePlsDpx);
    }

    if (claimablePlsJones > userPlsJonesShare - _claimDetails.plsJonesClaimedAmt) {
      // if claimable asset calculated is > claimable amt
      claimablePlsJones = uint96(userPlsJonesShare - _claimDetails.plsJonesClaimedAmt);
    } else {
      claimablePlsJones = uint96(claimablePlsJones);
    }

    // Update user claim details
    unchecked {
      claimDetails[msg.sender][_epoch] = ClaimDetails({
        fullyClaimed: _fullyClaimed,
        plsDpxClaimedAmt: _claimDetails.plsDpxClaimedAmt + uint96(claimablePlsDpx),
        plsJonesClaimedAmt: _claimDetails.plsJonesClaimedAmt + uint96(claimablePlsJones),
        lastClaimedTimestamp: uint32(block.timestamp)
      });
    }

    plsDPX.transfer(msg.sender, claimablePlsDpx);
    plsJONES.transfer(msg.sender, claimablePlsJones);

    emit ClaimRewards(msg.sender);
  }

  function _migrateStorage() internal {
    uint32 _epoch = oldRewards.epoch();
    epoch = _epoch;
    totalPlsDpxRewards = oldRewards.totalPlsDpxRewards();
    totalPlsJonesRewards = oldRewards.totalPlsJonesRewards();

    unchecked {
      for (uint32 i = 0; i <= _epoch; i++) {
        (uint32 _addedAtTs, uint96 _plsDpx, uint96 _plsJones) = oldRewards.epochRewards(i);
        epochRewards[i] = Reward({ addedAtTimestamp: _addedAtTs, plsDpx: _plsDpx, plsJones: _plsJones });
      }
    }
  }

  function _migrateClaimDetails(address _user) internal {
    if (migrated[_user]) {
      return;
    }

    unchecked {
      for (uint32 i = 0; i <= epoch; i++) {
        (bool _fullyClaimed, uint32 _lastClaimedTs, uint96 _plsDpxClaimed, uint96 _plsJonesClaimed) = oldRewards
          .claimDetails(_user, i);

        claimDetails[_user][i] = ClaimDetails({
          fullyClaimed: _fullyClaimed,
          lastClaimedTimestamp: _lastClaimedTs,
          plsDpxClaimedAmt: _plsDpxClaimed,
          plsJonesClaimedAmt: _plsJonesClaimed
        });
      }
    }

    migrated[_user] = true;
  }

  /** VIEWS */
  function getAmount(address _addr) public view returns (bool hasWithdrawn, uint112 amount) {
    uint32 lastCheckpoint;
    (amount, lastCheckpoint) = staking.stakedDetails(_addr);
    if (lastCheckpoint > 0) {
      hasWithdrawn = true;
      amount = staking.stakedCheckpoints(_addr, 1);
    }
  }

  /// @dev Calculate share of rewards for epoch
  function calculateShare(
    address _addr,
    uint32 _epoch,
    uint256 _rewardAmt
  ) public view returns (uint256) {
    (, uint112 amount) = getAmount(_addr);
    (, , uint112 totalStaked) = staking.epochCheckpoints(_epoch);
    return (amount * _rewardAmt) / totalStaked;
  }

  function pendingRewardsFor(uint32 _epoch) public view returns (uint256 _plsDpx, uint256 _plsJones) {
    ClaimDetails memory _claimDetails = claimDetails[msg.sender][_epoch];

    if (_claimDetails.lastClaimedTimestamp == 0) {
      (
        bool __fullyClaimed,
        uint32 _lastClaimedTimestamp,
        uint96 _plsDpxClaimedAmt,
        uint96 _plsJonesClaimedAmt
      ) = oldRewards.claimDetails(msg.sender, _epoch);

      if (_lastClaimedTimestamp != 0) {
        _claimDetails = ClaimDetails({
          fullyClaimed: __fullyClaimed,
          lastClaimedTimestamp: _lastClaimedTimestamp,
          plsDpxClaimedAmt: _plsDpxClaimedAmt,
          plsJonesClaimedAmt: _plsJonesClaimedAmt
        });
      }
    }
    Reward memory rewardsForEpoch = epochRewards[_epoch];

    // User rewards for epoch
    uint256 userPlsDpxShare = calculateShare(msg.sender, _epoch, rewardsForEpoch.plsDpx);
    uint256 userPlsJonesShare = calculateShare(msg.sender, _epoch, rewardsForEpoch.plsJones);

    require(userPlsDpxShare > 0 || userPlsJonesShare > 0, 'No rewards');

    uint256 claimablePlsDpx; // user portion claimable
    uint256 claimablePlsJones; // user portion claimable

    // Claim prorated amount for current epoch
    uint256 vestedDuration;

    unchecked {
      if (_claimDetails.lastClaimedTimestamp > rewardsForEpoch.addedAtTimestamp) {
        vestedDuration = block.timestamp - _claimDetails.lastClaimedTimestamp;
      } else {
        vestedDuration = block.timestamp - rewardsForEpoch.addedAtTimestamp;
      }

      claimablePlsDpx += (userPlsDpxShare * vestedDuration) / EPOCH_DURATION;
      claimablePlsJones += (userPlsJonesShare * vestedDuration) / EPOCH_DURATION;
    }

    bool _fullyClaimed;

    if (claimablePlsDpx > userPlsDpxShare - _claimDetails.plsDpxClaimedAmt) {
      // if claimable asset calculated is > claimable amt
      claimablePlsDpx = uint96(userPlsDpxShare - _claimDetails.plsDpxClaimedAmt);
      _fullyClaimed = true;
    } else {
      claimablePlsDpx = uint96(claimablePlsDpx);
    }

    if (claimablePlsJones > userPlsJonesShare - _claimDetails.plsJonesClaimedAmt) {
      // if claimable asset calculated is > claimable amt
      claimablePlsJones = uint96(userPlsJonesShare - _claimDetails.plsJonesClaimedAmt);
    } else {
      claimablePlsJones = uint96(claimablePlsJones);
    }

    _plsDpx = claimablePlsDpx;
    _plsJones = claimablePlsJones;
  }

  function pendingRewards() external view returns (uint256 _pendingDpx, uint256 _pendingJones) {
    uint32 _epoch = epoch;

    for (uint32 i = 0; i <= _epoch; i++) {
      if (!claimDetails[msg.sender][i].fullyClaimed) {
        (uint256 d, uint256 j) = pendingRewardsFor(i);
        _pendingDpx += d;
        _pendingJones += j;
      }
    }
  }

  /** OWNER */
  /// @dev deposit to rewards contract
  function depositRewards(uint96 _plsDpx, uint96 _plsJones) external onlyOwner {
    if (totalPlsDpxRewards == 0 && totalPlsJonesRewards == 0) {
      // No op - Don't increment it for very first deposit
    } else {
      epoch += 1;
    }

    epochRewards[epoch] = Reward({ addedAtTimestamp: uint32(block.timestamp), plsDpx: _plsDpx, plsJones: _plsJones });
    totalPlsJonesRewards += _plsJones;
    totalPlsDpxRewards += _plsDpx;

    plsDPX.transferFrom(msg.sender, address(this), _plsDpx);
    plsJONES.transferFrom(msg.sender, address(this), _plsJones);

    emit DepositRewards(epoch);
  }

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

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

  event DepositRewards(uint32 epoch);
  event ClaimRewards(address indexed _recipient);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 3 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 4 : 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;
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_plsDpx","type":"address"},{"internalType":"address","name":"_plsJones","type":"address"},{"internalType":"address","name":"_staking","type":"address"},{"internalType":"address","name":"_oldRewards","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"epoch","type":"uint32"}],"name":"DepositRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint32","name":"_epoch","type":"uint32"},{"internalType":"uint256","name":"_rewardAmt","type":"uint256"}],"name":"calculateShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"claimDetails","outputs":[{"internalType":"bool","name":"fullyClaimed","type":"bool"},{"internalType":"uint32","name":"lastClaimedTimestamp","type":"uint32"},{"internalType":"uint96","name":"plsDpxClaimedAmt","type":"uint96"},{"internalType":"uint96","name":"plsJonesClaimedAmt","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"_plsDpx","type":"uint96"},{"internalType":"uint96","name":"_plsJones","type":"uint96"}],"name":"depositRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"epochRewards","outputs":[{"internalType":"uint32","name":"addedAtTimestamp","type":"uint32"},{"internalType":"uint96","name":"plsDpx","type":"uint96"},{"internalType":"uint96","name":"plsJones","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getAmount","outputs":[{"internalType":"bool","name":"hasWithdrawn","type":"bool"},{"internalType":"uint112","name":"amount","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"migrated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"_pendingDpx","type":"uint256"},{"internalType":"uint256","name":"_pendingJones","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_epoch","type":"uint32"}],"name":"pendingRewardsFor","outputs":[{"internalType":"uint256","name":"_plsDpx","type":"uint256"},{"internalType":"uint256","name":"_plsJones","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"plsDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":"contract IERC20","name":"token","type":"address"}],"name":"retrieve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract IPlutusEpochStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPlsDpxRewards","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPlsJonesRewards","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b506040516200220d3803806200220d8339810160408190526200003591620003ec565b620000403362000073565b6001600160a01b0380851660805283811660a05282811660c052811660e05262000069620000c3565b5050505062000503565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060e0516001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200010157600080fd5b505afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c91906200045e565b905080600060146101000a81548163ffffffff021916908363ffffffff16021790555060e0516001600160a01b0316639409927a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200019b57600080fd5b505afa158015620001b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d691906200049b565b600160006101000a8154816001600160601b0302191690836001600160601b0316021790555060e0516001600160a01b031663590c2be96040518163ffffffff1660e01b815260040160206040518083038186803b1580156200023857600080fd5b505afa1580156200024d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200027391906200049b565b6001600c6101000a8154816001600160601b0302191690836001600160601b0316021790555060005b8163ffffffff168163ffffffff1611620003cb5760e051604051632d15671d60e21b815263ffffffff83166004820152600091829182916001600160a01b03169063b4559c749060240160606040518083038186803b158015620002ff57600080fd5b505afa15801562000314573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200033a9190620004b9565b6040805160608101825263ffffffff94851681526001600160601b0393841660208083019182529385168284019081528a8716600090815260039095529290932090518154935192518516600160801b02600160801b600160e01b031993909516640100000000026001600160801b031990941695169490941791909117161790555050600190910190506200029c565b5050565b80516001600160a01b0381168114620003e757600080fd5b919050565b600080600080608085870312156200040357600080fd5b6200040e85620003cf565b93506200041e60208601620003cf565b92506200042e60408601620003cf565b91506200043e60608601620003cf565b905092959194509250565b805163ffffffff81168114620003e757600080fd5b6000602082840312156200047157600080fd5b6200047c8262000449565b9392505050565b80516001600160601b0381168114620003e757600080fd5b600060208284031215620004ae57600080fd5b6200047c8262000483565b600080600060608486031215620004cf57600080fd5b620004da8462000449565b9250620004ea6020850162000483565b9150620004fa6040850162000483565b90509250925092565b60805160a05160c05160e051611c986200057560003960008181610c330152611249015260008181610288015281816109d401528181610fc0015261108f0152600081816102f2015281816108a50152611826015260008181610170015281816107f5015261173e0152611c986000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806386012bfd116100cd578063d1058e5911610081578063ef99e12b11610066578063ef99e12b14610419578063f2fde38b1461042c578063f5a797671461043f57600080fd5b8063d1058e59146103f4578063eded3fda146103fc57600080fd5b8063900cf0cf116100b2578063900cf0cf146103465780639409927a14610372578063b4559c741461038557600080fd5b806386012bfd146103145780638da5cb5b1461033557600080fd5b80634ba0a5ee11610124578063590c2be911610109578063590c2be9146102aa578063715018a6146102e557806375aff88f146102ed57600080fd5b80634ba0a5ee146102505780634cf088d91461028357600080fd5b80630a79309b146101565780630c913b341461016b5780631e6ad350146101af5780631fb18797146101c2575b600080fd5b6101696101643660046118f6565b610478565b005b6101927f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101696101bd36600461192f565b61060d565b61021a6101d036600461197a565b600260209081526000928352604080842090915290825290205460ff81169063ffffffff610100820416906001600160601b03650100000000008204811691600160881b90041684565b60408051941515855263ffffffff90931660208501526001600160601b03918216928401929092521660608201526080016101a6565b61027361025e3660046118f6565b60046020526000908152604090205460ff1681565b60405190151581526020016101a6565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b6001546102cd906c0100000000000000000000000090046001600160601b031681565b6040516001600160601b0390911681526020016101a6565b610169610971565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b6103276103223660046119a8565b610985565b6040519081526020016101a6565b6000546001600160a01b0316610192565b60005461035d90600160a01b900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b6001546102cd906001600160601b031681565b6103c86103933660046119e9565b60036020526000908152604090205463ffffffff8116906001600160601b036401000000008204811691600160801b90041683565b6040805163ffffffff90941684526001600160601b0392831660208501529116908201526060016101a6565b610169610a93565b610404610afb565b604080519283526020830191909152016101a6565b6104046104273660046119e9565b610b8f565b61016961043a3660046118f6565b610ef1565b61045261044d3660046118f6565b610f81565b6040805192151583526dffffffffffffffffffffffffffff9091166020830152016101a6565b610480611112565b47156104c257600080546040516001600160a01b03909116914780156108fc02929091818181858888f193505050501580156104c0573d6000803e3d6000fd5b505b806001600160a01b031663a9059cbb6104e36000546001600160a01b031690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561053b57600080fd5b505afa15801561054f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105739190611a06565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156105d157600080fd5b505af11580156105e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106099190611a34565b5050565b610615611112565b6001546001600160601b031615801561064757506001546c0100000000000000000000000090046001600160601b0316155b1561065157610692565b6001600060148282829054906101000a900463ffffffff166106739190611a65565b92506101000a81548163ffffffff021916908363ffffffff1602179055505b6040805160608101825263ffffffff42811682526001600160601b03808616602080850191825286831685870190815260008054600160a01b900486168152600390925295902093518454915195518316600160801b027fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff968416640100000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090931691909416171793909316179055600180548392600c9161076a9185916c01000000000000000000000000900416611a8d565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555081600160008282829054906101000a90046001600160601b03166107b29190611a8d565b82546101009290920a6001600160601b038181021990931691831602179091556040516323b872dd60e01b815233600482015230602482015290841660448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506323b872dd90606401602060405180830381600087803b15801561084257600080fd5b505af1158015610856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087a9190611a34565b506040516323b872dd60e01b81523360048201523060248201526001600160601b03821660448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90606401602060405180830381600087803b1580156108f157600080fd5b505af1158015610905573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109299190611a34565b50600054604051600160a01b90910463ffffffff1681527fabccf803841244f7fef97d8d38bdf09763ebee3f13639f30d1a1b1cf79c937989060200160405180910390a15050565b610979611112565b610983600061116c565b565b60008061099185610f81565b6040517f446b0d3400000000000000000000000000000000000000000000000000000000815263ffffffff87166004820152909250600091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063446b0d349060240160606040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611acd565b92505050806dffffffffffffffffffffffffffff1684836dffffffffffffffffffffffffffff16610a7f9190611b15565b610a899190611b4a565b9695505050505050565b610a9c336111d4565b60008054600160a01b900463ffffffff16905b8163ffffffff168163ffffffff16116106095733600090815260026020908152604080832063ffffffff8516845290915290205460ff16610af357610af3816113e1565b600101610aaf565b600080548190600160a01b900463ffffffff16815b8163ffffffff168163ffffffff1611610b895733600090815260026020908152604080832063ffffffff8516845290915290205460ff16610b7757600080610b5783610b8f565b9092509050610b668287611b6c565b9550610b728186611b6c565b945050505b80610b8181611b84565b915050610b10565b50509091565b33600090815260026020908152604080832063ffffffff80861685529083528184208251608081018452905460ff81161515825261010081049092169381018490526001600160601b03650100000000008304811693820193909352600160881b90910490911660608201528291610d0657604051631fb1879760e01b815233600482015263ffffffff851660248201526000908190819081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631fb187979060440160806040518083038186803b158015610c7557600080fd5b505afa158015610c89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cad9190611ba8565b93509350935093508263ffffffff16600014610d0157604051806080016040528085151581526020018463ffffffff168152602001836001600160601b03168152602001826001600160601b031681525094505b505050505b63ffffffff80851660009081526003602090815260408083208151606081018352905494851681526001600160601b0364010000000086048116938201849052600160801b90950490941690840152610d629033908890610985565b90506000610d7e338885604001516001600160601b0316610985565b90506000821180610d8f5750600081115b610dcd5760405162461bcd60e51b815260206004820152600a6024820152694e6f207265776172647360b01b60448201526064015b60405180910390fd5b6000806000856000015163ffffffff16876020015163ffffffff161115610e015750602086015163ffffffff164203610e0d565b50845163ffffffff1642035b622819a08582020483019250622819a081850281610e2d57610e2d611b34565b0482019150600087604001516001600160601b031686610e4d9190611c04565b841115610e80576040880151610e6c906001600160601b031687611c04565b6001600160601b0316935060019050610e8d565b836001600160601b031693505b6060880151610ea5906001600160601b031686611c04565b831115610ed4576060880151610ec4906001600160601b031686611c04565b6001600160601b03169250610ee1565b826001600160601b031692505b5091999098509650505050505050565b610ef9611112565b6001600160a01b038116610f755760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610dc4565b610f7e8161116c565b50565b6040517f7b7ce6510000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152600091829182917f000000000000000000000000000000000000000000000000000000000000000090911690637b7ce65190602401604080518083038186803b15801561100357600080fd5b505afa158015611017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103b9190611c1b565b909250905063ffffffff81161561110c576040517f38c621510000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260016024830181905294507f000000000000000000000000000000000000000000000000000000000000000016906338c621519060440160206040518083038186803b1580156110d157600080fd5b505afa1580156110e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111099190611c47565b91505b50915091565b6000546001600160a01b031633146109835760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610dc4565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811660009081526004602052604090205460ff16156111f85750565b60005b60005463ffffffff600160a01b9091048116908216116113bc57604051631fb1879760e01b81526001600160a01b03838116600483015263ffffffff831660248301526000918291829182917f00000000000000000000000000000000000000000000000000000000000000001690631fb187979060440160806040518083038186803b15801561128b57600080fd5b505afa15801561129f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c39190611ba8565b60408051608081018252941515855263ffffffff93841660208087019182526001600160601b03948516878401908152938516606088019081526001600160a01b038e166000908152600283528481208e89168252909252929020955186549151935192518516600160881b027fffffff000000000000000000000000ffffffffffffffffffffffffffffffffff939095166501000000000002929092167fffffff000000000000000000000000000000000000000000000000ffffffffff939095166101000264ffffffff00199215159290921664ffffffffff19909116171716919091171790555050600190920191506111fb9050565b506001600160a01b03166000908152600460205260409020805460ff19166001179055565b33600081815260026020908152604080832063ffffffff8087168086529184528285208351608081018552905460ff81161515825261010081048316828701526001600160601b03650100000000008204811683870152600160881b9091048116606080840191909152938752600386528487208551948501865254928316845264010000000083048116958401869052600160801b90920490911692820192909252909390929161149591908690610985565b905060006114b1338685604001516001600160601b0316610985565b905060008211806114c25750600081115b6114fb5760405162461bcd60e51b815260206004820152600a6024820152694e6f207265776172647360b01b6044820152606401610dc4565b6000806000856000015163ffffffff16876020015163ffffffff16111561152f5750602086015163ffffffff16420361153b565b50845163ffffffff1642035b622819a08582020483019250622819a08185028161155b5761155b611b34565b0482019150600087604001516001600160601b03168661157b9190611c04565b8411156115ae57604088015161159a906001600160601b031687611c04565b6001600160601b03169350600190506115bb565b836001600160601b031693505b60608801516115d3906001600160601b031686611c04565b8311156116025760608801516115f2906001600160601b031686611c04565b6001600160601b0316925061160f565b826001600160601b031692505b604051806080016040528082151581526020014263ffffffff168152602001858a60400151016001600160601b03168152602001848a60600151016001600160601b031681525060026000336001600160a01b03166001600160a01b0316815260200190815260200160002060008b63ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160056101000a8154816001600160601b0302191690836001600160601b0316021790555060608201518160000160116101000a8154816001600160601b0302191690836001600160601b031602179055509050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb33866040518363ffffffff1660e01b815260040161179e9291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b1580156117b857600080fd5b505af11580156117cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f09190611a34565b506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561187257600080fd5b505af1158015611886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118aa9190611a34565b5060405133907f0178be5ff07ff0255343266c94130c9a7c518cf8ba70cbf6198cfb3572ab9d3f90600090a2505050505050505050565b6001600160a01b0381168114610f7e57600080fd5b60006020828403121561190857600080fd5b8135611913816118e1565b9392505050565b6001600160601b0381168114610f7e57600080fd5b6000806040838503121561194257600080fd5b823561194d8161191a565b9150602083013561195d8161191a565b809150509250929050565b63ffffffff81168114610f7e57600080fd5b6000806040838503121561198d57600080fd5b8235611998816118e1565b9150602083013561195d81611968565b6000806000606084860312156119bd57600080fd5b83356119c8816118e1565b925060208401356119d881611968565b929592945050506040919091013590565b6000602082840312156119fb57600080fd5b813561191381611968565b600060208284031215611a1857600080fd5b5051919050565b80518015158114611a2f57600080fd5b919050565b600060208284031215611a4657600080fd5b61191382611a1f565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818516808303821115611a8457611a84611a4f565b01949350505050565b60006001600160601b03808316818516808303821115611a8457611a84611a4f565b80516dffffffffffffffffffffffffffff81168114611a2f57600080fd5b600080600060608486031215611ae257600080fd5b8351611aed81611968565b6020850151909350611afe81611968565b9150611b0c60408501611aaf565b90509250925092565b6000816000190483118215151615611b2f57611b2f611a4f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611b6757634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611b7f57611b7f611a4f565b500190565b600063ffffffff80831681811415611b9e57611b9e611a4f565b6001019392505050565b60008060008060808587031215611bbe57600080fd5b611bc785611a1f565b93506020850151611bd781611968565b6040860151909350611be88161191a565b6060860151909250611bf98161191a565b939692955090935050565b600082821015611c1657611c16611a4f565b500390565b60008060408385031215611c2e57600080fd5b611c3783611aaf565b9150602083015161195d81611968565b600060208284031215611c5957600080fd5b61191382611aaf56fea2646970667358221220dc2917cd95d0d9a27cec9411420ed4d54d413e405a7ce03a288b302af5cbbfe064736f6c63430008090033000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1000000000000000000000000e7f6c3c1f0018e4c08acc52965e5cbff99e34a44000000000000000000000000e59dadf5f7a9decb8337402ccdf06abe5c0b2b3e00000000000000000000000089a829bd85280b5d3cfce6eec3eaf783a94d296a

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

000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1000000000000000000000000e7f6c3c1f0018e4c08acc52965e5cbff99e34a44000000000000000000000000e59dadf5f7a9decb8337402ccdf06abe5c0b2b3e00000000000000000000000089a829bd85280b5d3cfce6eec3eaf783a94d296a

-----Decoded View---------------
Arg [0] : _plsDpx (address): 0xf236ea74b515ef96a9898f5a4ed4aa591f253ce1
Arg [1] : _plsJones (address): 0xe7f6c3c1f0018e4c08acc52965e5cbff99e34a44
Arg [2] : _staking (address): 0xe59dadf5f7a9decb8337402ccdf06abe5c0b2b3e
Arg [3] : _oldRewards (address): 0x89a829bd85280b5d3cfce6eec3eaf783a94d296a

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1
Arg [1] : 000000000000000000000000e7f6c3c1f0018e4c08acc52965e5cbff99e34a44
Arg [2] : 000000000000000000000000e59dadf5f7a9decb8337402ccdf06abe5c0b2b3e
Arg [3] : 00000000000000000000000089a829bd85280b5d3cfce6eec3eaf783a94d296a


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.