Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 72 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Token | 18613951 | 411 days ago | IN | 0 ETH | 0.00176931 | ||||
Withdraw ETH | 18613947 | 411 days ago | IN | 0 ETH | 0.00101407 | ||||
Unstake | 18350036 | 448 days ago | IN | 0 ETH | 0.00102072 | ||||
Unstake | 18349696 | 448 days ago | IN | 0 ETH | 0.00154828 | ||||
Transfer | 18344462 | 449 days ago | IN | 0.05 ETH | 0.00010932 | ||||
Update Rewards | 18343420 | 449 days ago | IN | 0 ETH | 0.00025591 | ||||
Update Rewards | 18343320 | 449 days ago | IN | 0 ETH | 0.00022421 | ||||
Enable Deposits | 18342337 | 449 days ago | IN | 0 ETH | 0.00022152 | ||||
Unstake | 18335461 | 450 days ago | IN | 0 ETH | 0.00191104 | ||||
Unstake | 18335453 | 450 days ago | IN | 0 ETH | 0.00229414 | ||||
Unstake | 18335319 | 450 days ago | IN | 0 ETH | 0.00254022 | ||||
Unstake | 18335209 | 450 days ago | IN | 0 ETH | 0.00138434 | ||||
Emergency Withdr... | 18335203 | 450 days ago | IN | 0 ETH | 0.00041376 | ||||
Emergency Withdr... | 18335198 | 450 days ago | IN | 0 ETH | 0.00037459 | ||||
Stake | 18260604 | 460 days ago | IN | 0 ETH | 0.00101578 | ||||
Stake | 18235141 | 464 days ago | IN | 0 ETH | 0.00417075 | ||||
Stake | 18233442 | 464 days ago | IN | 0 ETH | 0.00120636 | ||||
Stake | 18232975 | 464 days ago | IN | 0 ETH | 0.00147706 | ||||
Withdraw Reward | 18232922 | 464 days ago | IN | 0 ETH | 0.0014427 | ||||
Stake | 18228598 | 465 days ago | IN | 0 ETH | 0.00364677 | ||||
Withdraw Reward | 18228563 | 465 days ago | IN | 0 ETH | 0.00325699 | ||||
Update Rewards | 18228126 | 465 days ago | IN | 0 ETH | 0.00054821 | ||||
Stake | 18228120 | 465 days ago | IN | 0 ETH | 0.00328338 | ||||
Update Rewards | 18228051 | 465 days ago | IN | 0 ETH | 0.00057395 | ||||
Stake | 18227888 | 465 days ago | IN | 0 ETH | 0.00423547 |
Latest 12 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18613947 | 411 days ago | 0.05043835 ETH | ||||
18232922 | 464 days ago | 0.08797568 ETH | ||||
18228563 | 465 days ago | 0.02489611 ETH | ||||
18227785 | 465 days ago | 0.01306827 ETH | ||||
18226505 | 465 days ago | 0.00526995 ETH | ||||
18225310 | 465 days ago | 0.0093366 ETH | ||||
18225275 | 465 days ago | 0.00161973 ETH | ||||
18225099 | 465 days ago | 0.00900777 ETH | ||||
18222784 | 466 days ago | 0.0479661 ETH | ||||
18222778 | 466 days ago | 0.001018 ETH | ||||
18221922 | 466 days ago | 0.0056784 ETH | ||||
18221916 | 466 days ago | 0.00372503 ETH |
Loading...
Loading
Contract Name:
LShareLpStaking
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract LShareLpStaking is Ownable, ReentrancyGuard { using SafeMath for uint256; IERC20 public lpToken; uint256 public lockPeriod = 20160 minutes; // 20160 minutes uint256 public lock_var = 20160; // 14 uint256 public rewardPerBlock = 1e18; uint256 public blockPerMinutes = 4; // 4 uint256 public AverageBlockTime = 13; // 13 bool public EmergencyFeeWaive = false; bool public Deposit_enabled = false; // false struct Stake { uint256 stakedAmount; uint256 stakeTime; uint256 unstakeTime; uint256 startBlock; uint256 lastClaimedBlock; uint256 claimedRewards; } struct UserInfo { Stake[] stakes; } mapping(address => UserInfo) private userInfo; event Staked(address indexed user, uint256 amount,uint256 startTime, uint256 endTime); event RewardWithdrawn(address indexed user, uint256 reward); event Unstaked(address indexed user, uint256 reward,uint256 unstakeAmount ); constructor(IERC20 _rewardToken) { lpToken = _rewardToken; } function setRewardTokenLp(IERC20 _token) external onlyOwner { lpToken = _token; } function SetAverageBlockTimeAndTimeVar(uint256 _newTime, uint256 _time) external onlyOwner { AverageBlockTime = _newTime; lock_var = _time; } function enableDeposits(bool state) public onlyOwner { Deposit_enabled = state; } function stake(uint256 _tokenAmount) external nonReentrant { require(Deposit_enabled == true, "Deposits need to be enabled"); require(_tokenAmount > 0, "Staking amount must be greater than 0!"); uint256 _stakeTime = block.timestamp; uint256 _unstakeTime = _stakeTime.add(lockPeriod); userInfo[msg.sender].stakes.push(Stake({ stakedAmount: _tokenAmount, stakeTime: _stakeTime, unstakeTime : _unstakeTime, startBlock : block.number, lastClaimedBlock: block.number, claimedRewards: 0 })); require(lpToken.transferFrom(msg.sender, address(this), _tokenAmount), "Token transfer failed!"); emit Staked(msg.sender, _tokenAmount, _stakeTime, _unstakeTime); } function unstake() external { UserInfo storage user = userInfo[msg.sender]; uint256 totalUnstakeAmount = 0; uint256 totalReward = 0; // Store indexes of stakes that need to be removed uint256[] memory toRemoveIndexes = new uint256[](user.stakes.length); uint256 removeCount = 0; for (uint256 i = 0; i < user.stakes.length; i++) { if (block.timestamp >= user.stakes[i].stakeTime.add(lockPeriod)) { uint256 stakeReward = calculateRewardForStake(msg.sender, i); totalReward = totalReward.add(stakeReward); totalUnstakeAmount = totalUnstakeAmount.add(user.stakes[i].stakedAmount); if (stakeReward > 0 && !EmergencyFeeWaive) { withdrawReward(); } toRemoveIndexes[removeCount] = i; removeCount++; } } require(removeCount > 0, "Lock time not completed yet."); for (uint256 j = removeCount; j > 0; j--) { if (toRemoveIndexes[j - 1] != user.stakes.length - 1) { user.stakes[toRemoveIndexes[j - 1]] = user.stakes[user.stakes.length - 1]; } user.stakes.pop(); } require(lpToken.transfer(msg.sender, totalUnstakeAmount), "Failed to transfer LP tokens."); emit Unstaked(msg.sender, totalReward, totalUnstakeAmount); } function calculatePercentage(address user) public view returns(uint256) { UserInfo storage userInformation = userInfo[user]; uint256 userTotalStake = 0; for (uint256 i = 0; i < userInformation.stakes.length; i++) { userTotalStake = userTotalStake.add(userInformation.stakes[i].stakedAmount); } uint256 totalPoolBalance = lpToken.balanceOf(address(this)); if (totalPoolBalance == 0) { return 0; } uint256 percentage = userTotalStake.mul(10000).div(totalPoolBalance); return percentage; } function getUserRewardForBlock(address user) public view returns (uint256) { uint256 userPercentage = calculatePercentage(user); uint256 userReward = rewardPerBlock.mul(userPercentage).div(10000); return userReward; } function withdrawReward() public { require(msg.sender == tx.origin, "invalid caller!"); UserInfo storage user = userInfo[msg.sender]; uint256 totalRewards = 0; for (uint256 i = 0; i < user.stakes.length; i++) { Stake storage stakeInfo = user.stakes[i]; uint256 reward = calculateRewardForStake(msg.sender, i); totalRewards = totalRewards.add(reward); if (reward > 0) { stakeInfo.lastClaimedBlock = block.number; stakeInfo.claimedRewards = stakeInfo.claimedRewards.add(reward); } } require(totalRewards > 0, "No rewards to withdraw"); require(address(this).balance >= totalRewards, "insufficient ETH Balance!"); payable(msg.sender).transfer(totalRewards); emit RewardWithdrawn(msg.sender, totalRewards); } function calculateRewardForStake(address user, uint256 stakeIndex) public view returns (uint256) { Stake storage stakeInfo = userInfo[user].stakes[stakeIndex]; uint256 endBlock = stakeInfo.startBlock.add(blockPerMinutes.mul(lock_var)); uint256 blockToCalculateUntil = (block.number < endBlock) ? block.number : endBlock; if (stakeInfo.lastClaimedBlock >= blockToCalculateUntil) { return 0; } uint256 blocksSinceLastClaim = blockToCalculateUntil.sub(stakeInfo.lastClaimedBlock); return getUserRewardForBlock(user).mul(blocksSinceLastClaim); } function calculateRewardSinceLastClaim(address user) public view returns (uint256) { uint256 totalReward = 0; for (uint256 i = 0; i < userInfo[user].stakes.length; i++) { totalReward = totalReward.add(calculateRewardForStake(user, i)); } return totalReward; } function checkRemainingTimeAndBlocks(address user) public view returns(uint256[] memory remainingTimes, uint256[] memory remainingBlocks){ UserInfo storage userInformation = userInfo[user]; uint256[] memory _remainingTimes = new uint256[](userInformation.stakes.length); uint256[] memory _remainingBlocks = new uint256[](userInformation.stakes.length); for(uint256 i = 0; i < userInformation.stakes.length; i++) { Stake storage stakeInfo = userInformation.stakes[i]; uint256 endBlock = stakeInfo.startBlock.add(blockPerMinutes.mul(lock_var)); _remainingBlocks[i] = (block.number >= endBlock) ? 0 : endBlock.sub(block.number); _remainingTimes[i] = _remainingBlocks[i].mul(AverageBlockTime); // Assuming an average block time of 13 seconds for Ethereum // was 3 if(block.timestamp >= stakeInfo.unstakeTime) { _remainingTimes[i] = 0; } } return (_remainingTimes, _remainingBlocks); } function checkRemainingTime(address user) external view returns(uint256[] memory){ UserInfo storage userInformation = userInfo[user]; uint256[] memory remainingTimes = new uint256[](userInformation.stakes.length); for(uint256 i = 0; i < userInformation.stakes.length; i++) { Stake storage stakeInfo = userInformation.stakes[i]; if(block.timestamp < stakeInfo.unstakeTime) { remainingTimes[i] = stakeInfo.unstakeTime.sub(block.timestamp); } else { remainingTimes[i] = 0; } } return remainingTimes; } function getAllStakeDetails(address _user) external view returns (uint256[] memory stakeIndices, Stake[] memory stakes) { UserInfo storage user = userInfo[_user]; stakeIndices = new uint256[](user.stakes.length); stakes = user.stakes; for (uint256 i = 0; i < user.stakes.length; i++) { stakeIndices[i] = i; } return (stakeIndices, stakes); } function getCurrentBlock() public view returns(uint256) { return block.number; } function getLpDepositsForUser(address account) public view returns (uint256) { UserInfo storage user = userInfo[account]; uint256 totalStaked; // Initialize the total staked variable for (uint256 i = 0; i < user.stakes.length; i++) { totalStaked += user.stakes[i].stakedAmount; // Accumulate the staked amounts } return totalStaked; } function EmergencyMeasures(bool state) public onlyOwner { EmergencyFeeWaive = state; } function updateRewards(uint256 _rewardperBlock) external onlyOwner { rewardPerBlock = _rewardperBlock; } function updatelockPeriod(uint256 newLockPeriodInMinutes) external onlyOwner { lockPeriod = newLockPeriodInMinutes * 1 minutes; } function updateBlockPerMinutes(uint256 _blockPerMinute) external onlyOwner { blockPerMinutes=_blockPerMinute; } function emergencyWithdrawLpTokens() external onlyOwner { uint256 balanceOfContract = lpToken.balanceOf(address(this)); lpToken.transfer(owner(), balanceOfContract); } function CheckBalance() public view returns(uint256){ return lpToken.balanceOf(address(this)); } function withdrawETH() external onlyOwner { payable (owner()).transfer(address(this).balance); } function withdrawToken(address token) external onlyOwner { if (token == address(0x0)) { payable(msg.sender).transfer(address(this).balance); return; } IERC20 ERC20token = IERC20(token); uint256 balance = ERC20token.balanceOf(address(this)); ERC20token.transfer(msg.sender, balance); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^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() { _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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // 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 (last updated v4.9.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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unstakeAmount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"AverageBlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CheckBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Deposit_enabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EmergencyFeeWaive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"EmergencyMeasures","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"},{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"SetAverageBlockTimeAndTimeVar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blockPerMinutes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculatePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"stakeIndex","type":"uint256"}],"name":"calculateRewardForStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateRewardSinceLastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"checkRemainingTime","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"checkRemainingTimeAndBlocks","outputs":[{"internalType":"uint256[]","name":"remainingTimes","type":"uint256[]"},{"internalType":"uint256[]","name":"remainingBlocks","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdrawLpTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"enableDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getAllStakeDetails","outputs":[{"internalType":"uint256[]","name":"stakeIndices","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"unstakeTime","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"lastClaimedBlock","type":"uint256"},{"internalType":"uint256","name":"claimedRewards","type":"uint256"}],"internalType":"struct LShareLpStaking.Stake[]","name":"stakes","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getLpDepositsForUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserRewardForBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_var","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"setRewardTokenLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockPerMinute","type":"uint256"}],"name":"updateBlockPerMinutes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardperBlock","type":"uint256"}],"name":"updateRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLockPeriodInMinutes","type":"uint256"}],"name":"updatelockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405262127500600355614ec06004908155670de0b6b3a7640000600555600655600d6007556008805461ffff191690553480156200003f57600080fd5b50604051620021d6380380620021d68339810160408190526200006291620000f4565b6200007662000070620000a0565b620000a4565b60018055600280546001600160a01b0319166001600160a01b039290921691909117905562000124565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121562000106578081fd5b81516001600160a01b03811681146200011d578182fd5b9392505050565b6120a280620001346000396000f3fe6080604052600436106101fd5760003560e01c80637afa1f801161010d578063b1e95e94116100a0578063d2da71b91161006f578063d2da71b91461056a578063dc2c9de51461057f578063e086e5ec1461059f578063f2fde38b146105b4578063fbc35a69146105d457610204565b8063b1e95e94146104e7578063bdcc98d714610507578063c885bc5814610527578063cc9a8a6e1461053c57610204565b80639f22a03b116100dc5780639f22a03b14610467578063a3d686a314610487578063a694fc3a146104a7578063b00c6db5146104c757610204565b80637afa1f80146103fd578063894760691461041d5780638ae39cac1461043d5780638da5cb5b1461045257610204565b80633c994364116101905780634b6014d71161015f5780634b6014d71461037c57806357cdbf2a146103915780635fcbd285146103b1578063672d5d3b146103d3578063715018a6146103e857610204565b80633c994364146103055780633fd8b02f1461033257806344e73b7814610347578063485e5c221461035c57610204565b8063266cf0c6116101cc578063266cf0c6146102805780632b7c02be146102ae5780632def6620146102ce57806336205fc3146102e357610204565b80630c7c4fe5146102095780630db5c844146102345780631c1718041461024b5780631e0c72521461026057610204565b3661020457005b600080fd5b34801561021557600080fd5b5061021e6105f4565b60405161022b9190611f66565b60405180910390f35b34801561024057600080fd5b506102496105fa565b005b34801561025757600080fd5b5061021e610713565b34801561026c57600080fd5b5061024961027b366004611ad9565b610719565b34801561028c57600080fd5b506102a061029b366004611ad9565b610743565b60405161022b929190611c47565b3480156102ba57600080fd5b5061021e6102c9366004611ad9565b610898565b3480156102da57600080fd5b5061024961091a565b3480156102ef57600080fd5b506102f8610d51565b60405161022b9190611cfe565b34801561031157600080fd5b50610325610320366004611ad9565b610d5f565b60405161022b9190611c34565b34801561033e57600080fd5b5061021e610e9e565b34801561035357600080fd5b5061021e610ea4565b34801561036857600080fd5b5061021e610377366004611ad9565b610f2a565b34801561038857600080fd5b5061021e610f7e565b34801561039d57600080fd5b506102496103ac366004611b20565b610f84565b3480156103bd57600080fd5b506103c6610fa6565b60405161022b9190611be3565b3480156103df57600080fd5b5061021e610fb5565b3480156103f457600080fd5b50610249610fb9565b34801561040957600080fd5b5061021e610418366004611ad9565b610fcd565b34801561042957600080fd5b50610249610438366004611ad9565b6110fa565b34801561044957600080fd5b5061021e61124d565b34801561045e57600080fd5b506103c6611253565b34801561047357600080fd5b50610249610482366004611b58565b611262565b34801561049357600080fd5b506102496104a2366004611b58565b61127b565b3480156104b357600080fd5b506102496104c2366004611b58565b611288565b3480156104d357600080fd5b506102496104e2366004611b20565b61146b565b3480156104f357600080fd5b50610249610502366004611b58565b611486565b34801561051357600080fd5b5061021e610522366004611ad9565b611493565b34801561053357600080fd5b506102496114c6565b34801561054857600080fd5b5061055c610557366004611ad9565b611639565b60405161022b929190611cd0565b34801561057657600080fd5b506102f8611876565b34801561058b57600080fd5b5061021e61059a366004611af5565b61187f565b3480156105ab57600080fd5b5061024961194d565b3480156105c057600080fd5b506102496105cf366004611ad9565b611995565b3480156105e057600080fd5b506102496105ef366004611b88565b6119cc565b60045481565b6106026119df565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610633903090600401611be3565b60206040518083038186803b15801561064b57600080fd5b505afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106839190611b70565b6002549091506001600160a01b031663a9059cbb61069f611253565b836040518363ffffffff1660e01b81526004016106bd929190611c1b565b602060405180830381600087803b1580156106d757600080fd5b505af11580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070f9190611b3c565b5050565b60065481565b6107216119df565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526009602052604090208054606091829167ffffffffffffffff81111561078857634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156107b1578160200160208202803683370190505b5081546040805160208084028201810190925282815292955083919060009084015b8282101561084157838290600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481525050815260200190600101906107d3565b50505050915060005b8154811015610891578084828151811061087457634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061088981612018565b91505061084a565b5050915091565b6001600160a01b038116600090815260096020526040812081805b8254811015610910578260000181815481106108df57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160000154826108fc9190611f93565b91508061090881612018565b9150506108b3565b509150505b919050565b33600090815260096020526040812080549091908190819067ffffffffffffffff81111561095857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610981578160200160208202803683370190505b5090506000805b8554811015610aa7576109da6003548760000183815481106109ba57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160010154611a1e90919063ffffffff16565b4210610a955760006109ec338361187f565b90506109f88582611a1e565b9450610a38876000018381548110610a2057634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201548790611a1e565b9550600081118015610a4d575060085460ff16155b15610a5a57610a5a6114c6565b81848481518110610a7b57634e487b7160e01b600052603260045260246000fd5b602090810291909101015282610a9081612018565b935050505b80610a9f81612018565b915050610988565b5060008111610ad15760405162461bcd60e51b8152600401610ac890611e1b565b60405180910390fd5b805b8015610c66578554610ae790600190611fea565b83610af3600184611fea565b81518110610b1157634e487b7160e01b600052603260045260246000fd5b602002602001015114610bfb5785548690610b2e90600190611fea565b81548110610b4c57634e487b7160e01b600052603260045260246000fd5b600091825260209091206006909102018684610b69600185611fea565b81518110610b8757634e487b7160e01b600052603260045260246000fd5b602002602001015181548110610bad57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016000820154816000015560018201548160010155600282015481600201556003820154816003015560048201548160040155600582015481600501559050505b8554869080610c1a57634e487b7160e01b600052603160045260246000fd5b6000828152602081206006600019909301928302018181556001810182905560028101829055600381018290556004810182905560050155905580610c5e81612001565b915050610ad3565b5060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610c999033908890600401611c1b565b602060405180830381600087803b158015610cb357600080fd5b505af1158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190611b3c565b610d075760405162461bcd60e51b8152600401610ac890611ef8565b336001600160a01b03167f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e8486604051610d42929190611f6f565b60405180910390a25050505050565b600854610100900460ff1681565b6001600160a01b038116600090815260096020526040812080546060929067ffffffffffffffff811115610da357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610dcc578160200160208202803683370190505b50905060005b8254811015610910576000836000018281548110610e0057634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020190508060020154421015610e5c576002810154610e2b9042611a31565b838381518110610e4b57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050610e8b565b6000838381518110610e7e57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b5080610e9681612018565b915050610dd2565b60035481565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ed5903090600401611be3565b60206040518083038186803b158015610eed57600080fd5b505afa158015610f01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f259190611b70565b905090565b600080805b6001600160a01b038416600090815260096020526040902054811015610f7757610f63610f5c858361187f565b8390611a1e565b915080610f6f81612018565b915050610f2f565b5092915050565b60075481565b610f8c6119df565b600880549115156101000261ff0019909216919091179055565b6002546001600160a01b031681565b4390565b610fc16119df565b610fcb6000611a3d565b565b6001600160a01b038116600090815260096020526040812081805b82548110156110435761102f83600001828154811061101757634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201548390611a1e565b91508061103b81612018565b915050610fe8565b506002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611075903090600401611be3565b60206040518083038186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190611b70565b9050806110d85760009350505050610915565b60006110f0826110ea85612710611a8d565b90611a99565b9695505050505050565b6111026119df565b6001600160a01b0381166111425760405133904780156108fc02916000818181858888f1935050505015801561113c573d6000803e3d6000fd5b5061124a565b6040516370a0823160e01b815281906000906001600160a01b038316906370a0823190611173903090600401611be3565b60206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c39190611b70565b60405163a9059cbb60e01b81529091506001600160a01b0383169063a9059cbb906111f49033908590600401611c1b565b602060405180830381600087803b15801561120e57600080fd5b505af1158015611222573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112469190611b3c565b5050505b50565b60055481565b6000546001600160a01b031690565b61126a6119df565b61127581603c611fcb565b60035550565b6112836119df565b600655565b611290611aa5565b60085460ff6101009091041615156001146112bd5760405162461bcd60e51b8152600401610ac890611d7f565b600081116112dd5760405162461bcd60e51b8152600401610ac890611eb2565b60035442906000906112f0908390611a1e565b336000818152600960209081526040808320815160c08101835289815280840189815281840188815243606084018181526080850191825260a08501898152865460018181018955978b52989099209451600690980290940196875591519386019390935591516002808601919091559051600385015590516004808501919091559351600590930192909255905490516323b872dd60e01b81529394506001600160a01b0316926323b872dd926113ae9290913091899101611bf7565b602060405180830381600087803b1580156113c857600080fd5b505af11580156113dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114009190611b3c565b61141c5760405162461bcd60e51b8152600401610ac890611d4f565b336001600160a01b03167fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed84848460405161145993929190611f7d565b60405180910390a2505061124a611acf565b6114736119df565b6008805460ff1916911515919091179055565b61148e6119df565b600555565b60008061149f83610fcd565b905060006114be6127106110ea84600554611a8d90919063ffffffff16565b949350505050565b3332146114e55760405162461bcd60e51b8152600401610ac890611e52565b33600090815260096020526040812090805b825481101561158557600083600001828154811061152557634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020190506000611541338461187f565b905061154d8482611a1e565b9350801561157057436004830155600582015461156a9082611a1e565b60058301555b5050808061157d90612018565b9150506114f7565b50600081116115a65760405162461bcd60e51b8152600401610ac890611db6565b804710156115c65760405162461bcd60e51b8152600401610ac890611e7b565b604051339082156108fc029083906000818181858888f193505050501580156115f3573d6000803e3d6000fd5b50336001600160a01b03167f1d3eee4ca001cff39eec6ec7615aacf2f2bd61791273830728ba00ccbd6e13378260405161162d9190611f66565b60405180910390a25050565b6001600160a01b0381166000908152600960205260408120805460609283929167ffffffffffffffff81111561167f57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156116a8578160200160208202803683370190505b50825490915060009067ffffffffffffffff8111156116d757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611700578160200160208202803683370190505b50905060005b835481101561186a57600084600001828154811061173457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602019050600061176b611760600454600654611a8d90919063ffffffff16565b600384015490611a1e565b9050804310156117845761177f8143611a31565b611787565b60005b8484815181106117a757634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506117ef6007548585815181106117d957634e487b7160e01b600052603260045260246000fd5b6020026020010151611a8d90919063ffffffff16565b85848151811061180f57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508160020154421061185557600085848151811061184857634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b5050808061186290612018565b915050611706565b50909350915050915091565b60085460ff1681565b6001600160a01b03821660009081526009602052604081208054829190849081106118ba57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201905060006118e6611760600454600654611a8d90919063ffffffff16565b905060008143106118f757816118f9565b435b9050808360040154106119125760009350505050611947565b600061192b846004015483611a3190919063ffffffff16565b90506119408161193a89611493565b90611a8d565b9450505050505b92915050565b6119556119df565b61195d611253565b6001600160a01b03166108fc479081150290604051600060405180830381858888f1935050505015801561124a573d6000803e3d6000fd5b61199d6119df565b6001600160a01b0381166119c35760405162461bcd60e51b8152600401610ac890611d09565b61124a81611a3d565b6119d46119df565b600791909155600455565b6119e7611ad5565b6001600160a01b03166119f8611253565b6001600160a01b031614610fcb5760405162461bcd60e51b8152600401610ac890611de6565b6000611a2a8284611f93565b9392505050565b6000611a2a8284611fea565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611a2a8284611fcb565b6000611a2a8284611fab565b60026001541415611ac85760405162461bcd60e51b8152600401610ac890611f2f565b6002600155565b60018055565b3390565b600060208284031215611aea578081fd5b8135611a2a81612049565b60008060408385031215611b07578081fd5b8235611b1281612049565b946020939093013593505050565b600060208284031215611b31578081fd5b8135611a2a8161205e565b600060208284031215611b4d578081fd5b8151611a2a8161205e565b600060208284031215611b69578081fd5b5035919050565b600060208284031215611b81578081fd5b5051919050565b60008060408385031215611b9a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015611bd857815187529582019590820190600101611bbc565b509495945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b600060208252611a2a6020830184611ba9565b60006040808352611c5a81840186611ba9565b838103602085810191909152855180835286820192820190855b81811015611cc25784518051845284810151858501528681015187850152606080820151908501526080808201519085015260a090810151908401529383019360c090920191600101611c74565b509098975050505050505050565b600060408252611ce36040830185611ba9565b8281036020840152611cf58185611ba9565b95945050505050565b901515815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b602080825260169082015275546f6b656e207472616e73666572206661696c65642160501b604082015260600190565b6020808252601b908201527f4465706f73697473206e65656420746f20626520656e61626c65640000000000604082015260600190565b6020808252601690820152754e6f207265776172647320746f20776974686472617760501b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527f4c6f636b2074696d65206e6f7420636f6d706c65746564207965742e00000000604082015260600190565b6020808252600f908201526e696e76616c69642063616c6c65722160881b604082015260600190565b60208082526019908201527f696e73756666696369656e74204554482042616c616e63652100000000000000604082015260600190565b60208082526026908201527f5374616b696e6720616d6f756e74206d7573742062652067726561746572207460408201526568616e20302160d01b606082015260800190565b6020808252601d908201527f4661696c656420746f207472616e73666572204c5020746f6b656e732e000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60008219821115611fa657611fa6612033565b500190565b600082611fc657634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611fe557611fe5612033565b500290565b600082821015611ffc57611ffc612033565b500390565b60008161201057612010612033565b506000190190565b600060001982141561202c5761202c612033565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461124a57600080fd5b801515811461124a57600080fdfea2646970667358221220d134910b991ab3aa21a12f2bc4a18a4b2916e0bd00d68b6d29f31ff691551f6c64736f6c634300080000330000000000000000000000003a7801754adffce398a3d974908a493446266f39
Deployed Bytecode
0x6080604052600436106101fd5760003560e01c80637afa1f801161010d578063b1e95e94116100a0578063d2da71b91161006f578063d2da71b91461056a578063dc2c9de51461057f578063e086e5ec1461059f578063f2fde38b146105b4578063fbc35a69146105d457610204565b8063b1e95e94146104e7578063bdcc98d714610507578063c885bc5814610527578063cc9a8a6e1461053c57610204565b80639f22a03b116100dc5780639f22a03b14610467578063a3d686a314610487578063a694fc3a146104a7578063b00c6db5146104c757610204565b80637afa1f80146103fd578063894760691461041d5780638ae39cac1461043d5780638da5cb5b1461045257610204565b80633c994364116101905780634b6014d71161015f5780634b6014d71461037c57806357cdbf2a146103915780635fcbd285146103b1578063672d5d3b146103d3578063715018a6146103e857610204565b80633c994364146103055780633fd8b02f1461033257806344e73b7814610347578063485e5c221461035c57610204565b8063266cf0c6116101cc578063266cf0c6146102805780632b7c02be146102ae5780632def6620146102ce57806336205fc3146102e357610204565b80630c7c4fe5146102095780630db5c844146102345780631c1718041461024b5780631e0c72521461026057610204565b3661020457005b600080fd5b34801561021557600080fd5b5061021e6105f4565b60405161022b9190611f66565b60405180910390f35b34801561024057600080fd5b506102496105fa565b005b34801561025757600080fd5b5061021e610713565b34801561026c57600080fd5b5061024961027b366004611ad9565b610719565b34801561028c57600080fd5b506102a061029b366004611ad9565b610743565b60405161022b929190611c47565b3480156102ba57600080fd5b5061021e6102c9366004611ad9565b610898565b3480156102da57600080fd5b5061024961091a565b3480156102ef57600080fd5b506102f8610d51565b60405161022b9190611cfe565b34801561031157600080fd5b50610325610320366004611ad9565b610d5f565b60405161022b9190611c34565b34801561033e57600080fd5b5061021e610e9e565b34801561035357600080fd5b5061021e610ea4565b34801561036857600080fd5b5061021e610377366004611ad9565b610f2a565b34801561038857600080fd5b5061021e610f7e565b34801561039d57600080fd5b506102496103ac366004611b20565b610f84565b3480156103bd57600080fd5b506103c6610fa6565b60405161022b9190611be3565b3480156103df57600080fd5b5061021e610fb5565b3480156103f457600080fd5b50610249610fb9565b34801561040957600080fd5b5061021e610418366004611ad9565b610fcd565b34801561042957600080fd5b50610249610438366004611ad9565b6110fa565b34801561044957600080fd5b5061021e61124d565b34801561045e57600080fd5b506103c6611253565b34801561047357600080fd5b50610249610482366004611b58565b611262565b34801561049357600080fd5b506102496104a2366004611b58565b61127b565b3480156104b357600080fd5b506102496104c2366004611b58565b611288565b3480156104d357600080fd5b506102496104e2366004611b20565b61146b565b3480156104f357600080fd5b50610249610502366004611b58565b611486565b34801561051357600080fd5b5061021e610522366004611ad9565b611493565b34801561053357600080fd5b506102496114c6565b34801561054857600080fd5b5061055c610557366004611ad9565b611639565b60405161022b929190611cd0565b34801561057657600080fd5b506102f8611876565b34801561058b57600080fd5b5061021e61059a366004611af5565b61187f565b3480156105ab57600080fd5b5061024961194d565b3480156105c057600080fd5b506102496105cf366004611ad9565b611995565b3480156105e057600080fd5b506102496105ef366004611b88565b6119cc565b60045481565b6106026119df565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610633903090600401611be3565b60206040518083038186803b15801561064b57600080fd5b505afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106839190611b70565b6002549091506001600160a01b031663a9059cbb61069f611253565b836040518363ffffffff1660e01b81526004016106bd929190611c1b565b602060405180830381600087803b1580156106d757600080fd5b505af11580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070f9190611b3c565b5050565b60065481565b6107216119df565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526009602052604090208054606091829167ffffffffffffffff81111561078857634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156107b1578160200160208202803683370190505b5081546040805160208084028201810190925282815292955083919060009084015b8282101561084157838290600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481525050815260200190600101906107d3565b50505050915060005b8154811015610891578084828151811061087457634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061088981612018565b91505061084a565b5050915091565b6001600160a01b038116600090815260096020526040812081805b8254811015610910578260000181815481106108df57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160000154826108fc9190611f93565b91508061090881612018565b9150506108b3565b509150505b919050565b33600090815260096020526040812080549091908190819067ffffffffffffffff81111561095857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610981578160200160208202803683370190505b5090506000805b8554811015610aa7576109da6003548760000183815481106109ba57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160010154611a1e90919063ffffffff16565b4210610a955760006109ec338361187f565b90506109f88582611a1e565b9450610a38876000018381548110610a2057634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201548790611a1e565b9550600081118015610a4d575060085460ff16155b15610a5a57610a5a6114c6565b81848481518110610a7b57634e487b7160e01b600052603260045260246000fd5b602090810291909101015282610a9081612018565b935050505b80610a9f81612018565b915050610988565b5060008111610ad15760405162461bcd60e51b8152600401610ac890611e1b565b60405180910390fd5b805b8015610c66578554610ae790600190611fea565b83610af3600184611fea565b81518110610b1157634e487b7160e01b600052603260045260246000fd5b602002602001015114610bfb5785548690610b2e90600190611fea565b81548110610b4c57634e487b7160e01b600052603260045260246000fd5b600091825260209091206006909102018684610b69600185611fea565b81518110610b8757634e487b7160e01b600052603260045260246000fd5b602002602001015181548110610bad57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016000820154816000015560018201548160010155600282015481600201556003820154816003015560048201548160040155600582015481600501559050505b8554869080610c1a57634e487b7160e01b600052603160045260246000fd5b6000828152602081206006600019909301928302018181556001810182905560028101829055600381018290556004810182905560050155905580610c5e81612001565b915050610ad3565b5060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610c999033908890600401611c1b565b602060405180830381600087803b158015610cb357600080fd5b505af1158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190611b3c565b610d075760405162461bcd60e51b8152600401610ac890611ef8565b336001600160a01b03167f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e8486604051610d42929190611f6f565b60405180910390a25050505050565b600854610100900460ff1681565b6001600160a01b038116600090815260096020526040812080546060929067ffffffffffffffff811115610da357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610dcc578160200160208202803683370190505b50905060005b8254811015610910576000836000018281548110610e0057634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020190508060020154421015610e5c576002810154610e2b9042611a31565b838381518110610e4b57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050610e8b565b6000838381518110610e7e57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b5080610e9681612018565b915050610dd2565b60035481565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ed5903090600401611be3565b60206040518083038186803b158015610eed57600080fd5b505afa158015610f01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f259190611b70565b905090565b600080805b6001600160a01b038416600090815260096020526040902054811015610f7757610f63610f5c858361187f565b8390611a1e565b915080610f6f81612018565b915050610f2f565b5092915050565b60075481565b610f8c6119df565b600880549115156101000261ff0019909216919091179055565b6002546001600160a01b031681565b4390565b610fc16119df565b610fcb6000611a3d565b565b6001600160a01b038116600090815260096020526040812081805b82548110156110435761102f83600001828154811061101757634e487b7160e01b600052603260045260246000fd5b60009182526020909120600690910201548390611a1e565b91508061103b81612018565b915050610fe8565b506002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611075903090600401611be3565b60206040518083038186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190611b70565b9050806110d85760009350505050610915565b60006110f0826110ea85612710611a8d565b90611a99565b9695505050505050565b6111026119df565b6001600160a01b0381166111425760405133904780156108fc02916000818181858888f1935050505015801561113c573d6000803e3d6000fd5b5061124a565b6040516370a0823160e01b815281906000906001600160a01b038316906370a0823190611173903090600401611be3565b60206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c39190611b70565b60405163a9059cbb60e01b81529091506001600160a01b0383169063a9059cbb906111f49033908590600401611c1b565b602060405180830381600087803b15801561120e57600080fd5b505af1158015611222573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112469190611b3c565b5050505b50565b60055481565b6000546001600160a01b031690565b61126a6119df565b61127581603c611fcb565b60035550565b6112836119df565b600655565b611290611aa5565b60085460ff6101009091041615156001146112bd5760405162461bcd60e51b8152600401610ac890611d7f565b600081116112dd5760405162461bcd60e51b8152600401610ac890611eb2565b60035442906000906112f0908390611a1e565b336000818152600960209081526040808320815160c08101835289815280840189815281840188815243606084018181526080850191825260a08501898152865460018181018955978b52989099209451600690980290940196875591519386019390935591516002808601919091559051600385015590516004808501919091559351600590930192909255905490516323b872dd60e01b81529394506001600160a01b0316926323b872dd926113ae9290913091899101611bf7565b602060405180830381600087803b1580156113c857600080fd5b505af11580156113dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114009190611b3c565b61141c5760405162461bcd60e51b8152600401610ac890611d4f565b336001600160a01b03167fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed84848460405161145993929190611f7d565b60405180910390a2505061124a611acf565b6114736119df565b6008805460ff1916911515919091179055565b61148e6119df565b600555565b60008061149f83610fcd565b905060006114be6127106110ea84600554611a8d90919063ffffffff16565b949350505050565b3332146114e55760405162461bcd60e51b8152600401610ac890611e52565b33600090815260096020526040812090805b825481101561158557600083600001828154811061152557634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020190506000611541338461187f565b905061154d8482611a1e565b9350801561157057436004830155600582015461156a9082611a1e565b60058301555b5050808061157d90612018565b9150506114f7565b50600081116115a65760405162461bcd60e51b8152600401610ac890611db6565b804710156115c65760405162461bcd60e51b8152600401610ac890611e7b565b604051339082156108fc029083906000818181858888f193505050501580156115f3573d6000803e3d6000fd5b50336001600160a01b03167f1d3eee4ca001cff39eec6ec7615aacf2f2bd61791273830728ba00ccbd6e13378260405161162d9190611f66565b60405180910390a25050565b6001600160a01b0381166000908152600960205260408120805460609283929167ffffffffffffffff81111561167f57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156116a8578160200160208202803683370190505b50825490915060009067ffffffffffffffff8111156116d757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611700578160200160208202803683370190505b50905060005b835481101561186a57600084600001828154811061173457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602019050600061176b611760600454600654611a8d90919063ffffffff16565b600384015490611a1e565b9050804310156117845761177f8143611a31565b611787565b60005b8484815181106117a757634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506117ef6007548585815181106117d957634e487b7160e01b600052603260045260246000fd5b6020026020010151611a8d90919063ffffffff16565b85848151811061180f57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508160020154421061185557600085848151811061184857634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b5050808061186290612018565b915050611706565b50909350915050915091565b60085460ff1681565b6001600160a01b03821660009081526009602052604081208054829190849081106118ba57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201905060006118e6611760600454600654611a8d90919063ffffffff16565b905060008143106118f757816118f9565b435b9050808360040154106119125760009350505050611947565b600061192b846004015483611a3190919063ffffffff16565b90506119408161193a89611493565b90611a8d565b9450505050505b92915050565b6119556119df565b61195d611253565b6001600160a01b03166108fc479081150290604051600060405180830381858888f1935050505015801561124a573d6000803e3d6000fd5b61199d6119df565b6001600160a01b0381166119c35760405162461bcd60e51b8152600401610ac890611d09565b61124a81611a3d565b6119d46119df565b600791909155600455565b6119e7611ad5565b6001600160a01b03166119f8611253565b6001600160a01b031614610fcb5760405162461bcd60e51b8152600401610ac890611de6565b6000611a2a8284611f93565b9392505050565b6000611a2a8284611fea565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611a2a8284611fcb565b6000611a2a8284611fab565b60026001541415611ac85760405162461bcd60e51b8152600401610ac890611f2f565b6002600155565b60018055565b3390565b600060208284031215611aea578081fd5b8135611a2a81612049565b60008060408385031215611b07578081fd5b8235611b1281612049565b946020939093013593505050565b600060208284031215611b31578081fd5b8135611a2a8161205e565b600060208284031215611b4d578081fd5b8151611a2a8161205e565b600060208284031215611b69578081fd5b5035919050565b600060208284031215611b81578081fd5b5051919050565b60008060408385031215611b9a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015611bd857815187529582019590820190600101611bbc565b509495945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b600060208252611a2a6020830184611ba9565b60006040808352611c5a81840186611ba9565b838103602085810191909152855180835286820192820190855b81811015611cc25784518051845284810151858501528681015187850152606080820151908501526080808201519085015260a090810151908401529383019360c090920191600101611c74565b509098975050505050505050565b600060408252611ce36040830185611ba9565b8281036020840152611cf58185611ba9565b95945050505050565b901515815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b602080825260169082015275546f6b656e207472616e73666572206661696c65642160501b604082015260600190565b6020808252601b908201527f4465706f73697473206e65656420746f20626520656e61626c65640000000000604082015260600190565b6020808252601690820152754e6f207265776172647320746f20776974686472617760501b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527f4c6f636b2074696d65206e6f7420636f6d706c65746564207965742e00000000604082015260600190565b6020808252600f908201526e696e76616c69642063616c6c65722160881b604082015260600190565b60208082526019908201527f696e73756666696369656e74204554482042616c616e63652100000000000000604082015260600190565b60208082526026908201527f5374616b696e6720616d6f756e74206d7573742062652067726561746572207460408201526568616e20302160d01b606082015260800190565b6020808252601d908201527f4661696c656420746f207472616e73666572204c5020746f6b656e732e000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60008219821115611fa657611fa6612033565b500190565b600082611fc657634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611fe557611fe5612033565b500290565b600082821015611ffc57611ffc612033565b500390565b60008161201057612010612033565b506000190190565b600060001982141561202c5761202c612033565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461124a57600080fd5b801515811461124a57600080fdfea2646970667358221220d134910b991ab3aa21a12f2bc4a18a4b2916e0bd00d68b6d29f31ff691551f6c64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003a7801754adffce398a3d974908a493446266f39
-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x3a7801754ADfFCE398A3d974908a493446266F39
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003a7801754adffce398a3d974908a493446266f39
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.