Contract 0xc046f44ed68014f048eca0010a642749ebe34b03

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4f1a68b7cc2568b959f301f3d140dec407d3330f23b5b9dff7c745d3ba535a53Transfer Ownersh...127336612022-05-22 21:20:12125 days 10 hrs agoPlutusDAO: Deployer IN  Plutus DAO: Dpx Staker0 ETH0.00010878563 ETH
0x0553205dbaa4fb4132bd22cd3894220a0ab784688d20cbbe108bed2a61cbc82bSet Rewards Dist...126335292022-05-21 12:13:49126 days 20 hrs agoPlutusDAO: Deployer IN  Plutus DAO: Dpx Staker0 ETH0.000119651781 ETH
0xde5e19f0a915b39fc879af091e90aa4cfb018fa4f1fb97a757c5b6e89caa8709Set Operator125688592022-05-20 15:07:49127 days 17 hrs agoPlutusDAO: Deployer IN  Plutus DAO: Dpx Staker0 ETH0.000139218504 ETH
0x7a5973c574ab2959c7b5a3e0d999b93f2d86114ebbb24de185afd0232d5aa84a0x61010060125688362022-05-20 15:07:03127 days 17 hrs agoPlutusDAO: Deployer IN  Create: DpxStaker0 ETH0.006453573275 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd9adc05786090c8f3e7b419bb8c0a664a2c5fb98831243429d46141f56f6e954259942402022-09-22 15:26:022 days 16 hrs ago Plutus DAO: Dpx Staker Dopex: rDPX Token0 ETH
0xd9adc05786090c8f3e7b419bb8c0a664a2c5fb98831243429d46141f56f6e954259942402022-09-22 15:26:022 days 16 hrs ago Plutus DAO: Dpx StakerDopex: DPX Token0 ETH
0xd9adc05786090c8f3e7b419bb8c0a664a2c5fb98831243429d46141f56f6e954259942402022-09-22 15:26:022 days 16 hrs ago Plutus DAO: Dpx StakerDopex: Retired DPX Farm0 ETH
0xd9adc05786090c8f3e7b419bb8c0a664a2c5fb98831243429d46141f56f6e954259942402022-09-22 15:26:022 days 16 hrs ago Plutus DAO: Pls-Dpx Rewards Distro Plutus DAO: Dpx Staker0 ETH
0xd9adc05786090c8f3e7b419bb8c0a664a2c5fb98831243429d46141f56f6e954259942402022-09-22 15:26:022 days 16 hrs ago Plutus DAO: Pending Rewards Plutus DAO: Dpx Staker0 ETH
0x71971d98893a88ee407b142f0604048904c56bbb4538198ebbe311675492b405252862042022-09-19 13:37:345 days 18 hrs ago Plutus DAO: Dpx Staker Dopex: rDPX Token0 ETH
0x71971d98893a88ee407b142f0604048904c56bbb4538198ebbe311675492b405252862042022-09-19 13:37:345 days 18 hrs ago Plutus DAO: Dpx StakerDopex: DPX Token0 ETH
0x71971d98893a88ee407b142f0604048904c56bbb4538198ebbe311675492b405252862042022-09-19 13:37:345 days 18 hrs ago Plutus DAO: Dpx StakerDopex: Retired DPX Farm0 ETH
0x71971d98893a88ee407b142f0604048904c56bbb4538198ebbe311675492b405252862042022-09-19 13:37:345 days 18 hrs ago Plutus DAO: Pls-Dpx Rewards Distro Plutus DAO: Dpx Staker0 ETH
0x71971d98893a88ee407b142f0604048904c56bbb4538198ebbe311675492b405252862042022-09-19 13:37:345 days 18 hrs ago Plutus DAO: Pending Rewards Plutus DAO: Dpx Staker0 ETH
0x8a681b5ae2c8cfe30e2ea1e55e6da2a129c72b61ce44a79c6af130845db83593252544512022-09-19 9:34:005 days 22 hrs ago Plutus DAO: Dpx Staker Dopex: rDPX Token0 ETH
0x8a681b5ae2c8cfe30e2ea1e55e6da2a129c72b61ce44a79c6af130845db83593252544512022-09-19 9:34:005 days 22 hrs ago Plutus DAO: Dpx StakerDopex: DPX Token0 ETH
0x8a681b5ae2c8cfe30e2ea1e55e6da2a129c72b61ce44a79c6af130845db83593252544512022-09-19 9:34:005 days 22 hrs ago Plutus DAO: Dpx StakerDopex: Retired DPX Farm0 ETH
0x8a681b5ae2c8cfe30e2ea1e55e6da2a129c72b61ce44a79c6af130845db83593252544512022-09-19 9:34:005 days 22 hrs ago Plutus DAO: Pls-Dpx Rewards Distro Plutus DAO: Dpx Staker0 ETH
0x8a681b5ae2c8cfe30e2ea1e55e6da2a129c72b61ce44a79c6af130845db83593252544512022-09-19 9:34:005 days 22 hrs ago Plutus DAO: Pending Rewards Plutus DAO: Dpx Staker0 ETH
0x9e92f17298d7acf45b4c6fd89fde537590b8f932eaa6699608b04b5a0b01e832252544262022-09-19 9:33:455 days 22 hrs ago Plutus DAO: Dpx Staker Dopex: rDPX Token0 ETH
0x9e92f17298d7acf45b4c6fd89fde537590b8f932eaa6699608b04b5a0b01e832252544262022-09-19 9:33:455 days 22 hrs ago Plutus DAO: Dpx StakerDopex: DPX Token0 ETH
0x9e92f17298d7acf45b4c6fd89fde537590b8f932eaa6699608b04b5a0b01e832252544262022-09-19 9:33:455 days 22 hrs ago Plutus DAO: Dpx StakerDopex: Retired DPX Farm0 ETH
0x9e92f17298d7acf45b4c6fd89fde537590b8f932eaa6699608b04b5a0b01e832252544262022-09-19 9:33:455 days 22 hrs ago Plutus DAO: Pls-Dpx Rewards Distro Plutus DAO: Dpx Staker0 ETH
0x9e92f17298d7acf45b4c6fd89fde537590b8f932eaa6699608b04b5a0b01e832252544262022-09-19 9:33:455 days 22 hrs ago Plutus DAO: Pending Rewards Plutus DAO: Dpx Staker0 ETH
0xe0e2d5872c20e2c50c2b7999318344dd30dd41ad3df486ea51458ade5c85e1f1248576062022-09-16 8:46:068 days 23 hrs ago Plutus DAO: Dpx Staker Dopex: rDPX Token0 ETH
0xe0e2d5872c20e2c50c2b7999318344dd30dd41ad3df486ea51458ade5c85e1f1248576062022-09-16 8:46:068 days 23 hrs ago Plutus DAO: Dpx StakerDopex: DPX Token0 ETH
0xe0e2d5872c20e2c50c2b7999318344dd30dd41ad3df486ea51458ade5c85e1f1248576062022-09-16 8:46:068 days 23 hrs ago Plutus DAO: Dpx StakerDopex: Retired DPX Farm0 ETH
0xe0e2d5872c20e2c50c2b7999318344dd30dd41ad3df486ea51458ade5c85e1f1248576062022-09-16 8:46:068 days 23 hrs ago Plutus DAO: Pls-Dpx Rewards Distro Plutus DAO: Dpx Staker0 ETH
0xe0e2d5872c20e2c50c2b7999318344dd30dd41ad3df486ea51458ade5c85e1f1248576062022-09-16 8:46:068 days 23 hrs ago Plutus DAO: Pending Rewards Plutus DAO: Dpx Staker0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DpxStaker

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

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

