Contract 0x125cc7cce81a809c825c945e5aa874e60cccb6bb 2

 

Contract Overview

Dopex: rDPX Staking Rewards V2
Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xdc42d20f4956739c9b7aac2117549e1255acffece6edd0be674a754442f5386dWithdraw265715742022-09-25 11:47:284 days 18 hrs ago0x4db8ac0c360c40dfcb674c7129ed1b73e0d2e9c0 IN  Dopex: rDPX Staking Rewards V20 ETH0.00001345
0xfc33f83379b5318efda27b043cec0a70ec5269c1ce44cc698136d3cf90d92bb1Withdraw258726692022-09-22 4:48:528 days 1 hr ago0x865da0c8d3af4b01c83cb133316f4e47c90fbc20 IN  Dopex: rDPX Staking Rewards V20 ETH0.00001051
0xcfc580ea767ec2945b0733cca7caff705ad792a458f80d1c251a7037d1b8fd3bGet Reward251697842022-09-18 20:23:3211 days 10 hrs ago0xc3e1fe5a748313c4118efbb08bdca23f19f382e3 IN  Dopex: rDPX Staking Rewards V20 ETH0.00002422
0x343760f0523766be23a295502cf2a4ddbfcab9521669986c1860f90d6f093053Withdraw247727652022-09-15 16:13:2414 days 14 hrs ago0x617818c7398c243cc87b240a9d8de89272b03982 IN  Dopex: rDPX Staking Rewards V20 ETH0.00003642
0x13c347fa73f3bcd2ba23b50a8fbd27186f856901fb5635186d4a0193eef2b577Get Reward247315642022-09-15 10:55:4214 days 19 hrs ago0x16647dbb696eba8c54ace95ca5c1643cd65619d0 IN  Dopex: rDPX Staking Rewards V20 ETH0.00004707
0x5fd99a335de3cb3a9d60aebecf412da8889109eb18e03d963e4c03bce908e938Stake232768542022-09-07 2:25:3623 days 4 hrs ago0xa7c955eeac8b5b8c7ab67ac10b427b8293e10164 IN  Dopex: rDPX Staking Rewards V20 ETH0.00003621
0x1dc82804d0a04a4b918ce47bb85c6536caf323a9d684e1f5225c3f517c37ba40Withdraw232326052022-09-06 19:57:3123 days 10 hrs ago0x3884deaf92deedd3c28d06d2537decd199fd2491 IN  Dopex: rDPX Staking Rewards V20 ETH0.00004462
0x206099b0cc649ec2b2dd1f1c5ceccef4292fb4bb112e91af6e7c41dae3399fceWithdraw220592052022-08-30 22:48:2230 days 7 hrs ago0x706cecf7f809c1620053d3e55cc919e29f93a170 IN  Dopex: rDPX Staking Rewards V20 ETH0.000085868765 ETH
0x439107b8175fa458727b93dc66dddd9a0abd1519aa1cb0635082a8b25c1822e4Withdraw219997302022-08-30 14:40:1030 days 16 hrs ago0x866d9d6c3a317807b82f1bfb86ca9019f417d7c4 IN  Dopex: rDPX Staking Rewards V20 ETH0.000087533162 ETH
0xbc39b9d58428e653821d403940621473b3baa2e41d4e71724da1bb790e7742d4Withdraw217954302022-08-29 5:33:2532 days 1 hr ago0xb670359a3719b4de42baf5c548e5d53637b19b94 IN  Dopex: rDPX Staking Rewards V20 ETH0.00006731369 ETH
0x5e5673e4b6e6c3aac4baedcbc3ba953f71443adf110451d25be69103e48539b6Withdraw215022532022-08-27 6:34:4834 days 9 mins ago0x109cbdcf9e4f6cb9ea56c810bc26f06f8b1f399f IN  Dopex: rDPX Staking Rewards V20 ETH0.000076416472 ETH
0x134e8be3a6ac26b692d306d73b4adb156233d559c32e6d5458444cbfd0aec9beWithdraw214887502022-08-27 4:10:3134 days 2 hrs ago0x4c7d159766b244c78b5248b176af8c7bb1868501 IN  Dopex: rDPX Staking Rewards V20 ETH0.000112706485 ETH
0x697faa14a1b9ea432d5f8a0272195070358b4eddb933f9156ef9cf1182e9feadGet Reward213143482022-08-26 0:52:2135 days 5 hrs ago0x13cdc703e3dfabcf7dc7ade1b7197df3ba7210ed IN  Dopex: rDPX Staking Rewards V20 ETH0.000070355755 ETH
0x226fe6b5fe829474d48a3d212d1c0b74bd32c51f4263e162c014dcf949abde75Withdraw213126372022-08-26 0:46:1835 days 5 hrs ago0x13cdc703e3dfabcf7dc7ade1b7197df3ba7210ed IN  Dopex: rDPX Staking Rewards V20 ETH0.000086987448 ETH
0xa5e993e0f33ef049aee616f9aa66bbc1b62cb7b6422f22d8de460ee56f396daaWithdraw211948922022-08-24 23:42:2636 days 7 hrs ago0x8b1ca84c014c8483a3a38ff9d696a5a4bf53d964 IN  Dopex: rDPX Staking Rewards V20 ETH0.00006216285 ETH
0x290782354eb6dd77dad0976e304511719482961bdba4ba92d41cadaddb1f3d87Withdraw211818552022-08-24 19:31:2336 days 11 hrs ago0xe7967e618010c7561f5acd59ab9790455370e65e IN  Dopex: rDPX Staking Rewards V20 ETH0.000061892611 ETH
0x96a6307c921c38769cd0e4a78ac5598a946e91706f6b3ac18c4ddff5b9303693Withdraw211402742022-08-24 10:27:1036 days 20 hrs ago0x2e593f5008e70adf982bc68959c6a0c47c1106f3 IN  Dopex: rDPX Staking Rewards V20 ETH0.000047570207 ETH
0x7975453b9f82ee71238b1ee3582866107ccb6c048fb6048d351d74d55295d4ffWithdraw211195582022-08-24 5:03:3637 days 1 hr ago0xc4dbc7d5957dcef7ed2b0778c597c16ce2769e7d IN  Dopex: rDPX Staking Rewards V20 ETH0.000051149704 ETH
0xd9cac435f273b997554e214f9b2eba3c216d0efd211db902fef9a869a688f090Get Reward211195092022-08-24 5:03:1637 days 1 hr ago0xc4dbc7d5957dcef7ed2b0778c597c16ce2769e7d IN  Dopex: rDPX Staking Rewards V20 ETH0.00004999737 ETH
0xd5242fa9c3622afd781f34168e20ed3d7c34ba2656a1addd9cfd79da0ba59972Withdraw210090342022-08-23 1:16:5438 days 5 hrs ago0xbee2d469aacb46251ae33cca91f482e26c971dff IN  Dopex: rDPX Staking Rewards V20 ETH0.000075921564 ETH
0x11b4d6f2d818b63132346565dfaa8d2d47c674a39483268a4be5ba878c3e153eWithdraw206943952022-08-19 14:07:3141 days 16 hrs ago0x1f1d5c66c8dd4dab831b7c29f78d177c05ed7de5 IN  Dopex: rDPX Staking Rewards V20 ETH0.00006068156 ETH
0x31b5540269bf05bf2f7b9807e8fdca481a5e090bbc0f67d61d96d642d70023c5Withdraw206887942022-08-19 13:02:2541 days 17 hrs ago0xae8b0473129cdd9f4f1ab181a00aa5a8bec7beb2 IN  Dopex: rDPX Staking Rewards V20 ETH0.000060310382 ETH
0xc5836c8022834d107dfdd69336b175b36a3c22228c483fc75daa7f491235da43Withdraw205556922022-08-18 1:58:1443 days 4 hrs ago0x83e0e18e9fea4dc39b9b6dc16a48f10872b9f74f IN  Dopex: rDPX Staking Rewards V20 ETH0.000095248889 ETH
0x81f501d6f230987ca311f8e5f72572d9af6a484d44a0be5a4d3288b147c92c28Withdraw204425432022-08-16 22:03:5744 days 8 hrs ago0xcce806114b6cc9df239821ba1373c44bafe9b200 IN  Dopex: rDPX Staking Rewards V20 ETH0.000083133705 ETH
0x4c8a7699a190b392ae80471f56f357aede336967662a7e4ea878aec28a44adfeGet Reward204418152022-08-16 21:48:5044 days 8 hrs ago0xcce806114b6cc9df239821ba1373c44bafe9b200 IN  Dopex: rDPX Staking Rewards V20 ETH0.000072608553 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xdc42d20f4956739c9b7aac2117549e1255acffece6edd0be674a754442f5386d265715742022-09-25 11:47:284 days 18 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xfc33f83379b5318efda27b043cec0a70ec5269c1ce44cc698136d3cf90d92bb1258726692022-09-22 4:48:528 days 1 hr ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xcfc580ea767ec2945b0733cca7caff705ad792a458f80d1c251a7037d1b8fd3b251697842022-09-18 20:23:3211 days 10 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xcfc580ea767ec2945b0733cca7caff705ad792a458f80d1c251a7037d1b8fd3b251697842022-09-18 20:23:3211 days 10 hrs ago Dopex: rDPX Staking Rewards V2Dopex: DPX Token0 ETH
0x343760f0523766be23a295502cf2a4ddbfcab9521669986c1860f90d6f093053247727652022-09-15 16:13:2414 days 14 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x13c347fa73f3bcd2ba23b50a8fbd27186f856901fb5635186d4a0193eef2b577247315642022-09-15 10:55:4214 days 19 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x13c347fa73f3bcd2ba23b50a8fbd27186f856901fb5635186d4a0193eef2b577247315642022-09-15 10:55:4214 days 19 hrs ago Dopex: rDPX Staking Rewards V2Dopex: DPX Token0 ETH
0x5fd99a335de3cb3a9d60aebecf412da8889109eb18e03d963e4c03bce908e938232768542022-09-07 2:25:3623 days 4 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x1dc82804d0a04a4b918ce47bb85c6536caf323a9d684e1f5225c3f517c37ba40232326052022-09-06 19:57:3123 days 10 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x206099b0cc649ec2b2dd1f1c5ceccef4292fb4bb112e91af6e7c41dae3399fce220592052022-08-30 22:48:2230 days 7 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x439107b8175fa458727b93dc66dddd9a0abd1519aa1cb0635082a8b25c1822e4219997302022-08-30 14:40:1030 days 16 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xbc39b9d58428e653821d403940621473b3baa2e41d4e71724da1bb790e7742d4217954302022-08-29 5:33:2532 days 1 hr ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x5e5673e4b6e6c3aac4baedcbc3ba953f71443adf110451d25be69103e48539b6215022532022-08-27 6:34:4834 days 9 mins ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x134e8be3a6ac26b692d306d73b4adb156233d559c32e6d5458444cbfd0aec9be214887502022-08-27 4:10:3134 days 2 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x697faa14a1b9ea432d5f8a0272195070358b4eddb933f9156ef9cf1182e9fead213143482022-08-26 0:52:2135 days 5 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x697faa14a1b9ea432d5f8a0272195070358b4eddb933f9156ef9cf1182e9fead213143482022-08-26 0:52:2135 days 5 hrs ago Dopex: rDPX Staking Rewards V2Dopex: DPX Token0 ETH
0x226fe6b5fe829474d48a3d212d1c0b74bd32c51f4263e162c014dcf949abde75213126372022-08-26 0:46:1835 days 5 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xa5e993e0f33ef049aee616f9aa66bbc1b62cb7b6422f22d8de460ee56f396daa211948922022-08-24 23:42:2636 days 7 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x290782354eb6dd77dad0976e304511719482961bdba4ba92d41cadaddb1f3d87211818552022-08-24 19:31:2336 days 11 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x96a6307c921c38769cd0e4a78ac5598a946e91706f6b3ac18c4ddff5b9303693211402742022-08-24 10:27:1036 days 20 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x7975453b9f82ee71238b1ee3582866107ccb6c048fb6048d351d74d55295d4ff211195582022-08-24 5:03:3637 days 1 hr ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xd9cac435f273b997554e214f9b2eba3c216d0efd211db902fef9a869a688f090211195092022-08-24 5:03:1637 days 1 hr ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0xd9cac435f273b997554e214f9b2eba3c216d0efd211db902fef9a869a688f090211195092022-08-24 5:03:1637 days 1 hr ago Dopex: rDPX Staking Rewards V2Dopex: DPX Token0 ETH
0xd5242fa9c3622afd781f34168e20ed3d7c34ba2656a1addd9cfd79da0ba59972210090342022-08-23 1:16:5438 days 5 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
0x11b4d6f2d818b63132346565dfaa8d2d47c674a39483268a4be5ba878c3e153e206943952022-08-19 14:07:3141 days 16 hrs ago Dopex: rDPX Staking Rewards V2 Dopex: rDPX Token0 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x8d481245801907b45823Fb032E6848d0D3c29AE5

