Contract 0x03ac1Aa1ff470cf376e6b7cD3A3389Ad6D922A74 2

 

Contract Overview

Dopex: rDPX-WETH Staking Rewards
Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9975354393a59df46f5f882287cd1fb603476a1faecf878b7e8b1811021dcea5Withdraw196537832022-08-07 20:25:288 hrs 49 mins ago0xd7cb828a9b376c3e59b3505e2bffef92f241caf3 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000055980128 ETH
0xe899b62cc88212d3d8f17dc3dec6561f99ff4bfb6e489040fb33f8a6264733d4Withdraw196532572022-08-07 20:14:469 hrs ago0x09893eb5f2dc504d08a29ce269692129fe3123ed IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000067160657 ETH
0x0af36fa4382de487157506173d8e94af9110b13c4e83b142ea3c582ddc4aa5a9Withdraw196522982022-08-07 19:55:009 hrs 20 mins ago0x4f92a9bf8f6269f789c947164297bdfcabc1ed20 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.00006715742 ETH
0x2d184506884d02fb2d1957c299e915bf90091629f8edf53af86ac0356ae13764Withdraw196519472022-08-07 19:47:429 hrs 27 mins ago0x6221d0cf95db2141621d21d0c1f55a24dac80b39 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000061982546 ETH
0x23d2c470907173b6b7ab2a2c83d4a18949f356c78c8bbf9a7b8ee2ad327bb692Withdraw196496452022-08-07 18:51:4710 hrs 23 mins ago0x271c02f88d9c2388f5fbe2a35bc61adcdda4f26a IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000061649713 ETH
0x113237ea3b5745e952387bf0513ea591a23469cb233fb9829ab2acbcb9d76b31Withdraw196450092022-08-07 17:16:1311 hrs 59 mins ago0xbee2d469aacb46251ae33cca91f482e26c971dff IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000046769502 ETH
0xd4890ee0483ccb29360c52cc79163cbce2e43424812881731b25e170fd20db03Withdraw196447512022-08-07 17:12:1512 hrs 3 mins ago0xbee2d469aacb46251ae33cca91f482e26c971dff IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000051827221 ETH
0xbfd62ef2b7758f6420229b205c19a36a2b7af483fd29bc55b483945c9704c12fWithdraw196341582022-08-07 14:28:3814 hrs 46 mins ago0x90cc95bb898e89ed267ba97d70af75619c490c35 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.00004707967 ETH
0xe8d40e2c6b377c91c2de2792adb32b201987d123b58580d9a87b371827b3758bWithdraw196247202022-08-07 12:33:4116 hrs 41 mins ago0xc90bdaffa6bd488da7649744b6343e38b1f8a446 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000039347371 ETH
0xad6aebe43142b139885209663a042daa80bbf8e3324cb0ddf4d25fbaac3452b7Withdraw196083002022-08-07 8:52:0020 hrs 23 mins ago0x135a6d9d29e3c764b708a3b122385416f3a22329 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000041687114 ETH
0xc16c976f37c65f60dc4c8fa890d7b61765c52eb45231b450e8166beb78815605Withdraw195818332022-08-07 1:13:141 day 4 hrs ago0xc82a1b583607dd4ee0a33e21e8a4e0f786921c30 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000047752275 ETH
0x68e79bdb79eb8c1952350df2200156483098d77607646fda7e20fbb28d8962e0Withdraw195728252022-08-06 22:01:231 day 7 hrs ago0x189602efac96258878e411c1dcc0e5183133260c IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000052616361 ETH
0x4b77274285d57a7e82ab2e142b279b8415b116d034999c867bfda82ebe2fbc1bWithdraw195388682022-08-06 13:07:181 day 16 hrs ago0x35aa3f733958b7416669303945093c98819f77a6 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000058262728 ETH
0x828af805f9c50c058a327f3407056364427614819fb214703d29db035ff9ba7aWithdraw195097122022-08-06 4:41:242 days 34 mins ago0x863a3dc56a345ea43610e7a840b264fec3ca4c09 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000087648761 ETH
0x0a49d3e648d20f54555a15717b16028d60133deacbc8a3bd4799c5f34db2fe38Withdraw195080332022-08-06 4:04:232 days 1 hr ago0x578768d2c7c5beb60cccfc148a563c8378e281ec IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000073291845 ETH
0xb068d657fc156761a9d94194b052c92b64654aebbaa345500ebdb481eb013804Withdraw194833162022-08-05 19:30:152 days 9 hrs ago0xcd8750c61c383cee6b91e836316ee92c026bc2d6 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000091289265 ETH
0x4c628ff9d6f7fedc7e4811acaba6b66b844a191c9f41f5b6b365bb537e7100b6Withdraw194532302022-08-05 12:40:262 days 16 hrs ago0xb1e7a45cb50998c5f7fc749b5fedc995e2ea85c2 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000059603591 ETH
0xfc6343833ee8acb12f1c9dc5c218cee7063ae3fba1a334eee53648825c318cc3Withdraw194220542022-08-05 4:56:163 days 19 mins ago0x75a7706c8ee7799152f82b249f53f57224cbc010 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000066302373 ETH
0x032ac79bf3b3e401bd6cc7b14e599bd978e28befffceeccf1830818c064461d3Withdraw193979482022-08-04 20:26:293 days 8 hrs ago0x88a26a07ac1d80bb6544d85da1c1d6089bc7d39f IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000072758536 ETH
0x92893ad8a901e3663fa1bc28e4ad32afdd2418eafd6e501b8f05d294b6a1c2a0Withdraw193897812022-08-04 17:37:063 days 11 hrs ago0xd56ba2c35537c4f1b926a02dba0e46241a18c66f IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000084304378 ETH
0xc4396a3da11dce446c930d73bab98dcfd36c9b7c6d98d3c52850075a8eccc6d6Withdraw193453632022-08-04 5:57:293 days 23 hrs ago0xe599677329594b30f985b9f4e6a4ad8272f87318 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000077850385 ETH
0x4ad3bf5f12c397d3489df8a85bd513a95955b657e912715f36b0a646c169b4a6Withdraw193395392022-08-04 3:55:394 days 1 hr ago0xc3ec0ebe3d27ec331a8533efbe2c2b67a5e42dcc IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000079871184 ETH
0x54364c6143ee820eb5bdfdf4553c738075e00d584f3d5350dfa817326a57aab6Withdraw193263522022-08-04 0:17:534 days 4 hrs ago0xb215627ef2ff410d67eb9d8dec14d533b234051e IN Dopex: rDPX-WETH Staking Rewards0 ETH0.00008322806 ETH
0x4cad7bd6c4c9bb56f02c6bb70144fd3428dfc48552ed3ca20700efae1b578ad8Withdraw192966462022-08-03 16:16:574 days 12 hrs ago0xf2cb34e7bcaafaa3cf12e55f1e95dc2183b3f147 IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000057844766 ETH
0x341428dbeb30b29c1a1fa14f9da7a6085f75b0073318400ac3a02e43a39f307fWithdraw192913432022-08-03 14:48:024 days 14 hrs ago0x99697e5c8fcc8601531c348e54f39a6cc3ddfece IN Dopex: rDPX-WETH Staking Rewards0 ETH0.000050041842 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x9975354393a59df46f5f882287cd1fb603476a1faecf878b7e8b1811021dcea5196537832022-08-07 20:25:288 hrs 49 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xe899b62cc88212d3d8f17dc3dec6561f99ff4bfb6e489040fb33f8a6264733d4196532572022-08-07 20:14:469 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x0af36fa4382de487157506173d8e94af9110b13c4e83b142ea3c582ddc4aa5a9196522982022-08-07 19:55:009 hrs 20 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x2d184506884d02fb2d1957c299e915bf90091629f8edf53af86ac0356ae13764196519472022-08-07 19:47:429 hrs 27 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x23d2c470907173b6b7ab2a2c83d4a18949f356c78c8bbf9a7b8ee2ad327bb692196496452022-08-07 18:51:4710 hrs 23 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x113237ea3b5745e952387bf0513ea591a23469cb233fb9829ab2acbcb9d76b31196450092022-08-07 17:16:1311 hrs 59 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xd4890ee0483ccb29360c52cc79163cbce2e43424812881731b25e170fd20db03196447512022-08-07 17:12:1512 hrs 3 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xbfd62ef2b7758f6420229b205c19a36a2b7af483fd29bc55b483945c9704c12f196341582022-08-07 14:28:3814 hrs 46 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xe8d40e2c6b377c91c2de2792adb32b201987d123b58580d9a87b371827b3758b196247202022-08-07 12:33:4116 hrs 41 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xad6aebe43142b139885209663a042daa80bbf8e3324cb0ddf4d25fbaac3452b7196083002022-08-07 8:52:0020 hrs 23 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xc16c976f37c65f60dc4c8fa890d7b61765c52eb45231b450e8166beb78815605195818332022-08-07 1:13:141 day 4 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x68e79bdb79eb8c1952350df2200156483098d77607646fda7e20fbb28d8962e0195728252022-08-06 22:01:231 day 7 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x4b77274285d57a7e82ab2e142b279b8415b116d034999c867bfda82ebe2fbc1b195388682022-08-06 13:07:181 day 16 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x828af805f9c50c058a327f3407056364427614819fb214703d29db035ff9ba7a195097122022-08-06 4:41:242 days 34 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x0a49d3e648d20f54555a15717b16028d60133deacbc8a3bd4799c5f34db2fe38195080332022-08-06 4:04:232 days 1 hr ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xb068d657fc156761a9d94194b052c92b64654aebbaa345500ebdb481eb013804194833162022-08-05 19:30:152 days 9 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x4c628ff9d6f7fedc7e4811acaba6b66b844a191c9f41f5b6b365bb537e7100b6194532302022-08-05 12:40:262 days 16 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xfc6343833ee8acb12f1c9dc5c218cee7063ae3fba1a334eee53648825c318cc3194220542022-08-05 4:56:163 days 19 mins ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x032ac79bf3b3e401bd6cc7b14e599bd978e28befffceeccf1830818c064461d3193979482022-08-04 20:26:293 days 8 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x92893ad8a901e3663fa1bc28e4ad32afdd2418eafd6e501b8f05d294b6a1c2a0193897812022-08-04 17:37:063 days 11 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0xc4396a3da11dce446c930d73bab98dcfd36c9b7c6d98d3c52850075a8eccc6d6193453632022-08-04 5:57:293 days 23 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x4ad3bf5f12c397d3489df8a85bd513a95955b657e912715f36b0a646c169b4a6193395392022-08-04 3:55:394 days 1 hr ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x54364c6143ee820eb5bdfdf4553c738075e00d584f3d5350dfa817326a57aab6193263522022-08-04 0:17:534 days 4 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x4cad7bd6c4c9bb56f02c6bb70144fd3428dfc48552ed3ca20700efae1b578ad8192966462022-08-03 16:16:574 days 12 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
0x341428dbeb30b29c1a1fa14f9da7a6085f75b0073318400ac3a02e43a39f307f192913432022-08-03 14:48:024 days 14 hrs ago Dopex: rDPX-WETH Staking Rewards0x7418f5a2621e13c05d1efbd71ec922070794b90a0 ETH
[ Download CSV Export 
Loading

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

Contract Name:
StakingRewards

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 11 : StakingRewards.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';
import './RewardsDistributionRecipient.sol';

contract StakingRewards is RewardsDistributionRecipient, 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 _rewardsDistribution,
    address _rewardsTokenDPX,
    address _rewardsTokenRDPX,
    address _stakingToken,
    uint256 _rewardsDuration,
    uint256 _boostedTimePeriod,
    uint256 _boost,
    uint256 _id
  ) Ownable() {
    rewardsTokenDPX = IERC20(_rewardsTokenDPX);
    rewardsTokenRDPX = IERC20(_rewardsTokenRDPX);
    stakingToken = IERC20(_stakingToken);
    rewardsDistribution = _rewardsDistribution;
    rewardsDuration = _rewardsDuration;
    boostedTimePeriod = _boostedTimePeriod;
    boost = _boost;
    id = _id;
  }

  /* ========== 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(uint256 amountDPX, uint256 amountRDPX)
    public
    onlyOwner
    returns (uint256, uint256)
  {
    address OwnerAddress = owner();
    if (OwnerAddress == msg.sender) {
      IERC20(rewardsTokenDPX).safeTransfer(OwnerAddress, amountDPX);
      IERC20(rewardsTokenRDPX).safeTransfer(OwnerAddress, amountRDPX);
    }
    return (amountDPX, amountRDPX);
  }

  function compound() public nonReentrant updateReward(msg.sender) {
    uint256 rewardDPX = rewardsDPX[msg.sender];
    require(rewardDPX > 0, 'stake address not found');
    require(rewardsTokenDPX == stakingToken, "Can't stake the reward token.");
    rewardsDPX[msg.sender] = 0;
    _totalSupply = _totalSupply.add(rewardDPX);
    _balances[msg.sender] = _balances[msg.sender].add(rewardDPX);
    emit RewardCompounded(msg.sender, rewardDPX);
  }

  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
    override
    onlyRewardsDistribution
    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 11 : 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 11 : 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 11 : 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 11 : 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 11 : 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 11 : 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 11 : 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 11 : RewardsDistributionRecipient.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

abstract contract RewardsDistributionRecipient {
  address public rewardsDistribution;

  function notifyRewardAmount(uint256 rewardDPX, uint256 rewardRDPX) external virtual;

  modifier onlyRewardsDistribution() {
    require(msg.sender == rewardsDistribution, 'Caller is not RewardsDistribution contract');
    _;
  }
}

File 10 of 11 : 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 11 of 11 : 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":"_rewardsDistribution","type":"address"},{"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"},{"internalType":"uint256","name":"_id","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":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"uint256","name":"amountDPX","type":"uint256"},{"internalType":"uint256","name":"amountRDPX","type":"uint256"}],"name":"withdrawRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

608060405260006006556000600755600060085560006009556000600a5534801561002957600080fd5b506040516123de3803806123de833981810160405261010081101561004d57600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015160018055959694959394929391929091600061008e610144565b600280546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b03199081166001600160a01b03998a16179091556004805482169789169790971790965560058054871695881695909517909455600080549095169690951695909517909255600b91909155600f92909255600655601055610148565b3390565b612287806101576000396000f3fe6080604052600436106102245760003560e01c80638da5cb5b11610123578063c11e1e4b116100ab578063e363208e1161006f578063e363208e146106cf578063e9fad8ee146106e4578063ebe2b12b146106f9578063f2fde38b1461070e578063f69e20461461074157610224565b8063c11e1e4b1461062a578063c3d9ed391461065d578063c8f33c9114610690578063c9b6b2b1146106a5578063cd3daf9d146106ba57610224565b8063ac2c5413116100f2578063ac2c541314610585578063acc3a0061461059a578063ad46a40c146105cd578063af640d0f146105e2578063bc1e25dc146105f757610224565b80638da5cb5b1461050b578063a1411e6714610520578063a66f42c014610553578063a694fc3a1461056857610224565b80632e1a7d4d116101b157806370a082311161017557806370a0823114610484578063715018a6146104b757806372f702f3146104cc57806380faa57d146104e15780638a0dfa0d146104f657610224565b80632e1a7d4d146103e8578063386a95251461041257806338736f4914610427578063391feebb1461043c5780633fc6df6e1461046f57610224565b806318156416116101f8578063181564161461031457806318160ddd146103475780631c4b774b1461035c578063246132f9146103885780632729f584146103b857610224565b80628cc262146102295780630131c87014610275578063080b3ead146102a657806316279055146102cd575b600080fd5b34801561023557600080fd5b5061025c6004803603602081101561024c57600080fd5b50356001600160a01b0316610756565b6040805192835260208301919091528051918290030190f35b34801561028157600080fd5b5061028a61082d565b604080516001600160a01b039092168252519081900360200190f35b3480156102b257600080fd5b506102bb61083c565b60408051918252519081900360200190f35b3480156102d957600080fd5b50610300600480360360208110156102f057600080fd5b50356001600160a01b0316610842565b604080519115158252519081900360200190f35b34801561032057600080fd5b506102bb6004803603602081101561033757600080fd5b50356001600160a01b0316610848565b34801561035357600080fd5b506102bb61085a565b34801561036857600080fd5b506103866004803603602081101561037f57600080fd5b5035610860565b005b34801561039457600080fd5b50610386600480360360408110156103ab57600080fd5b5080359060200135610b71565b3480156103c457600080fd5b5061025c600480360360408110156103db57600080fd5b5080359060200135610d6c565b3480156103f457600080fd5b506103866004803603602081101561040b57600080fd5b5035610e1b565b34801561041e57600080fd5b506102bb611012565b34801561043357600080fd5b506102bb611018565b34801561044857600080fd5b506103006004803603602081101561045f57600080fd5b50356001600160a01b031661101e565b34801561047b57600080fd5b5061028a611033565b34801561049057600080fd5b506102bb600480360360208110156104a757600080fd5b50356001600160a01b0316611042565b3480156104c357600080fd5b5061038661105d565b3480156104d857600080fd5b5061028a6110ff565b3480156104ed57600080fd5b506102bb61110e565b34801561050257600080fd5b506102bb611123565b34801561051757600080fd5b5061028a611129565b34801561052c57600080fd5b506102bb6004803603602081101561054357600080fd5b50356001600160a01b0316611138565b34801561055f57600080fd5b506102bb61114a565b6103866004803603602081101561057e57600080fd5b5035611150565b34801561059157600080fd5b506102bb611347565b3480156105a657600080fd5b50610300600480360360208110156105bd57600080fd5b50356001600160a01b031661134d565b3480156105d957600080fd5b506102bb611494565b3480156105ee57600080fd5b506102bb61149a565b34801561060357600080fd5b506102bb6004803603602081101561061a57600080fd5b50356001600160a01b03166114a0565b34801561063657600080fd5b506102bb6004803603602081101561064d57600080fd5b50356001600160a01b03166114b2565b34801561066957600080fd5b506103006004803603602081101561068057600080fd5b50356001600160a01b03166114c4565b34801561069c57600080fd5b506102bb6115c3565b3480156106b157600080fd5b506102bb6115c9565b3480156106c657600080fd5b5061025c6115cf565b3480156106db57600080fd5b5061028a6117be565b3480156106f057600080fd5b506103866117cd565b34801561070557600080fd5b506102bb6117f2565b34801561071a57600080fd5b506103866004803603602081101561073157600080fd5b50356001600160a01b03166117f8565b34801561074d57600080fd5b506103866118f1565b6000806000806107646115cf565b6001600160a01b0387166000908152601460209081526040808320546012909252909120549294509092506107db916107d590670de0b6b3a7640000906107cf906107b0908890611b03565b6001600160a01b038b1660009081526016602052604090205490611b4e565b90611ba7565b90611be9565b6001600160a01b038616600090815260156020908152604080832054601390925290912054919550610824916107d590670de0b6b3a7640000906107cf906107b0908790611b03565b92505050915091565b6003546001600160a01b031681565b60095481565b3b151590565b60136020526000908152604090205481565b60175490565b600260015414156108a6576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336108b46115cf565b600e55600d556108c261110e565b600c556001600160a01b03811615610920576108dd81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b816109ec573360009081526014602052604090205480610987576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b336000818152601460205260408120556003546109b0916001600160a01b039091169083611c43565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610b69565b8160011415610a80573360009081526015602052604090205480610a57576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b336000818152601560205260408120556004546109b0916001600160a01b039091169083611c43565b336000908152601460209081526040808320546015909252909120548115610acb5733600081815260146020526040812055600354610acb916001600160a01b039091169084611c43565b8015610afa5733600081815260156020526040812055600454610afa916001600160a01b039091169083611c43565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b505060018055565b6000546001600160a01b03163314610bba5760405162461bcd60e51b815260040180806020018281038252602a8152602001806121d6602a913960400191505060405180910390fd5b6000610bc46115cf565b600e55600d55610bd261110e565b600c556001600160a01b03811615610c3057610bed81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600754610ca557610c58610c51600f54600b54611be990919063ffffffff16565b8490611ba7565b600955600f54600b54610c7691610c6f9190611be9565b8390611ba7565b600a5542600c819055600b54610c8c9190611be9565b600755600f54610c9d904290611be9565b600855610d2c565b600754600090610cb59042611b03565b90506000610cce60095483611b4e90919063ffffffff16565b90506000610ce7600a5484611b4e90919063ffffffff16565b600b54909150610cfb906107cf8885611be9565b600955600b54610d0f906107cf8784611be9565b600a5542600c819055600b54610d259190611be9565b6007555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b600080610d77611c9a565b6002546001600160a01b03908116911614610dc7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6000610dd1611129565b90506001600160a01b038116331415610e1257600354610dfb906001600160a01b03168287611c43565b600454610e12906001600160a01b03168286611c43565b50929391925050565b60026001541415610e61576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b600260015533610e6f6115cf565b600e55600d55610e7d61110e565b600c556001600160a01b03811615610edb57610e9881610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b60008211610f24576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260166020526040902054821115610f7e576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601754610f8b9083611b03565b60175533600090815260166020526040902054610fa89083611b03565b33600081815260166020526040902091909155600554610fd4916001600160a01b039091169084611c43565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b600b5481565b600d5481565b60116020526000908152604090205460ff1681565b6000546001600160a01b031681565b6001600160a01b031660009081526016602052604090205490565b611065611c9a565b6002546001600160a01b039081169116146110b5576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6005546001600160a01b031681565b60008061111d42600754611c9e565b91505090565b600a5481565b6002546001600160a01b031690565b60156020526000908152604090205481565b60065481565b61115933610842565b156111ac573360009081526011602052604090205460ff166111ac5760405162461bcd60e51b815260040180806020018281038252602c8152602001806121aa602c913960400191505060405180910390fd5b600260015414156111f2576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336112006115cf565b600e55600d5561120e61110e565b600c556001600160a01b0381161561126c5761122981610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b600082116112b2576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6017546112bf9083611be9565b601755336000908152601660205260409020546112dc9083611be9565b33600081815260166020526040902091909155600554611309916001600160a01b03909116903085611cb4565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60085481565b6000611357611c9a565b6002546001600160a01b039081169116146113a7576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6113b082610842565b6113eb5760405162461bcd60e51b81526004018080602001828103825260328152602001806121376032913960400191505060405180910390fd5b6001600160a01b03821660009081526011602052604090205460ff16156114435760405162461bcd60e51b815260040180806020018281038252602c8152602001806120bf602c913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a2506001919050565b600e5481565b60105481565b60126020526000908152604090205481565b60146020526000908152604090205481565b60006114ce611c9a565b6002546001600160a01b0390811691161461151e576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff166115755760405162461bcd60e51b815260040180806020018281038252602881526020018061222a6028913960400191505060405180910390fd5b6001600160a01b038216600081815260116020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b600c5481565b600f5481565b600080601754600014156115ea575050600d54600e546117ba565b60085442101561169157600061164861163f6017546107cf670de0b6b3a7640000611639611625600654600954611b4e90919063ffffffff16565b611639600c5461163361110e565b90611b03565b90611b4e565b600d5490611be9565b9050600061168461167b6017546107cf670de0b6b3a7640000611639611625600654600a54611b4e90919063ffffffff16565b600e5490611be9565b9193509091506117ba9050565b600854600c5410156117625760006117066116c86017546107cf670de0b6b3a764000061163960095461163960085461163361110e565b6107d561163f6017546107cf670de0b6b3a76400006116396116f7600654600954611b4e90919063ffffffff16565b600c5460085461163991611b03565b905060006116846117336017546107cf670de0b6b3a7640000611639600a5461163960085461163361110e565b6107d561167b6017546107cf670de0b6b3a76400006116396116f7600654600a54611b4e90919063ffffffff16565b600061178d61163f6017546107cf670de0b6b3a7640000611639600954611639600c5461163361110e565b9050600061168461167b6017546107cf670de0b6b3a7640000611639600a54611639600c5461163361110e565b9091565b6004546001600160a01b031681565b6117d76002610860565b336000908152601660205260409020546117f090610e1b565b565b60075481565b611800611c9a565b6002546001600160a01b03908116911614611850576040805162461bcd60e51b8152602060048201819052602482015260008051602061218a833981519152604482015290519081900360640190fd5b6001600160a01b0381166118955760405162461bcd60e51b81526004018080602001828103825260268152602001806120eb6026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611937576040805162461bcd60e51b815260206004820152601f602482015260008051602061209f833981519152604482015290519081900360640190fd5b6002600155336119456115cf565b600e55600d5561195361110e565b600c556001600160a01b038116156119b15761196e81610756565b6001600160a01b0383166000908152601460209081526040808320601583528184209490945593909255600d546012835283822055600e54601390925291909120555b3360009081526014602052604090205480611a13576040805162461bcd60e51b815260206004820152601760248201527f7374616b652061646472657373206e6f7420666f756e64000000000000000000604482015290519081900360640190fd5b6005546003546001600160a01b03908116911614611a78576040805162461bcd60e51b815260206004820152601d60248201527f43616e2774207374616b65207468652072657761726420746f6b656e2e000000604482015290519081900360640190fd5b33600090815260146020526040812055601754611a959082611be9565b60175533600090815260166020526040902054611ab29082611be9565b33600081815260166020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a2505060018055565b6000611b4583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d14565b90505b92915050565b600082611b5d57506000611b48565b82820282848281611b6a57fe5b0414611b455760405162461bcd60e51b81526004018080602001828103825260218152602001806121696021913960400191505060405180910390fd5b6000611b4583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611db0565b600082820183811015611b45576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611c95908490611e15565b505050565b3390565b6000818310611cad5781611b45565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d0e908590611e15565b50505050565b60008184841115611da35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d68578181015183820152602001611d50565b50505050905090810190601f168015611d955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611dff5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d68578181015183820152602001611d50565b506000838581611e0b57fe5b0495945050505050565b6000611e6a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ec69092919063ffffffff16565b805190915015611c9557808060200190516020811015611e8957600080fd5b5051611c955760405162461bcd60e51b815260040180806020018281038252602a815260200180612200602a913960400191505060405180910390fd5b6060611ed58484600085611edd565b949350505050565b606082471015611f1e5760405162461bcd60e51b81526004018080602001828103825260268152602001806121116026913960400191505060405180910390fd5b611f2785610842565b611f78576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611fb65780518252601f199092019160209182019101611f97565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612018576040519150601f19603f3d011682016040523d82523d6000602084013e61201d565b606091505b509150915061202d828286612038565b979650505050505050565b60608315612047575081611da9565b8251156120575782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611d68578181015183820152602001611d5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005374616b696e67526577617264733a20436f6e747261637420616c72656164792077686974656c69737465644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e67526577617264733a2041646472657373206d757374206265206120636f6e74726163742061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725374616b696e67526577617264733a20436f6e7472616374206d7573742062652077686974656c697374656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645374616b696e67526577617264733a20436f6e7472616374206e6f742077686974656c6973746564a26469706673582212206400d657659722aa37069f750df6956dc2079e7cd1833e67a53800e4877395d264736f6c63430007060033000000000000000000000000923c88f0aa5998953c01a23cdd1d82852f94aeea0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a2120000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee550000000000000000000000000000000000000000000000000000000003355680000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001

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.