More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 116 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stake | 20688791 | 7 days ago | IN | 0 ETH | 0.00014514 | ||||
Stake | 20605707 | 19 days ago | IN | 0 ETH | 0.00009581 | ||||
Withdraw | 20605692 | 19 days ago | IN | 0 ETH | 0.0000764 | ||||
Withdraw | 20604566 | 19 days ago | IN | 0 ETH | 0.00006742 | ||||
Stake | 20604553 | 19 days ago | IN | 0 ETH | 0.00005903 | ||||
Stake | 20604553 | 19 days ago | IN | 0 ETH | 0.00008655 | ||||
Stake | 20509050 | 32 days ago | IN | 0 ETH | 0.00011625 | ||||
Stake | 20411210 | 46 days ago | IN | 0 ETH | 0.00030765 | ||||
Stake All | 20371662 | 51 days ago | IN | 0 ETH | 0.00026994 | ||||
Stake | 20366985 | 52 days ago | IN | 0 ETH | 0.00022969 | ||||
Stake | 20354568 | 54 days ago | IN | 0 ETH | 0.00015438 | ||||
Stake | 20294928 | 62 days ago | IN | 0 ETH | 0.00011035 | ||||
Stake | 20284061 | 64 days ago | IN | 0 ETH | 0.00065542 | ||||
Withdraw | 20276112 | 65 days ago | IN | 0 ETH | 0.00056449 | ||||
Stake | 20264534 | 66 days ago | IN | 0 ETH | 0.00025017 | ||||
Stake | 20264060 | 66 days ago | IN | 0 ETH | 0.00025955 | ||||
Stake All | 20263209 | 67 days ago | IN | 0 ETH | 0.0005883 | ||||
Stake | 20257025 | 67 days ago | IN | 0 ETH | 0.00012953 | ||||
Stake | 20234715 | 71 days ago | IN | 0 ETH | 0.00089416 | ||||
Stake | 20222931 | 72 days ago | IN | 0 ETH | 0.00037088 | ||||
Stake | 20222873 | 72 days ago | IN | 0 ETH | 0.00039662 | ||||
Stake | 20222848 | 72 days ago | IN | 0 ETH | 0.00043622 | ||||
Stake | 20215302 | 73 days ago | IN | 0 ETH | 0.00018518 | ||||
Stake | 20209812 | 74 days ago | IN | 0 ETH | 0.00022043 | ||||
Stake | 20207947 | 74 days ago | IN | 0 ETH | 0.00023455 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BaseRewardPool
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** *Submitted for verification at Etherscan.io on 2020-07-17 */ /* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * Synthetix: BaseRewardPool.sol * * Docs: https://docs.synthetix.io/ * * * MIT License * =========== * * Copyright (c) 2020 Synthetix * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ import {IRewards} from "./interfaces/IRewards.sol"; import {IDeposit} from "./interfaces/IDeposit.sol"; import {MathUtil} from "./interfaces/MathUtil.sol"; import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import {Address} from "lib/openzeppelin-contracts/contracts/utils/Address.sol"; import {SafeERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; /** * @title BaseRewardPool * @author Synthetix -> ConvexFinance * @notice Unipool rewards contract that is re-deployed from rFactory for each staking pool. * @dev Changes made here by ConvexFinance are to do with the delayed reward allocation. Curve is queued for * rewards and the distribution only begins once the new rewards are sufficiently large, or the epoch * has ended. Additionally, enables hooks for `extraRewards` that can be enabled at any point to * distribute a child reward token (i.e. a secondary one from Curve, or a seperate one). */ contract BaseRewardPool { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public immutable rewardToken; IERC20 public immutable stakingToken; uint256 public constant duration = 1; address public operator; address public rewardManager; uint256 public immutable pid; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; uint256 public queuedRewards = 0; uint256 public currentRewards = 0; uint256 public historicalRewards = 0; uint256 public constant newRewardRatio = 830; uint256 private _totalSupply; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; mapping(address => uint256) private _balances; address[] public extraRewards; 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 TransferReward(address indexed from, address indexed to, uint256 value); /** * @dev This is called directly from RewardFactory * @param pid_ Effectively the pool identifier - used in the Booster * @param stakingToken_ Pool LP token * @param rewardToken_ Tenet * @param operator_ Booster * @param rewardManager_ RewardFactory */ constructor( uint256 pid_, address stakingToken_, address rewardToken_, address operator_, address rewardManager_ ) { pid = pid_; stakingToken = IERC20(stakingToken_); rewardToken = IERC20(rewardToken_); operator = operator_; rewardManager = rewardManager_; } function totalSupply() public view virtual returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } function extraRewardsLength() external view returns (uint256) { return extraRewards.length; } function setOperator(address _operator) external { require(msg.sender == operator, "!authorized"); operator = _operator; } function setRewardManager(address _rewardManager) external { require(msg.sender == operator, "!authorized"); rewardManager = _rewardManager; } function addExtraReward(address _reward) external returns(bool){ require(msg.sender == rewardManager, "!authorized"); require(_reward != address(0),"!reward setting"); if(extraRewards.length >= 12){ return false; } extraRewards.push(_reward); return true; } function clearExtraRewards() external{ require(msg.sender == rewardManager, "!authorized"); delete extraRewards; } modifier updateReward(address account) { rewardPerTokenStored = _rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = _earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } function lastTimeRewardApplicable() public view returns (uint256) { return MathUtil.min(block.timestamp, periodFinish); } function rewardPerToken() external view returns (uint256){ return _rewardPerToken(); } function _rewardPerToken() internal view returns (uint256) { if (totalSupply() == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add( lastTimeRewardApplicable() .sub(lastUpdateTime) .mul(rewardRate) .mul(1e18) .div(totalSupply()) ); } function earned(address account) external view returns (uint256){ return _earned(account); } function _earned(address account) internal view returns (uint256) { return balanceOf(account) .mul(_rewardPerToken().sub(userRewardPerTokenPaid[account])) .div(1e18) .add(rewards[account]); } function stake(uint256 _amount) external returns(bool) { return _stake(_amount); } function _stake(uint256 _amount) internal returns(bool) { _processStake(_amount, msg.sender); stakingToken.safeTransferFrom(msg.sender, address(this), _amount); emit Staked(msg.sender, _amount); return true; } function stakeAll() external returns(bool){ uint256 balance = stakingToken.balanceOf(msg.sender); _stake(balance); return true; } function stakeFor(address _for, uint256 _amount) external returns(bool) { return _stakeFor(_for, _amount); } function _stakeFor(address _for, uint256 _amount) internal returns(bool) { _processStake(_amount, _for); //take away from sender stakingToken.safeTransferFrom(msg.sender, address(this), _amount); emit Staked(_for, _amount); return true; } /** * @dev Generic internal staking function that basically does 3 things: update rewards based * on previous balance, trigger also on any child contracts, then update balances. * @param _amount Units to add to the users balance * @param _receiver Address of user who will receive the stake */ function _processStake(uint256 _amount, address _receiver) internal updateReward(_receiver) { require(_amount > 0, 'RewardPool : Cannot stake 0'); //also stake to linked rewards for(uint i=0; i < extraRewards.length; i++){ IRewards(extraRewards[i]).stake(_receiver, _amount); } _totalSupply = _totalSupply.add(_amount); _balances[_receiver] = _balances[_receiver].add(_amount); emit TransferReward(address(0), _receiver, _amount); } function withdraw(uint256 amount, bool claim) external returns(bool){ return _withdraw(amount, claim); } function _withdraw(uint256 amount, bool claim) internal updateReward(msg.sender) returns(bool) { require(amount > 0, 'RewardPool : Cannot withdraw 0'); //also withdraw from linked rewards for(uint i=0; i < extraRewards.length; i++){ IRewards(extraRewards[i]).withdraw(msg.sender, amount); } _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); stakingToken.safeTransfer(msg.sender, amount); emit Withdrawn(msg.sender, amount); if(claim){ _getReward(msg.sender,true); } emit TransferReward(msg.sender, address(0), amount); return true; } function withdrawAll(bool claim) external{ _withdraw(_balances[msg.sender],claim); } function getReward(address _account, bool _claimExtras) external returns(bool){ return _getReward(_account, _claimExtras); } /** * @dev Gives a staker their rewards, with the option of claiming extra rewards * @param _account Account for which to claim * @param _claimExtras Get the child rewards too? */ function _getReward(address _account, bool _claimExtras) internal updateReward(_account) returns(bool){ uint256 reward = _earned(_account); if (reward > 0) { rewards[_account] = 0; rewardToken.safeTransfer(_account, reward); //IDeposit(operator).rewardClaimed(pid, _account, reward); If you are here then you know what is coming next ;) emit RewardPaid(_account, reward); } //also get rewards from linked rewards if(_claimExtras){ for(uint i=0; i < extraRewards.length; i++){ IRewards(extraRewards[i]).getReward(_account); } } return true; } /** * @dev Called by a staker to get their allocated rewards */ function getReward() external returns(bool){ _getReward(msg.sender,true); return true; } /** * @dev Processes queued rewards in isolation, providing the period has finished. * This allows a cheaper way to trigger rewards on low value pools. */ function processIdleRewards() external { if (block.timestamp >= periodFinish && queuedRewards > 0) { notifyRewardAmount(queuedRewards); queuedRewards = 0; } } /** * @dev Called by the booster to allocate new Crv rewards to this pool * Curve is queued for rewards and the distribution only begins once the new rewards are sufficiently * large, or the epoch has ended. */ function queueNewRewards(uint256 _rewards) external returns(bool){ require(msg.sender == operator, "!authorized"); _rewards = _rewards.add(queuedRewards); if (block.timestamp >= periodFinish) { notifyRewardAmount(_rewards); queuedRewards = 0; return true; } //et = now - (finish-duration) uint256 elapsedTime = block.timestamp.sub(periodFinish.sub(duration)); //current at now: rewardRate * elapsedTime uint256 currentAtNow = rewardRate * elapsedTime; uint256 queuedRatio = currentAtNow.mul(1000).div(_rewards); //uint256 queuedRatio = currentRewards.mul(1000).div(_rewards); if(queuedRatio < newRewardRatio){ notifyRewardAmount(_rewards); queuedRewards = 0; }else{ queuedRewards = _rewards; } return true; } function notifyRewardAmount(uint256 reward) internal updateReward(address(0)) { historicalRewards = historicalRewards.add(reward); if (block.timestamp >= periodFinish) { rewardRate = reward.div(duration); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); reward = reward.add(leftover); rewardRate = reward.div(duration); } currentRewards = reward; lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(duration); emit RewardAdded(reward); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IRewards{ function stake(address, uint256) external; function stakeFor(address, uint256) external; function withdraw(address, uint256) external; function exit(address) external; function getReward(address) external; function queueNewRewards(uint256) external; function notifyRewardAmount(uint256) external; function addExtraReward(address) external; function extraRewardsLength() external view returns (uint256); function stakingToken() external view returns (address); function rewardToken() external view returns(address); function earned(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IDeposit{ function isShutdown() external view returns(bool); function balanceOf(address _account) external view returns(uint256); function totalSupply() external view returns(uint256); function poolInfo(uint256) external view returns(address,address,address,address,address, bool); function rewardClaimed(uint256,address,uint256) external; function withdrawTo(uint256,uint256,address) external; function claimRewards(uint256,address) external returns(bool); function rewardArbitrator() external returns(address); function setGaugeRedirect(uint256 _pid) external returns(bool); function owner() external returns(address); function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns(bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUtil { /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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"); (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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.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 Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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' 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ 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) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { 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) { unchecked { // 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) { unchecked { 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) { unchecked { 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) { return a + b; } /** * @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 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) { return a * b; } /** * @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. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { 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) { 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) { unchecked { 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. * * 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) { unchecked { 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) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "remappings": [ "@prb/test/=lib/prb-test/src/", "ERC721A/=lib/ERC721A/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "layerzerolabs-contracts/=lib/solidity-examples/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "prb-test/=lib/prb-test/src/", "solidity-examples/=lib/solidity-examples/contracts/", "solmate/=lib/solmate/src/", "src/=src/", "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/", "lib/openzeppelin-contracts:ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "lib/openzeppelin-contracts:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "lib/openzeppelin-contracts:forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/", "lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/", "lib/openzeppelin-contracts-upgradeable:ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "lib/openzeppelin-contracts-upgradeable:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "lib/openzeppelin-contracts-upgradeable:forge-std/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/", "lib/openzeppelin-contracts-upgradeable:openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/", "lib/solmate:ds-test/=lib/solmate/lib/ds-test/src/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"pid_","type":"uint256"},{"internalType":"address","name":"stakingToken_","type":"address"},{"internalType":"address","name":"rewardToken_","type":"address"},{"internalType":"address","name":"operator_","type":"address"},{"internalType":"address","name":"rewardManager_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferReward","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":"_reward","type":"address"}],"name":"addExtraReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clearExtraRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extraRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraRewardsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_claimExtras","type":"bool"}],"name":"getReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"historicalRewards","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":[],"name":"newRewardRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","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":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"processIdleRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewards","type":"uint256"}],"name":"queueNewRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"queuedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardManager","type":"address"}],"name":"setRewardManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claim","type":"bool"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"claim","type":"bool"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e0604052600060025560006003556000600655600060075560006008553480156200002a57600080fd5b5060405162001e2338038062001e238339810160408190526200004d91620000b0565b60c0949094526001600160a01b0392831660a052908216608052600080549183166001600160a01b03199283161790556001805493909216921691909117905562000117565b80516001600160a01b0381168114620000ab57600080fd5b919050565b600080600080600060a08688031215620000c957600080fd5b85519450620000db6020870162000093565b9350620000eb6040870162000093565b9250620000fb6060870162000093565b91506200010b6080870162000093565b90509295509295909350565b60805160a05160c051611cb96200016a60003960006104ed015260008181610433015281816109f801528181610d9801528181610e8401526112ad0152600081816105140152610fbc0152611cb96000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c80636c8bcee811610145578063a694fc3a116100bd578063d55a23f41161008c578063ebe2b12b11610071578063ebe2b12b146104df578063f1068454146104e8578063f7c618c11461050f57600080fd5b8063d55a23f4146104ce578063df136d65146104d657600080fd5b8063a694fc3a14610497578063b3ab15fb146104aa578063c8f33c91146104bd578063cd3daf9d146104c657600080fd5b80637b0a47ee116101145780638b876347116100f95780638b876347146104665780638dcb406114610486578063901a7d531461048e57600080fd5b80637b0a47ee1461045557806380faa57d1461045e57600080fd5b80636c8bcee8146103dc5780637050ccd9146103e557806370a08231146103f857806372f702f31461042e57600080fd5b80632ee40908116101d857806340c35446116101a7578063590a41f51161018c578063590a41f5146103ad5780635e43c47b146103c057806363d38c3b146103d357600080fd5b806340c354461461037a578063570ca7351461038d57600080fd5b80632ee409081461033457806338d07436146103575780633d18b9121461036a5780633e8b83e31461037257600080fd5b80630fb5a6b41161022f57806318160ddd1161021457806318160ddd146103105780631c1c6fe514610318578063262d3d6d1461032b57600080fd5b80630fb5a6b4146102f5578063153ee554146102fd57600080fd5b80628cc262146102605780630569d388146102865780630700037d146102905780630f4ef8a6146102b0575b600080fd5b61027361026e3660046119f2565b610536565b6040519081526020015b60405180910390f35b61028e610547565b005b61027361029e3660046119f2565b600b6020526000908152604090205481565b6001546102d09073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161027d565b610273600181565b61028e61030b3660046119f2565b6105c1565b600954610273565b61028e610326366004611a1b565b61066f565b61027360085481565b610347610342366004611a38565b61068d565b604051901515815260200161027d565b610347610365366004611a62565b6106a0565b6103476106ac565b61028e6106c1565b6102d0610388366004611a92565b6106ec565b6000546102d09073ffffffffffffffffffffffffffffffffffffffff1681565b6103476103bb366004611a92565b610723565b6103476103ce3660046119f2565b610837565b61027360065481565b61027361033e81565b6103476103f3366004611aab565b610991565b6102736104063660046119f2565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b6102d07f000000000000000000000000000000000000000000000000000000000000000081565b61027360035481565b61027361099d565b6102736104743660046119f2565b600a6020526000908152604090205481565b6103476109b0565b61027360075481565b6103476104a5366004611a92565b610a77565b61028e6104b83660046119f2565b610a82565b61027360045481565b610273610b30565b600d54610273565b61027360055481565b61027360025481565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6102d07f000000000000000000000000000000000000000000000000000000000000000081565b600061054182610b3a565b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105b35760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6105bf600d600061198f565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106285760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b336000908152600c60205260409020546106899082610bc7565b5050565b60006106998383610e5e565b9392505050565b60006106998383610bc7565b60006106b9336001610f05565b506001905090565b60025442101580156106d557506000600654115b156105bf576106e5600654611107565b6000600655565b600d81815481106106fc57600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461078b5760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b600654610799908390611241565b915060025442106107b9576107ad82611107565b50506000600655600190565b60006107db6107d4600160025461124d90919063ffffffff16565b429061124d565b90506000816003546107ed9190611b06565b9050600061080785610801846103e8611259565b90611265565b905061033e8110156108265761081c85611107565b600060065561082c565b60068590555b506001949350505050565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146108a15760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b73ffffffffffffffffffffffffffffffffffffffff82166109045760405162461bcd60e51b815260206004820152600f60248201527f217265776172642073657474696e67000000000000000000000000000000000060448201526064016105aa565b600d54600c1161091657506000919050565b50600d8054600180820183556000929092527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169290921790915590565b60006106998383610f05565b60006109ab42600254611271565b905090565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a639190611b1d565b9050610a6e81611287565b50600191505090565b600061054182611287565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ae95760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006109ab611312565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b6020908152604080832054600a9092528220546105419190610bc190670de0b6b3a76400009061080190610b9490610b8e611312565b9061124d565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c60205260409020545b90611259565b90611241565b600033610bd2611312565b600555610bdd61099d565b60045573ffffffffffffffffffffffffffffffffffffffff811615610c3e57610c0581610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b60008411610c8e5760405162461bcd60e51b815260206004820152601e60248201527f526577617264506f6f6c203a2043616e6e6f742077697468647261772030000060448201526064016105aa565b60005b600d54811015610d5457600d8181548110610cae57610cae611b36565b6000918252602090912001546040517ff3fef3a30000000000000000000000000000000000000000000000000000000081523360048201526024810187905273ffffffffffffffffffffffffffffffffffffffff9091169063f3fef3a390604401600060405180830381600087803b158015610d2957600080fd5b505af1158015610d3d573d6000803e3d6000fd5b505050508080610d4c90611b65565b915050610c91565b50600954610d62908561124d565b600955336000908152600c6020526040902054610d7f908561124d565b336000818152600c6020526040902091909155610dd4907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169086611363565b60405184815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a28215610e1c57610e1a336001610f05565b505b60405184815260009033907f4332d3aac8bbc1ec65700cf5d1235e2118fe56b06c41aaf3e9627fb19a39b1bf9060200160405180910390a35060019392505050565b6000610e6a828461143c565b610eac73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611675565b8273ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d83604051610ef491815260200190565b60405180910390a250600192915050565b600082610f10611312565b600555610f1b61099d565b60045573ffffffffffffffffffffffffffffffffffffffff811615610f7c57610f4381610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b6000610f8785610b3a565b905080156110345773ffffffffffffffffffffffffffffffffffffffff8086166000908152600b6020526040812055610fe3907f0000000000000000000000000000000000000000000000000000000000000000168683611363565b8473ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161102b91815260200190565b60405180910390a25b831561082c5760005b600d548110156110fb57600d818154811061105a5761105a611b36565b6000918252602090912001546040517fc00007b000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301529091169063c00007b090602401600060405180830381600087803b1580156110d057600080fd5b505af11580156110e4573d6000803e3d6000fd5b5050505080806110f390611b65565b91505061103d565b50506001949350505050565b6000611111611312565b60055561111c61099d565b60045573ffffffffffffffffffffffffffffffffffffffff81161561117d5761114481610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b60085461118a9083611241565b60085560025442106111a9576111a1826001611265565b6003556111f1565b6002546000906111b9904261124d565b905060006111d26003548361125990919063ffffffff16565b90506111de8482611241565b93506111eb846001611265565b60035550505b6007829055426004819055611207906001611241565b6002556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b60006106998284611b9d565b60006106998284611bb0565b60006106998284611b06565b60006106998284611bc3565b60008183106112805781610699565b5090919050565b6000611293823361143c565b6112d573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611675565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a2506001919050565b600061131d60095490565b60000361132b575060055490565b6109ab61135a61133a60095490565b610801670de0b6b3a7640000610bbb600354610bbb600454610b8e61099d565b60055490611241565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114379084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526116d9565b505050565b80611445611312565b60055561145061099d565b60045573ffffffffffffffffffffffffffffffffffffffff8116156114b15761147881610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b600083116115015760405162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b652030000000000060448201526064016105aa565b60005b600d548110156115c957600d818154811061152157611521611b36565b6000918252602090912001546040517fadc9772e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018790529091169063adc9772e90604401600060405180830381600087803b15801561159e57600080fd5b505af11580156115b2573d6000803e3d6000fd5b5050505080806115c190611b65565b915050611504565b506009546115d79084611241565b60095573ffffffffffffffffffffffffffffffffffffffff82166000908152600c602052604090205461160a9084611241565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600c60205260408082209390935591519091907f4332d3aac8bbc1ec65700cf5d1235e2118fe56b06c41aaf3e9627fb19a39b1bf906116689087815260200190565b60405180910390a3505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526116d39085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016113b5565b50505050565b600061173b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166117ce9092919063ffffffff16565b905080516000148061175c57508080602001905181019061175c9190611bfe565b6114375760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105aa565b60606117dd84846000856117e5565b949350505050565b60608247101561185d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105aa565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118869190611c3f565b60006040518083038185875af1925050503d80600081146118c3576040519150601f19603f3d011682016040523d82523d6000602084013e6118c8565b606091505b50915091506118d9878383876118e4565b979650505050505050565b606083156119605782516000036119595773ffffffffffffffffffffffffffffffffffffffff85163b6119595760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105aa565b50816117dd565b6117dd83838151156119755781518083602001fd5b8060405162461bcd60e51b81526004016105aa9190611c5b565b50805460008255906000526020600020908101906119ad91906119b0565b50565b5b808211156119c557600081556001016119b1565b5090565b803573ffffffffffffffffffffffffffffffffffffffff811681146119ed57600080fd5b919050565b600060208284031215611a0457600080fd5b610699826119c9565b80151581146119ad57600080fd5b600060208284031215611a2d57600080fd5b813561069981611a0d565b60008060408385031215611a4b57600080fd5b611a54836119c9565b946020939093013593505050565b60008060408385031215611a7557600080fd5b823591506020830135611a8781611a0d565b809150509250929050565b600060208284031215611aa457600080fd5b5035919050565b60008060408385031215611abe57600080fd5b611ac7836119c9565b91506020830135611a8781611a0d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761054157610541611ad7565b600060208284031215611b2f57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b9657611b96611ad7565b5060010190565b8082018082111561054157610541611ad7565b8181038181111561054157610541611ad7565b600082611bf9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611c1057600080fd5b815161069981611a0d565b60005b83811015611c36578181015183820152602001611c1e565b50506000910152565b60008251611c51818460208701611c1b565b9190910192915050565b6020815260008251806020840152611c7a816040850160208701611c1b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000811000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004506dddbf689714487f91ae1397047169afcf340000000000000000000000007448c7456a97769f6cd04f1e83a4a23ccdc46abd000000000000000000000000b32e9bfc164599a7cf72b048d6f0fdaad4de65d2000000000000000000000000b32e9bfc164599a7cf72b048d6f0fdaad4de65d2
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061025b5760003560e01c80636c8bcee811610145578063a694fc3a116100bd578063d55a23f41161008c578063ebe2b12b11610071578063ebe2b12b146104df578063f1068454146104e8578063f7c618c11461050f57600080fd5b8063d55a23f4146104ce578063df136d65146104d657600080fd5b8063a694fc3a14610497578063b3ab15fb146104aa578063c8f33c91146104bd578063cd3daf9d146104c657600080fd5b80637b0a47ee116101145780638b876347116100f95780638b876347146104665780638dcb406114610486578063901a7d531461048e57600080fd5b80637b0a47ee1461045557806380faa57d1461045e57600080fd5b80636c8bcee8146103dc5780637050ccd9146103e557806370a08231146103f857806372f702f31461042e57600080fd5b80632ee40908116101d857806340c35446116101a7578063590a41f51161018c578063590a41f5146103ad5780635e43c47b146103c057806363d38c3b146103d357600080fd5b806340c354461461037a578063570ca7351461038d57600080fd5b80632ee409081461033457806338d07436146103575780633d18b9121461036a5780633e8b83e31461037257600080fd5b80630fb5a6b41161022f57806318160ddd1161021457806318160ddd146103105780631c1c6fe514610318578063262d3d6d1461032b57600080fd5b80630fb5a6b4146102f5578063153ee554146102fd57600080fd5b80628cc262146102605780630569d388146102865780630700037d146102905780630f4ef8a6146102b0575b600080fd5b61027361026e3660046119f2565b610536565b6040519081526020015b60405180910390f35b61028e610547565b005b61027361029e3660046119f2565b600b6020526000908152604090205481565b6001546102d09073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161027d565b610273600181565b61028e61030b3660046119f2565b6105c1565b600954610273565b61028e610326366004611a1b565b61066f565b61027360085481565b610347610342366004611a38565b61068d565b604051901515815260200161027d565b610347610365366004611a62565b6106a0565b6103476106ac565b61028e6106c1565b6102d0610388366004611a92565b6106ec565b6000546102d09073ffffffffffffffffffffffffffffffffffffffff1681565b6103476103bb366004611a92565b610723565b6103476103ce3660046119f2565b610837565b61027360065481565b61027361033e81565b6103476103f3366004611aab565b610991565b6102736104063660046119f2565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b6102d07f00000000000000000000000004506dddbf689714487f91ae1397047169afcf3481565b61027360035481565b61027361099d565b6102736104743660046119f2565b600a6020526000908152604090205481565b6103476109b0565b61027360075481565b6103476104a5366004611a92565b610a77565b61028e6104b83660046119f2565b610a82565b61027360045481565b610273610b30565b600d54610273565b61027360055481565b61027360025481565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6102d07f0000000000000000000000007448c7456a97769f6cd04f1e83a4a23ccdc46abd81565b600061054182610b3a565b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105b35760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6105bf600d600061198f565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106285760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b336000908152600c60205260409020546106899082610bc7565b5050565b60006106998383610e5e565b9392505050565b60006106998383610bc7565b60006106b9336001610f05565b506001905090565b60025442101580156106d557506000600654115b156105bf576106e5600654611107565b6000600655565b600d81815481106106fc57600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461078b5760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b600654610799908390611241565b915060025442106107b9576107ad82611107565b50506000600655600190565b60006107db6107d4600160025461124d90919063ffffffff16565b429061124d565b90506000816003546107ed9190611b06565b9050600061080785610801846103e8611259565b90611265565b905061033e8110156108265761081c85611107565b600060065561082c565b60068590555b506001949350505050565b60015460009073ffffffffffffffffffffffffffffffffffffffff1633146108a15760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b73ffffffffffffffffffffffffffffffffffffffff82166109045760405162461bcd60e51b815260206004820152600f60248201527f217265776172642073657474696e67000000000000000000000000000000000060448201526064016105aa565b600d54600c1161091657506000919050565b50600d8054600180820183556000929092527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169290921790915590565b60006106998383610f05565b60006109ab42600254611271565b905090565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000004506dddbf689714487f91ae1397047169afcf3416906370a0823190602401602060405180830381865afa158015610a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a639190611b1d565b9050610a6e81611287565b50600191505090565b600061054182611287565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ae95760405162461bcd60e51b815260206004820152600b60248201527f21617574686f72697a656400000000000000000000000000000000000000000060448201526064016105aa565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006109ab611312565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b6020908152604080832054600a9092528220546105419190610bc190670de0b6b3a76400009061080190610b9490610b8e611312565b9061124d565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c60205260409020545b90611259565b90611241565b600033610bd2611312565b600555610bdd61099d565b60045573ffffffffffffffffffffffffffffffffffffffff811615610c3e57610c0581610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b60008411610c8e5760405162461bcd60e51b815260206004820152601e60248201527f526577617264506f6f6c203a2043616e6e6f742077697468647261772030000060448201526064016105aa565b60005b600d54811015610d5457600d8181548110610cae57610cae611b36565b6000918252602090912001546040517ff3fef3a30000000000000000000000000000000000000000000000000000000081523360048201526024810187905273ffffffffffffffffffffffffffffffffffffffff9091169063f3fef3a390604401600060405180830381600087803b158015610d2957600080fd5b505af1158015610d3d573d6000803e3d6000fd5b505050508080610d4c90611b65565b915050610c91565b50600954610d62908561124d565b600955336000908152600c6020526040902054610d7f908561124d565b336000818152600c6020526040902091909155610dd4907f00000000000000000000000004506dddbf689714487f91ae1397047169afcf3473ffffffffffffffffffffffffffffffffffffffff169086611363565b60405184815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a28215610e1c57610e1a336001610f05565b505b60405184815260009033907f4332d3aac8bbc1ec65700cf5d1235e2118fe56b06c41aaf3e9627fb19a39b1bf9060200160405180910390a35060019392505050565b6000610e6a828461143c565b610eac73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000004506dddbf689714487f91ae1397047169afcf3416333085611675565b8273ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d83604051610ef491815260200190565b60405180910390a250600192915050565b600082610f10611312565b600555610f1b61099d565b60045573ffffffffffffffffffffffffffffffffffffffff811615610f7c57610f4381610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b6000610f8785610b3a565b905080156110345773ffffffffffffffffffffffffffffffffffffffff8086166000908152600b6020526040812055610fe3907f0000000000000000000000007448c7456a97769f6cd04f1e83a4a23ccdc46abd168683611363565b8473ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161102b91815260200190565b60405180910390a25b831561082c5760005b600d548110156110fb57600d818154811061105a5761105a611b36565b6000918252602090912001546040517fc00007b000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301529091169063c00007b090602401600060405180830381600087803b1580156110d057600080fd5b505af11580156110e4573d6000803e3d6000fd5b5050505080806110f390611b65565b91505061103d565b50506001949350505050565b6000611111611312565b60055561111c61099d565b60045573ffffffffffffffffffffffffffffffffffffffff81161561117d5761114481610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b60085461118a9083611241565b60085560025442106111a9576111a1826001611265565b6003556111f1565b6002546000906111b9904261124d565b905060006111d26003548361125990919063ffffffff16565b90506111de8482611241565b93506111eb846001611265565b60035550505b6007829055426004819055611207906001611241565b6002556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b60006106998284611b9d565b60006106998284611bb0565b60006106998284611b06565b60006106998284611bc3565b60008183106112805781610699565b5090919050565b6000611293823361143c565b6112d573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000004506dddbf689714487f91ae1397047169afcf3416333085611675565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a2506001919050565b600061131d60095490565b60000361132b575060055490565b6109ab61135a61133a60095490565b610801670de0b6b3a7640000610bbb600354610bbb600454610b8e61099d565b60055490611241565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114379084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526116d9565b505050565b80611445611312565b60055561145061099d565b60045573ffffffffffffffffffffffffffffffffffffffff8116156114b15761147881610b3a565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604080832093909355600554600a909152919020555b600083116115015760405162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b652030000000000060448201526064016105aa565b60005b600d548110156115c957600d818154811061152157611521611b36565b6000918252602090912001546040517fadc9772e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018790529091169063adc9772e90604401600060405180830381600087803b15801561159e57600080fd5b505af11580156115b2573d6000803e3d6000fd5b5050505080806115c190611b65565b915050611504565b506009546115d79084611241565b60095573ffffffffffffffffffffffffffffffffffffffff82166000908152600c602052604090205461160a9084611241565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600c60205260408082209390935591519091907f4332d3aac8bbc1ec65700cf5d1235e2118fe56b06c41aaf3e9627fb19a39b1bf906116689087815260200190565b60405180910390a3505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526116d39085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016113b5565b50505050565b600061173b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166117ce9092919063ffffffff16565b905080516000148061175c57508080602001905181019061175c9190611bfe565b6114375760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105aa565b60606117dd84846000856117e5565b949350505050565b60608247101561185d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105aa565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118869190611c3f565b60006040518083038185875af1925050503d80600081146118c3576040519150601f19603f3d011682016040523d82523d6000602084013e6118c8565b606091505b50915091506118d9878383876118e4565b979650505050505050565b606083156119605782516000036119595773ffffffffffffffffffffffffffffffffffffffff85163b6119595760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105aa565b50816117dd565b6117dd83838151156119755781518083602001fd5b8060405162461bcd60e51b81526004016105aa9190611c5b565b50805460008255906000526020600020908101906119ad91906119b0565b50565b5b808211156119c557600081556001016119b1565b5090565b803573ffffffffffffffffffffffffffffffffffffffff811681146119ed57600080fd5b919050565b600060208284031215611a0457600080fd5b610699826119c9565b80151581146119ad57600080fd5b600060208284031215611a2d57600080fd5b813561069981611a0d565b60008060408385031215611a4b57600080fd5b611a54836119c9565b946020939093013593505050565b60008060408385031215611a7557600080fd5b823591506020830135611a8781611a0d565b809150509250929050565b600060208284031215611aa457600080fd5b5035919050565b60008060408385031215611abe57600080fd5b611ac7836119c9565b91506020830135611a8781611a0d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761054157610541611ad7565b600060208284031215611b2f57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b9657611b96611ad7565b5060010190565b8082018082111561054157610541611ad7565b8181038181111561054157610541611ad7565b600082611bf9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611c1057600080fd5b815161069981611a0d565b60005b83811015611c36578181015183820152602001611c1e565b50506000910152565b60008251611c51818460208701611c1b565b9190910192915050565b6020815260008251806020840152611c7a816040850160208701611c1b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000811000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004506dddbf689714487f91ae1397047169afcf340000000000000000000000007448c7456a97769f6cd04f1e83a4a23ccdc46abd000000000000000000000000b32e9bfc164599a7cf72b048d6f0fdaad4de65d2000000000000000000000000b32e9bfc164599a7cf72b048d6f0fdaad4de65d2
-----Decoded View---------------
Arg [0] : pid_ (uint256): 0
Arg [1] : stakingToken_ (address): 0x04506DDDBF689714487f91Ae1397047169afcF34
Arg [2] : rewardToken_ (address): 0x7448c7456a97769F6cD04F1E83A4a23cCdC46aBD
Arg [3] : operator_ (address): 0xB32e9Bfc164599a7cF72b048d6F0FdAad4DE65d2
Arg [4] : rewardManager_ (address): 0xB32e9Bfc164599a7cF72b048d6F0FdAad4DE65d2
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 00000000000000000000000004506dddbf689714487f91ae1397047169afcf34
Arg [2] : 0000000000000000000000007448c7456a97769f6cd04f1e83a4a23ccdc46abd
Arg [3] : 000000000000000000000000b32e9bfc164599a7cf72b048d6f0fdaad4de65d2
Arg [4] : 000000000000000000000000b32e9bfc164599a7cf72b048d6f0fdaad4de65d2
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 25 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.