Contract Name:
StakingRewardsV2

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : StakingRewardsV2.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

// Libraries
import '@openzeppelin/contracts/math/Math.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';

// Interfaces
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import './interfaces/IStakingRewards.sol';

// Contracts
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

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

  /* ========== STATE VARIABLES ========== */

  IERC20 public rewardsTokenDPX;
  IERC20 public rewardsTokenRDPX;
  IERC20 public stakingToken;
  uint256 public boost = 0;
  uint256 public periodFinish = 0;
  uint256 public boostedFinish = 0;
  uint256 public rewardRateDPX = 0;
  uint256 public rewardRateRDPX = 0;
  uint256 public rewardsDuration;
  uint256 public lastUpdateTime;
  uint256 public rewardPerTokenStoredDPX;
  uint256 public rewardPerTokenStoredRDPX;
  uint256 public boostedTimePeriod;
  uint256 public id;

  mapping(address => bool) public whitelistedContracts;
  mapping(address => uint256) public userDPXRewardPerTokenPaid;
  mapping(address => uint256) public userRDPXRewardPerTokenPaid;
  mapping(address => uint256) public rewardsDPX;
  mapping(address => uint256) public rewardsRDPX;
  mapping(address => uint256) private _balances;

  uint256 private _totalSupply;

  /* ========== CONSTRUCTOR ========== */

  constructor(
    address _rewardsTokenDPX,
    address _rewardsTokenRDPX,
    address _stakingToken,
    uint256 _rewardsDuration,
    uint256 _boostedTimePeriod,
    uint256 _boost
  ) Ownable() {
    rewardsTokenDPX = IERC20(_rewardsTokenDPX);
    rewardsTokenRDPX = IERC20(_rewardsTokenRDPX);
    stakingToken = IERC20(_stakingToken);
    rewardsDuration = _rewardsDuration;
    boostedTimePeriod = _boostedTimePeriod;
    boost = _boost;
  }

  /* ========== VIEWS ========== */

  function isContract(address addr) public view returns (bool) {
    uint256 size;
    assembly {
      size := extcodesize(addr)
    }
    return size > 0;
  }

  function totalSupply() external view returns (uint256) {
    return _totalSupply;
  }

  function balanceOf(address account) external view returns (uint256) {
    return _balances[account];
  }

  function lastTimeRewardApplicable() public view returns (uint256) {
    uint256 timeApp = Math.min(block.timestamp, periodFinish);
    return timeApp;
  }

  function rewardPerToken() public view returns (uint256, uint256) {
    if (_totalSupply == 0) {
      uint256 perTokenRateDPX = rewardPerTokenStoredDPX;
      uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX;
      return (perTokenRateDPX, perTokenRateRDPX);
    }
    if (block.timestamp < boostedFinish) {
      uint256 perTokenRateDPX = rewardPerTokenStoredDPX.add(
        lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateDPX.mul(boost)).mul(1e18).div(
          _totalSupply
        )
      );
      uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX.add(
        lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateRDPX.mul(boost)).mul(1e18).div(
          _totalSupply
        )
      );
      return (perTokenRateDPX, perTokenRateRDPX);
    } else {
      if (lastUpdateTime < boostedFinish) {
        uint256 perTokenRateDPX = rewardPerTokenStoredDPX
          .add(
            boostedFinish.sub(lastUpdateTime).mul(rewardRateDPX.mul(boost)).mul(1e18).div(
              _totalSupply
            )
          )
          .add(
            lastTimeRewardApplicable().sub(boostedFinish).mul(rewardRateDPX).mul(1e18).div(
              _totalSupply
            )
          );
        uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX
          .add(
            boostedFinish.sub(lastUpdateTime).mul(rewardRateRDPX.mul(boost)).mul(1e18).div(
              _totalSupply
            )
          )
          .add(
            lastTimeRewardApplicable().sub(boostedFinish).mul(rewardRateRDPX).mul(1e18).div(
              _totalSupply
            )
          );
        return (perTokenRateDPX, perTokenRateRDPX);
      } else {
        uint256 perTokenRateDPX = rewardPerTokenStoredDPX.add(
          lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateDPX).mul(1e18).div(
            _totalSupply
          )
        );
        uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX.add(
          lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateRDPX).mul(1e18).div(
            _totalSupply
          )
        );
        return (perTokenRateDPX, perTokenRateRDPX);
      }
    }
  }

  function earned(address account)
    public
    view
    returns (uint256 DPXtokensEarned, uint256 RDPXtokensEarned)
  {
    uint256 perTokenRateDPX;
    uint256 perTokenRateRDPX;
    (perTokenRateDPX, perTokenRateRDPX) = rewardPerToken();
    DPXtokensEarned = _balances[account]
      .mul(perTokenRateDPX.sub(userDPXRewardPerTokenPaid[account]))
      .div(1e18)
      .add(rewardsDPX[account]);
    RDPXtokensEarned = _balances[account]
      .mul(perTokenRateRDPX.sub(userRDPXRewardPerTokenPaid[account]))
      .div(1e18)
      .add(rewardsRDPX[account]);
  }

  /* ========== MUTATIVE FUNCTIONS ========== */

  function stake(uint256 amount)
    external
    payable
    isEligibleSender
    nonReentrant
    updateReward(msg.sender)
  {
    require(amount > 0, 'Cannot stake 0');
    _totalSupply = _totalSupply.add(amount);
    _balances[msg.sender] = _balances[msg.sender].add(amount);
    stakingToken.safeTransferFrom(msg.sender, address(this), amount);
    emit Staked(msg.sender, amount);
  }

  function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
    require(amount > 0, 'Cannot withdraw 0');
    require(amount <= _balances[msg.sender], 'Insufficent balance');
    _totalSupply = _totalSupply.sub(amount);
    _balances[msg.sender] = _balances[msg.sender].sub(amount);
    stakingToken.safeTransfer(msg.sender, amount);
    emit Withdrawn(msg.sender, amount);
  }

  function withdrawRewardTokens() public onlyOwner returns (uint256, uint256) {
    address OwnerAddress = owner();
    if (OwnerAddress == msg.sender) {
      uint256 DPXRewards = rewardsTokenDPX.balanceOf(address(this));
      uint256 RDPXRewards = rewardsTokenRDPX.balanceOf(address(this));
      if (stakingToken == rewardsTokenDPX) {
        DPXRewards -= _totalSupply;
      } else if (stakingToken == rewardsTokenRDPX) {
        RDPXRewards -= _totalSupply;
      }
      periodFinish = block.timestamp;
      IERC20(rewardsTokenDPX).safeTransfer(OwnerAddress, DPXRewards);
      IERC20(rewardsTokenRDPX).safeTransfer(OwnerAddress, RDPXRewards);
      return (DPXRewards, RDPXRewards);
    } else {
      return (0, 0);
    }
  }

  function compound() public nonReentrant updateReward(msg.sender) {
    if (stakingToken == rewardsTokenDPX) {
      uint256 rewardDPX = rewardsDPX[msg.sender];
      require(rewardDPX > 0, 'stake address not found');
      rewardsDPX[msg.sender] = 0;
      _totalSupply = _totalSupply.add(rewardDPX);
      _balances[msg.sender] = _balances[msg.sender].add(rewardDPX);
      emit RewardCompounded(msg.sender, rewardDPX);
    } else if (stakingToken == rewardsTokenRDPX) {
      uint256 rewardRDPX = rewardsRDPX[msg.sender];
      require(rewardRDPX > 0, 'stake address not found');
      rewardsRDPX[msg.sender] = 0;
      _totalSupply = _totalSupply.add(rewardRDPX);
      _balances[msg.sender] = _balances[msg.sender].add(rewardRDPX);
      emit RewardCompounded(msg.sender, rewardRDPX);
    } else {
      require(false, 'stakingToken not found');
    }
  }

  function getReward(uint256 rewardsTokenID) public nonReentrant updateReward(msg.sender) {
    if (rewardsTokenID == 0) {
      uint256 rewardDPX = rewardsDPX[msg.sender];
      require(rewardDPX > 0, 'can not withdraw 0 DPX reward');
      rewardsDPX[msg.sender] = 0;
      rewardsTokenDPX.safeTransfer(msg.sender, rewardDPX);
      emit RewardPaid(msg.sender, rewardDPX);
    } else if (rewardsTokenID == 1) {
      uint256 rewardRDPX = rewardsRDPX[msg.sender];
      require(rewardRDPX > 0, 'can not withdraw 0 RDPX reward');
      rewardsRDPX[msg.sender] = 0;
      rewardsTokenRDPX.safeTransfer(msg.sender, rewardRDPX);
      emit RewardPaid(msg.sender, rewardRDPX);
    } else {
      uint256 rewardDPX = rewardsDPX[msg.sender];
      uint256 rewardRDPX = rewardsRDPX[msg.sender];
      if (rewardDPX > 0) {
        rewardsDPX[msg.sender] = 0;
        rewardsTokenDPX.safeTransfer(msg.sender, rewardDPX);
      }
      if (rewardRDPX > 0) {
        rewardsRDPX[msg.sender] = 0;
        rewardsTokenRDPX.safeTransfer(msg.sender, rewardRDPX);
      }
      emit RewardPaid(msg.sender, rewardDPX);
      emit RewardPaid(msg.sender, rewardRDPX);
    }
  }

  function exit() external {
    getReward(2);
    withdraw(_balances[msg.sender]);
  }

  /* ========== RESTRICTED FUNCTIONS ========== */

  function notifyRewardAmount(uint256 rewardDPX, uint256 rewardRDPX)
    external
    onlyOwner
    setReward(address(0))
  {
    if (periodFinish == 0) {
      rewardRateDPX = rewardDPX.div(rewardsDuration.add(boostedTimePeriod));
      rewardRateRDPX = rewardRDPX.div(rewardsDuration.add(boostedTimePeriod));
      lastUpdateTime = block.timestamp;
      periodFinish = block.timestamp.add(rewardsDuration);
      boostedFinish = block.timestamp.add(boostedTimePeriod);
    } else {
      uint256 remaining = periodFinish.sub(block.timestamp);
      uint256 leftoverDPX = remaining.mul(rewardRateDPX);
      uint256 leftoverRDPX = remaining.mul(rewardRateRDPX);
      rewardRateDPX = rewardDPX.add(leftoverDPX).div(rewardsDuration);
      rewardRateRDPX = rewardRDPX.add(leftoverRDPX).div(rewardsDuration);
      lastUpdateTime = block.timestamp;
      periodFinish = block.timestamp.add(rewardsDuration);
    }
    emit RewardAdded(rewardDPX, rewardRDPX);
  }

  function addToContractWhitelist(address _contract) external onlyOwner returns (bool) {
    require(isContract(_contract), 'StakingRewards: Address must be a contract address');
    require(!whitelistedContracts[_contract], 'StakingRewards: Contract already whitelisted');

    whitelistedContracts[_contract] = true;

    emit AddToContractWhitelist(_contract);

    return true;
  }

  function removeFromContractWhitelist(address _contract) external onlyOwner returns (bool) {
    require(whitelistedContracts[_contract], 'StakingRewards: Contract not whitelisted');

    whitelistedContracts[_contract] = false;

    emit RemoveFromContractWhitelist(_contract);

    return true;
  }

  /* ========== MODIFIERS ========== */

  // Modifier is eligible sender modifier
  modifier isEligibleSender() {
    if (isContract(msg.sender))
      require(whitelistedContracts[msg.sender], 'StakingRewards: Contract must be whitelisted');
    _;
  }

  // Modifier Set Reward modifier
  modifier setReward(address account) {
    (rewardPerTokenStoredDPX, rewardPerTokenStoredRDPX) = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (account != address(0)) {
      (rewardsDPX[account], rewardsRDPX[account]) = earned(account);
      userDPXRewardPerTokenPaid[account] = rewardPerTokenStoredDPX;
      userRDPXRewardPerTokenPaid[account] = rewardPerTokenStoredRDPX;
    }
    _;
  }

  // Modifier *Update Reward modifier*
  modifier updateReward(address account) {
    (rewardPerTokenStoredDPX, rewardPerTokenStoredRDPX) = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (account != address(0)) {
      (rewardsDPX[account], rewardsRDPX[account]) = earned(account);
      userDPXRewardPerTokenPaid[account] = rewardPerTokenStoredDPX;
      userRDPXRewardPerTokenPaid[account] = rewardPerTokenStoredRDPX;
    }
    _;
  }

  /* ========== EVENTS ========== */

  event RewardUpdated(uint256 rewardDPX, uint256 rewardRDPX);
  event RewardAdded(uint256 rewardDPX, uint256 rewardRDPX);
  event Staked(address indexed user, uint256 amount);
  event Withdrawn(address indexed user, uint256 amount);
  event RewardPaid(address indexed user, uint256 reward);
  event RewardCompounded(address indexed user, uint256 rewardDPX);
  event AddToContractWhitelist(address indexed _contract);
  event RemoveFromContractWhitelist(address indexed _contract);
}

