More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,988 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get Reward | 20136344 | 224 days ago | IN | 0 ETH | 0.00014382 | ||||
Exit | 20118601 | 226 days ago | IN | 0 ETH | 0.00067 | ||||
Withdraw | 19522036 | 310 days ago | IN | 0 ETH | 0.00320571 | ||||
Withdraw | 18700124 | 425 days ago | IN | 0 ETH | 0.00359716 | ||||
Withdraw | 18034662 | 518 days ago | IN | 0 ETH | 0.00144288 | ||||
Get Reward | 18034662 | 518 days ago | IN | 0 ETH | 0.00125469 | ||||
Withdraw | 16459608 | 740 days ago | IN | 0 ETH | 0.00116213 | ||||
Withdraw | 16390013 | 749 days ago | IN | 0 ETH | 0.00131343 | ||||
Get Reward | 16389852 | 750 days ago | IN | 0 ETH | 0.00104489 | ||||
Withdraw | 15471366 | 879 days ago | IN | 0 ETH | 0.00041693 | ||||
Get Reward | 15160920 | 928 days ago | IN | 0 ETH | 0.00144656 | ||||
Withdraw | 15160919 | 928 days ago | IN | 0 ETH | 0.00222423 | ||||
Withdraw | 14994263 | 956 days ago | IN | 0 ETH | 0.00154933 | ||||
Withdraw | 14994263 | 956 days ago | IN | 0 ETH | 0.00126132 | ||||
Withdraw | 14994263 | 956 days ago | IN | 0 ETH | 0.00215849 | ||||
Get Reward | 14994263 | 956 days ago | IN | 0 ETH | 0.00105182 | ||||
Get Reward | 14673831 | 1008 days ago | IN | 0 ETH | 0.0059833 | ||||
Withdraw | 14673826 | 1008 days ago | IN | 0 ETH | 0.00830928 | ||||
Get Reward | 14551303 | 1027 days ago | IN | 0 ETH | 0.00179791 | ||||
Withdraw | 14551294 | 1027 days ago | IN | 0 ETH | 0.0028027 | ||||
Get Reward | 14078416 | 1101 days ago | IN | 0 ETH | 0.00939826 | ||||
Withdraw | 14035131 | 1108 days ago | IN | 0 ETH | 0.00842682 | ||||
Withdraw | 14003146 | 1112 days ago | IN | 0 ETH | 0.00908074 | ||||
Withdraw | 13924473 | 1125 days ago | IN | 0 ETH | 0.00547548 | ||||
Get Reward | 13924439 | 1125 days ago | IN | 0 ETH | 0.00672771 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PMintStaking
Compiler Version
v0.6.2+commit.bacdbe57
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.6.2; import 'openzeppelin-solidity/contracts/math/Math.sol'; import 'openzeppelin-solidity/contracts/math/SafeMath.sol'; import 'openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol'; import 'openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol'; // Inheritance import './interfaces/IPMintStaking.sol'; import './Pausable.sol'; contract PMintStaking is IPMintStaking, ReentrancyGuard, Pausable { using SafeMath for uint256; using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ uint256 public periodFinish; uint256 public rewardRate; uint256 public rewardsDuration; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; uint256 public lastBalance; uint256 public totalSupply; IERC20 public rewardsToken; IERC20 public stakingToken; mapping(address => uint256) private userRewardPerTokenPaid; mapping(address => uint256) private rewards; mapping(address => uint256) private _balances; /* ========== CONSTRUCTOR ========== */ constructor( address _owner, address _rewardsToken, address _stakingToken ) public Pausable(_owner) { rewardsToken = IERC20(_rewardsToken); stakingToken = IERC20(_stakingToken); } /* ========== VIEWS ========== */ function balanceOf(address account) external override view returns (uint256) { return _balances[account]; } function lastTimeRewardApplicable() public override view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public override view returns (uint256) { if (totalSupply == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add(lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(totalSupply)); } function earned(address account) public override view returns (uint256) { return _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(rewards[account]); } /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 amount) external override nonReentrant notPaused 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 override nonReentrant updateReward(msg.sender) { require(amount > 0, 'Cannot withdraw 0'); totalSupply = totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); stakingToken.safeTransfer(msg.sender, amount); emit Withdrawn(msg.sender, amount); } function getReward() public override nonReentrant updateReward(msg.sender) { uint256 reward = rewards[msg.sender]; if (reward > 0) { rewards[msg.sender] = 0; rewardsToken.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } function exit() external override { withdraw(_balances[msg.sender]); getReward(); } /* ========== RESTRICTED FUNCTIONS ========== */ function notifyRewardAmount(uint256 reward) external onlyOwner updateReward(address(0)) { require(rewardRate > 0, 'Reward Rate is not yet set'); if (block.timestamp >= periodFinish) { rewardsDuration = reward.div(rewardRate);// 1000 ETH / } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardsDuration = reward.add(leftover).div(rewardRate); } lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(rewardsDuration); emit RewardAdded(reward); } function setRewardRate(uint256 rewardsPerInterval, uint256 interval) external onlyOwner { require(rewardsPerInterval > 0 && interval > 0, 'rewardsPerInterval and interval should be greater than 0'); rewardRate = rewardsPerInterval.div(interval); RewardRateUpdated(rewardsPerInterval, interval, rewardRate); } // This method is used transfer for left over MINT tokens deposited at the end of Staking program function transferMintTokens(address account, uint256 amount) public onlyOwner { rewardsToken.safeTransfer(account, amount); } /* ========== MODIFIERS ========== */ modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } /* ========== EVENTS ========== */ event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardRateUpdated(uint256 rewardsPerInterval, uint256 interval, uint256 rewardRate); }
pragma solidity 0.6.2; contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), 'Owner address cannot be 0'); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, 'You must be nominated before you can accept ownership'); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, 'Only the contract owner may perform this action'); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); }
pragma solidity 0.6.2; // Inheritance import './Owned.sol'; contract Pausable is Owned { uint256 public lastPauseTime; bool public paused; constructor(address _owner) internal Owned(_owner) { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), 'Owner must be set'); // Paused will be false, and lastPauseTime will be 0 upon initialisation } /** * @notice Change the paused state of the contract * @dev Only the contract owner may call this. */ function setPaused(bool _paused) external onlyOwner { // Ensure we're actually changing the state before we do anything if (_paused == paused) { return; } // Set our paused state. paused = _paused; // If applicable, set the last pause time. if (paused) { lastPauseTime = now; } // Let everyone know that our pause state has changed. emit PauseChanged(paused); } event PauseChanged(bool isPaused); modifier notPaused { require(!paused, 'This action cannot be performed while the contract is paused'); _; } }
pragma solidity 0.6.2; interface IPMintStaking { // Views function lastTimeRewardApplicable() external view returns (uint256); function rewardPerToken() external view returns (uint256); function earned(address account) external view returns (uint256); function balanceOf(address account) external view returns (uint256); // Mutative function stake(uint256 amount) external; function withdraw(uint256 amount) external; function getReward() external; function exit() 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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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; /** * @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: 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.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); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(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 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; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","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":"rewardsPerInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRate","type":"uint256"}],"name":"RewardRateUpdated","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":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPauseTime","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":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardsPerInterval","type":"uint256"},{"internalType":"uint256","name":"interval","type":"uint256"}],"name":"setRewardRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferMintTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516116833803806116838339818101604052606081101561003357600080fd5b5080516020820151604090920151600160005590919082806001600160a01b0381166100a6576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040805160008152602081019290925280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506001546001600160a01b0316610152576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b50600c80546001600160a01b039384166001600160a01b031991821617909155600d8054929093169116179055506114f48061018f6000396000f3fe608060405234801561001057600080fd5b50600436106101a85760003560e01c806372f702f3116100f9578063a694fc3a11610097578063d1af0c7d11610071578063d1af0c7d14610398578063df136d65146103a0578063e9fad8ee146103a8578063ebe2b12b146103b0576101a8565b8063a694fc3a1461036b578063c8f33c9114610388578063cd3daf9d14610390576101a8565b806380faa57d116100d357806380faa57d1461034b5780638da5cb5b146103535780638f1c56bd1461035b57806391b4ded914610363576101a8565b806372f702f31461033357806379ba50971461033b5780637b0a47ee14610343576101a8565b80633462e0a8116101665780633d18b912116101405780633d18b912146102c557806353a47bb7146102cd5780635c975abb146102f157806370a082311461030d576101a8565b80633462e0a81461027d578063386a9525146102a05780633c6b16ab146102a8576101a8565b80628cc262146101ad5780630d13d85e146101e55780631627540c1461021357806316c38b3c1461023957806318160ddd146102585780632e1a7d4d14610260575b600080fd5b6101d3600480360360208110156101c357600080fd5b50356001600160a01b03166103b8565b60408051918252519081900360200190f35b610211600480360360408110156101fb57600080fd5b506001600160a01b03813516906020013561044e565b005b6102116004803603602081101561022957600080fd5b50356001600160a01b0316610477565b6102116004803603602081101561024f57600080fd5b503515156104d3565b6101d361054d565b6102116004803603602081101561027657600080fd5b5035610553565b6102116004803603604081101561029357600080fd5b50803590602001356106f5565b6101d36107a1565b610211600480360360208110156102be57600080fd5b50356107a7565b610211610929565b6102d5610a60565b604080516001600160a01b039092168252519081900360200190f35b6102f9610a6f565b604080519115158252519081900360200190f35b6101d36004803603602081101561032357600080fd5b50356001600160a01b0316610a78565b6102d5610a93565b610211610aa2565b6101d3610b5e565b6101d3610b64565b6102d5610b78565b6101d3610b87565b6101d3610b8d565b6102116004803603602081101561038157600080fd5b5035610b93565b6101d3610d75565b6101d3610d7b565b6102d5610dd5565b6101d3610de4565b610211610dea565b6101d3610e0d565b6001600160a01b0381166000908152600f6020908152604080832054600e909252822054610448919061043c90670de0b6b3a7640000906104309061040b906103ff610d7b565b9063ffffffff610e1316565b6001600160a01b0388166000908152601060205260409020549063ffffffff610e7016565b9063ffffffff610ed016565b9063ffffffff610f3716565b92915050565b610456610f91565b600c54610473906001600160a01b0316838363ffffffff610fda16565b5050565b61047f610f91565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6104db610f91565b60045460ff16151581151514156104f15761054a565b6004805460ff1916821515179081905560ff161561050e57426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600b5481565b600260005414156105ab576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055336105b9610d7b565b6009556105c4610b64565b6008556001600160a01b0381161561060b576105df816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b60008211610654576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600b54610667908363ffffffff610e1316565b600b553360009081526010602052604090205461068a908363ffffffff610e1316565b33600081815260106020526040902091909155600d546106b6916001600160a01b039091169084610fda565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506001600055565b6106fd610f91565b60008211801561070d5750600081115b6107485760405162461bcd60e51b81526004018080602001828103825260388152602001806113ab6038913960400191505060405180910390fd5b610758828263ffffffff610ed016565b6006819055604080518481526020810184905280820192909252517f69155044ae1e4cf9acf985cae44e0d86b5e592e3fb029bc9b39f63b0bdaa4a629181900360600190a15050565b60075481565b6107af610f91565b60006107b9610d7b565b6009556107c4610b64565b6008556001600160a01b0381161561080b576107df816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b600060065411610862576040805162461bcd60e51b815260206004820152601a60248201527f5265776172642052617465206973206e6f742079657420736574000000000000604482015290519081900360640190fd5b60055442106108875760065461087f90839063ffffffff610ed016565b6007556108d6565b60055460009061089d904263ffffffff610e1316565b905060006108b660065483610e7090919063ffffffff16565b6006549091506108d090610430868463ffffffff610f3716565b60075550505b4260088190556007546108ef919063ffffffff610f3716565b6005556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b60026000541415610981576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000553361098f610d7b565b60095561099a610b64565b6008556001600160a01b038116156109e1576109b5816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b336000908152600f60205260409020548015610a5757336000818152600f6020526040812055600c54610a20916001600160a01b039091169083610fda565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001600055565b6002546001600160a01b031681565b60045460ff1681565b6001600160a01b031660009081526010602052604090205490565b600d546001600160a01b031681565b6002546001600160a01b03163314610aeb5760405162461bcd60e51b81526004018080602001828103825260358152602001806113766035913960400191505060405180910390fd5b600154600254604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b60065481565b6000610b7242600554611031565b90505b90565b6001546001600160a01b031681565b600a5481565b60035481565b60026000541415610beb576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005560045460ff1615610c325760405162461bcd60e51b815260040180806020018281038252603c815260200180611459603c913960400191505060405180910390fd5b33610c3b610d7b565b600955610c46610b64565b6008556001600160a01b03811615610c8d57610c61816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b60008211610cd3576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600b54610ce6908363ffffffff610f3716565b600b5533600090815260106020526040902054610d09908363ffffffff610f3716565b33600081815260106020526040902091909155600d54610d36916001600160a01b03909116903085611047565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001600055565b60085481565b6000600b5460001415610d915750600954610b75565b610b72610dc6600b54610430670de0b6b3a7640000610dba600654610dba6008546103ff610b64565b9063ffffffff610e7016565b6009549063ffffffff610f3716565b600c546001600160a01b031681565b60095481565b33600090815260106020526040902054610e0390610553565b610e0b610929565b565b60055481565b600082821115610e6a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610e7f57506000610448565b82820282848281610e8c57fe5b0414610ec95760405162461bcd60e51b81526004018080602001828103825260218152602001806114386021913960400191505060405180910390fd5b9392505050565b6000808211610f26576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610f2f57fe5b049392505050565b600082820183811015610ec9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001546001600160a01b03163314610e0b5760405162461bcd60e51b815260040180806020018281038252602f815260200180611409602f913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261102c9084906110a7565b505050565b60008183106110405781610ec9565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526110a19085906110a7565b50505050565b60606110fc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111589092919063ffffffff16565b80519091501561102c5780806020019051602081101561111b57600080fd5b505161102c5760405162461bcd60e51b815260040180806020018281038252602a815260200180611495602a913960400191505060405180910390fd5b6060611167848460008561116f565b949350505050565b6060824710156111b05760405162461bcd60e51b81526004018080602001828103825260268152602001806113e36026913960400191505060405180910390fd5b6111b9856112cb565b61120a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106112495780518252601f19909201916020918201910161122a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146112ab576040519150601f19603f3d011682016040523d82523d6000602084013e6112b0565b606091505b50915091506112c08282866112d1565b979650505050505050565b3b151590565b606083156112e0575081610ec9565b8251156112f05782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561133a578181015183820152602001611322565b50505050905090810190601f1680156113675780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697072657761726473506572496e74657276616c20616e6420696e74657276616c2073686f756c642062652067726561746572207468616e2030416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e7472616374206973207061757365645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208efac668f37a964dfc381456aaad424f7bfd0b93f19b1d58a54bad86f46bab7f64736f6c634300060200330000000000000000000000003909d68c31b20e9e65c1b9e765e44fb3b11fb1ac0000000000000000000000000cdf9acd87e940837ff21bb40c9fd55f68bba059000000000000000000000000092e793afe54366601eb7ef7e63b6abb93edb485
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a85760003560e01c806372f702f3116100f9578063a694fc3a11610097578063d1af0c7d11610071578063d1af0c7d14610398578063df136d65146103a0578063e9fad8ee146103a8578063ebe2b12b146103b0576101a8565b8063a694fc3a1461036b578063c8f33c9114610388578063cd3daf9d14610390576101a8565b806380faa57d116100d357806380faa57d1461034b5780638da5cb5b146103535780638f1c56bd1461035b57806391b4ded914610363576101a8565b806372f702f31461033357806379ba50971461033b5780637b0a47ee14610343576101a8565b80633462e0a8116101665780633d18b912116101405780633d18b912146102c557806353a47bb7146102cd5780635c975abb146102f157806370a082311461030d576101a8565b80633462e0a81461027d578063386a9525146102a05780633c6b16ab146102a8576101a8565b80628cc262146101ad5780630d13d85e146101e55780631627540c1461021357806316c38b3c1461023957806318160ddd146102585780632e1a7d4d14610260575b600080fd5b6101d3600480360360208110156101c357600080fd5b50356001600160a01b03166103b8565b60408051918252519081900360200190f35b610211600480360360408110156101fb57600080fd5b506001600160a01b03813516906020013561044e565b005b6102116004803603602081101561022957600080fd5b50356001600160a01b0316610477565b6102116004803603602081101561024f57600080fd5b503515156104d3565b6101d361054d565b6102116004803603602081101561027657600080fd5b5035610553565b6102116004803603604081101561029357600080fd5b50803590602001356106f5565b6101d36107a1565b610211600480360360208110156102be57600080fd5b50356107a7565b610211610929565b6102d5610a60565b604080516001600160a01b039092168252519081900360200190f35b6102f9610a6f565b604080519115158252519081900360200190f35b6101d36004803603602081101561032357600080fd5b50356001600160a01b0316610a78565b6102d5610a93565b610211610aa2565b6101d3610b5e565b6101d3610b64565b6102d5610b78565b6101d3610b87565b6101d3610b8d565b6102116004803603602081101561038157600080fd5b5035610b93565b6101d3610d75565b6101d3610d7b565b6102d5610dd5565b6101d3610de4565b610211610dea565b6101d3610e0d565b6001600160a01b0381166000908152600f6020908152604080832054600e909252822054610448919061043c90670de0b6b3a7640000906104309061040b906103ff610d7b565b9063ffffffff610e1316565b6001600160a01b0388166000908152601060205260409020549063ffffffff610e7016565b9063ffffffff610ed016565b9063ffffffff610f3716565b92915050565b610456610f91565b600c54610473906001600160a01b0316838363ffffffff610fda16565b5050565b61047f610f91565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6104db610f91565b60045460ff16151581151514156104f15761054a565b6004805460ff1916821515179081905560ff161561050e57426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600b5481565b600260005414156105ab576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055336105b9610d7b565b6009556105c4610b64565b6008556001600160a01b0381161561060b576105df816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b60008211610654576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600b54610667908363ffffffff610e1316565b600b553360009081526010602052604090205461068a908363ffffffff610e1316565b33600081815260106020526040902091909155600d546106b6916001600160a01b039091169084610fda565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506001600055565b6106fd610f91565b60008211801561070d5750600081115b6107485760405162461bcd60e51b81526004018080602001828103825260388152602001806113ab6038913960400191505060405180910390fd5b610758828263ffffffff610ed016565b6006819055604080518481526020810184905280820192909252517f69155044ae1e4cf9acf985cae44e0d86b5e592e3fb029bc9b39f63b0bdaa4a629181900360600190a15050565b60075481565b6107af610f91565b60006107b9610d7b565b6009556107c4610b64565b6008556001600160a01b0381161561080b576107df816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b600060065411610862576040805162461bcd60e51b815260206004820152601a60248201527f5265776172642052617465206973206e6f742079657420736574000000000000604482015290519081900360640190fd5b60055442106108875760065461087f90839063ffffffff610ed016565b6007556108d6565b60055460009061089d904263ffffffff610e1316565b905060006108b660065483610e7090919063ffffffff16565b6006549091506108d090610430868463ffffffff610f3716565b60075550505b4260088190556007546108ef919063ffffffff610f3716565b6005556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b60026000541415610981576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000553361098f610d7b565b60095561099a610b64565b6008556001600160a01b038116156109e1576109b5816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b336000908152600f60205260409020548015610a5757336000818152600f6020526040812055600c54610a20916001600160a01b039091169083610fda565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506001600055565b6002546001600160a01b031681565b60045460ff1681565b6001600160a01b031660009081526010602052604090205490565b600d546001600160a01b031681565b6002546001600160a01b03163314610aeb5760405162461bcd60e51b81526004018080602001828103825260358152602001806113766035913960400191505060405180910390fd5b600154600254604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b60065481565b6000610b7242600554611031565b90505b90565b6001546001600160a01b031681565b600a5481565b60035481565b60026000541415610beb576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005560045460ff1615610c325760405162461bcd60e51b815260040180806020018281038252603c815260200180611459603c913960400191505060405180910390fd5b33610c3b610d7b565b600955610c46610b64565b6008556001600160a01b03811615610c8d57610c61816103b8565b6001600160a01b0382166000908152600f6020908152604080832093909355600954600e909152919020555b60008211610cd3576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600b54610ce6908363ffffffff610f3716565b600b5533600090815260106020526040902054610d09908363ffffffff610f3716565b33600081815260106020526040902091909155600d54610d36916001600160a01b03909116903085611047565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506001600055565b60085481565b6000600b5460001415610d915750600954610b75565b610b72610dc6600b54610430670de0b6b3a7640000610dba600654610dba6008546103ff610b64565b9063ffffffff610e7016565b6009549063ffffffff610f3716565b600c546001600160a01b031681565b60095481565b33600090815260106020526040902054610e0390610553565b610e0b610929565b565b60055481565b600082821115610e6a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610e7f57506000610448565b82820282848281610e8c57fe5b0414610ec95760405162461bcd60e51b81526004018080602001828103825260218152602001806114386021913960400191505060405180910390fd5b9392505050565b6000808211610f26576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610f2f57fe5b049392505050565b600082820183811015610ec9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001546001600160a01b03163314610e0b5760405162461bcd60e51b815260040180806020018281038252602f815260200180611409602f913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261102c9084906110a7565b505050565b60008183106110405781610ec9565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526110a19085906110a7565b50505050565b60606110fc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111589092919063ffffffff16565b80519091501561102c5780806020019051602081101561111b57600080fd5b505161102c5760405162461bcd60e51b815260040180806020018281038252602a815260200180611495602a913960400191505060405180910390fd5b6060611167848460008561116f565b949350505050565b6060824710156111b05760405162461bcd60e51b81526004018080602001828103825260268152602001806113e36026913960400191505060405180910390fd5b6111b9856112cb565b61120a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106112495780518252601f19909201916020918201910161122a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146112ab576040519150601f19603f3d011682016040523d82523d6000602084013e6112b0565b606091505b50915091506112c08282866112d1565b979650505050505050565b3b151590565b606083156112e0575081610ec9565b8251156112f05782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561133a578181015183820152602001611322565b50505050905090810190601f1680156113675780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697072657761726473506572496e74657276616c20616e6420696e74657276616c2073686f756c642062652067726561746572207468616e2030416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e7472616374206973207061757365645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208efac668f37a964dfc381456aaad424f7bfd0b93f19b1d58a54bad86f46bab7f64736f6c63430006020033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003909d68c31b20e9e65c1b9e765e44fb3b11fb1ac0000000000000000000000000cdf9acd87e940837ff21bb40c9fd55f68bba059000000000000000000000000092e793afe54366601eb7ef7e63b6abb93edb485
-----Decoded View---------------
Arg [0] : _owner (address): 0x3909d68c31b20E9E65C1b9e765e44fB3b11FB1ac
Arg [1] : _rewardsToken (address): 0x0CDF9acd87E940837ff21BB40c9fd55F68bba059
Arg [2] : _stakingToken (address): 0x092E793AFe54366601Eb7eF7e63b6abB93EDB485
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003909d68c31b20e9e65c1b9e765e44fb3b11fb1ac
Arg [1] : 0000000000000000000000000cdf9acd87e940837ff21bb40c9fd55f68bba059
Arg [2] : 000000000000000000000000092e793afe54366601eb7ef7e63b6abb93edb485
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.