Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 5,572 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get Reward | 18752326 | 415 days ago | IN | 0 ETH | 0.00232218 | ||||
Exit | 18752286 | 415 days ago | IN | 0 ETH | 0.00240068 | ||||
Compound | 14033262 | 1105 days ago | IN | 0 ETH | 0.00704412 | ||||
Compound | 14033099 | 1105 days ago | IN | 0 ETH | 0.01011764 | ||||
Compound | 14006846 | 1109 days ago | IN | 0 ETH | 0.01179842 | ||||
Withdraw | 14006845 | 1109 days ago | IN | 0 ETH | 0.01402706 | ||||
Exit | 14006822 | 1109 days ago | IN | 0 ETH | 0.01387317 | ||||
Get Reward | 14006815 | 1109 days ago | IN | 0 ETH | 0.01299975 | ||||
Compound | 13932960 | 1121 days ago | IN | 0 ETH | 0.00776152 | ||||
Get Reward | 13916903 | 1123 days ago | IN | 0 ETH | 0.00592122 | ||||
Compound | 13881593 | 1129 days ago | IN | 0 ETH | 0.0050198 | ||||
Compound | 13879531 | 1129 days ago | IN | 0 ETH | 0.00406262 | ||||
Get Reward | 13878178 | 1129 days ago | IN | 0 ETH | 0.0091799 | ||||
Get Reward | 13802368 | 1141 days ago | IN | 0 ETH | 0.0066003 | ||||
Get Reward | 13779853 | 1144 days ago | IN | 0 ETH | 0.00978206 | ||||
Compound | 13771093 | 1146 days ago | IN | 0 ETH | 0.00521562 | ||||
Get Reward | 13769694 | 1146 days ago | IN | 0 ETH | 0.00578707 | ||||
Get Reward | 13769688 | 1146 days ago | IN | 0 ETH | 0.00828132 | ||||
Get Reward | 13767616 | 1146 days ago | IN | 0 ETH | 0.01154045 | ||||
Get Reward | 13766939 | 1146 days ago | IN | 0 ETH | 0.0082609 | ||||
Withdraw | 13764913 | 1147 days ago | IN | 0 ETH | 0.00800503 | ||||
Withdraw | 13764364 | 1147 days ago | IN | 0 ETH | 0.00902124 | ||||
Withdraw | 13764025 | 1147 days ago | IN | 0 ETH | 0.00693766 | ||||
Get Reward | 13757526 | 1148 days ago | IN | 0 ETH | 0.00887846 | ||||
Withdraw | 13748128 | 1149 days ago | IN | 0 ETH | 0.01425656 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12698206 | 1313 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StakingRewards
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.7.6; // Libraries import '@openzeppelin/contracts/math/Math.sol'; import '@openzeppelin/contracts/math/SafeMath.sol'; import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; // Interfaces import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import './interfaces/IStakingRewards.sol'; // Contracts import '@openzeppelin/contracts/utils/ReentrancyGuard.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import './RewardsDistributionRecipient.sol'; contract StakingRewards is RewardsDistributionRecipient, ReentrancyGuard, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ IERC20 public rewardsTokenDPX; IERC20 public rewardsTokenRDPX; IERC20 public stakingToken; uint256 public boost = 0; uint256 public periodFinish = 0; uint256 public boostedFinish = 0; uint256 public rewardRateDPX = 0; uint256 public rewardRateRDPX = 0; uint256 public rewardsDuration; uint256 public lastUpdateTime; uint256 public rewardPerTokenStoredDPX; uint256 public rewardPerTokenStoredRDPX; uint256 public boostedTimePeriod; uint256 public id; mapping(address => uint256) public userDPXRewardPerTokenPaid; mapping(address => uint256) public userRDPXRewardPerTokenPaid; mapping(address => uint256) public rewardsDPX; mapping(address => uint256) public rewardsRDPX; uint256 private _totalSupply; mapping(address => uint256) private _balances; /* ========== CONSTRUCTOR ========== */ constructor( address _rewardsDistribution, address _rewardsTokenDPX, address _rewardsTokenRDPX, address _stakingToken, uint256 _rewardsDuration, uint256 _boostedTimePeriod, uint256 _boost, uint256 _id ) Ownable() { rewardsTokenDPX = IERC20(_rewardsTokenDPX); rewardsTokenRDPX = IERC20(_rewardsTokenRDPX); stakingToken = IERC20(_stakingToken); rewardsDistribution = _rewardsDistribution; rewardsDuration = _rewardsDuration; boostedTimePeriod = _boostedTimePeriod; boost = _boost; id = _id; } /* ========== VIEWS ========== */ function totalSupply() external view returns (uint256) { return _totalSupply; } function balanceOf(address account) external view returns (uint256) { return _balances[account]; } function lastTimeRewardApplicable() public view returns (uint256) { uint256 timeApp = Math.min(block.timestamp, periodFinish); return timeApp; } function rewardPerToken() public view returns (uint256, uint256) { if (_totalSupply == 0) { uint256 perTokenRateDPX = rewardPerTokenStoredDPX; uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX; return (perTokenRateDPX, perTokenRateRDPX); } if (block.timestamp < boostedFinish) { uint256 perTokenRateDPX = rewardPerTokenStoredDPX.add( lastTimeRewardApplicable() .sub(lastUpdateTime) .mul(rewardRateDPX.mul(boost)) .mul(1e18) .div(_totalSupply) ); uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX.add( lastTimeRewardApplicable() .sub(lastUpdateTime) .mul(rewardRateRDPX.mul(boost)) .mul(1e18) .div(_totalSupply) ); return (perTokenRateDPX, perTokenRateRDPX); } else { if (lastUpdateTime < boostedFinish) { uint256 perTokenRateDPX = rewardPerTokenStoredDPX .add( boostedFinish.sub(lastUpdateTime).mul(rewardRateDPX.mul(boost)).mul(1e18).div( _totalSupply ) ) .add( lastTimeRewardApplicable().sub(boostedFinish).mul(rewardRateDPX).mul(1e18).div( _totalSupply ) ); uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX .add( boostedFinish.sub(lastUpdateTime).mul(rewardRateRDPX.mul(boost)).mul(1e18).div( _totalSupply ) ) .add( lastTimeRewardApplicable().sub(boostedFinish).mul(rewardRateRDPX).mul(1e18).div( _totalSupply ) ); return (perTokenRateDPX, perTokenRateRDPX); } else { uint256 perTokenRateDPX = rewardPerTokenStoredDPX.add( lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateDPX).mul(1e18).div( _totalSupply ) ); uint256 perTokenRateRDPX = rewardPerTokenStoredRDPX.add( lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRateRDPX).mul(1e18).div( _totalSupply ) ); return (perTokenRateDPX, perTokenRateRDPX); } } } function earned(address account) public view returns (uint256 DPXtokensEarned, uint256 RDPXtokensEarned) { uint256 perTokenRateDPX; uint256 perTokenRateRDPX; (perTokenRateDPX, perTokenRateRDPX) = rewardPerToken(); DPXtokensEarned = _balances[account] .mul(perTokenRateDPX.sub(userDPXRewardPerTokenPaid[account])) .div(1e18) .add(rewardsDPX[account]); RDPXtokensEarned = _balances[account] .mul(perTokenRateRDPX.sub(userRDPXRewardPerTokenPaid[account])) .div(1e18) .add(rewardsRDPX[account]); } /* ========== MUTATIVE FUNCTIONS ========== */ function stakeWithPermit( uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external payable nonReentrant updateReward(msg.sender) { require(amount > 0, 'Cannot stake 0'); _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); // permit IUniswapV2ERC20(address(stakingToken)).permit( msg.sender, address(this), amount, deadline, v, r, s ); stakingToken.safeTransferFrom(msg.sender, address(this), amount); emit Staked(msg.sender, amount); } function stake(uint256 amount) external payable nonReentrant updateReward(msg.sender) { require(amount > 0, 'Cannot stake 0'); _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); stakingToken.safeTransferFrom(msg.sender, address(this), amount); emit Staked(msg.sender, amount); } function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) { require(amount > 0, 'Cannot withdraw 0'); require(amount <= _balances[msg.sender], 'Insufficent balance'); _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); stakingToken.safeTransfer(msg.sender, amount); emit Withdrawn(msg.sender, amount); } function withdrawRewardTokens(uint256 amountDPX, uint256 amountRDPX) public onlyOwner returns (uint256, uint256) { address OwnerAddress = owner(); if (OwnerAddress == msg.sender) { IERC20(rewardsTokenDPX).safeTransfer(OwnerAddress, amountDPX); IERC20(rewardsTokenRDPX).safeTransfer(OwnerAddress, amountRDPX); } return (amountDPX, amountRDPX); } function compound() public nonReentrant updateReward(msg.sender) { uint256 rewardDPX = rewardsDPX[msg.sender]; require(rewardDPX > 0, 'stake address not found'); require(rewardsTokenDPX == stakingToken, "Can't stake the reward token."); rewardsDPX[msg.sender] = 0; _totalSupply = _totalSupply.add(rewardDPX); _balances[msg.sender] = _balances[msg.sender].add(rewardDPX); emit RewardCompounded(msg.sender, rewardDPX); } function getReward(uint256 rewardsTokenID) public nonReentrant updateReward(msg.sender) { if (rewardsTokenID == 0) { uint256 rewardDPX = rewardsDPX[msg.sender]; require(rewardDPX > 0, 'can not withdraw 0 DPX reward'); rewardsDPX[msg.sender] = 0; rewardsTokenDPX.safeTransfer(msg.sender, rewardDPX); emit RewardPaid(msg.sender, rewardDPX); } else if (rewardsTokenID == 1) { uint256 rewardRDPX = rewardsRDPX[msg.sender]; require(rewardRDPX > 0, 'can not withdraw 0 RDPX reward'); rewardsRDPX[msg.sender] = 0; rewardsTokenRDPX.safeTransfer(msg.sender, rewardRDPX); emit RewardPaid(msg.sender, rewardRDPX); } else { uint256 rewardDPX = rewardsDPX[msg.sender]; uint256 rewardRDPX = rewardsRDPX[msg.sender]; if (rewardDPX > 0) { rewardsDPX[msg.sender] = 0; rewardsTokenDPX.safeTransfer(msg.sender, rewardDPX); } if (rewardRDPX > 0) { rewardsRDPX[msg.sender] = 0; rewardsTokenRDPX.safeTransfer(msg.sender, rewardRDPX); } emit RewardPaid(msg.sender, rewardDPX); emit RewardPaid(msg.sender, rewardRDPX); } } function exit() external { getReward(2); withdraw(_balances[msg.sender]); } /* ========== RESTRICTED FUNCTIONS ========== */ function notifyRewardAmount(uint256 rewardDPX, uint256 rewardRDPX) external override onlyRewardsDistribution setReward(address(0)) { if (periodFinish == 0) { rewardRateDPX = rewardDPX.div(rewardsDuration.add(boostedTimePeriod)); rewardRateRDPX = rewardRDPX.div(rewardsDuration.add(boostedTimePeriod)); lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(rewardsDuration); boostedFinish = block.timestamp.add(boostedTimePeriod); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftoverDPX = remaining.mul(rewardRateDPX); uint256 leftoverRDPX = remaining.mul(rewardRateRDPX); rewardRateDPX = rewardDPX.add(leftoverDPX).div(rewardsDuration); rewardRateRDPX = rewardRDPX.add(leftoverRDPX).div(rewardsDuration); lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(rewardsDuration); } emit RewardAdded(rewardDPX, rewardRDPX); } /* ========== MODIFIERS ========== */ // Modifier Set Reward modifier modifier setReward(address account) { (rewardPerTokenStoredDPX, rewardPerTokenStoredRDPX) = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { (rewardsDPX[account], rewardsRDPX[account]) = earned(account); userDPXRewardPerTokenPaid[account] = rewardPerTokenStoredDPX; userRDPXRewardPerTokenPaid[account] = rewardPerTokenStoredRDPX; } _; } // Modifier *Update Reward modifier* modifier updateReward(address account) { (rewardPerTokenStoredDPX, rewardPerTokenStoredRDPX) = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { (rewardsDPX[account], rewardsRDPX[account]) = earned(account); userDPXRewardPerTokenPaid[account] = rewardPerTokenStoredDPX; userRDPXRewardPerTokenPaid[account] = rewardPerTokenStoredRDPX; } _; } /* ========== EVENTS ========== */ event RewardUpdated(uint256 rewardDPX, uint256 rewardRDPX); event RewardAdded(uint256 rewardDPX, uint256 rewardRDPX); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardCompounded(address indexed user, uint256 rewardDPX); } interface IUniswapV2ERC20 { function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.7.6; interface IStakingRewards { // Views function lastTimeRewardApplicable() external view returns (uint256); function rewardPerToken() external view returns (uint256, uint256); function earned(address account) external view returns (uint256, uint256); function getRewardForDuration() external view returns (uint256, uint256); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); // Mutative function stake(uint256 amount) external payable; function withdraw(uint256 amount) external; function getReward(uint256 rewardsTokenID) external; function exit() external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.7.6; abstract contract RewardsDistributionRecipient { address public rewardsDistribution; function notifyRewardAmount(uint256 rewardDPX, uint256 rewardRDPX) external virtual; modifier onlyRewardsDistribution() { require(msg.sender == rewardsDistribution, 'Caller is not RewardsDistribution contract'); _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsTokenDPX","type":"address"},{"internalType":"address","name":"_rewardsTokenRDPX","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"},{"internalType":"uint256","name":"_boostedTimePeriod","type":"uint256"},{"internalType":"uint256","name":"_boost","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"}],"name":"RewardCompounded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"RewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedTimePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"DPXtokensEarned","type":"uint256"},{"internalType":"uint256","name":"RDPXtokensEarned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardsTokenID","type":"uint256"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardDPX","type":"uint256"},{"internalType":"uint256","name":"rewardRDPX","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStoredDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStoredRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsRDPX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTokenRDPX","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userDPXRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRDPXRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountDPX","type":"uint256"},{"internalType":"uint256","name":"amountRDPX","type":"uint256"}],"name":"withdrawRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006006556000600755600060085560006009556000600a5534801561002957600080fd5b506040516121ec3803806121ec833981810160405261010081101561004d57600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015160018055959694959394929391929091600061008e610144565b600280546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b03199081166001600160a01b03998a16179091556004805482169789169790971790965560058054871695881695909517909455600080549095169690951695909517909255600b91909155600f92909255600655601055610148565b3390565b612095806101576000396000f3fe6080604052600436106102035760003560e01c80638da5cb5b11610118578063c8f33c91116100a0578063e9fad8ee1161006f578063e9fad8ee146105e3578063ebe2b12b146105f8578063ecd9ba821461060d578063f2fde38b14610645578063f69e20461461067857610203565b8063c8f33c911461058f578063c9b6b2b1146105a4578063cd3daf9d146105b9578063e363208e146105ce57610203565b8063ac2c5413116100e7578063ac2c5413146104ea578063ad46a40c146104ff578063af640d0f14610514578063bc1e25dc14610529578063c11e1e4b1461055c57610203565b80638da5cb5b14610470578063a1411e6714610485578063a66f42c0146104b8578063a694fc3a146104cd57610203565b80632e1a7d4d1161019b57806370a082311161016a57806370a08231146103e9578063715018a61461041c57806372f702f31461043157806380faa57d146104465780638a0dfa0d1461045b57610203565b80632e1a7d4d14610380578063386a9525146103aa57806338736f49146103bf5780633fc6df6e146103d457610203565b806318160ddd116101d757806318160ddd146102df5780631c4b774b146102f4578063246132f9146103205780632729f5841461035057610203565b80628cc262146102085780630131c87014610254578063080b3ead1461028557806318156416146102ac575b600080fd5b34801561021457600080fd5b5061023b6004803603602081101561022b57600080fd5b50356001600160a01b031661068d565b6040805192835260208301919091528051918290030190f35b34801561026057600080fd5b50610269610764565b604080516001600160a01b039092168252519081900360200190f35b34801561029157600080fd5b5061029a610773565b60408051918252519081900360200190f35b3480156102b857600080fd5b5061029a600480360360208110156102cf57600080fd5b50356001600160a01b0316610779565b3480156102eb57600080fd5b5061029a61078b565b34801561030057600080fd5b5061031e6004803603602081101561031757600080fd5b5035610791565b005b34801561032c57600080fd5b5061031e6004803603604081101561034357600080fd5b5080359060200135610aa2565b34801561035c57600080fd5b5061023b6004803603604081101561037357600080fd5b5080359060200135610c9d565b34801561038c57600080fd5b5061031e600480360360208110156103a357600080fd5b5035610d5e565b3480156103b657600080fd5b5061029a610f55565b3480156103cb57600080fd5b5061029a610f5b565b3480156103e057600080fd5b50610269610f61565b3480156103f557600080fd5b5061029a6004803603602081101561040c57600080fd5b50356001600160a01b0316610f70565b34801561042857600080fd5b5061031e610f8b565b34801561043d57600080fd5b5061026961103f565b34801561045257600080fd5b5061029a61104e565b34801561046757600080fd5b5061029a611063565b34801561047c57600080fd5b50610269611069565b34801561049157600080fd5b5061029a600480360360208110156104a857600080fd5b50356001600160a01b0316611078565b3480156104c457600080fd5b5061029a61108a565b61031e600480360360208110156104e357600080fd5b5035611090565b3480156104f657600080fd5b5061029a61122b565b34801561050b57600080fd5b5061029a611231565b34801561052057600080fd5b5061029a611237565b34801561053557600080fd5b5061029a6004803603602081101561054c57600080fd5b50356001600160a01b031661123d565b34801561056857600080fd5b5061029a6004803603602081101561057f57600080fd5b50356001600160a01b031661124f565b34801561059b57600080fd5b5061029a611261565b3480156105b057600080fd5b5061029a611267565b3480156105c557600080fd5b5061023b61126d565b3480156105da57600080fd5b5061026961145c565b3480156105ef57600080fd5b5061031e61146b565b34801561060457600080fd5b5061029a611490565b61031e600480360360a081101561062357600080fd5b5080359060208101359060ff6040820135169060608101359060800135611496565b34801561065157600080fd5b5061031e6004803603602081101561066857600080fd5b50356001600160a01b03166116c0565b34801561068457600080fd5b5061031e6117cb565b60008060008061069b61126d565b6001600160a01b0387166000908152601360209081526040808320546011909252909120549294509092506107129161070c90670de0b6b3a764000090610706906106e79088906119dd565b6001600160a01b038b1660009081526016602052604090205490611a28565b90611a81565b90611ac3565b6001600160a01b03861660009081526014602090815260408083205460129092529091205491955061075b9161070c90670de0b6b3a764000090610706906106e79087906119dd565b92505050915091565b6003546001600160a01b031681565b60095481565b60126020526000908152604090205481565b60155490565b600260015414156107d7576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b6002600155336107e561126d565b600e55600d556107f361104e565b600c556001600160a01b038116156108515761080e8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b8161091d5733600090815260136020526040902054806108b8576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b336000818152601360205260408120556003546108e1916001600160a01b039091169083611b1d565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610a9a565b81600114156109b1573360009081526014602052604090205480610988576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b336000818152601460205260408120556004546108e1916001600160a01b039091169083611b1d565b3360009081526013602090815260408083205460149092529091205481156109fc57336000818152601360205260408120556003546109fc916001600160a01b039091169084611b1d565b8015610a2b5733600081815260146020526040812055600454610a2b916001600160a01b039091169083611b1d565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b505060018055565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b815260040180806020018281038252602a81526020018061200c602a913960400191505060405180910390fd5b6000610af561126d565b600e55600d55610b0361104e565b600c556001600160a01b03811615610b6157610b1e8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b600754610bd657610b89610b82600f54600b54611ac390919063ffffffff16565b8490611a81565b600955600f54600b54610ba791610ba09190611ac3565b8390611a81565b600a5542600c819055600b54610bbd9190611ac3565b600755600f54610bce904290611ac3565b600855610c5d565b600754600090610be690426119dd565b90506000610bff60095483611a2890919063ffffffff16565b90506000610c18600a5484611a2890919063ffffffff16565b600b54909150610c2c906107068885611ac3565b600955600b54610c40906107068784611ac3565b600a5542600c819055600b54610c569190611ac3565b6007555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b600080610ca8611b74565b6002546001600160a01b03908116911614610d0a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000610d14611069565b90506001600160a01b038116331415610d5557600354610d3e906001600160a01b03168287611b1d565b600454610d55906001600160a01b03168286611b1d565b50929391925050565b60026001541415610da4576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b600260015533610db261126d565b600e55600d55610dc061104e565b600c556001600160a01b03811615610e1e57610ddb8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b60008211610e67576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260166020526040902054821115610ec1576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601554610ece90836119dd565b60155533600090815260166020526040902054610eeb90836119dd565b33600081815260166020526040902091909155600554610f17916001600160a01b039091169084611b1d565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b600b5481565b600d5481565b6000546001600160a01b031681565b6001600160a01b031660009081526016602052604090205490565b610f93611b74565b6002546001600160a01b03908116911614610ff5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6005546001600160a01b031681565b60008061105d42600754611b78565b91505090565b600a5481565b6002546001600160a01b031690565b60146020526000908152604090205481565b60065481565b600260015414156110d6576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b6002600155336110e461126d565b600e55600d556110f261104e565b600c556001600160a01b038116156111505761110d8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b60008211611196576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6015546111a39083611ac3565b601555336000908152601660205260409020546111c09083611ac3565b336000818152601660205260409020919091556005546111ed916001600160a01b03909116903085611b8e565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60085481565b600e5481565b60105481565b60116020526000908152604090205481565b60136020526000908152604090205481565b600c5481565b600f5481565b60008060155460001415611288575050600d54600e54611458565b60085442101561132f5760006112e66112dd601554610706670de0b6b3a76400006112d76112c3600654600954611a2890919063ffffffff16565b6112d7600c546112d161104e565b906119dd565b90611a28565b600d5490611ac3565b90506000611322611319601554610706670de0b6b3a76400006112d76112c3600654600a54611a2890919063ffffffff16565b600e5490611ac3565b9193509091506114589050565b600854600c5410156114005760006113a4611366601554610706670de0b6b3a76400006112d76009546112d76008546112d161104e565b61070c6112dd601554610706670de0b6b3a76400006112d7611395600654600954611a2890919063ffffffff16565b600c546008546112d7916119dd565b905060006113226113d1601554610706670de0b6b3a76400006112d7600a546112d76008546112d161104e565b61070c611319601554610706670de0b6b3a76400006112d7611395600654600a54611a2890919063ffffffff16565b600061142b6112dd601554610706670de0b6b3a76400006112d76009546112d7600c546112d161104e565b90506000611322611319601554610706670de0b6b3a76400006112d7600a546112d7600c546112d161104e565b9091565b6004546001600160a01b031681565b6114756002610791565b3360009081526016602052604090205461148e90610d5e565b565b60075481565b600260015414156114dc576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b6002600155336114ea61126d565b600e55600d556114f861104e565b600c556001600160a01b03811615611556576115138161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b6000861161159c576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6015546115a99087611ac3565b601555336000908152601660205260409020546115c69087611ac3565b3360008181526016602052604080822093909355600554835163d505accf60e01b81526004810193909352306024840152604483018a90526064830189905260ff8816608484015260a4830187905260c4830186905292516001600160a01b039093169263d505accf9260e480820193929182900301818387803b15801561164d57600080fd5b505af1158015611661573d6000803e3d6000fd5b505060055461167e92506001600160a01b03169050333089611b8e565b60408051878152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001805550505050565b6116c8611b74565b6002546001600160a01b0390811691161461172a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661176f5760405162461bcd60e51b8152600401808060200182810382526026815260200180611f9f6026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611811576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b60026001553361181f61126d565b600e55600d5561182d61104e565b600c556001600160a01b0381161561188b576118488161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b33600090815260136020526040902054806118ed576040805162461bcd60e51b815260206004820152601760248201527f7374616b652061646472657373206e6f7420666f756e64000000000000000000604482015290519081900360640190fd5b6005546003546001600160a01b03908116911614611952576040805162461bcd60e51b815260206004820152601d60248201527f43616e2774207374616b65207468652072657761726420746f6b656e2e000000604482015290519081900360640190fd5b3360009081526013602052604081205560155461196f9082611ac3565b6015553360009081526016602052604090205461198c9082611ac3565b33600081815260166020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a2505060018055565b6000611a1f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bee565b90505b92915050565b600082611a3757506000611a22565b82820282848281611a4457fe5b0414611a1f5760405162461bcd60e51b8152600401808060200182810382526021815260200180611feb6021913960400191505060405180910390fd5b6000611a1f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c8a565b600082820183811015611a1f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611b6f908490611cef565b505050565b3390565b6000818310611b875781611a1f565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611be8908590611cef565b50505050565b60008184841115611c7d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c42578181015183820152602001611c2a565b50505050905090810190601f168015611c6f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611cd95760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611c42578181015183820152602001611c2a565b506000838581611ce557fe5b0495945050505050565b6000611d44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611da09092919063ffffffff16565b805190915015611b6f57808060200190516020811015611d6357600080fd5b5051611b6f5760405162461bcd60e51b815260040180806020018281038252602a815260200180612036602a913960400191505060405180910390fd5b6060611daf8484600085611db7565b949350505050565b606082471015611df85760405162461bcd60e51b8152600401808060200182810382526026815260200180611fc56026913960400191505060405180910390fd5b611e0185611f12565b611e52576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611e905780518252601f199092019160209182019101611e71565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611ef2576040519150601f19603f3d011682016040523d82523d6000602084013e611ef7565b606091505b5091509150611f07828286611f18565b979650505050505050565b3b151590565b60608315611f27575081611c83565b825115611f375782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611c42578181015183820152602001611c2a56fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122031abf0e0e946311d6b15f5afa7936cb6e26ce6149d33dc3e1853a4432a51dd1964736f6c6343000706003300000000000000000000000043a5cfb83d0decaaead90e0cc6dca60a2405442b000000000000000000000000eec2be5c91ae7f8a338e1e5f3b5de49d07afdc810000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d11000000000000000000000000eec2be5c91ae7f8a338e1e5f3b5de49d07afdc810000000000000000000000000000000000000000000000000000000003bfc400000000000000000000000000000000000000000000000000000000000024ea0000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x6080604052600436106102035760003560e01c80638da5cb5b11610118578063c8f33c91116100a0578063e9fad8ee1161006f578063e9fad8ee146105e3578063ebe2b12b146105f8578063ecd9ba821461060d578063f2fde38b14610645578063f69e20461461067857610203565b8063c8f33c911461058f578063c9b6b2b1146105a4578063cd3daf9d146105b9578063e363208e146105ce57610203565b8063ac2c5413116100e7578063ac2c5413146104ea578063ad46a40c146104ff578063af640d0f14610514578063bc1e25dc14610529578063c11e1e4b1461055c57610203565b80638da5cb5b14610470578063a1411e6714610485578063a66f42c0146104b8578063a694fc3a146104cd57610203565b80632e1a7d4d1161019b57806370a082311161016a57806370a08231146103e9578063715018a61461041c57806372f702f31461043157806380faa57d146104465780638a0dfa0d1461045b57610203565b80632e1a7d4d14610380578063386a9525146103aa57806338736f49146103bf5780633fc6df6e146103d457610203565b806318160ddd116101d757806318160ddd146102df5780631c4b774b146102f4578063246132f9146103205780632729f5841461035057610203565b80628cc262146102085780630131c87014610254578063080b3ead1461028557806318156416146102ac575b600080fd5b34801561021457600080fd5b5061023b6004803603602081101561022b57600080fd5b50356001600160a01b031661068d565b6040805192835260208301919091528051918290030190f35b34801561026057600080fd5b50610269610764565b604080516001600160a01b039092168252519081900360200190f35b34801561029157600080fd5b5061029a610773565b60408051918252519081900360200190f35b3480156102b857600080fd5b5061029a600480360360208110156102cf57600080fd5b50356001600160a01b0316610779565b3480156102eb57600080fd5b5061029a61078b565b34801561030057600080fd5b5061031e6004803603602081101561031757600080fd5b5035610791565b005b34801561032c57600080fd5b5061031e6004803603604081101561034357600080fd5b5080359060200135610aa2565b34801561035c57600080fd5b5061023b6004803603604081101561037357600080fd5b5080359060200135610c9d565b34801561038c57600080fd5b5061031e600480360360208110156103a357600080fd5b5035610d5e565b3480156103b657600080fd5b5061029a610f55565b3480156103cb57600080fd5b5061029a610f5b565b3480156103e057600080fd5b50610269610f61565b3480156103f557600080fd5b5061029a6004803603602081101561040c57600080fd5b50356001600160a01b0316610f70565b34801561042857600080fd5b5061031e610f8b565b34801561043d57600080fd5b5061026961103f565b34801561045257600080fd5b5061029a61104e565b34801561046757600080fd5b5061029a611063565b34801561047c57600080fd5b50610269611069565b34801561049157600080fd5b5061029a600480360360208110156104a857600080fd5b50356001600160a01b0316611078565b3480156104c457600080fd5b5061029a61108a565b61031e600480360360208110156104e357600080fd5b5035611090565b3480156104f657600080fd5b5061029a61122b565b34801561050b57600080fd5b5061029a611231565b34801561052057600080fd5b5061029a611237565b34801561053557600080fd5b5061029a6004803603602081101561054c57600080fd5b50356001600160a01b031661123d565b34801561056857600080fd5b5061029a6004803603602081101561057f57600080fd5b50356001600160a01b031661124f565b34801561059b57600080fd5b5061029a611261565b3480156105b057600080fd5b5061029a611267565b3480156105c557600080fd5b5061023b61126d565b3480156105da57600080fd5b5061026961145c565b3480156105ef57600080fd5b5061031e61146b565b34801561060457600080fd5b5061029a611490565b61031e600480360360a081101561062357600080fd5b5080359060208101359060ff6040820135169060608101359060800135611496565b34801561065157600080fd5b5061031e6004803603602081101561066857600080fd5b50356001600160a01b03166116c0565b34801561068457600080fd5b5061031e6117cb565b60008060008061069b61126d565b6001600160a01b0387166000908152601360209081526040808320546011909252909120549294509092506107129161070c90670de0b6b3a764000090610706906106e79088906119dd565b6001600160a01b038b1660009081526016602052604090205490611a28565b90611a81565b90611ac3565b6001600160a01b03861660009081526014602090815260408083205460129092529091205491955061075b9161070c90670de0b6b3a764000090610706906106e79087906119dd565b92505050915091565b6003546001600160a01b031681565b60095481565b60126020526000908152604090205481565b60155490565b600260015414156107d7576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b6002600155336107e561126d565b600e55600d556107f361104e565b600c556001600160a01b038116156108515761080e8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b8161091d5733600090815260136020526040902054806108b8576040805162461bcd60e51b815260206004820152601d60248201527f63616e206e6f7420776974686472617720302044505820726577617264000000604482015290519081900360640190fd5b336000818152601360205260408120556003546108e1916001600160a01b039091169083611b1d565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250610a9a565b81600114156109b1573360009081526014602052604090205480610988576040805162461bcd60e51b815260206004820152601e60248201527f63616e206e6f7420776974686472617720302052445058207265776172640000604482015290519081900360640190fd5b336000818152601460205260408120556004546108e1916001600160a01b039091169083611b1d565b3360009081526013602090815260408083205460149092529091205481156109fc57336000818152601360205260408120556003546109fc916001600160a01b039091169084611b1d565b8015610a2b5733600081815260146020526040812055600454610a2b916001600160a01b039091169083611b1d565b60408051838152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a260408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505b505060018055565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b815260040180806020018281038252602a81526020018061200c602a913960400191505060405180910390fd5b6000610af561126d565b600e55600d55610b0361104e565b600c556001600160a01b03811615610b6157610b1e8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b600754610bd657610b89610b82600f54600b54611ac390919063ffffffff16565b8490611a81565b600955600f54600b54610ba791610ba09190611ac3565b8390611a81565b600a5542600c819055600b54610bbd9190611ac3565b600755600f54610bce904290611ac3565b600855610c5d565b600754600090610be690426119dd565b90506000610bff60095483611a2890919063ffffffff16565b90506000610c18600a5484611a2890919063ffffffff16565b600b54909150610c2c906107068885611ac3565b600955600b54610c40906107068784611ac3565b600a5542600c819055600b54610c569190611ac3565b6007555050505b604080518481526020810184905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a1505050565b600080610ca8611b74565b6002546001600160a01b03908116911614610d0a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000610d14611069565b90506001600160a01b038116331415610d5557600354610d3e906001600160a01b03168287611b1d565b600454610d55906001600160a01b03168286611b1d565b50929391925050565b60026001541415610da4576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b600260015533610db261126d565b600e55600d55610dc061104e565b600c556001600160a01b03811615610e1e57610ddb8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b60008211610e67576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b33600090815260166020526040902054821115610ec1576040805162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b604482015290519081900360640190fd5b601554610ece90836119dd565b60155533600090815260166020526040902054610eeb90836119dd565b33600081815260166020526040902091909155600554610f17916001600160a01b039091169084611b1d565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b600b5481565b600d5481565b6000546001600160a01b031681565b6001600160a01b031660009081526016602052604090205490565b610f93611b74565b6002546001600160a01b03908116911614610ff5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6005546001600160a01b031681565b60008061105d42600754611b78565b91505090565b600a5481565b6002546001600160a01b031690565b60146020526000908152604090205481565b60065481565b600260015414156110d6576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b6002600155336110e461126d565b600e55600d556110f261104e565b600c556001600160a01b038116156111505761110d8161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b60008211611196576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6015546111a39083611ac3565b601555336000908152601660205260409020546111c09083611ac3565b336000818152601660205260409020919091556005546111ed916001600160a01b03909116903085611b8e565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60085481565b600e5481565b60105481565b60116020526000908152604090205481565b60136020526000908152604090205481565b600c5481565b600f5481565b60008060155460001415611288575050600d54600e54611458565b60085442101561132f5760006112e66112dd601554610706670de0b6b3a76400006112d76112c3600654600954611a2890919063ffffffff16565b6112d7600c546112d161104e565b906119dd565b90611a28565b600d5490611ac3565b90506000611322611319601554610706670de0b6b3a76400006112d76112c3600654600a54611a2890919063ffffffff16565b600e5490611ac3565b9193509091506114589050565b600854600c5410156114005760006113a4611366601554610706670de0b6b3a76400006112d76009546112d76008546112d161104e565b61070c6112dd601554610706670de0b6b3a76400006112d7611395600654600954611a2890919063ffffffff16565b600c546008546112d7916119dd565b905060006113226113d1601554610706670de0b6b3a76400006112d7600a546112d76008546112d161104e565b61070c611319601554610706670de0b6b3a76400006112d7611395600654600a54611a2890919063ffffffff16565b600061142b6112dd601554610706670de0b6b3a76400006112d76009546112d7600c546112d161104e565b90506000611322611319601554610706670de0b6b3a76400006112d7600a546112d7600c546112d161104e565b9091565b6004546001600160a01b031681565b6114756002610791565b3360009081526016602052604090205461148e90610d5e565b565b60075481565b600260015414156114dc576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b6002600155336114ea61126d565b600e55600d556114f861104e565b600c556001600160a01b03811615611556576115138161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b6000861161159c576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b6015546115a99087611ac3565b601555336000908152601660205260409020546115c69087611ac3565b3360008181526016602052604080822093909355600554835163d505accf60e01b81526004810193909352306024840152604483018a90526064830189905260ff8816608484015260a4830187905260c4830186905292516001600160a01b039093169263d505accf9260e480820193929182900301818387803b15801561164d57600080fd5b505af1158015611661573d6000803e3d6000fd5b505060055461167e92506001600160a01b03169050333089611b8e565b60408051878152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001805550505050565b6116c8611b74565b6002546001600160a01b0390811691161461172a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661176f5760405162461bcd60e51b8152600401808060200182810382526026815260200180611f9f6026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611811576040805162461bcd60e51b815260206004820152601f6024820152600080516020611f7f833981519152604482015290519081900360640190fd5b60026001553361181f61126d565b600e55600d5561182d61104e565b600c556001600160a01b0381161561188b576118488161068d565b6001600160a01b0383166000908152601360209081526040808320601483528184209490945593909255600d546011835283822055600e54601290925291909120555b33600090815260136020526040902054806118ed576040805162461bcd60e51b815260206004820152601760248201527f7374616b652061646472657373206e6f7420666f756e64000000000000000000604482015290519081900360640190fd5b6005546003546001600160a01b03908116911614611952576040805162461bcd60e51b815260206004820152601d60248201527f43616e2774207374616b65207468652072657761726420746f6b656e2e000000604482015290519081900360640190fd5b3360009081526013602052604081205560155461196f9082611ac3565b6015553360009081526016602052604090205461198c9082611ac3565b33600081815260166020908152604091829020939093558051848152905191927f6675fb32d259af2b7287aeeead9dc867fe8ca2cf653265dfadd302512ab59f0692918290030190a2505060018055565b6000611a1f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bee565b90505b92915050565b600082611a3757506000611a22565b82820282848281611a4457fe5b0414611a1f5760405162461bcd60e51b8152600401808060200182810382526021815260200180611feb6021913960400191505060405180910390fd5b6000611a1f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c8a565b600082820183811015611a1f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611b6f908490611cef565b505050565b3390565b6000818310611b875781611a1f565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611be8908590611cef565b50505050565b60008184841115611c7d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c42578181015183820152602001611c2a565b50505050905090810190601f168015611c6f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b60008183611cd95760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611c42578181015183820152602001611c2a565b506000838581611ce557fe5b0495945050505050565b6000611d44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611da09092919063ffffffff16565b805190915015611b6f57808060200190516020811015611d6357600080fd5b5051611b6f5760405162461bcd60e51b815260040180806020018281038252602a815260200180612036602a913960400191505060405180910390fd5b6060611daf8484600085611db7565b949350505050565b606082471015611df85760405162461bcd60e51b8152600401808060200182810382526026815260200180611fc56026913960400191505060405180910390fd5b611e0185611f12565b611e52576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611e905780518252601f199092019160209182019101611e71565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611ef2576040519150601f19603f3d011682016040523d82523d6000602084013e611ef7565b606091505b5091509150611f07828286611f18565b979650505050505050565b3b151590565b60608315611f27575081611c83565b825115611f375782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611c42578181015183820152602001611c2a56fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122031abf0e0e946311d6b15f5afa7936cb6e26ce6149d33dc3e1853a4432a51dd1964736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000043a5cfb83d0decaaead90e0cc6dca60a2405442b000000000000000000000000eec2be5c91ae7f8a338e1e5f3b5de49d07afdc810000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d11000000000000000000000000eec2be5c91ae7f8a338e1e5f3b5de49d07afdc810000000000000000000000000000000000000000000000000000000003bfc400000000000000000000000000000000000000000000000000000000000024ea0000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0x43a5cfB83d0DEcAaead90E0CC6DCA60A2405442B
Arg [1] : _rewardsTokenDPX (address): 0xEec2bE5c91ae7f8a338e1e5f3b5DE49d07AfdC81
Arg [2] : _rewardsTokenRDPX (address): 0x0ff5A8451A839f5F0BB3562689D9A44089738D11
Arg [3] : _stakingToken (address): 0xEec2bE5c91ae7f8a338e1e5f3b5DE49d07AfdC81
Arg [4] : _rewardsDuration (uint256): 62899200
Arg [5] : _boostedTimePeriod (uint256): 2419200
Arg [6] : _boost (uint256): 2
Arg [7] : _id (uint256): 1
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000043a5cfb83d0decaaead90e0cc6dca60a2405442b
Arg [1] : 000000000000000000000000eec2be5c91ae7f8a338e1e5f3b5de49d07afdc81
Arg [2] : 0000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d11
Arg [3] : 000000000000000000000000eec2be5c91ae7f8a338e1e5f3b5de49d07afdc81
Arg [4] : 0000000000000000000000000000000000000000000000000000000003bfc400
Arg [5] : 000000000000000000000000000000000000000000000000000000000024ea00
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.