More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 158 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit Rewards | 20418357 | 7 hrs ago | IN | 0 ETH | 0.00030415 | ||||
Deposit Rewards | 20417434 | 10 hrs ago | IN | 0 ETH | 0.00011806 | ||||
Deposit Rewards | 20415351 | 17 hrs ago | IN | 0 ETH | 0.00012202 | ||||
Deposit Rewards | 20404402 | 2 days ago | IN | 0 ETH | 0.00016679 | ||||
Deposit | 20403441 | 2 days ago | IN | 0 ETH | 0.00017498 | ||||
Deposit Rewards | 20397489 | 3 days ago | IN | 0 ETH | 0.00011215 | ||||
Deposit Rewards | 20397301 | 3 days ago | IN | 0 ETH | 0.00010122 | ||||
Deposit Rewards | 20380570 | 5 days ago | IN | 0 ETH | 0.00026158 | ||||
Deposit | 20380525 | 5 days ago | IN | 0 ETH | 0.00047622 | ||||
Deposit Rewards | 20372100 | 6 days ago | IN | 0 ETH | 0.00038842 | ||||
Deposit Rewards | 20357880 | 8 days ago | IN | 0 ETH | 0.00053605 | ||||
Deposit Rewards | 20355882 | 9 days ago | IN | 0 ETH | 0.00030321 | ||||
Deposit Rewards | 20354385 | 9 days ago | IN | 0 ETH | 0.00013386 | ||||
Deposit | 20353732 | 9 days ago | IN | 0 ETH | 0.00027717 | ||||
Deposit | 20353413 | 9 days ago | IN | 0 ETH | 0.00026161 | ||||
Deposit | 20353386 | 9 days ago | IN | 0 ETH | 0.00039946 | ||||
Deposit Rewards | 20353240 | 9 days ago | IN | 0 ETH | 0.00014414 | ||||
Deposit Rewards | 20345799 | 10 days ago | IN | 0 ETH | 0.00015249 | ||||
Deposit Rewards | 20344637 | 10 days ago | IN | 0 ETH | 0.00017411 | ||||
Deposit Rewards | 20344467 | 10 days ago | IN | 0 ETH | 0.00020255 | ||||
Deposit Rewards | 20342391 | 10 days ago | IN | 0 ETH | 0.00042671 | ||||
Deposit Rewards | 20334677 | 12 days ago | IN | 0 ETH | 0.00082847 | ||||
Withdraw | 20334091 | 12 days ago | IN | 0 ETH | 0.00163056 | ||||
Deposit Rewards | 20327026 | 13 days ago | IN | 0 ETH | 0.00138414 | ||||
Deposit Rewards | 20321528 | 13 days ago | IN | 0 ETH | 0.00049588 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StakingV2
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.25; import "./interfaces/IStakingV2.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; contract StakingV2 is IStakingV2, Ownable { using SafeERC20 for IERC20; // STATE VARIABLES IERC20 public immutable depositToken; IERC20 public immutable rewardsToken; // Duration of rewards to be paid out (in seconds) uint256 public duration; // Timestamp of when the rewards finish uint256 public finishAt; // Minimum of last updated time and reward finish time uint256 public updatedAt; // Reward to be paid out per second uint256 public rewardRate; // Sum of (reward rate * dt * 1e18 / total supply) uint256 public rewardPerTokenStored; // Duration of minimum deposit period uint256 public lockPeriod; // User address => rewardPerTokenStored mapping(address => uint256) public userRewardPerTokenPaid; // User address => rewards to be claimed mapping(address => uint256) public rewards; // User address => deposit time (timestamp) mapping(address => uint256) public userDepositTime; // Total deposited uint256 public totalSupply; // User address => deposit amount mapping(address => uint256) public balanceOf; // CONSTRUCTOR constructor( address _owner, address _stakingToken, address _rewardsToken, uint256 _rewardsDuration, uint256 _lockPeriod ) Ownable(_owner) { require(_stakingToken == _rewardsToken, StakindAndDepositTokenMismatch()); depositToken = IERC20(_stakingToken); rewardsToken = IERC20(_rewardsToken); duration = _rewardsDuration; lockPeriod = _lockPeriod; } // MODIFIERS modifier updateReward(address _account) { rewardPerTokenStored = rewardPerToken(); updatedAt = lastTimeRewardApplicable(); if (_account != address(0)) { rewards[_account] = rewardsOf(_account); userRewardPerTokenPaid[_account] = rewardPerTokenStored; } _; } modifier isUnlocked() { if (userDepositTime[msg.sender] + lockPeriod > block.timestamp) revert LockPeriodNotComplete(); _; } // PRIVATE FUNCTIONS /** * @notice Returns the minimum of two numbers * @param x The first number * @param y The second number * @return The minimum of the two numbers */ function _min(uint256 x, uint256 y) private pure returns (uint256) { return x <= y ? x : y; } // GETTERS /** * @notice Returns the last time reward was applicable * @return The minimum of finishAt and current block timestamp */ function lastTimeRewardApplicable() public view returns (uint256) { return _min(finishAt, block.timestamp); } /** * @notice Returns the reward per token * @return The reward per token */ function rewardPerToken() public view returns (uint256) { if (totalSupply == 0) { return rewardPerTokenStored; } return rewardPerTokenStored + (rewardRate * (lastTimeRewardApplicable() - updatedAt) * 1e18) / totalSupply; } /** * @notice Returns the rewards earned by an account * @param _account The address of the account to check * @return The rewards earned by the account */ function rewardsOf(address _account) public view returns (uint256) { return ((balanceOf[_account] * (rewardPerToken() - userRewardPerTokenPaid[_account])) / 1e18) + rewards[_account]; } /** * @notice Returns the daily rewards of an account * @param _account The address of the account to check * @return The daily rewards of the account */ function dailyRewardsOf(address _account) public view returns (uint256) { uint256 _balance = balanceOf[_account]; if (_balance == 0) return 0; uint256 dailyRewardPerToken = (rewardRate * 1 days * 1e18) / totalSupply; return (_balance * dailyRewardPerToken) / 1e18; } /** * @notice Returns the details of an account * @param _account The address of the account to check * @return dailyRewards The daily rewards of the account * @return rewardsBalance The rewards balance of the account * @return depositedBalance The deposited balance of the account * @return unlockTime The unlock time of the account */ function getAccountDetails( address _account ) external view returns (uint256 dailyRewards, uint256 rewardsBalance, uint256 depositedBalance, uint256 unlockTime) { dailyRewards = dailyRewardsOf(_account); rewardsBalance = rewardsOf(_account); depositedBalance = balanceOf[_account]; unlockTime = userDepositTime[_account] + lockPeriod; } /** * @notice Returns the details of the pool * @return totalDeposited The total amount deposited in the pool * @return yearlyRewardsRate The yearly rewards rate of the pool * @return token The address of the deposit token */ function getPoolDetails() external view returns (uint256 totalDeposited, uint256 yearlyRewardsRate, address token) { totalDeposited = totalSupply; yearlyRewardsRate = rewardRate * 365 days; token = address(depositToken); } // EXTERNAL FUNCTIONS /** * @notice Deposits tokens into the pool * @dev If the user has rewards, they are added to the deposit amount * @param amount The amount of tokens to deposit */ function deposit(uint256 amount) external updateReward(msg.sender) { if (amount == 0) revert InvalidAmount(); uint256 _rewards = rewards[msg.sender]; uint256 _amount = amount + _rewards; depositToken.safeTransferFrom(msg.sender, address(this), amount); balanceOf[msg.sender] += _amount; userDepositTime[msg.sender] = block.timestamp; totalSupply += _amount; rewards[msg.sender] = 0; emit Deposited(msg.sender, _amount); } /** * @notice Deposits rewards into the pool */ function depositRewards() external updateReward(msg.sender) { uint256 _rewards = rewards[msg.sender]; if (_rewards == 0) revert NoRewardsToClaim(); rewards[msg.sender] = 0; balanceOf[msg.sender] += _rewards; userDepositTime[msg.sender] = block.timestamp; totalSupply += _rewards; emit Deposited(msg.sender, _rewards); } /** * @notice Withdraws tokens from the pool * @dev If the user has rewards, they are added to the withdraw amount * @param _amount The amount of tokens to withdraw */ function withdraw(uint256 _amount) public updateReward(msg.sender) isUnlocked { if (_amount == 0) revert InvalidAmount(); uint256 _rewards = rewards[msg.sender]; rewards[msg.sender] = 0; balanceOf[msg.sender] -= _amount; totalSupply -= _amount; depositToken.safeTransfer(msg.sender, _amount + _rewards); emit Withdrawn(msg.sender, _amount); } /** * @notice Claims rewards from the pool */ function claim() public updateReward(msg.sender) isUnlocked { uint256 _rewards = rewards[msg.sender]; if (_rewards == 0) revert NoRewardsToClaim(); rewards[msg.sender] = 0; rewardsToken.safeTransfer(msg.sender, _rewards); emit Claimed(msg.sender, _rewards); } // ADMIN FUNCTIONS /** * @notice Sets the rewards duration * @param _duration The new rewards duration */ function setRewardsDuration(uint256 _duration) external onlyOwner { if (_duration == 0) revert InvalidDuration(); if (finishAt >= block.timestamp) revert RewardDurationNotFinished(); duration = _duration; } /** * @notice Adds rewards to the pool * @param _amount The amount of rewards to add */ function addRewards(uint256 _amount) external onlyOwner updateReward(address(0)) { rewardsToken.safeTransferFrom(msg.sender, address(this), _amount); if (block.timestamp >= finishAt) { rewardRate = _amount / duration; } else { uint256 remainingRewards = (finishAt - block.timestamp) * rewardRate; rewardRate = (_amount + remainingRewards) / duration; } if (rewardRate == 0) revert RewardRateZero(); if (rewardRate * duration > rewardsToken.balanceOf(address(this))) revert InsufficientRewardsInRewardPool(); finishAt = block.timestamp + duration; updatedAt = block.timestamp; emit RewardsAdded(_amount); } /** * @notice Sets the lock period * @param timeInSeconds The new lock period */ function setLockPeriod(uint256 timeInSeconds) external onlyOwner { lockPeriod = timeInSeconds; emit LockPeriodUpdated(timeInSeconds); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.25; error InvalidAmount(); error NoRewardsToClaim(); error LockPeriodNotComplete(); error InsufficientRewardsInRewardPool(); error RewardDurationNotFinished(); error RewardRateZero(); error InvalidDuration(); error StakindAndDepositTokenMismatch(); interface IStakingV2 { event Deposited(address indexed user, uint256 amount); event Claimed(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardsAdded(uint256 amount); event RewardsDurationUpdated(uint256 newDuration); event RewardsDeposited(address indexed user, uint256 amount); event LockPeriodUpdated(uint256 newLockPeriod); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../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 An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @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. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ 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]. * * CAUTION: See Security Considerations above. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) 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 FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "remappings": [ "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "forge-std/=node_modules/forge-std/", "ds-test/=node_modules/ds-test/src/", "solmate/=node_modules/solmate/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"},{"internalType":"uint256","name":"_lockPeriod","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InsufficientRewardsInRewardPool","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidDuration","type":"error"},{"inputs":[],"name":"LockPeriodNotComplete","type":"error"},{"inputs":[],"name":"NoRewardsToClaim","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"RewardDurationNotFinished","type":"error"},{"inputs":[],"name":"RewardRateZero","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"StakindAndDepositTokenMismatch","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newLockPeriod","type":"uint256"}],"name":"LockPeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","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":"uint256","name":"_amount","type":"uint256"}],"name":"addRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"dailyRewardsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finishAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAccountDetails","outputs":[{"internalType":"uint256","name":"dailyRewards","type":"uint256"},{"internalType":"uint256","name":"rewardsBalance","type":"uint256"},{"internalType":"uint256","name":"depositedBalance","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolDetails","outputs":[{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"yearlyRewardsRate","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timeInSeconds","type":"uint256"}],"name":"setLockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userDepositTime","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"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c03461014f57601f61157338819003918201601f19168301916001600160401b038311848410176101545780849260a09460405283398101031261014f576100478161016a565b6100536020830161016a565b916100606040820161016a565b6060820151608092909201516001600160a01b039093169390841561013957600080546001600160a01b031981168717825560405196916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b0390811691168181036101285760805260a0526001556006556113f4908161017f82396080518181816103c80152818161063c015281816107870152610c78015260a051818181610285015281816104200152610a9a0152f35b634367236d60e11b60005260046000fd5b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361014f5756fe608080604052600436101561001357600080fd5b60003560e01c9081630700037d14610ea9575080630fb5a6b414610e8b578063152111f714610da257806318160ddd14610d845780632aceb53414610cf95780632e1a7d4d14610bc95780633fd8b02f14610bab578063479ba7ae14610b6f5780634e71d92d14610a2057806367d3b48814610a025780636e8e0904146109c657806370a082311461097c578063715018a6146108fe5780637519ab50146108e0578063779972da146108945780637b0a47ee1461087657806380faa57d1461085b5780638b876347146108115780638da5cb5b146107dd578063aca34c1114610731578063b6b55f25146105e6578063beceed39146103ec578063c89039c51461039b578063cc1a378f14610316578063cd3daf9d146102f3578063cf27e06f146102a9578063d1af0c7d14610258578063df136d651461023a5763f2fde38b1461015e57600080fd5b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81168091036102355761019861119b565b80156102065773ffffffffffffffffffffffffffffffffffffffff600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f1e4fbdf700000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b600080fd5b34610235576000600319360112610235576020600554604051908152f35b3461023557600060031936011261023557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81168091036102355760005260096020526020604060002054604051908152f35b3461023557600060031936011261023557602061030e6110d6565b604051908152f35b346102355760206003193601126102355760043561033261119b565b80156103715760025442111561034757600155005b7fe2be70860000000000000000000000000000000000000000000000000000000060005260046000fd5b7f761664010000000000000000000000000000000000000000000000000000000060005260046000fd5b3461023557600060031936011261023557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102355760206003193601126102355760043561040861119b565b6104106110d6565b60055561041b611054565b6003557f000000000000000000000000000000000000000000000000000000000000000061044b823033846111ea565b6002544281116105b2575061046260015483610f1d565b6004555b6004549081156105885773ffffffffffffffffffffffffffffffffffffffff9060206104956001548095610f0a565b916024604051809581937f70a08231000000000000000000000000000000000000000000000000000000008352306004840152165afa91821561057c57600092610548575b501161051e577ff8fad42e780bfa5459be3fe691e8ba1aec70342250112139c5771c3fd155f3129161050e60209242610ef0565b60025542600355604051908152a1005b7f159c27540000000000000000000000000000000000000000000000000000000060005260046000fd5b9091506020813d602011610574575b8161056460209383611066565b81010312610235575190846104da565b3d9150610557565b6040513d6000823e3d90fd5b7f0f5d66ef0000000000000000000000000000000000000000000000000000000060005260046000fd5b6105d56105cf6105c66105de934290610efd565b60045490610f0a565b84610ef0565b60015490610f1d565b600455610466565b34610235576020600319360112610235576004356106026110d6565b60055561060d611054565b60035533610702575b80156106d85733600052600860205261066061063760406000205483610ef0565b9130337f00000000000000000000000000000000000000000000000000000000000000006111ea565b33600052600b6020526040600020610679828254610ef0565b90553360005260096020524260406000205561069781600a54610ef0565b600a55336000526008602052600060408120556040519081527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460203392a2005b7f2c5211c60000000000000000000000000000000000000000000000000000000060005260046000fd5b61070b33610f56565b336000526008602052604060002055600554336000526007602052604060002055610616565b3461023557600060031936011261023557600a54600454906301e133808202918083046301e1338014901517156107ae57606091604051918252602082015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166040820152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b3461023557600060031936011261023557602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81168091036102355760005260076020526020604060002054604051908152f35b3461023557600060031936011261023557602061030e611054565b34610235576000600319360112610235576020600454604051908152f35b34610235576020600319360112610235577f8249ec545e68f6f1e1230133ca48c704d831a7f8e635ded80f3dd9e99b09bb2f60206004356108d361119b565b80600655604051908152a1005b34610235576000600319360112610235576020600354604051908152f35b346102355760006003193601126102355761091761119b565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff811680910361023557600052600b6020526020604060002054604051908152f35b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff811681036102355761030e602091610fca565b34610235576000600319360112610235576020600254604051908152f35b3461023557600060031936011261023557610a396110d6565b600555610a44611054565b60035533610b40575b336000526009602052610a6860406000205460065490610ef0565b4210610b16573360005260086020526040600020548015610aec5733600052600860205260006040812055610abe81337f0000000000000000000000000000000000000000000000000000000000000000611137565b6040519081527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a60203392a2005b7f73380d990000000000000000000000000000000000000000000000000000000060005260046000fd5b7f695e575a0000000000000000000000000000000000000000000000000000000060005260046000fd5b610b4933610f56565b336000526008602052604060002055600554336000526007602052604060002055610a4d565b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff811681036102355761030e602091610f56565b34610235576000600319360112610235576020600654604051908152f35b3461023557602060031936011261023557600435610be56110d6565b600555610bf0611054565b60035533610cca575b336000526009602052610c1460406000205460065490610ef0565b4210610b165780156106d857336000526008602052610c9c610c756040600020543360005260086020526000604081205533600052600b6020526040600020610c5e858254610efd565b9055610c6c84600a54610efd565b600a5583610ef0565b337f0000000000000000000000000000000000000000000000000000000000000000611137565b6040519081527f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d560203392a2005b610cd333610f56565b336000526008602052604060002055600554336000526007602052604060002055610bf9565b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81169081810361023557608091610d41610d3b83610fca565b92610f56565b9080600052600b602052604060002054906000526009602052610d6c60406000205460065490610ef0565b91604051938452602084015260408301526060820152f35b34610235576000600319360112610235576020600a54604051908152f35b3461023557600060031936011261023557610dbb6110d6565b600555610dc6611054565b60035533610e5c575b3360005260086020526040600020548015610aec573360005260086020526000604081205533600052600b6020526040600020610e0d828254610ef0565b905533600052600960205242604060002055610e2b81600a54610ef0565b600a556040519081527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460203392a2005b610e6533610f56565b336000526008602052604060002055600554336000526007602052604060002055610dcf565b34610235576000600319360112610235576020600154604051908152f35b34610235576020600319360112610235576004359073ffffffffffffffffffffffffffffffffffffffff821680920361023557602091600052600882526040600020548152f35b919082018092116107ae57565b919082039182116107ae57565b818102929181159184041417156107ae57565b8115610f27570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff610fc7911680600052600b602052670de0b6b3a7640000610fb1604060002054610fab610f966110d6565b85600052600760205260406000205490610efd565b90610f0a565b0490600052600860205260406000205490610ef0565b90565b73ffffffffffffffffffffffffffffffffffffffff16600052600b602052604060002054801561104e57600454620151808102908082046201518014811517156107ae5769124bc0ddd92e560000000290808204670de0b6b3a764000014901517156107ae57670de0b6b3a764000091610fab61104a92600a5490610f1d565b0490565b50600090565b6002544281116110615790565b504290565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110a757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600a548015611130576005546110fc600454610fab6110f3611054565b60035490610efd565b670de0b6b3a7640000810290808204670de0b6b3a764000014901517156107ae57610fc79261112a91610f1d565b90610ef0565b5060055490565b6111999273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252611194606483611066565b611251565b565b73ffffffffffffffffffffffffffffffffffffffff6000541633036111bc57565b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b90919273ffffffffffffffffffffffffffffffffffffffff6111999481604051957f23b872dd000000000000000000000000000000000000000000000000000000006020880152166024860152166044840152606483015260648252611194608483611066565b600073ffffffffffffffffffffffffffffffffffffffff8192169260208151910182855af13d1561133e573d67ffffffffffffffff81116110a7576112d791604051916112c660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184611066565b82523d6000602084013e5b8361134a565b805190811515918261131a575b50506112ed5750565b7f5274afe70000000000000000000000000000000000000000000000000000000060005260045260246000fd5b819250906020918101031261023557602001518015908115036102355738806112e4565b6112d7906060906112d1565b90611389575080511561135f57805190602001fd5b7f1425ea420000000000000000000000000000000000000000000000000000000060005260046000fd5b815115806113de575b61139a575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b50803b1561139256fea164736f6c634300081a000a00000000000000000000000095e915f41d106b02c79d314e19bee2275b76a2d900000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c900000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c90000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000003f480
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c9081630700037d14610ea9575080630fb5a6b414610e8b578063152111f714610da257806318160ddd14610d845780632aceb53414610cf95780632e1a7d4d14610bc95780633fd8b02f14610bab578063479ba7ae14610b6f5780634e71d92d14610a2057806367d3b48814610a025780636e8e0904146109c657806370a082311461097c578063715018a6146108fe5780637519ab50146108e0578063779972da146108945780637b0a47ee1461087657806380faa57d1461085b5780638b876347146108115780638da5cb5b146107dd578063aca34c1114610731578063b6b55f25146105e6578063beceed39146103ec578063c89039c51461039b578063cc1a378f14610316578063cd3daf9d146102f3578063cf27e06f146102a9578063d1af0c7d14610258578063df136d651461023a5763f2fde38b1461015e57600080fd5b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81168091036102355761019861119b565b80156102065773ffffffffffffffffffffffffffffffffffffffff600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f1e4fbdf700000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b600080fd5b34610235576000600319360112610235576020600554604051908152f35b3461023557600060031936011261023557602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9168152f35b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81168091036102355760005260096020526020604060002054604051908152f35b3461023557600060031936011261023557602061030e6110d6565b604051908152f35b346102355760206003193601126102355760043561033261119b565b80156103715760025442111561034757600155005b7fe2be70860000000000000000000000000000000000000000000000000000000060005260046000fd5b7f761664010000000000000000000000000000000000000000000000000000000060005260046000fd5b3461023557600060031936011261023557602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9168152f35b346102355760206003193601126102355760043561040861119b565b6104106110d6565b60055561041b611054565b6003557f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c961044b823033846111ea565b6002544281116105b2575061046260015483610f1d565b6004555b6004549081156105885773ffffffffffffffffffffffffffffffffffffffff9060206104956001548095610f0a565b916024604051809581937f70a08231000000000000000000000000000000000000000000000000000000008352306004840152165afa91821561057c57600092610548575b501161051e577ff8fad42e780bfa5459be3fe691e8ba1aec70342250112139c5771c3fd155f3129161050e60209242610ef0565b60025542600355604051908152a1005b7f159c27540000000000000000000000000000000000000000000000000000000060005260046000fd5b9091506020813d602011610574575b8161056460209383611066565b81010312610235575190846104da565b3d9150610557565b6040513d6000823e3d90fd5b7f0f5d66ef0000000000000000000000000000000000000000000000000000000060005260046000fd5b6105d56105cf6105c66105de934290610efd565b60045490610f0a565b84610ef0565b60015490610f1d565b600455610466565b34610235576020600319360112610235576004356106026110d6565b60055561060d611054565b60035533610702575b80156106d85733600052600860205261066061063760406000205483610ef0565b9130337f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c96111ea565b33600052600b6020526040600020610679828254610ef0565b90553360005260096020524260406000205561069781600a54610ef0565b600a55336000526008602052600060408120556040519081527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460203392a2005b7f2c5211c60000000000000000000000000000000000000000000000000000000060005260046000fd5b61070b33610f56565b336000526008602052604060002055600554336000526007602052604060002055610616565b3461023557600060031936011261023557600a54600454906301e133808202918083046301e1338014901517156107ae57606091604051918252602082015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9166040820152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b3461023557600060031936011261023557602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81168091036102355760005260076020526020604060002054604051908152f35b3461023557600060031936011261023557602061030e611054565b34610235576000600319360112610235576020600454604051908152f35b34610235576020600319360112610235577f8249ec545e68f6f1e1230133ca48c704d831a7f8e635ded80f3dd9e99b09bb2f60206004356108d361119b565b80600655604051908152a1005b34610235576000600319360112610235576020600354604051908152f35b346102355760006003193601126102355761091761119b565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff811680910361023557600052600b6020526020604060002054604051908152f35b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff811681036102355761030e602091610fca565b34610235576000600319360112610235576020600254604051908152f35b3461023557600060031936011261023557610a396110d6565b600555610a44611054565b60035533610b40575b336000526009602052610a6860406000205460065490610ef0565b4210610b16573360005260086020526040600020548015610aec5733600052600860205260006040812055610abe81337f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9611137565b6040519081527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a60203392a2005b7f73380d990000000000000000000000000000000000000000000000000000000060005260046000fd5b7f695e575a0000000000000000000000000000000000000000000000000000000060005260046000fd5b610b4933610f56565b336000526008602052604060002055600554336000526007602052604060002055610a4d565b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff811681036102355761030e602091610f56565b34610235576000600319360112610235576020600654604051908152f35b3461023557602060031936011261023557600435610be56110d6565b600555610bf0611054565b60035533610cca575b336000526009602052610c1460406000205460065490610ef0565b4210610b165780156106d857336000526008602052610c9c610c756040600020543360005260086020526000604081205533600052600b6020526040600020610c5e858254610efd565b9055610c6c84600a54610efd565b600a5583610ef0565b337f00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9611137565b6040519081527f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d560203392a2005b610cd333610f56565b336000526008602052604060002055600554336000526007602052604060002055610bf9565b346102355760206003193601126102355760043573ffffffffffffffffffffffffffffffffffffffff81169081810361023557608091610d41610d3b83610fca565b92610f56565b9080600052600b602052604060002054906000526009602052610d6c60406000205460065490610ef0565b91604051938452602084015260408301526060820152f35b34610235576000600319360112610235576020600a54604051908152f35b3461023557600060031936011261023557610dbb6110d6565b600555610dc6611054565b60035533610e5c575b3360005260086020526040600020548015610aec573360005260086020526000604081205533600052600b6020526040600020610e0d828254610ef0565b905533600052600960205242604060002055610e2b81600a54610ef0565b600a556040519081527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460203392a2005b610e6533610f56565b336000526008602052604060002055600554336000526007602052604060002055610dcf565b34610235576000600319360112610235576020600154604051908152f35b34610235576020600319360112610235576004359073ffffffffffffffffffffffffffffffffffffffff821680920361023557602091600052600882526040600020548152f35b919082018092116107ae57565b919082039182116107ae57565b818102929181159184041417156107ae57565b8115610f27570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff610fc7911680600052600b602052670de0b6b3a7640000610fb1604060002054610fab610f966110d6565b85600052600760205260406000205490610efd565b90610f0a565b0490600052600860205260406000205490610ef0565b90565b73ffffffffffffffffffffffffffffffffffffffff16600052600b602052604060002054801561104e57600454620151808102908082046201518014811517156107ae5769124bc0ddd92e560000000290808204670de0b6b3a764000014901517156107ae57670de0b6b3a764000091610fab61104a92600a5490610f1d565b0490565b50600090565b6002544281116110615790565b504290565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110a757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600a548015611130576005546110fc600454610fab6110f3611054565b60035490610efd565b670de0b6b3a7640000810290808204670de0b6b3a764000014901517156107ae57610fc79261112a91610f1d565b90610ef0565b5060055490565b6111999273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252611194606483611066565b611251565b565b73ffffffffffffffffffffffffffffffffffffffff6000541633036111bc57565b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b90919273ffffffffffffffffffffffffffffffffffffffff6111999481604051957f23b872dd000000000000000000000000000000000000000000000000000000006020880152166024860152166044840152606483015260648252611194608483611066565b600073ffffffffffffffffffffffffffffffffffffffff8192169260208151910182855af13d1561133e573d67ffffffffffffffff81116110a7576112d791604051916112c660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184611066565b82523d6000602084013e5b8361134a565b805190811515918261131a575b50506112ed5750565b7f5274afe70000000000000000000000000000000000000000000000000000000060005260045260246000fd5b819250906020918101031261023557602001518015908115036102355738806112e4565b6112d7906060906112d1565b90611389575080511561135f57805190602001fd5b7f1425ea420000000000000000000000000000000000000000000000000000000060005260046000fd5b815115806113de575b61139a575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b50803b1561139256fea164736f6c634300081a000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000095e915f41d106b02c79d314e19bee2275b76a2d900000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c900000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c90000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000003f480
-----Decoded View---------------
Arg [0] : _owner (address): 0x95e915f41D106b02c79D314E19Bee2275B76A2d9
Arg [1] : _stakingToken (address): 0x91dFbEE3965baAEE32784c2d546B7a0C62F268c9
Arg [2] : _rewardsToken (address): 0x91dFbEE3965baAEE32784c2d546B7a0C62F268c9
Arg [3] : _rewardsDuration (uint256): 2592000
Arg [4] : _lockPeriod (uint256): 259200
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000095e915f41d106b02c79d314e19bee2275b76a2d9
Arg [1] : 00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9
Arg [2] : 00000000000000000000000091dfbee3965baaee32784c2d546b7a0c62f268c9
Arg [3] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [4] : 000000000000000000000000000000000000000000000000000000000003f480
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.002847 | 30,608,654.4201 | $87,151.72 |
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.