interface IUniswapV2ERC20 {
  function permit(
    address owner,
    address spender,
    uint256 value,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) external;
}

File 2 of 10 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 3 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

File 4 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 6 of 10 : IStakingRewards.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

interface IStakingRewards {
  // Views
  function lastTimeRewardApplicable() external view returns (uint256);

  function rewardPerToken() external view returns (uint256, uint256);

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

  function getRewardForDuration() external view returns (uint256, uint256);

  function totalSupply() external view returns (uint256);

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

  // Mutative

  function stake(uint256 amount) external payable;

  function withdraw(uint256 amount) external;

  function getReward(uint256 rewardsTokenID) external;

  function exit() external;
}

File 7 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

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

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsTokenDPX","type":"address"},{"internalType":"address","name":"_rewardsTokenRDPX","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"},{"internalType":"uint256","name":"_boostedTimePeriod","type":"uint256"},{"internalType":"uint256","name":"_boost","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"}],"name":"AddToContractWhitelist","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":"_contract","type":"address"}],"name":"RemoveFromContractWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"}],"name":"RewardCompounded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"RewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"addToContractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedTimePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"DPXtokensEarned","type":"uint256"},{"internalType":"uint256","name":"RDPXtokensEarned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardsTokenID","type":"uint256"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeFromContractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStoredDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStoredRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenRDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userDPXRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRDPXRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040526000600555600060065560006007556000600855600060095534801561002957600080fd5b5060405161252f38038061252f833981810160405260c081101561004c57600080fd5b508051602082015160408301516060840151608085015160a090950151600160009081559495939492939192610080610120565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600280546001600160a01b03199081166001600160a01b039889161790915560038054821696881696909617909555600480549095169390951692909217909255600a91909155600e55600555610124565b3390565b6123fc806101336000396000f3fe6080604052600436106102195760003560e01c80638da5cb5b11610123578063c11e1e4b116100ab578063e363208e1161006f578063e363208e14610694578063e9fad8ee146106a9578063ebe2b12b146106be578063f2fde38b146106d3578063f69e20461461070657610219565b8063c11e1e4b146105ef578063c3d9ed3914610622578063c8f33c9114610655578063c9b6b2b11461066a578063cd3daf9d1461067f57610219565b8063ac2c5413116100f2578063ac2c54131461054a578063acc3a0061461055f578063ad46a40c14610592578063af640d0f146105a7578063bc1e25dc146105bc57610219565b80638da5cb5b146104d0578063a1411e67146104e5578063a66f42c014610518578063a694fc3a1461052d57610219565b8063370243dc116101a657806370a082311161017557806370a0823114610449578063715018a61461047c57806372f702f31461049157806380faa57d146104a65780638a0dfa0d146104bb57610219565b8063370243dc146103d7578063386a9525146103ec57806338736f4914610401578063391feebb1461041657610219565b806318156416116101ed578063181564161461030957806318160ddd1461033c5780631c4b774b14610351578063246132f91461037d5780632e1a7d4d146103ad57610219565b80628cc2621461021e5780630131c8701461026a578063080b3ead1461029b57806316279055146102c2575b600080fd5b34801561022a57600080fd5b506102516004803603602081101561024157600080fd5b50356001600160a01b031661071b565b6040805192835260208301919091528051918290030190f35b34801561027657600080fd5b5061027f6107f2565b604080516001600160a01b039092168252519081900360200190f35b3480156102a757600080fd5b506102b0610801565b60408051918252519081900360200190f35b3480156102ce57600080fd5b506102f5600480360360208110156102e557600080fd5b50356001600160a01b0316610807565b604080519115158252519081900360200190f35b34801561031557600080fd5b506102b06004803603602081101561032c57600080fd5b50356001600160a01b031661080d565b34801561034857600080fd5b506102b061081f565b34801561035d57600080fd5b5061037b6004803603602081101561037457600080fd5b5035610825565b005b34801561038957600080fd5b5061037b600480360360408110156103a057600080fd5b5080359060200135610b37565b3480156103b957600080fd5b5061037b600480360360208110156103d057600080fd5b5035610d41565b3480156103e357600080fd5b50610251610f39565b3480156103f857600080fd5b506102b0611137565b34801561040d57600080fd5b506102b061113d565b34801561042257600080fd5b506102f56004803603602081101561043957600080fd5b50356001600160a01b0316611143565b34801561045557600080fd5b506102b06004803603602081101561046c57600080fd5b50356001600160a01b0316611158565b34801561048857600080fd5b5061037b611173565b34801561049d57600080fd5b5061027f611215565b3480156104b257600080fd5b506102b0611224565b3480156104c757600080fd5b506102b0611239565b3480156104dc57600080fd5b5061027f61123f565b3480156104f157600080fd5b506102b06004803603602081101561050857600080fd5b50356001600160a01b031661124e565b34801561052457600080fd5b506102b0611260565b61037b6004803603602081101561054357600080fd5b5035611266565b34801561055657600080fd5b506102b061145e565b34801561056b57600080fd5b506102f56004803603602081101561058257600080fd5b50356001600160a01b0316611464565b34801561059e57600080fd5b506102b06115ab565b3480156105b357600080fd5b506102b06115b1565b3480156105c857600080fd5b506102b0600480360360208110156105df57600080fd5b50356001600160a01b03166115b7565b3480156105fb57600080fd5b506102b06004803603602081101561061257600080fd5b50356001600160a01b03166115c9565b34801561062e57600080fd5b506102f56004803603602081101561064557600080fd5b50356001600160a01b03166115db565b34801561066157600080fd5b506102b06116da565b34801561067657600080fd5b506102b06116e0565b34801561068b57600080fd5b506102516116e6565b3480156106a057600080fd5b5061027f6118d1565b3480156106b557600080fd5b5061037b6118e0565b3480156106ca57600080fd5b506102b0611905565b3480156106df57600080fd5b5061037b600480360360208110156106f657600080fd5b50356001600160a01b031661190b565b34801561071257600080fd5b5061037b611a04565b6000806000806107296116e6565b6001600160a01b0387166000908152601360209081526040808320546011909252909120549294509092506107a09161079a90670de0b6b3a76400009061079490610775908890611ca2565b6001600160a01b038b1660009081526015602052604090205490611ced565b90611d46565b90611d88565b6001600160a01b0386166000908152601460209081526040808320546012909252909120549195506107e99161079a90670de0b6b3a76400009061079490610775908790611ca2565b92505050915091565b6002546001600160a01b031681565b60085481565b3b151590565b60126020526000908152604090205481565b60165490565b6002600054141561086b576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b6002600055336108796116e6565b600d55600c55610887611224565b600b556001600160a01b038116156108e5576108a28161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b816109b157336000908152601360205260409020548061094c576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b33600081815260136020526040812055600254610975916001600160a01b039091169083611de2565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610b2e565b8160011415610a45573360009081526014602052604090205480610a1c576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b33600081815260146020526040812055600354610975916001600160a01b039091169083611de2565b336000908152601360209081526040808320546014909252909120548115610a905733600081815260136020526040812055600254610a90916001600160a01b039091169084611de2565b8015610abf5733600081815260146020526040812055600354610abf916001600160a01b039091169083611de2565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b50506001600055565b610b3f611e39565b6001546001600160a01b03908116911614610b8f576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6000610b996116e6565b600d55600c55610ba7611224565b600b556001600160a01b03811615610c0557610bc28161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b600654610c7a57610c2d610c26600e54600a54611d8890919063ffffffff16565b8490611d46565b600855600e54600a54610c4b91610c449190611d88565b8390611d46565b60095542600b819055600a54610c619190611d88565b600655600e54610c72904290611d88565b600755610d01565b600654600090610c8a9042611ca2565b90506000610ca360085483611ced90919063ffffffff16565b90506000610cbc60095484611ced90919063ffffffff16565b600a54909150610cd0906107948885611d88565b600855600a54610ce4906107948784611d88565b60095542600b819055600a54610cfa9190611d88565b6006555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b60026000541415610d87576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b600260005533610d956116e6565b600d55600c55610da3611224565b600b556001600160a01b03811615610e0157610dbe8161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b60008211610e4a576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260156020526040902054821115610ea4576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601654610eb19083611ca2565b60165533600090815260156020526040902054610ece9083611ca2565b33600081815260156020526040902091909155600454610efa916001600160a01b039091169084611de2565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506001600055565b600080610f44611e39565b6001546001600160a01b03908116911614610f94576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6000610f9e61123f565b90506001600160a01b03811633141561112a57600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610ffc57600080fd5b505afa158015611010573d6000803e3d6000fd5b505050506040513d602081101561102657600080fd5b5051600354604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561107957600080fd5b505afa15801561108d573d6000803e3d6000fd5b505050506040513d60208110156110a357600080fd5b50516002546004549192506001600160a01b03918216911614156110cd57601654820391506110ec565b6003546004546001600160a01b03908116911614156110ec5760165490035b42600655600254611107906001600160a01b03168484611de2565b60035461111e906001600160a01b03168483611de2565b90935091506111339050565b60008092509250505b9091565b600a5481565b600c5481565b60106020526000908152604090205460ff1681565b6001600160a01b031660009081526015602052604090205490565b61117b611e39565b6001546001600160a01b039081169116146111cb576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6004546001600160a01b031681565b60008061123342600654611e3d565b91505090565b60095481565b6001546001600160a01b031690565b60146020526000908152604090205481565b60055481565b61126f33610807565b156112c2573360009081526010602052604090205460ff166112c25760405162461bcd60e51b815260040180806020018281038252602c815260200180612349602c913960400191505060405180910390fd5b60026000541415611308576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b6002600055336113166116e6565b600d55600c55611324611224565b600b556001600160a01b038116156113825761133f8161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b600082116113c8576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6016546113d59083611d88565b601655336000908152601560205260409020546113f29083611d88565b3360008181526015602052604090209190915560045461141f916001600160a01b03909116903085611e53565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001600055565b60075481565b600061146e611e39565b6001546001600160a01b039081169116146114be576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6114c782610807565b6115025760405162461bcd60e51b81526004018080602001828103825260328152602001806122d66032913960400191505060405180910390fd5b6001600160a01b03821660009081526010602052604090205460ff161561155a5760405162461bcd60e51b815260040180806020018281038252602c81526020018061225e602c913960400191505060405180910390fd5b6001600160a01b038216600081815260106020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a2506001919050565b600d5481565b600f5481565b60116020526000908152604090205481565b60136020526000908152604090205481565b60006115e5611e39565b6001546001600160a01b03908116911614611635576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526010602052604090205460ff1661168c5760405162461bcd60e51b815260040180806020018281038252602881526020018061239f6028913960400191505060405180910390fd5b6001600160a01b038216600081815260106020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b600b5481565b600e5481565b60008060165460001415611701575050600c54600d54611133565b6007544210156117a857600061175f611756601654610794670de0b6b3a764000061175061173c600554600854611ced90919063ffffffff16565b611750600b5461174a611224565b90611ca2565b90611ced565b600c5490611d88565b9050600061179b611792601654610794670de0b6b3a764000061175061173c600554600954611ced90919063ffffffff16565b600d5490611d88565b9193509091506111339050565b600754600b54101561187957600061181d6117df601654610794670de0b6b3a764000061175060085461175060075461174a611224565b61079a611756601654610794670de0b6b3a764000061175061180e600554600854611ced90919063ffffffff16565b600b5460075461175091611ca2565b9050600061179b61184a601654610794670de0b6b3a764000061175060095461175060075461174a611224565b61079a611792601654610794670de0b6b3a764000061175061180e600554600954611ced90919063ffffffff16565b60006118a4611756601654610794670de0b6b3a7640000611750600854611750600b5461174a611224565b9050600061179b611792601654610794670de0b6b3a7640000611750600954611750600b5461174a611224565b6003546001600160a01b031681565b6118ea6002610825565b3360009081526015602052604090205461190390610d41565b565b60065481565b611913611e39565b6001546001600160a01b03908116911614611963576040805162461bcd60e51b81526020600482018190526024820152600080516020612329833981519152604482015290519081900360640190fd5b6001600160a01b0381166119a85760405162461bcd60e51b815260040180806020018281038252602681526020018061228a6026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b60026000541415611a4a576040805162461bcd60e51b815260206004820152601f602482015260008051602061223e833981519152604482015290519081900360640190fd5b600260005533611a586116e6565b600d55600c55611a66611224565b600b556001600160a01b03811615611ac457611a818161071b565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600c546011835283822055600d54601290925291909120555b6002546004546001600160a01b0390811691161415611bc2573360009081526013602052604090205480611b39576040805162461bcd60e51b81526020600482015260176024820152761cdd185ad9481859191c995cdcc81b9bdd08199bdd5b99604a1b604482015290519081900360640190fd5b33600090815260136020526040812055601654611b569082611d88565b60165533600090815260156020526040902054611b739082611d88565b33600081815260156020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a250611c9a565b6003546004546001600160a01b0390811691161415611c54573360009081526014602052604090205480611c37576040805162461bcd60e51b81526020600482015260176024820152761cdd185ad9481859191c995cdcc81b9bdd08199bdd5b99604a1b604482015290519081900360640190fd5b33600090815260146020526040812055601654611b569082611d88565b6040805162461bcd60e51b81526020600482015260166024820152751cdd185ada5b99d51bdad95b881b9bdd08199bdd5b9960521b604482015290519081900360640190fd5b506001600055565b6000611ce483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611eb3565b90505b92915050565b600082611cfc57506000611ce7565b82820282848281611d0957fe5b0414611ce45760405162461bcd60e51b81526004018080602001828103825260218152602001806123086021913960400191505060405180910390fd5b6000611ce483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f4f565b600082820183811015611ce4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611e34908490611fb4565b505050565b3390565b6000818310611e4c5781611ce4565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611ead908590611fb4565b50505050565b60008184841115611f425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f07578181015183820152602001611eef565b50505050905090810190601f168015611f345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611f9e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611f07578181015183820152602001611eef565b506000838581611faa57fe5b0495945050505050565b6000612009826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120659092919063ffffffff16565b805190915015611e345780806020019051602081101561202857600080fd5b5051611e345760405162461bcd60e51b815260040180806020018281038252602a815260200180612375602a913960400191505060405180910390fd5b6060612074848460008561207c565b949350505050565b6060824710156120bd5760405162461bcd60e51b81526004018080602001828103825260268152602001806122b06026913960400191505060405180910390fd5b6120c685610807565b612117576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106121555780518252601f199092019160209182019101612136565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146121b7576040519150601f19603f3d011682016040523d82523d6000602084013e6121bc565b606091505b50915091506121cc8282866121d7565b979650505050505050565b606083156121e6575081611f48565b8251156121f65782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611f07578181015183820152602001611eef56fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005374616b696e67526577617264733a20436f6e747261637420616c72656164792077686974656c69737465644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e67526577617264733a2041646472657373206d757374206265206120636f6e74726163742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e67526577617264733a20436f6e7472616374206d7573742062652077686974656c69737465645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645374616b696e67526577617264733a20436f6e7472616374206e6f742077686974656c6973746564a2646970667358221220231ff7c7bfe9b9cf0683b82ceb78610038dae76ab82c2ba48b9195d3a5d472b464736f6c634300070600330000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a21200000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212000000000000000000000000000000000000000000000000000000000076a7000000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000000002

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.