Latest 25 from a total of 3,597 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Harvest | 210345350 | 582 days ago | IN | 0 ETH | 0.00000317 | ||||
| Withdraw | 210345253 | 582 days ago | IN | 0 ETH | 0.00000196 | ||||
| Withdraw | 204880209 | 597 days ago | IN | 0 ETH | 0.00000183 | ||||
| Harvest | 204880103 | 597 days ago | IN | 0 ETH | 0.00000295 | ||||
| Harvest | 170034563 | 701 days ago | IN | 0 ETH | 0.00003584 | ||||
| Withdraw | 114528947 | 874 days ago | IN | 0 ETH | 0.00008431 | ||||
| Harvest | 114528862 | 874 days ago | IN | 0 ETH | 0.00007864 | ||||
| Harvest | 112825424 | 879 days ago | IN | 0 ETH | 0.00007544 | ||||
| Harvest | 105232894 | 902 days ago | IN | 0 ETH | 0.00003356 | ||||
| Harvest | 89858437 | 947 days ago | IN | 0 ETH | 0.00007663 | ||||
| Withdraw | 89858349 | 947 days ago | IN | 0 ETH | 0.00008193 | ||||
| Withdraw | 86233859 | 958 days ago | IN | 0 ETH | 0.00013866 | ||||
| Harvest | 79979299 | 976 days ago | IN | 0 ETH | 0.00006116 | ||||
| Harvest | 78971701 | 979 days ago | IN | 0 ETH | 0.00003882 | ||||
| Deposit | 76871112 | 985 days ago | IN | 0 ETH | 0.000054 | ||||
| Harvest | 73144801 | 996 days ago | IN | 0 ETH | 0.00003412 | ||||
| Withdraw | 72916178 | 997 days ago | IN | 0 ETH | 0.00006925 | ||||
| Deposit | 72326258 | 998 days ago | IN | 0 ETH | 0.00004347 | ||||
| Harvest | 72223291 | 999 days ago | IN | 0 ETH | 0.00005127 | ||||
| Harvest | 72175235 | 999 days ago | IN | 0 ETH | 0.00005086 | ||||
| Withdraw | 71827750 | 1000 days ago | IN | 0 ETH | 0.00005485 | ||||
| Harvest | 71640059 | 1000 days ago | IN | 0 ETH | 0.00004656 | ||||
| Withdraw | 70558935 | 1004 days ago | IN | 0 ETH | 0.0000673 | ||||
| Harvest | 69968386 | 1005 days ago | IN | 0 ETH | 0.00004115 | ||||
| Harvest | 69942226 | 1005 days ago | IN | 0 ETH | 0.00003912 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 71827750 | 1000 days ago | 0 ETH | ||||
| 71827750 | 1000 days ago | 0 ETH | ||||
| 71827750 | 1000 days ago | 0 ETH | ||||
| 71640059 | 1000 days ago | 0 ETH | ||||
| 71640059 | 1000 days ago | 0 ETH | ||||
| 71640059 | 1000 days ago | 0 ETH | ||||
| 70558935 | 1004 days ago | 0 ETH | ||||
| 70558935 | 1004 days ago | 0 ETH | ||||
| 70558935 | 1004 days ago | 0 ETH | ||||
| 69968386 | 1005 days ago | 0 ETH | ||||
| 69968386 | 1005 days ago | 0 ETH | ||||
| 69968386 | 1005 days ago | 0 ETH | ||||
| 69942226 | 1005 days ago | 0 ETH | ||||
| 69942226 | 1005 days ago | 0 ETH | ||||
| 69942226 | 1005 days ago | 0 ETH | ||||
| 69788814 | 1006 days ago | 0 ETH | ||||
| 69788814 | 1006 days ago | 0 ETH | ||||
| 69788814 | 1006 days ago | 0 ETH | ||||
| 69732738 | 1006 days ago | 0 ETH | ||||
| 69732738 | 1006 days ago | 0 ETH | ||||
| 69732738 | 1006 days ago | 0 ETH | ||||
| 69695281 | 1006 days ago | 0 ETH | ||||
| 69695281 | 1006 days ago | 0 ETH | ||||
| 69695281 | 1006 days ago | 0 ETH | ||||
| 69455420 | 1007 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PlsDpxPlutusChef
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)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import { IRewardsDistro } from './PlsDpxRewardsDistro.sol';
import { IWhitelist } from '../Whitelist.sol';
/**
Assumptions:
Total stake: <= 309_485_009 * 1e18 tokens
Individual stake: <= 309_485_009 * 1e18 tokens
DPX max supply: 5e23
JONES max siupply: 1e25
PLS max supply: 1e26
*/
contract PlsDpxPlutusChef is Ownable {
uint256 private constant MUL_CONSTANT = 1e14;
IRewardsDistro public immutable rewardsDistro;
IERC20 public immutable plsDpx;
// Info of each user.
struct UserInfo {
uint96 amount; // Staking tokens the user has provided
int128 plsRewardDebt;
int128 plsDpxRewardDebt;
int128 plsJonesRewardDebt;
int128 dpxRewardDebt;
int128 rdpxRewardDebt;
}
IWhitelist public whitelist;
address public operator;
uint128 public accPlsPerShare;
uint96 private shares; // total staked
uint32 public lastRewardSecond;
// Treasury
uint128 public accPlsDpxPerShare;
uint128 public accPlsJonesPerShare;
// Farm
uint128 public accDpxPerShare;
uint128 public accRdpxPerShare;
mapping(address => UserInfo) public userInfo;
constructor(address _rewardsDistro, address _plsDpx) {
rewardsDistro = IRewardsDistro(_rewardsDistro);
plsDpx = IERC20(_plsDpx);
}
function deposit(uint96 _amount) external {
_isEligibleSender();
_deposit(msg.sender, _amount);
}
function withdraw(uint96 _amount) external {
_isEligibleSender();
_withdraw(msg.sender, _amount);
}
function harvest() external {
_isEligibleSender();
_harvest(msg.sender);
}
/**
* Withdraw without caring about rewards. EMERGENCY ONLY.
*/
function emergencyWithdraw() external {
_isEligibleSender();
UserInfo storage user = userInfo[msg.sender];
uint96 _amount = user.amount;
user.amount = 0;
user.plsRewardDebt = 0;
if (shares >= _amount) {
shares -= _amount;
} else {
shares = 0;
}
plsDpx.transfer(msg.sender, _amount);
emit EmergencyWithdraw(msg.sender, _amount);
}
/**
Keep reward variables up to date. Ran before every mutative function.
*/
function updateShares() public {
// if block.timestamp <= lastRewardSecond, already updated.
if (block.timestamp <= lastRewardSecond) {
return;
}
// if pool has no supply
if (shares == 0) {
lastRewardSecond = uint32(block.timestamp);
return;
}
(
uint80 pls_,
uint80 plsDpx_,
uint80 plsJones_,
uint80 pendingDpxLessFee_,
uint80 pendingRdpxLessFee_
) = rewardsDistro.updateInfo();
unchecked {
accPlsPerShare += rewardPerShare(pls_);
accPlsDpxPerShare += rewardPerShare(plsDpx_);
accPlsJonesPerShare += rewardPerShare(plsJones_);
accDpxPerShare += uint128((pendingDpxLessFee_ * MUL_CONSTANT) / shares);
accRdpxPerShare += uint128((pendingRdpxLessFee_ * MUL_CONSTANT) / shares);
}
rewardsDistro.harvestFromUnderlyingFarm();
lastRewardSecond = uint32(block.timestamp);
}
/** OPERATOR */
function depositFor(address _user, uint88 _amount) external {
if (msg.sender != operator) revert UNAUTHORIZED();
_deposit(_user, _amount);
}
function withdrawFor(address _user, uint88 _amount) external {
if (msg.sender != operator) revert UNAUTHORIZED();
_withdraw(_user, _amount);
}
function harvestFor(address _user) external {
if (msg.sender != operator) revert UNAUTHORIZED();
_harvest(_user);
}
/** VIEWS */
/**
Calculates the reward per share since `lastRewardSecond` was updated
*/
function rewardPerShare(uint80 _rewardRatePerSecond) public view returns (uint128) {
// duration = block.timestamp - lastRewardSecond;
// tokenReward = duration * _rewardRatePerSecond;
// tokenRewardPerShare = (tokenReward * MUL_CONSTANT) / shares;
unchecked {
return uint128(((block.timestamp - lastRewardSecond) * uint256(_rewardRatePerSecond) * MUL_CONSTANT) / shares);
}
}
/**
View function to see pending rewards on frontend
*/
function pendingRewards(address _user)
external
view
returns (
uint256 _pendingPls,
uint256 _pendingPlsDpx,
uint256 _pendingPlsJones,
uint256 _pendingDpx,
uint256 _pendingRdpx
)
{
uint256 _plsPS = accPlsPerShare;
uint256 _plsDpxPS = accPlsDpxPerShare;
uint256 _plsJonesPS = accPlsJonesPerShare;
uint256 _dpxPS = accDpxPerShare;
uint256 _rdpxPS = accRdpxPerShare;
if (block.timestamp > lastRewardSecond && shares != 0) {
(
uint80 pls_,
uint80 plsDpx_,
uint80 plsJones_,
uint80 pendingDpxLessFee_,
uint80 pendingRdpxLessFee_
) = rewardsDistro.updateInfo();
_plsPS += rewardPerShare(pls_);
_plsDpxPS += rewardPerShare(plsDpx_);
_plsJonesPS += rewardPerShare(plsJones_);
_dpxPS += uint256((pendingDpxLessFee_ * MUL_CONSTANT) / shares);
_rdpxPS += uint256((pendingRdpxLessFee_ * MUL_CONSTANT) / shares);
}
UserInfo memory user = userInfo[_user];
_pendingPls = _calculatePending(user.plsRewardDebt, _plsPS, user.amount);
_pendingPlsDpx = _calculatePending(user.plsDpxRewardDebt, _plsDpxPS, user.amount);
_pendingPlsJones = _calculatePending(user.plsJonesRewardDebt, _plsJonesPS, user.amount);
_pendingDpx = _calculatePending(user.dpxRewardDebt, _dpxPS, user.amount);
_pendingRdpx = _calculatePending(user.rdpxRewardDebt, _rdpxPS, user.amount);
}
/** PRIVATE */
function _isEligibleSender() private view {
if (msg.sender != tx.origin && whitelist.isWhitelisted(msg.sender) == false) revert UNAUTHORIZED();
}
function _calculatePending(
int128 _rewardDebt,
uint256 _accPerShare, // Stay 256;
uint96 _amount
) private pure returns (uint128) {
if (_rewardDebt < 0) {
return uint128(_calculateRewardDebt(_accPerShare, _amount)) + uint128(-_rewardDebt);
} else {
return uint128(_calculateRewardDebt(_accPerShare, _amount)) - uint128(_rewardDebt);
}
}
function _calculateRewardDebt(uint256 _accPlsPerShare, uint96 _amount) private pure returns (uint256) {
unchecked {
return (_amount * _accPlsPerShare) / MUL_CONSTANT;
}
}
function _deposit(address _user, uint96 _amount) private {
UserInfo storage user = userInfo[_user];
if (_amount == 0) revert DEPOSIT_ERROR();
updateShares();
uint256 _prev = plsDpx.balanceOf(address(this));
unchecked {
user.amount += _amount;
shares += _amount;
}
user.plsRewardDebt = user.plsRewardDebt + int128(uint128(_calculateRewardDebt(accPlsPerShare, _amount)));
user.plsDpxRewardDebt = user.plsDpxRewardDebt + int128(uint128(_calculateRewardDebt(accPlsDpxPerShare, _amount)));
user.plsJonesRewardDebt =
user.plsJonesRewardDebt +
int128(uint128(_calculateRewardDebt(accPlsJonesPerShare, _amount)));
user.dpxRewardDebt = user.dpxRewardDebt + int128(uint128(_calculateRewardDebt(accDpxPerShare, _amount)));
user.rdpxRewardDebt = user.rdpxRewardDebt + int128(uint128(_calculateRewardDebt(accRdpxPerShare, _amount)));
plsDpx.transferFrom(_user, address(this), _amount);
unchecked {
if (_prev + _amount != plsDpx.balanceOf(address(this))) revert DEPOSIT_ERROR();
}
emit Deposit(_user, _amount);
}
function _withdraw(address _user, uint96 _amount) private {
UserInfo storage user = userInfo[_user];
if (user.amount < _amount || _amount == 0) revert WITHDRAW_ERROR();
updateShares();
unchecked {
user.amount -= _amount;
shares -= _amount;
}
user.plsRewardDebt = user.plsRewardDebt - int128(uint128(_calculateRewardDebt(accPlsPerShare, _amount)));
user.plsDpxRewardDebt = user.plsDpxRewardDebt - int128(uint128(_calculateRewardDebt(accPlsDpxPerShare, _amount)));
user.plsJonesRewardDebt =
user.plsJonesRewardDebt -
int128(uint128(_calculateRewardDebt(accPlsJonesPerShare, _amount)));
user.dpxRewardDebt = user.dpxRewardDebt - int128(uint128(_calculateRewardDebt(accDpxPerShare, _amount)));
user.rdpxRewardDebt = user.rdpxRewardDebt - int128(uint128(_calculateRewardDebt(accRdpxPerShare, _amount)));
plsDpx.transfer(_user, _amount);
emit Withdraw(_user, _amount);
}
function _harvest(address _user) private {
updateShares();
UserInfo storage user = userInfo[_user];
uint128 plsPending = _calculatePending(user.plsRewardDebt, accPlsPerShare, user.amount);
uint128 plsDpxPending = _calculatePending(user.plsDpxRewardDebt, accPlsDpxPerShare, user.amount);
uint128 plsJonesPending = _calculatePending(user.plsJonesRewardDebt, accPlsJonesPerShare, user.amount);
uint128 dpxPending = _calculatePending(user.dpxRewardDebt, accDpxPerShare, user.amount);
uint128 rdpxPending = _calculatePending(user.rdpxRewardDebt, accRdpxPerShare, user.amount);
user.plsRewardDebt = int128(uint128(_calculateRewardDebt(accPlsPerShare, user.amount)));
user.plsDpxRewardDebt = int128(uint128(_calculateRewardDebt(accPlsDpxPerShare, user.amount)));
user.plsJonesRewardDebt = int128(uint128(_calculateRewardDebt(accPlsJonesPerShare, user.amount)));
user.dpxRewardDebt = int128(uint128(_calculateRewardDebt(accDpxPerShare, user.amount)));
user.rdpxRewardDebt = int128(uint128(_calculateRewardDebt(accRdpxPerShare, user.amount)));
rewardsDistro.sendRewards(_user, plsPending, plsDpxPending, plsJonesPending, dpxPending, rdpxPending);
}
/** OWNER FUNCTIONS */
function setWhitelist(address _whitelist) external onlyOwner {
whitelist = IWhitelist(_whitelist);
}
function setOperator(address _operator) external onlyOwner {
operator = _operator;
}
function setStartTime(uint32 _startTime) external onlyOwner {
if (lastRewardSecond == 0) {
lastRewardSecond = _startTime;
}
}
error DEPOSIT_ERROR();
error WITHDRAW_ERROR();
error UNAUTHORIZED();
event Deposit(address indexed _user, uint256 _amount);
event Withdraw(address indexed _user, uint256 _amount);
event EmergencyWithdraw(address indexed _user, uint256 _amount);
}// 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);
}// 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);
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import { IDpxStaker } from './DpxStaker.sol';
import { IPendingRewards } from '../PendingRewards.sol';
interface IRewardsDistro {
function updateInfo()
external
view
returns (
uint80 pls_,
uint80 plsDpx_,
uint80 plsJones_,
uint80 pendingDpxLessFee_,
uint80 pendingRdpxLessFee_
);
function sendRewards(
address _to,
uint128 _plsAmt,
uint128 _plsDpxAmt,
uint128 _plsJonesAmt,
uint128 _dpxAmt,
uint128 _rdpxAmt
) external;
function harvestFromUnderlyingFarm() external;
}
contract PlsDpxRewardsDistro is IRewardsDistro, Ownable {
IDpxStaker public immutable staker;
IPendingRewards public immutable pendingRewards;
IERC20 public immutable pls;
IERC20 public immutable plsDpx;
IERC20 public immutable plsJones;
IERC20 public immutable dpx;
IERC20 public immutable rdpx;
address public plutusChef;
address public rewardsController;
uint80 public plsPerSecond;
uint80 public plsDpxPerSecond;
uint80 public plsJonesPerSecond;
constructor(
address _pendingRewards,
address _staker,
address _pls,
address _plsDpx,
address _plsJones,
address _dpx,
address _rdpx
) {
pendingRewards = IPendingRewards(_pendingRewards);
staker = IDpxStaker(_staker);
pls = IERC20(_pls);
plsDpx = IERC20(_plsDpx);
plsJones = IERC20(_plsJones);
dpx = IERC20(_dpx);
rdpx = IERC20(_rdpx);
rewardsController = msg.sender;
}
function sendRewards(
address _to,
uint128 _plsAmt,
uint128 _plsDpxAmt,
uint128 _plsJonesAmt,
uint128 _dpxAmt,
uint128 _rdpxAmt
) external {
if (msg.sender != plutusChef) revert UNAUTHORIZED();
if (isNotZero(_plsAmt)) {
_safeTokenTransfer(pls, _to, _plsAmt);
}
// Treasury yields
if (isNotZero(_plsDpxAmt) || isNotZero(_plsJonesAmt)) {
_safeTokenTransfer(plsDpx, _to, _plsDpxAmt);
_safeTokenTransfer(plsJones, _to, _plsJonesAmt);
}
// Underlying yields
if (isNotZero(_dpxAmt) || isNotZero(_rdpxAmt)) {
_safeTokenTransfer(dpx, _to, _dpxAmt);
_safeTokenTransfer(rdpx, _to, _rdpxAmt);
}
}
function harvestFromUnderlyingFarm() external {
if (msg.sender != plutusChef) revert UNAUTHORIZED();
staker.harvest();
}
/** VIEWS */
/**
Returns emissions of all the yield sources
*/
function getEmissions()
external
view
returns (
uint80 pls_,
uint80 plsDpx_,
uint80 plsJones_,
uint80 dpx_,
uint80 rdpx_
)
{
// PLS emissions
pls_ = plsPerSecond;
// Treasury yield
plsDpx_ = plsDpxPerSecond;
plsJones_ = plsJonesPerSecond;
// Underlying farm yield less fee
dpx_ = uint80(staker.dpxPerSecondLessFee());
rdpx_ = uint80(staker.rdpxPerSecondLessFee());
}
/**
Info needed for PlutusChef updates.
*/
function updateInfo()
external
view
returns (
uint80 pls_,
uint80 plsDpx_,
uint80 plsJones_,
uint80 pendingDpxLessFee_,
uint80 pendingRdpxLessFee_
)
{
// PLS emissions
pls_ = plsPerSecond;
// Treasury yield
plsDpx_ = plsDpxPerSecond;
plsJones_ = plsJonesPerSecond;
// Pending Jones
(uint256 _pendingDpxLessFee, uint256 _pendingRdpxLessFee) = pendingRewards.pendingDpxRewardsLessFee();
pendingDpxLessFee_ = uint80(_pendingDpxLessFee);
pendingRdpxLessFee_ = uint80(_pendingRdpxLessFee);
}
/** PRIVATE FUNCTIONS */
function isNotZero(uint256 _num) private pure returns (bool result) {
assembly {
result := gt(_num, 0)
}
}
function isZero(uint256 _num) private pure returns (bool result) {
assembly {
result := iszero(_num)
}
}
function _safeTokenTransfer(
IERC20 _token,
address _to,
uint256 _amount
) private {
uint256 bal = _token.balanceOf(address(this));
if (_amount > bal) {
_token.transfer(_to, bal);
} else {
_token.transfer(_to, _amount);
}
}
/** CONTROLLER FUNCTIONS */
function _isRewardsController() private view {
if (msg.sender != rewardsController) revert UNAUTHORIZED();
}
function updatePlsEmission(uint80 _newPlsRate) external {
_isRewardsController();
plsPerSecond = _newPlsRate;
}
function updatePlsDpxEmissions(uint80 _newPlsDpxRate) external {
_isRewardsController();
plsDpxPerSecond = _newPlsDpxRate;
}
function updatePlsJonesEmissions(uint80 _newPlsJonesRate) external {
_isRewardsController();
plsJonesPerSecond = _newPlsJonesRate;
}
/** OWNER FUNCTIONS */
/**
Owner can retrieve stuck funds
*/
function retrieve(IERC20 token) external onlyOwner {
if (isNotZero(address(this).balance)) {
payable(owner()).transfer(address(this).balance);
}
token.transfer(owner(), token.balanceOf(address(this)));
}
function setPlutusChef(address _newPlutusChef) external onlyOwner {
plutusChef = _newPlutusChef;
}
function setRewardsController(address _newController) external onlyOwner {
rewardsController = _newController;
}
error UNAUTHORIZED();
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
interface IWhitelist {
function isWhitelisted(address) external view returns (bool);
}
contract Whitelist is IWhitelist, Ownable {
mapping(address => bool) public isWhitelisted;
constructor(address _gov) {
transferOwnership(_gov);
}
function whitelistAdd(address _addr) external onlyOwner {
isWhitelisted[_addr] = true;
emit AddedToWhitelist(_addr);
}
function whitelistRemove(address _addr) external onlyOwner {
isWhitelisted[_addr] = false;
emit RemovedFromWhitelist(_addr);
}
event RemovedFromWhitelist(address indexed _addr);
event AddedToWhitelist(address indexed _addr);
}// 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;
}
}// 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(address(this));
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();
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import './plsJONES/IMillinerV2.sol';
import './plsDPX/IDpxStakingRewards.sol';
interface IStaker {
function fee() external view returns (uint256);
}
interface IPendingRewards {
function pendingDpxRewardsLessFee() external view returns (uint256 _pendingDpx, uint256 _pendingRdpx);
function pendingJonesLessFee() external view returns (uint256 _pendingJones);
}
contract PendingRewards is IPendingRewards {
uint256 private constant FEE_DIVISOR = 1e4;
address private constant JONES_STAKER = 0x668BB973c3e35759269DAc6D5BF118EA9729110E;
IMillinerV2 private constant MILLINER_V2 = IMillinerV2(0xb94d1959084081c5a11C460012Ab522F5a0FD756);
uint256 private constant POOL_ID = 1;
address private constant DPX_STAKER = 0xC046F44ED68014f048ECa0010A642749Ebe34b03;
IDpxStakingRewards private constant DPX_STAKING_REWARDS =
IDpxStakingRewards(0xc6D714170fE766691670f12c2b45C1f34405AAb6);
function pendingDpxRewardsLessFee() external view returns (uint256 _pendingDpx, uint256 _pendingRdpx) {
uint256 fee = IStaker(DPX_STAKER).fee();
(uint256 dpxEarned, uint256 rdpxEarned) = DPX_STAKING_REWARDS.earned(DPX_STAKER);
unchecked {
_pendingDpx = (dpxEarned * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
_pendingRdpx = (rdpxEarned * (FEE_DIVISOR - fee)) / FEE_DIVISOR;
}
}
function pendingJonesLessFee() external view returns (uint256 _pendingJones) {
unchecked {
_pendingJones =
(MILLINER_V2.pendingJones(POOL_ID, JONES_STAKER) * (FEE_DIVISOR - IStaker(JONES_STAKER).fee())) /
FEE_DIVISOR;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
interface IStaker {
function stake(uint256) external;
function withdraw(uint256, address) external;
function exit() external;
}// 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);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
interface IMillinerV2 {
function deposit(uint256 _pid, uint256 _amount) external;
function compound(uint256 _pid) external;
function withdraw(uint256 _pid, uint256 _amount) external;
function emergencyWithdraw(uint256 _pid) external;
function harvest(uint256 _pid) external;
/** VIEWS */
function deposited(uint256 _pid, address _user) external view returns (uint256);
function jonesPerSecond() external view returns (uint256);
function pendingJones(uint256 _pid, address _user) external view returns (uint256);
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_rewardsDistro","type":"address"},{"internalType":"address","name":"_plsDpx","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DEPOSIT_ERROR","type":"error"},{"inputs":[],"name":"UNAUTHORIZED","type":"error"},{"inputs":[],"name":"WITHDRAW_ERROR","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"accDpxPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPlsDpxPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPlsJonesPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accPlsPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accRdpxPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"_amount","type":"uint96"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint88","name":"_amount","type":"uint88"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"harvestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRewardSecond","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"_pendingPls","type":"uint256"},{"internalType":"uint256","name":"_pendingPlsDpx","type":"uint256"},{"internalType":"uint256","name":"_pendingPlsJones","type":"uint256"},{"internalType":"uint256","name":"_pendingDpx","type":"uint256"},{"internalType":"uint256","name":"_pendingRdpx","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"plsDpx","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint80","name":"_rewardRatePerSecond","type":"uint80"}],"name":"rewardPerShare","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistro","outputs":[{"internalType":"contract IRewardsDistro","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_startTime","type":"uint32"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelist","type":"address"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint96","name":"amount","type":"uint96"},{"internalType":"int128","name":"plsRewardDebt","type":"int128"},{"internalType":"int128","name":"plsDpxRewardDebt","type":"int128"},{"internalType":"int128","name":"plsJonesRewardDebt","type":"int128"},{"internalType":"int128","name":"dpxRewardDebt","type":"int128"},{"internalType":"int128","name":"rdpxRewardDebt","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelist","outputs":[{"internalType":"contract IWhitelist","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"_amount","type":"uint96"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint88","name":"_amount","type":"uint88"}],"name":"withdrawFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60c06040523480156200001157600080fd5b5060405162002253380380620022538339810160408190526200003491620000c4565b6200003f3362000057565b6001600160a01b039182166080521660a052620000fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000bf57600080fd5b919050565b60008060408385031215620000d857600080fd5b620000e383620000a7565b9150620000f360208401620000a7565b90509250929050565b60805160a0516120f2620001616000396000818161041d01528181610dcb01528181611791015281816118b901528181611b940152611c2601526000818161033201528181610575015281816107640152818161086e015261141901526120f26000f3fe608060405234801561001057600080fd5b50600436106101b85760003560e01c8063854cff2f116100f9578063dee4dea011610097578063e872375411610071578063e872375414610480578063f2fde38b14610493578063fbe1ebec146104a6578063fd44d860146104b957600080fd5b8063dee4dea014610447578063e305e54a1461045a578063e4eae6b71461046d57600080fd5b8063952e80d1116100d3578063952e80d1146103eb578063b3ab15fb14610405578063c8abb5a414610418578063db2e21bc1461043f57600080fd5b8063854cff2f146103b45780638da5cb5b146103c757806393e59dc1146103d857600080fd5b80634641257d11610166578063570ca73511610140578063570ca7351461036c578063583411821461037f578063715018a61461039957806379017d1b146103a157600080fd5b80634641257d146102f957806350b6f4d114610301578063536785ff1461032d57600080fd5b80632a410068116101975780632a410068146102a157806331d7a262146102ab578063436d9bcf146102e657600080fd5b80621db0ba146101bd5780630a7979b1146101ed5780631959a00214610200575b600080fd5b6003546101d0906001600160801b031681565b6040516001600160801b0390911681526020015b60405180910390f35b6101d06101fb366004611d37565b6104cc565b61025e61020e366004611d70565b6006602052600090815260409020805460018201546002909201546001600160601b03821692600160601b909204600f90810b9280820b92600160801b91829004830b9281810b92909104900b86565b604080516001600160601b039097168752600f95860b602088015293850b9386019390935290830b6060850152820b6080840152900b60a082015260c0016101e4565b6102a961051d565b005b6102be6102b9366004611d70565b6107f9565b604080519586526020860194909452928401919091526060830152608082015260a0016101e4565b6004546101d0906001600160801b031681565b6102a9610b11565b60035461031890600160e01b900463ffffffff1681565b60405163ffffffff90911681526020016101e4565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101e4565b600254610354906001600160a01b031681565b6004546101d090600160801b90046001600160801b031681565b6102a9610b24565b6102a96103af366004611d8b565b610b8d565b6102a96103c2366004611d70565b610bd3565b6000546001600160a01b0316610354565b600154610354906001600160a01b031681565b6005546101d090600160801b90046001600160801b031681565b6102a9610413366004611d70565b610c5c565b6103547f000000000000000000000000000000000000000000000000000000000000000081565b6102a9610ce5565b6102a9610455366004611dd2565b610e92565b6102a9610468366004611d8b565b610ea7565b6102a961047b366004611dd2565b610ee9565b6102a961048e366004611dfb565b610efb565b6102a96104a1366004611d70565b610f8b565b6102a96104b4366004611d70565b61106a565b6005546101d0906001600160801b031681565b6003546000906001600160601b03600160801b8204169063ffffffff600160e01b90910416420369ffffffffffffffffffff841602655af3107a4000028161051657610516611e21565b0492915050565b600354600160e01b900463ffffffff16421161053557565b600354600160801b90046001600160601b031661056b57600380546001600160e01b0316600160e01b4263ffffffff1602179055565b60008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b7c9252c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156105cc57600080fd5b505afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106049190611e37565b94509450945094509450610617856104cc565b600380546001600160801b031981166001600160801b039182169390930116919091179055610645846104cc565b600480546001600160801b031981166001600160801b039182169390930116919091179055610673836104cc565b600480546001600160801b03600160801b80830482169094018116840291161790556003546001600160601b039190041669ffffffffffffffffffff8316655af3107a400002816106c6576106c6611e21565b600580546001600160801b03198116939092046001600160801b0392831601909116919091179055600354600160801b90046001600160601b0316655af3107a400069ffffffffffffffffffff8316028161072357610723611e21565b04600560108282829054906101000a90046001600160801b03160192506101000a8154816001600160801b0302191690836001600160801b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663756864596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107bd57600080fd5b505af11580156107d1573d6000803e3d6000fd5b5050600380546001600160e01b0316600160e01b4263ffffffff160217905550505050505050565b60035460045460055460009283928392839283926001600160801b038083169381831693600160801b9384900483169383831693920490911690600160e01b900463ffffffff164211801561085f5750600354600160801b90046001600160601b031615155b156109f35760008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b7c9252c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156108c557600080fd5b505afa1580156108d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd9190611e37565b94509450945094509450610910856104cc565b610923906001600160801b03168b611ec2565b995061092e846104cc565b610941906001600160801b03168a611ec2565b985061094c836104cc565b61095f906001600160801b031689611ec2565b600354909850600160801b90046001600160601b0316610991655af3107a400069ffffffffffffffffffff8516611eda565b61099b9190611ef9565b6109a59088611ec2565b600354909750600160801b90046001600160601b03166109d7655af3107a400069ffffffffffffffffffff8416611eda565b6109e19190611ef9565b6109eb9087611ec2565b955050505050505b6001600160a01b038b16600090815260066020908152604091829020825160c08101845281546001600160601b038116808352600160601b909104600f90810b948301859052600184015480820b96840196909652600160801b95869004810b606084015260029093015480840b60808401529490940490910b60a082015291610a7f9190889061109e565b6001600160801b03169a50610a9d816040015186836000015161109e565b6001600160801b03169950610abb816060015185836000015161109e565b6001600160801b03169850610ad9816080015184836000015161109e565b6001600160801b03169750610af78160a0015183836000015161109e565b6001600160801b0316965050505050505091939590929450565b610b196110fc565b610b22336111bb565b565b6000546001600160a01b03163314610b835760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610b226000611482565b6002546001600160a01b03163314610bb85760405163075fd2b160e01b815260040160405180910390fd5b610bcf82826affffffffffffffffffffff166114df565b5050565b6000546001600160a01b03163314610c2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610cb65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610ced6110fc565b33600090815260066020526040902080547fffffffff00000000000000000000000000000000000000000000000000000000811682556003546001600160601b0391821691600160801b909104168111610d8e5780600360108282829054906101000a90046001600160601b0316610d659190611f1b565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610da7565b600380546bffffffffffffffffffffffff60801b191690555b60405163a9059cbb60e01b81523360048201526001600160601b03821660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610e1757600080fd5b505af1158015610e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4f9190611f43565b506040516001600160601b038216815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a25050565b610e9a6110fc565b610ea433826114df565b50565b6002546001600160a01b03163314610ed25760405163075fd2b160e01b815260040160405180910390fd5b610bcf82826affffffffffffffffffffff1661185a565b610ef16110fc565b610ea4338261185a565b6000546001600160a01b03163314610f555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b600354600160e01b900463ffffffff16610ea4576003805463ffffffff8316600160e01b026001600160e01b0390911617905550565b6000546001600160a01b03163314610fe55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b6001600160a01b0381166110615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b7a565b610ea481611482565b6002546001600160a01b031633146110955760405163075fd2b160e01b815260040160405180910390fd5b610ea4816111bb565b60008084600f0b12156110d8576110b484611f65565b6110d190655af3107a40006001600160601b038516860204611f95565b90506110f5565b6110d184655af3107a40006001600160601b038516860204611fc0565b9392505050565b33321480159061119d57506001546040517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911690633af32abf9060240160206040518083038186803b15801561116357600080fd5b505afa158015611177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119b9190611f43565b155b15610b225760405163075fd2b160e01b815260040160405180910390fd5b6111c361051d565b6001600160a01b0381166000908152600660205260408120805460035491929161120a91600160601b8104600f0b916001600160801b0316906001600160601b031661109e565b6001830154600454845492935060009261123a92600f0b916001600160801b0316906001600160601b031661109e565b6001840154600454855492935060009261127492600160801b90819004600f0b92046001600160801b0316906001600160601b031661109e565b600285015460055486549293506000926112a492600f0b916001600160801b0316906001600160601b031661109e565b600286015460055487549293506000926112de92600160801b90819004600f0b92046001600160801b0316906001600160601b031661109e565b6003548754655af3107a40006001600160601b038083166001600160801b0394851681028390048516600160601b027fffffffff00000000000000000000000000000000ffffffffffffffffffffffff90941684178c556004805460018e0180549188169690941690921794850284900486166001600160801b0319928316811784558154600160801b9081900488168702869004881681029091179093556005805460028f01805491891688028790048916919094168117845590548490048716909502939093048516909102909217909155604080517fb77503ae0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811693820193909352898416602482015288841660448201528784166064820152868416608482015292841660a4840152519293507f0000000000000000000000000000000000000000000000000000000000000000169163b77503ae9160c48082019260009290919082900301818387803b15801561146157600080fd5b505af1158015611475573d6000803e3d6000fd5b5050505050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216600090815260066020526040902080546001600160601b038084169116108061151957506001600160601b038216155b15611550576040517f9b54028b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61155861051d565b80546bffffffffffffffffffffffff1981166001600160601b039182168490038216178255600380546bffffffffffffffffffffffff60801b198116600160801b8083048516879003851602908117909255655af3107a40006001600160801b039182169190921617918416919091020481546115df9190600160601b9004600f0b611fe0565b81547fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b0392831602178255600454655af3107a400091166001600160601b038416020460018201546116419190600f0b611fe0565b6001820180546001600160801b0319166001600160801b03928316179055600454655af3107a4000600160801b9091049091166001600160601b038416020460018201546116999190600160801b9004600f0b611fe0565b6001820180546001600160801b03928316600160801b029083161790556005546116da911683655af3107a40006001600160601b0391909116919091020490565b60028201546116ec9190600f0b611fe0565b6002820180546001600160801b0319166001600160801b03928316179055600554655af3107a4000600160801b9091049091166001600160601b038416020460028201546117449190600160801b9004600f0b611fe0565b6002820180546001600160801b03928316600160801b02921691909117905560405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03841660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b1580156117d557600080fd5b505af11580156117e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180d9190611f43565b506040516001600160601b03831681526001600160a01b038416907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2505050565b6001600160a01b03821660009081526006602052604090206001600160601b0382166118995760405163fd9eaf9160e01b815260040160405180910390fd5b6118a161051d565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561190357600080fd5b505afa158015611917573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193b9190612042565b82546bffffffffffffffffffffffff1981166001600160601b0391821686018216178455600380546bffffffffffffffffffffffff60801b198116600160801b80830485168901851602908117909255929350655af3107a40006001600160801b039384169390911692909217908516020482546119c39190600160601b9004600f0b61205b565b82547fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b0392831602178355600454655af3107a400091166001600160601b03851602046001830154611a259190600f0b61205b565b6001830180546001600160801b0319166001600160801b03928316179055600454655af3107a4000600160801b9091049091166001600160601b03851602046001830154611a7d9190600160801b9004600f0b61205b565b6001830180546001600160801b03928316600160801b02908316179055600554611abe911684655af3107a40006001600160601b0391909116919091020490565b6002830154611ad09190600f0b61205b565b6002830180546001600160801b0319166001600160801b03928316179055600554655af3107a4000600160801b9091049091166001600160601b03851602046002830154611b289190600160801b9004600f0b61205b565b6002830180546001600160801b03928316600160801b0292169190911790556040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301523060248301526001600160601b03851660448301527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401602060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c109190611f43565b506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015611c7057600080fd5b505afa158015611c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca89190612042565b836001600160601b0316820114611cd25760405163fd9eaf9160e01b815260040160405180910390fd5b6040516001600160601b03841681526001600160a01b038516907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a250505050565b69ffffffffffffffffffff81168114610ea457600080fd5b600060208284031215611d4957600080fd5b81356110f581611d1f565b80356001600160a01b0381168114611d6b57600080fd5b919050565b600060208284031215611d8257600080fd5b6110f582611d54565b60008060408385031215611d9e57600080fd5b611da783611d54565b915060208301356affffffffffffffffffffff81168114611dc757600080fd5b809150509250929050565b600060208284031215611de457600080fd5b81356001600160601b03811681146110f557600080fd5b600060208284031215611e0d57600080fd5b813563ffffffff811681146110f557600080fd5b634e487b7160e01b600052601260045260246000fd5b600080600080600060a08688031215611e4f57600080fd5b8551611e5a81611d1f565b6020870151909550611e6b81611d1f565b6040870151909450611e7c81611d1f565b6060870151909350611e8d81611d1f565b6080870151909250611e9e81611d1f565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ed557611ed5611eac565b500190565b6000816000190483118215151615611ef457611ef4611eac565b500290565b600082611f1657634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160601b0383811690831681811015611f3b57611f3b611eac565b039392505050565b600060208284031215611f5557600080fd5b815180151581146110f557600080fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19811415611f8c57611f8c611eac565b60000392915050565b60006001600160801b03808316818516808303821115611fb757611fb7611eac565b01949350505050565b60006001600160801b0383811690831681811015611f3b57611f3b611eac565b600081600f0b83600f0b60008112816f7fffffffffffffffffffffffffffffff190183128115161561201457612014611eac565b816f7fffffffffffffffffffffffffffffff01831381161561203857612038611eac565b5090039392505050565b60006020828403121561205457600080fd5b5051919050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff0382138115161561208e5761208e611eac565b826f7fffffffffffffffffffffffffffffff190382128116156120b3576120b3611eac565b5001939250505056fea26469706673582212207818e2c94a197f97c67256cc93226da5990aec839ecceb3378444c72b831abd164736f6c6343000809003300000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101b85760003560e01c8063854cff2f116100f9578063dee4dea011610097578063e872375411610071578063e872375414610480578063f2fde38b14610493578063fbe1ebec146104a6578063fd44d860146104b957600080fd5b8063dee4dea014610447578063e305e54a1461045a578063e4eae6b71461046d57600080fd5b8063952e80d1116100d3578063952e80d1146103eb578063b3ab15fb14610405578063c8abb5a414610418578063db2e21bc1461043f57600080fd5b8063854cff2f146103b45780638da5cb5b146103c757806393e59dc1146103d857600080fd5b80634641257d11610166578063570ca73511610140578063570ca7351461036c578063583411821461037f578063715018a61461039957806379017d1b146103a157600080fd5b80634641257d146102f957806350b6f4d114610301578063536785ff1461032d57600080fd5b80632a410068116101975780632a410068146102a157806331d7a262146102ab578063436d9bcf146102e657600080fd5b80621db0ba146101bd5780630a7979b1146101ed5780631959a00214610200575b600080fd5b6003546101d0906001600160801b031681565b6040516001600160801b0390911681526020015b60405180910390f35b6101d06101fb366004611d37565b6104cc565b61025e61020e366004611d70565b6006602052600090815260409020805460018201546002909201546001600160601b03821692600160601b909204600f90810b9280820b92600160801b91829004830b9281810b92909104900b86565b604080516001600160601b039097168752600f95860b602088015293850b9386019390935290830b6060850152820b6080840152900b60a082015260c0016101e4565b6102a961051d565b005b6102be6102b9366004611d70565b6107f9565b604080519586526020860194909452928401919091526060830152608082015260a0016101e4565b6004546101d0906001600160801b031681565b6102a9610b11565b60035461031890600160e01b900463ffffffff1681565b60405163ffffffff90911681526020016101e4565b6103547f00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad81565b6040516001600160a01b0390911681526020016101e4565b600254610354906001600160a01b031681565b6004546101d090600160801b90046001600160801b031681565b6102a9610b24565b6102a96103af366004611d8b565b610b8d565b6102a96103c2366004611d70565b610bd3565b6000546001600160a01b0316610354565b600154610354906001600160a01b031681565b6005546101d090600160801b90046001600160801b031681565b6102a9610413366004611d70565b610c5c565b6103547f000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce181565b6102a9610ce5565b6102a9610455366004611dd2565b610e92565b6102a9610468366004611d8b565b610ea7565b6102a961047b366004611dd2565b610ee9565b6102a961048e366004611dfb565b610efb565b6102a96104a1366004611d70565b610f8b565b6102a96104b4366004611d70565b61106a565b6005546101d0906001600160801b031681565b6003546000906001600160601b03600160801b8204169063ffffffff600160e01b90910416420369ffffffffffffffffffff841602655af3107a4000028161051657610516611e21565b0492915050565b600354600160e01b900463ffffffff16421161053557565b600354600160801b90046001600160601b031661056b57600380546001600160e01b0316600160e01b4263ffffffff1602179055565b60008060008060007f00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad6001600160a01b031663b7c9252c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156105cc57600080fd5b505afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106049190611e37565b94509450945094509450610617856104cc565b600380546001600160801b031981166001600160801b039182169390930116919091179055610645846104cc565b600480546001600160801b031981166001600160801b039182169390930116919091179055610673836104cc565b600480546001600160801b03600160801b80830482169094018116840291161790556003546001600160601b039190041669ffffffffffffffffffff8316655af3107a400002816106c6576106c6611e21565b600580546001600160801b03198116939092046001600160801b0392831601909116919091179055600354600160801b90046001600160601b0316655af3107a400069ffffffffffffffffffff8316028161072357610723611e21565b04600560108282829054906101000a90046001600160801b03160192506101000a8154816001600160801b0302191690836001600160801b031602179055507f00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad6001600160a01b031663756864596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107bd57600080fd5b505af11580156107d1573d6000803e3d6000fd5b5050600380546001600160e01b0316600160e01b4263ffffffff160217905550505050505050565b60035460045460055460009283928392839283926001600160801b038083169381831693600160801b9384900483169383831693920490911690600160e01b900463ffffffff164211801561085f5750600354600160801b90046001600160601b031615155b156109f35760008060008060007f00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad6001600160a01b031663b7c9252c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156108c557600080fd5b505afa1580156108d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd9190611e37565b94509450945094509450610910856104cc565b610923906001600160801b03168b611ec2565b995061092e846104cc565b610941906001600160801b03168a611ec2565b985061094c836104cc565b61095f906001600160801b031689611ec2565b600354909850600160801b90046001600160601b0316610991655af3107a400069ffffffffffffffffffff8516611eda565b61099b9190611ef9565b6109a59088611ec2565b600354909750600160801b90046001600160601b03166109d7655af3107a400069ffffffffffffffffffff8416611eda565b6109e19190611ef9565b6109eb9087611ec2565b955050505050505b6001600160a01b038b16600090815260066020908152604091829020825160c08101845281546001600160601b038116808352600160601b909104600f90810b948301859052600184015480820b96840196909652600160801b95869004810b606084015260029093015480840b60808401529490940490910b60a082015291610a7f9190889061109e565b6001600160801b03169a50610a9d816040015186836000015161109e565b6001600160801b03169950610abb816060015185836000015161109e565b6001600160801b03169850610ad9816080015184836000015161109e565b6001600160801b03169750610af78160a0015183836000015161109e565b6001600160801b0316965050505050505091939590929450565b610b196110fc565b610b22336111bb565b565b6000546001600160a01b03163314610b835760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610b226000611482565b6002546001600160a01b03163314610bb85760405163075fd2b160e01b815260040160405180910390fd5b610bcf82826affffffffffffffffffffff166114df565b5050565b6000546001600160a01b03163314610c2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610cb65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610ced6110fc565b33600090815260066020526040902080547fffffffff00000000000000000000000000000000000000000000000000000000811682556003546001600160601b0391821691600160801b909104168111610d8e5780600360108282829054906101000a90046001600160601b0316610d659190611f1b565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610da7565b600380546bffffffffffffffffffffffff60801b191690555b60405163a9059cbb60e01b81523360048201526001600160601b03821660248201527f000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce16001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610e1757600080fd5b505af1158015610e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4f9190611f43565b506040516001600160601b038216815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a25050565b610e9a6110fc565b610ea433826114df565b50565b6002546001600160a01b03163314610ed25760405163075fd2b160e01b815260040160405180910390fd5b610bcf82826affffffffffffffffffffff1661185a565b610ef16110fc565b610ea4338261185a565b6000546001600160a01b03163314610f555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b600354600160e01b900463ffffffff16610ea4576003805463ffffffff8316600160e01b026001600160e01b0390911617905550565b6000546001600160a01b03163314610fe55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7a565b6001600160a01b0381166110615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b7a565b610ea481611482565b6002546001600160a01b031633146110955760405163075fd2b160e01b815260040160405180910390fd5b610ea4816111bb565b60008084600f0b12156110d8576110b484611f65565b6110d190655af3107a40006001600160601b038516860204611f95565b90506110f5565b6110d184655af3107a40006001600160601b038516860204611fc0565b9392505050565b33321480159061119d57506001546040517f3af32abf0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911690633af32abf9060240160206040518083038186803b15801561116357600080fd5b505afa158015611177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119b9190611f43565b155b15610b225760405163075fd2b160e01b815260040160405180910390fd5b6111c361051d565b6001600160a01b0381166000908152600660205260408120805460035491929161120a91600160601b8104600f0b916001600160801b0316906001600160601b031661109e565b6001830154600454845492935060009261123a92600f0b916001600160801b0316906001600160601b031661109e565b6001840154600454855492935060009261127492600160801b90819004600f0b92046001600160801b0316906001600160601b031661109e565b600285015460055486549293506000926112a492600f0b916001600160801b0316906001600160601b031661109e565b600286015460055487549293506000926112de92600160801b90819004600f0b92046001600160801b0316906001600160601b031661109e565b6003548754655af3107a40006001600160601b038083166001600160801b0394851681028390048516600160601b027fffffffff00000000000000000000000000000000ffffffffffffffffffffffff90941684178c556004805460018e0180549188169690941690921794850284900486166001600160801b0319928316811784558154600160801b9081900488168702869004881681029091179093556005805460028f01805491891688028790048916919094168117845590548490048716909502939093048516909102909217909155604080517fb77503ae0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811693820193909352898416602482015288841660448201528784166064820152868416608482015292841660a4840152519293507f00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad169163b77503ae9160c48082019260009290919082900301818387803b15801561146157600080fd5b505af1158015611475573d6000803e3d6000fd5b5050505050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216600090815260066020526040902080546001600160601b038084169116108061151957506001600160601b038216155b15611550576040517f9b54028b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61155861051d565b80546bffffffffffffffffffffffff1981166001600160601b039182168490038216178255600380546bffffffffffffffffffffffff60801b198116600160801b8083048516879003851602908117909255655af3107a40006001600160801b039182169190921617918416919091020481546115df9190600160601b9004600f0b611fe0565b81547fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b0392831602178255600454655af3107a400091166001600160601b038416020460018201546116419190600f0b611fe0565b6001820180546001600160801b0319166001600160801b03928316179055600454655af3107a4000600160801b9091049091166001600160601b038416020460018201546116999190600160801b9004600f0b611fe0565b6001820180546001600160801b03928316600160801b029083161790556005546116da911683655af3107a40006001600160601b0391909116919091020490565b60028201546116ec9190600f0b611fe0565b6002820180546001600160801b0319166001600160801b03928316179055600554655af3107a4000600160801b9091049091166001600160601b038416020460028201546117449190600160801b9004600f0b611fe0565b6002820180546001600160801b03928316600160801b02921691909117905560405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03841660248301527f000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1169063a9059cbb90604401602060405180830381600087803b1580156117d557600080fd5b505af11580156117e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180d9190611f43565b506040516001600160601b03831681526001600160a01b038416907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2505050565b6001600160a01b03821660009081526006602052604090206001600160601b0382166118995760405163fd9eaf9160e01b815260040160405180910390fd5b6118a161051d565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce16001600160a01b0316906370a082319060240160206040518083038186803b15801561190357600080fd5b505afa158015611917573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193b9190612042565b82546bffffffffffffffffffffffff1981166001600160601b0391821686018216178455600380546bffffffffffffffffffffffff60801b198116600160801b80830485168901851602908117909255929350655af3107a40006001600160801b039384169390911692909217908516020482546119c39190600160601b9004600f0b61205b565b82547fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b0392831602178355600454655af3107a400091166001600160601b03851602046001830154611a259190600f0b61205b565b6001830180546001600160801b0319166001600160801b03928316179055600454655af3107a4000600160801b9091049091166001600160601b03851602046001830154611a7d9190600160801b9004600f0b61205b565b6001830180546001600160801b03928316600160801b02908316179055600554611abe911684655af3107a40006001600160601b0391909116919091020490565b6002830154611ad09190600f0b61205b565b6002830180546001600160801b0319166001600160801b03928316179055600554655af3107a4000600160801b9091049091166001600160601b03851602046002830154611b289190600160801b9004600f0b61205b565b6002830180546001600160801b03928316600160801b0292169190911790556040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301523060248301526001600160601b03851660448301527f000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce116906323b872dd90606401602060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c109190611f43565b506040516370a0823160e01b81523060048201527f000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce16001600160a01b0316906370a082319060240160206040518083038186803b158015611c7057600080fd5b505afa158015611c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca89190612042565b836001600160601b0316820114611cd25760405163fd9eaf9160e01b815260040160405180910390fd5b6040516001600160601b03841681526001600160a01b038516907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a250505050565b69ffffffffffffffffffff81168114610ea457600080fd5b600060208284031215611d4957600080fd5b81356110f581611d1f565b80356001600160a01b0381168114611d6b57600080fd5b919050565b600060208284031215611d8257600080fd5b6110f582611d54565b60008060408385031215611d9e57600080fd5b611da783611d54565b915060208301356affffffffffffffffffffff81168114611dc757600080fd5b809150509250929050565b600060208284031215611de457600080fd5b81356001600160601b03811681146110f557600080fd5b600060208284031215611e0d57600080fd5b813563ffffffff811681146110f557600080fd5b634e487b7160e01b600052601260045260246000fd5b600080600080600060a08688031215611e4f57600080fd5b8551611e5a81611d1f565b6020870151909550611e6b81611d1f565b6040870151909450611e7c81611d1f565b6060870151909350611e8d81611d1f565b6080870151909250611e9e81611d1f565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ed557611ed5611eac565b500190565b6000816000190483118215151615611ef457611ef4611eac565b500290565b600082611f1657634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160601b0383811690831681811015611f3b57611f3b611eac565b039392505050565b600060208284031215611f5557600080fd5b815180151581146110f557600080fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19811415611f8c57611f8c611eac565b60000392915050565b60006001600160801b03808316818516808303821115611fb757611fb7611eac565b01949350505050565b60006001600160801b0383811690831681811015611f3b57611f3b611eac565b600081600f0b83600f0b60008112816f7fffffffffffffffffffffffffffffff190183128115161561201457612014611eac565b816f7fffffffffffffffffffffffffffffff01831381161561203857612038611eac565b5090039392505050565b60006020828403121561205457600080fd5b5051919050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff0382138115161561208e5761208e611eac565b826f7fffffffffffffffffffffffffffffff190382128116156120b3576120b3611eac565b5001939250505056fea26469706673582212207818e2c94a197f97c67256cc93226da5990aec839ecceb3378444c72b831abd164736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1
-----Decoded View---------------
Arg [0] : _rewardsDistro (address): 0x38e517AB9edF86e8089633041ECb2E5Db00715aD
Arg [1] : _plsDpx (address): 0xF236ea74B515eF96a9898F5a4ed4Aa591f253Ce1
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000038e517ab9edf86e8089633041ecb2e5db00715ad
Arg [1] : 000000000000000000000000f236ea74b515ef96a9898f5a4ed4aa591f253ce1
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ARB | 100.00% | $7.52 | 20.6209 | $155.07 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.