interface IDpxStaker {
  function harvest() external;

  function pendingRewardsLessFee() external view returns (uint256 pendingDpxLessFee, uint256 pendingRdpxLessFee);

  function dpxPerSecondLessFee() external view returns (uint256);

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

contract DpxStaker is IStaker, IDpxStaker, Ownable {
  uint256 private constant FEE_DIVISOR = 1e4;

  // DPX: 0x6C2C06790b3E3E3c38e12Ee22F8183b37a13EE55
  IERC20 public immutable stakingToken;

  // DPX: 0x6C2C06790b3E3E3c38e12Ee22F8183b37a13EE55
  IERC20 public immutable rewardToken;

  // rDPX: 0x32Eb7902D4134bf98A28b963D26de779AF92A212
  IERC20 public immutable rewardToken2;

  // StakingRewards: 0xc6D714170fE766691670f12c2b45C1f34405AAb6
  IDpxStakingRewards public immutable underlyingFarm;

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

  uint112 public totalDpxHarvested;
  uint112 public totalRdpxHarvested;
  uint32 public fee; // fee in bp

  constructor(
    address _feeCollector,
    address _dpx,
    address _rdpx,
    address _underlyingFarm
  ) {
    feeCollector = _feeCollector;

    stakingToken = IERC20(_dpx);
    rewardToken = IERC20(_dpx);
    rewardToken2 = IERC20(_rdpx);
    underlyingFarm = IDpxStakingRewards(_underlyingFarm);
    fee = 1000; // 10%

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

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

    underlyingFarm.stake(_amount);
    emit Staked(_amount);
  }

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

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

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

  /** VIEWS */
  function pendingRewardsLessFee() external view returns (uint256 pendingDpxLessFee, uint256 pendingRdpxLessFee) {
    (uint256 dpxEarned, uint256 rdpxEarned) = underlyingFarm.earned(msg.sender);

    unchecked {
      pendingDpxLessFee = (dpxEarned * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
      pendingRdpxLessFee = (rdpxEarned * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
    }
  }

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

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

  /** PRIVATE FUNCTIONS */
  function _harvest() private {
    underlyingFarm.getReward(2);

    address _rewardsDistro = rewardsDistro;
    uint256 _fee = fee;

    uint256 r1Amt = rewardToken.balanceOf(address(this));
    uint256 r1AmtLessFee;

    if (isNotZero(r1Amt)) {
      unchecked {
        uint256 r1Fee = (r1Amt * _fee) / FEE_DIVISOR;

        r1AmtLessFee = r1Amt - r1Fee;
        totalDpxHarvested += uint112(r1AmtLessFee);

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

        rewardToken.transfer(_rewardsDistro, r1AmtLessFee);
        emit Harvested(address(rewardToken), r1AmtLessFee);
      }
    }

    uint256 r2Amt = rewardToken2.balanceOf(address(this));
    uint256 r2AmtLessFee;

    if (isNotZero(r2Amt)) {
      unchecked {
        uint256 r2Fee = (r2Amt * _fee) / FEE_DIVISOR;

        r2AmtLessFee = r2Amt - r2Fee;
        totalRdpxHarvested += uint112(r2AmtLessFee);

        if (isNotZero(r2Fee)) {
          rewardToken2.transfer(feeCollector, r2Fee);
        }

        rewardToken2.transfer(_rewardsDistro, r2AmtLessFee);
        emit Harvested(address(rewardToken), r2AmtLessFee);
      }
    }
  }

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

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

  /** OWNER FUNCTIONS */

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

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

  /**
    Exit farm for veBoost migration
   */
  function exit() external onlyOwner {
    uint256 vaultBalance = underlyingFarm.balanceOf(address(this));
    address owner = owner();

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

    _harvest();
  }

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

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

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

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

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

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

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

  error UNAUTHORIZED();
  error INVALID_FEE();
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 3 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

interface IStaker {
  function stake(uint256) external;

  function withdraw(uint256, address) external;

  function exit() external;
}

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

interface IDpxStakingRewards {
  function stake(uint256) external;

  function exit() external;

  function compound() external;

  function withdraw(uint256) external;

  function getReward(uint256) external;

  /** VIEWS */

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

  function rewardRateDPX() external view returns (uint256);

  function rewardRateRDPX() external view returns (uint256);

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

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

pragma solidity ^0.8.0;

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

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

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_feeCollector","type":"address"},{"internalType":"address","name":"_dpx","type":"address"},{"internalType":"address","name":"_rdpx","type":"address"},{"internalType":"address","name":"_underlyingFarm","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"INVALID_FEE","type":"error"},{"inputs":[],"name":"UNAUTHORIZED","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"ExitedStaking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_new","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_old","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_new","type":"address"},{"indexed":false,"internalType":"address","name":"_old","type":"address"}],"name":"FeeCollectorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_new","type":"address"},{"indexed":false,"internalType":"address","name":"_old","type":"address"}],"name":"OperatorChanged","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":"_new","type":"address"},{"indexed":false,"internalType":"address","name":"_old","type":"address"}],"name":"RewardsDistroChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"Withdrew","type":"event"},{"inputs":[],"name":"dpxPerSecondLessFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pendingRewardsLessFee","outputs":[{"internalType":"uint256","name":"pendingDpxLessFee","type":"uint256"},{"internalType":"uint256","name":"pendingRdpxLessFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rdpxPerSecondLessFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"retrieve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken2","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistro","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_fee","type":"uint32"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFeeCollector","type":"address"}],"name":"setFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOperator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRewardsDistro","type":"address"}],"name":"setRewardsDistro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDpxHarvested","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRdpxHarvested","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingFarm","outputs":[{"internalType":"contract IDpxStakingRewards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b5060405162001d2938038062001d29833981016040819052620000359162000183565b620000403362000116565b600280546001600160a01b0319166001600160a01b0386811691909117909155838116608081905260a081905283821660c05290821660e0819052600480546001600160e01b0316607d60e31b17815560405163095ea7b360e01b815290810191909152600019602482015263095ea7b390604401602060405180830381600087803b158015620000d057600080fd5b505af1158015620000e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200010b9190620001e0565b50505050506200020b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200017e57600080fd5b919050565b600080600080608085870312156200019a57600080fd5b620001a58562000166565b9350620001b56020860162000166565b9250620001c56040860162000166565b9150620001d56060860162000166565b905092959194509250565b600060208284031215620001f357600080fd5b815180151581146200020457600080fd5b9392505050565b60805160a05160c05160e051611a66620002c36000396000818161021d0152818161047c015281816108f901528181610a5101528181610c7f01528181610edd01528181610fa60152818161105701526112ba0152600081816103a3015281816115ec0152818161170d01526117b3015260008181610419015281816113590152818161144c015281816114f201528181611571015261183201526000818161030c0152818161050401526110df0152611a666000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c806372f702f3116100ee578063c5be2cd211610097578063def055a911610071578063def055a9146103f1578063e9fad8ee146103f9578063f2fde38b14610401578063f7c618c11461041457600080fd5b8063c5be2cd21461038b578063d61a47f11461039e578063ddca3f43146103c557600080fd5b8063a694fc3a116100c8578063a694fc3a14610352578063b3ab15fb14610365578063c415b95c1461037857600080fd5b806372f702f3146103075780638da5cb5b1461032e578063a42dce801461033f57600080fd5b80632a39319b1161015b57806350c7b01b1161013557806350c7b01b146102c3578063536785ff146102d9578063570ca735146102ec578063715018a6146102ff57600080fd5b80632a39319b146102875780633a47b305146102b35780634641257d146102bb57600080fd5b806317ec036d1161018c57806317ec036d146102185780631ab971ab14610257578063224279b41461026a57600080fd5b8062f714ce146101b2578063061c558c146101c75780630a79309b14610205575b600080fd5b6101c56101c036600461190f565b61043b565b005b6004546101e1906dffffffffffffffffffffffffffff1681565b6040516dffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101c561021336600461193f565b6105ca565b61023f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101fc565b6101c5610265366004611963565b61079d565b6102726108bb565b604080519283526020830191909152016101fc565b6004546101e1906e01000000000000000000000000000090046dffffffffffffffffffffffffffff1681565b6101c561099e565b6101c5610a02565b6102cb610a2d565b6040519081526020016101fc565b60035461023f906001600160a01b031681565b60015461023f906001600160a01b031681565b6101c5610af4565b61023f7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661023f565b6101c561034d36600461193f565b610b58565b6101c5610360366004611989565b610c25565b6101c561037336600461193f565b610d1f565b60025461023f906001600160a01b031681565b6101c561039936600461193f565b610dec565b61023f7f000000000000000000000000000000000000000000000000000000000000000081565b6004546103dc90600160e01b900463ffffffff1681565b60405163ffffffff90911681526020016101fc565b6102cb610eb9565b6101c5610f34565b6101c561040f36600461193f565b6111a9565b61023f7f000000000000000000000000000000000000000000000000000000000000000081565b6001546001600160a01b031633146104665760405163075fd2b160e01b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156104c857600080fd5b505af11580156104dc573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038481166004830152602482018690527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401602060405180830381600087803b15801561054a57600080fd5b505af115801561055e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058291906119a2565b50806001600160a01b03167fb244b9a17ad633c6e83b7983ee04320484956a68ddbe96a0b70dfca1cf19d723836040516105be91815260200190565b60405180910390a25050565b6000546001600160a01b031633146106295760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b471561066b57600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610669573d6000803e3d6000fd5b505b806001600160a01b031663a9059cbb61068c6000546001600160a01b031690565b6040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b1580156106cb57600080fd5b505afa1580156106df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070391906119c4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561076157600080fd5b505af1158015610775573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079991906119a2565b5050565b6000546001600160a01b031633146107f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b6127108163ffffffff161115610839576040517f2fb15b8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454604051600160e01b90910463ffffffff90811682528216907f5fc463da23c1b063e66f9e352006a7fbe8db7223c455dc429e881a2dfe2f94f19060200160405180910390a26004805463ffffffff909216600160e01b027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040517e8cc2620000000000000000000000000000000000000000000000000000000081523360048201526000908190819081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690628cc26290602401604080518083038186803b15801561093957600080fd5b505afa15801561094d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097191906119dd565b60045461271063ffffffff600160e01b909204919091168103928302819004979290910204945092505050565b6000546001600160a01b031633146109f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b610a0061128b565b565b6003546001600160a01b031633146109f85760405163075fd2b160e01b815260040160405180910390fd5b60006127106004601c9054906101000a900463ffffffff1663ffffffff16612710037f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663080b3ead6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa857600080fd5b505afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae091906119c4565b0281610aee57610aee611a01565b04905090565b6000546001600160a01b03163314610b4e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b610a00600061189d565b6000546001600160a01b03163314610bb25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b6002546040516001600160a01b039182168152908216907f649c5e3d0ed183894196148e193af316452b0037e77d2ff0fef23b7dc722bed09060200160405180910390a26002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610c505760405163075fd2b160e01b815260040160405180910390fd5b6040517fa694fc3a000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a694fc3a90602401600060405180830381600087803b158015610ccb57600080fd5b505af1158015610cdf573d6000803e3d6000fd5b505050507feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca2781604051610d1491815260200190565b60405180910390a150565b6000546001600160a01b03163314610d795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b6001546040516001600160a01b039182168152908216907fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c9060200160405180910390a26001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e465760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b6003546040516001600160a01b039182168152908216907f0c138e5ea2f5dedbf6346f94583bf6c45fb79e3b5afd3c123ef31ae065f0793a9060200160405180910390a26003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60006127106004601c9054906101000a900463ffffffff1663ffffffff16612710037f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638a0dfa0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa857600080fd5b6000546001600160a01b03163314610f8e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610ff057600080fd5b505afa158015611004573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102891906119c4565b9050600061103e6000546001600160a01b031690565b604051632e1a7d4d60e01b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156110a357600080fd5b505af11580156110b7573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038481166004830152602482018690527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401602060405180830381600087803b15801561112557600080fd5b505af1158015611139573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115d91906119a2565b50806001600160a01b03167f0471e7848062c4104fc72fb08f3fb7d6605ccab4231886e24f11281d65c9582a8360405161119991815260200190565b60405180910390a261079961128b565b6000546001600160a01b031633146112035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610620565b6001600160a01b03811661127f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610620565b6112888161189d565b50565b6040517f1c4b774b000000000000000000000000000000000000000000000000000000008152600260048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631c4b774b90602401600060405180830381600087803b15801561130657600080fd5b505af115801561131a573d6000803e3d6000fd5b5050600354600480546040516370a0823160e01b815230928101929092526001600160a01b039283169450600160e01b900463ffffffff1692506000917f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561139b57600080fd5b505afa1580156113af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d391906119c4565b9050600081156115d45750600480546dffffffffffffffffffffffffffff198116612710848602048085036dffffffffffffffffffffffffffff9384168101909316919091179092559080156114cc5760025460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b15801561149257600080fd5b505af11580156114a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ca91906119a2565b505b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561153657600080fd5b505af115801561154a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156e91906119a2565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf836040516115ca91815260200190565b60405180910390a2505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561163657600080fd5b505afa15801561164a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166e91906119c4565b9050600081156118955750600480547fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff8116612710848802048085036e010000000000000000000000000000938490046dffffffffffffffffffffffffffff9081168201169093029190911790925590801561178d5760025460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b15801561175357600080fd5b505af1158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178b91906119a2565b505b60405163a9059cbb60e01b81526001600160a01b038881166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b1580156117f757600080fd5b505af115801561180b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182f91906119a2565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf8360405161188b91815260200190565b60405180910390a2505b505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461128857600080fd5b6000806040838503121561192257600080fd5b823591506020830135611934816118fa565b809150509250929050565b60006020828403121561195157600080fd5b813561195c816118fa565b9392505050565b60006020828403121561197557600080fd5b813563ffffffff8116811461195c57600080fd5b60006020828403121561199b57600080fd5b5035919050565b6000602082840312156119b457600080fd5b8151801515811461195c57600080fd5b6000602082840312156119d657600080fd5b5051919050565b600080604083850312156119f057600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122044999bd8377f54eb60a9f1de027feabe35a2bce4565b414df7e4a04b0657cbae64736f6c634300080900330000000000000000000000004bc6148306abccad5d95c0cd916249d7d08711aa0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212000000000000000000000000c6d714170fe766691670f12c2b45c1f34405aab6

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

0000000000000000000000004bc6148306abccad5d95c0cd916249d7d08711aa0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee5500000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212000000000000000000000000c6d714170fe766691670f12c2b45c1f34405aab6

-----Decoded View---------------
Arg [0] : _feeCollector (address): 0x4bc6148306abccad5d95c0cd916249d7d08711aa
Arg [1] : _dpx (address): 0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [2] : _rdpx (address): 0x32eb7902d4134bf98a28b963d26de779af92a212
Arg [3] : _underlyingFarm (address): 0xc6d714170fe766691670f12c2b45c1f34405aab6

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000004bc6148306abccad5d95c0cd916249d7d08711aa
Arg [1] : 0000000000000000000000006c2c06790b3e3e3c38e12ee22f8183b37a13ee55
Arg [2] : 00000000000000000000000032eb7902d4134bf98a28b963d26de779af92a212
Arg [3] : 000000000000000000000000c6d714170fe766691670f12c2b45c1f34405aab6


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.