Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 266 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get Reward | 17790882 | 586 days ago | IN | 0 ETH | 0.00171128 | ||||
Withdraw | 16390045 | 783 days ago | IN | 0 ETH | 0.00176841 | ||||
Get Reward | 16390041 | 783 days ago | IN | 0 ETH | 0.00121418 | ||||
Withdraw | 16289968 | 797 days ago | IN | 0 ETH | 0.0015465 | ||||
Withdraw | 16283246 | 798 days ago | IN | 0 ETH | 0.00144419 | ||||
Get Reward | 16283243 | 798 days ago | IN | 0 ETH | 0.00101085 | ||||
Withdraw | 16283203 | 798 days ago | IN | 0 ETH | 0.00141617 | ||||
Get Reward | 16283198 | 798 days ago | IN | 0 ETH | 0.00121886 | ||||
Withdraw | 16283134 | 798 days ago | IN | 0 ETH | 0.00143442 | ||||
Get Reward | 16283131 | 798 days ago | IN | 0 ETH | 0.00106039 | ||||
Withdraw | 15856290 | 858 days ago | IN | 0 ETH | 0.00256585 | ||||
Withdraw | 15856282 | 858 days ago | IN | 0 ETH | 0.00270023 | ||||
Withdraw | 15790405 | 867 days ago | IN | 0 ETH | 0.00711635 | ||||
Get Reward | 15587712 | 895 days ago | IN | 0 ETH | 0.00064887 | ||||
Withdraw | 15502099 | 908 days ago | IN | 0 ETH | 0.00227121 | ||||
Withdraw | 15456189 | 915 days ago | IN | 0 ETH | 0.0016759 | ||||
Withdraw | 15456179 | 915 days ago | IN | 0 ETH | 0.00165135 | ||||
Get Reward | 15406376 | 923 days ago | IN | 0 ETH | 0.00078296 | ||||
Get Reward | 15406368 | 923 days ago | IN | 0 ETH | 0.00070736 | ||||
Get Reward | 15406354 | 923 days ago | IN | 0 ETH | 0.00094061 | ||||
Get Reward | 15406350 | 923 days ago | IN | 0 ETH | 0.00075814 | ||||
Get Reward | 15388376 | 926 days ago | IN | 0 ETH | 0.00041697 | ||||
Get Reward | 15381201 | 927 days ago | IN | 0 ETH | 0.00063554 | ||||
Withdraw | 15331321 | 935 days ago | IN | 0 ETH | 0.00248417 | ||||
Withdraw | 15319816 | 937 days ago | IN | 0 ETH | 0.00215499 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
USDCLPStakingRewards
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8; import "./StakingRewards.sol"; contract USDTLPStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } contract ETHLPStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } contract COTIETHStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } contract COTIETHSLPStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } contract GOVIETHStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } contract GOVIETHSLPStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } contract USDCLPStakingRewards is StakingRewards { constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} } // contract ETHVOL_USDCLPStakingRewards is StakingRewards { // constructor( // address _owner, // address _rewardsDistribution, // address _rewardsToken, // address _stakingToken // ) StakingRewards(_owner, _rewardsDistribution, _rewardsToken, _stakingToken) {} // }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // Inheritance // import "./interfaces/IStakingRewards.sol"; // import "./RewardsDistributionRecipient.sol"; // import "./Pausable.sol"; // import "./Owned.sol"; // https://docs.synthetix.io/contracts/Owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // https://docs.synthetix.io/contracts/Pausable abstract contract Pausable is Owned { uint public lastPauseTime; bool public paused; constructor() { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), "Owner must be set"); // Paused will be false, and lastPauseTime will be 0 upon initialisation } /** * @notice Change the paused state of the contract * @dev Only the contract owner may call this. */ function setPaused(bool _paused) external onlyOwner { // Ensure we're actually changing the state before we do anything if (_paused == paused) { return; } // Set our paused state. paused = _paused; // If applicable, set the last pause time. if (paused) { lastPauseTime = block.timestamp; } // Let everyone know that our pause state has changed. emit PauseChanged(paused); } event PauseChanged(bool isPaused); modifier notPaused { require(!paused, "This action cannot be performed while the contract is paused"); _; } } // https://docs.synthetix.io/contracts/RewardsDistributionRecipient abstract contract RewardsDistributionRecipient is Owned { address public rewardsDistribution; function notifyRewardAmount(uint256 reward) external virtual; modifier onlyRewardsDistribution() { require(msg.sender == rewardsDistribution, "Caller is not RewardsDistribution contract"); _; } function setRewardsDistribution(address _rewardsDistribution) external onlyOwner { rewardsDistribution = _rewardsDistribution; } } interface IStakingRewards { // Views function lastTimeRewardApplicable() external view returns (uint256); function rewardPerToken() external view returns (uint256); function earned(address account) external view returns (uint256); function getRewardForDuration() external view returns (uint256); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); // Mutative function stake(uint256 amount) external; function withdraw(uint256 amount) external; function getReward() external; function exit() external; } contract StakingRewards is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuard, Pausable { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ IERC20 public rewardsToken; IERC20 public stakingToken; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public rewardsDuration = 7 days; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; uint256 private _totalSupply; mapping(address => uint256) private _balances; /* ========== CONSTRUCTOR ========== */ constructor( address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken ) Owned(_owner) { rewardsToken = IERC20(_rewardsToken); stakingToken = IERC20(_stakingToken); rewardsDistribution = _rewardsDistribution; } /* ========== VIEWS ========== */ function totalSupply() external view override returns (uint256) { return _totalSupply; } function balanceOf(address account) external view override returns (uint256) { return _balances[account]; } function lastTimeRewardApplicable() public view override returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public view override returns (uint256) { if (_totalSupply == 0) { return rewardPerTokenStored; } return rewardPerTokenStored + (lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * 1e18 / _totalSupply; } function earned(address account) public view override returns (uint256) { return _balances[account] * (rewardPerToken() - userRewardPerTokenPaid[account]) / 1e18 + rewards[account]; } function getRewardForDuration() external view override returns (uint256) { return rewardRate * rewardsDuration; } /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 amount) external override nonReentrant notPaused updateReward(msg.sender) { require(amount > 0, "Cannot stake 0"); _totalSupply = _totalSupply + amount; _balances[msg.sender] = _balances[msg.sender] + amount; stakingToken.safeTransferFrom(msg.sender, address(this), amount); emit Staked(msg.sender, amount); } function withdraw(uint256 amount) public override nonReentrant updateReward(msg.sender) { require(amount > 0, "Cannot withdraw 0"); _totalSupply = _totalSupply - amount; _balances[msg.sender] = _balances[msg.sender] - amount; stakingToken.safeTransfer(msg.sender, amount); emit Withdrawn(msg.sender, amount); } function getReward() public override nonReentrant updateReward(msg.sender) { uint256 reward = rewards[msg.sender]; if (reward > 0) { rewards[msg.sender] = 0; rewardsToken.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } function exit() external override { withdraw(_balances[msg.sender]); getReward(); } /* ========== RESTRICTED FUNCTIONS ========== */ function notifyRewardAmount(uint256 reward) external override onlyRewardsDistribution updateReward(address(0)) { if (block.timestamp >= periodFinish) { rewardRate = reward / rewardsDuration; } else { uint256 remaining = periodFinish - block.timestamp; uint256 leftover = remaining * rewardRate; rewardRate = reward + leftover / rewardsDuration; } // Ensure the provided reward amount is not more than the balance in the contract. // This keeps the reward rate in the right range, preventing overflows due to // very high values of rewardRate in the earned and rewardsPerToken functions; // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow. uint balance = rewardsToken.balanceOf(address(this)); require(rewardRate <= balance / rewardsDuration, "Provided reward too high"); lastUpdateTime = block.timestamp; periodFinish = block.timestamp + rewardsDuration; emit RewardAdded(reward); } // Added to support recovering LP Rewards from other systems to be distributed to holders function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner { // If it's SNX we have to query the token symbol to ensure its not a proxy or underlying bool isSNX = (keccak256(bytes("SNX")) == keccak256(bytes(ERC20(tokenAddress).symbol()))); // Cannot recover the staking token or the rewards token require( tokenAddress != address(stakingToken) && tokenAddress != address(rewardsToken) && !isSNX, "Cannot withdraw the staking or rewards tokens" ); IERC20(tokenAddress).safeTransfer(owner, tokenAmount); emit Recovered(tokenAddress, tokenAmount); } function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner { require( periodFinish == 0 || block.timestamp > periodFinish, "Previous rewards period must be complete before changing the duration for the new period" ); rewardsDuration = _rewardsDuration; emit RewardsDurationUpdated(rewardsDuration); } /* ========== MODIFIERS ========== */ modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } /* ========== EVENTS ========== */ event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardsDurationUpdated(uint256 newDuration); event Recovered(address token, uint256 amount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT 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 make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"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":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","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":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"}],"name":"setRewardsDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","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
60806040526000600755600060085562093a806009553480156200002257600080fd5b50604051620018b6380380620018b68339810160408190526200004591620001c3565b83838383836001600160a01b038116620000a65760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a15060016003556000546001600160a01b0316620001515760405162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b60448201526064016200009d565b600580546001600160a01b0393841661010002610100600160a81b0319909116179055600680549183166001600160a01b031992831617905560028054939092169216919091179055506200021f9350505050565b80516001600160a01b0381168114620001be57600080fd5b919050565b60008060008060808587031215620001d9578384fd5b620001e485620001a6565b9350620001f460208601620001a6565b92506200020460408601620001a6565b91506200021460608601620001a6565b905092959194509250565b611687806200022f6000396000f3fe608060405234801561001057600080fd5b50600436106101a45760003560e01c806372f702f3116100ef578063a694fc3a11610092578063a694fc3a14610365578063c8f33c9114610378578063cc1a378f14610381578063cd3daf9d14610394578063d1af0c7d1461039c578063df136d65146103b4578063e9fad8ee146103bd578063ebe2b12b146103c557600080fd5b806372f702f3146102ea57806379ba5097146102fd5780637b0a47ee1461030557806380faa57d1461030e5780638980f11f146103165780638b876347146103295780638da5cb5b1461034957806391b4ded91461035c57600080fd5b80632e1a7d4d116101575780632e1a7d4d1461023a578063386a95251461024d5780633c6b16ab146102565780633d18b912146102695780633fc6df6e1461027157806353a47bb7146102915780635c975abb146102a457806370a08231146102c157600080fd5b80628cc262146101a95780630700037d146101cf5780631627540c146101ef57806316c38b3c1461020457806318160ddd14610217578063197621431461021f5780631c1f78eb14610232575b600080fd5b6101bc6101b736600461139a565b6103ce565b6040519081526020015b60405180910390f35b6101bc6101dd36600461139a565b600d6020526000908152604090205481565b6102026101fd36600461139a565b61044b565b005b6102026102123660046113dd565b6104a9565b600e546101bc565b61020261022d36600461139a565b61051f565b6101bc610549565b6102026102483660046114b3565b610560565b6101bc60095481565b6102026102643660046114b3565b6106c7565b610202610920565b600254610284906001600160a01b031681565b6040516101c691906114ff565b600154610284906001600160a01b031681565b6005546102b19060ff1681565b60405190151581526020016101c6565b6101bc6102cf36600461139a565b6001600160a01b03166000908152600f602052604090205490565b600654610284906001600160a01b031681565b610202610a21565b6101bc60085481565b6101bc610b0b565b6102026103243660046113b4565b610b19565b6101bc61033736600461139a565b600c6020526000908152604090205481565b600054610284906001600160a01b031681565b6101bc60045481565b6102026103733660046114b3565b610cd7565b6101bc600a5481565b61020261038f3660046114b3565b610e9f565b6101bc610f7f565b6005546102849061010090046001600160a01b031681565b6101bc600b5481565b610202610fe1565b6101bc60075481565b6001600160a01b0381166000908152600d6020908152604080832054600c909252822054670de0b6b3a764000090610404610f7f565b61040e91906115d4565b6001600160a01b0385166000908152600f602052604090205461043191906115b5565b61043b9190611595565b610445919061157d565b92915050565b610453611004565b600180546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229061049e9083906114ff565b60405180910390a150565b6104b1611004565b60055460ff16151581151514156104c55750565b6005805460ff191682151590811790915560ff16156104e357426004555b60055460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59060200161049e565b50565b610527611004565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600060095460085461055b91906115b5565b905090565b6002600354141561058c5760405162461bcd60e51b815260040161058390611546565b60405180910390fd5b60026003553361059a610f7f565b600b556105a5610b0b565b600a556001600160a01b038116156105ec576105c0816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b600082116106305760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610583565b81600e5461063e91906115d4565b600e55336000908152600f602052604090205461065c9083906115d4565b336000818152600f6020526040902091909155600654610688916001600160a01b039091169084611076565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250506001600355565b6002546001600160a01b031633146107345760405162461bcd60e51b815260206004820152602a60248201527f43616c6c6572206973206e6f742052657761726473446973747269627574696f6044820152691b8818dbdb9d1c9858dd60b21b6064820152608401610583565b600061073e610f7f565b600b55610749610b0b565b600a556001600160a01b0381161561079057610764816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60075442106107ae576009546107a69083611595565b6008556107f0565b6000426007546107be91906115d4565b90506000600854826107d091906115b5565b9050600954816107e09190611595565b6107ea908561157d565b60085550505b6005546040516370a0823160e01b815260009161010090046001600160a01b0316906370a08231906108269030906004016114ff565b60206040518083038186803b15801561083e57600080fd5b505afa158015610852573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087691906114cb565b9050600954816108869190611595565b60085411156108d25760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b6044820152606401610583565b42600a8190556009546108e49161157d565b6007556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a1505050565b600260035414156109435760405162461bcd60e51b815260040161058390611546565b600260035533610951610f7f565b600b5561095c610b0b565b600a556001600160a01b038116156109a357610977816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b336000908152600d60205260409020548015610a1857336000818152600d60205260408120556005546109e6916101009091046001600160a01b03169083611076565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486906020016106b6565b50506001600355565b6001546001600160a01b03163314610a995760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610583565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600061055b426007546110de565b610b21611004565b6000826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610b5c57600080fd5b505afa158015610b70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b989190810190611415565b80516020918201206040805180820190915260038152620a69cb60eb1b9201919091526006547fc33e514e79311fe606801af4b4f343c83a3b72dca711239a516f2103673922d190911491506001600160a01b03848116911614801590610c1257506005546001600160a01b038481166101009092041614155b8015610c1c575080155b610c7e5760405162461bcd60e51b815260206004820152602d60248201527f43616e6e6f7420776974686472617720746865207374616b696e67206f72207260448201526c65776172647320746f6b656e7360981b6064820152608401610583565b600054610c98906001600160a01b03858116911684611076565b604080516001600160a01b0385168152602081018490527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289101610913565b60026003541415610cfa5760405162461bcd60e51b815260040161058390611546565b600260035560055460ff1615610d785760405162461bcd60e51b815260206004820152603c60248201527f5468697320616374696f6e2063616e6e6f7420626520706572666f726d65642060448201527f7768696c652074686520636f6e747261637420697320706175736564000000006064820152608401610583565b33610d81610f7f565b600b55610d8c610b0b565b600a556001600160a01b03811615610dd357610da7816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60008211610e145760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610583565b81600e54610e22919061157d565b600e55336000908152600f6020526040902054610e4090839061157d565b336000818152600f6020526040902091909155600654610e6d916001600160a01b039091169030856110f6565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016106b6565b610ea7611004565b6007541580610eb7575060075442115b610f4a5760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e672074686520647572606482015277185d1a5bdb88199bdc881d1a19481b995dc81c195c9a5bd960421b608482015260a401610583565b60098190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200161049e565b6000600e5460001415610f935750600b5490565b600e54600854600a54610fa4610b0b565b610fae91906115d4565b610fb891906115b5565b610fca90670de0b6b3a76400006115b5565b610fd49190611595565b600b5461055b919061157d565b336000908152600f6020526040902054610ffa90610560565b611002610920565b565b6000546001600160a01b031633146110025760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610583565b6040516001600160a01b0383166024820152604481018290526110d990849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611134565b505050565b60008183106110ed57816110ef565b825b9392505050565b6040516001600160a01b038085166024830152831660448201526064810182905261112e9085906323b872dd60e01b906084016110a2565b50505050565b6000611189826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112069092919063ffffffff16565b8051909150156110d957808060200190518101906111a791906113f9565b6110d95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610583565b6060611215848460008561121d565b949350505050565b60608247101561127e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610583565b843b6112cc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610583565b600080866001600160a01b031685876040516112e891906114e3565b60006040518083038185875af1925050503d8060008114611325576040519150601f19603f3d011682016040523d82523d6000602084013e61132a565b606091505b509150915061133a828286611345565b979650505050505050565b606083156113545750816110ef565b8251156113645782518084602001fd5b8160405162461bcd60e51b81526004016105839190611513565b80356001600160a01b038116811461139557600080fd5b919050565b6000602082840312156113ab578081fd5b6110ef8261137e565b600080604083850312156113c6578081fd5b6113cf8361137e565b946020939093013593505050565b6000602082840312156113ee578081fd5b81356110ef81611643565b60006020828403121561140a578081fd5b81516110ef81611643565b600060208284031215611426578081fd5b815167ffffffffffffffff8082111561143d578283fd5b818401915084601f830112611450578283fd5b8151818111156114625761146261162d565b604051601f8201601f19908116603f0116810190838211818310171561148a5761148a61162d565b816040528281528760208487010111156114a2578586fd5b61133a8360208301602088016115eb565b6000602082840312156114c4578081fd5b5035919050565b6000602082840312156114dc578081fd5b5051919050565b600082516114f58184602087016115eb565b9190910192915050565b6001600160a01b0391909116815260200190565b60208152600082518060208401526115328160408501602087016115eb565b601f01601f19169190910160400192915050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561159057611590611617565b500190565b6000826115b057634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156115cf576115cf611617565b500290565b6000828210156115e6576115e6611617565b500390565b60005b838110156116065781810151838201526020016115ee565b8381111561112e5750506000910152565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461051c57600080fdfea26469706673582212209d5a5a334d91567d4d67098ec460e150263150c1195a14ce7f10dfcd61fb18e164736f6c63430008040033000000000000000000000000cedad8c0ae5e0a878c01cc8c81e0ca2dba909ded000000000000000000000000cedad8c0ae5e0a878c01cc8c81e0ca2dba909ded000000000000000000000000eeaa40b28a2d1b0b08f6f97bb1dd4b75316c61070000000000000000000000002167eefb9ecb52fb6fcf1ff8f7dae6f0121f4fbc
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a45760003560e01c806372f702f3116100ef578063a694fc3a11610092578063a694fc3a14610365578063c8f33c9114610378578063cc1a378f14610381578063cd3daf9d14610394578063d1af0c7d1461039c578063df136d65146103b4578063e9fad8ee146103bd578063ebe2b12b146103c557600080fd5b806372f702f3146102ea57806379ba5097146102fd5780637b0a47ee1461030557806380faa57d1461030e5780638980f11f146103165780638b876347146103295780638da5cb5b1461034957806391b4ded91461035c57600080fd5b80632e1a7d4d116101575780632e1a7d4d1461023a578063386a95251461024d5780633c6b16ab146102565780633d18b912146102695780633fc6df6e1461027157806353a47bb7146102915780635c975abb146102a457806370a08231146102c157600080fd5b80628cc262146101a95780630700037d146101cf5780631627540c146101ef57806316c38b3c1461020457806318160ddd14610217578063197621431461021f5780631c1f78eb14610232575b600080fd5b6101bc6101b736600461139a565b6103ce565b6040519081526020015b60405180910390f35b6101bc6101dd36600461139a565b600d6020526000908152604090205481565b6102026101fd36600461139a565b61044b565b005b6102026102123660046113dd565b6104a9565b600e546101bc565b61020261022d36600461139a565b61051f565b6101bc610549565b6102026102483660046114b3565b610560565b6101bc60095481565b6102026102643660046114b3565b6106c7565b610202610920565b600254610284906001600160a01b031681565b6040516101c691906114ff565b600154610284906001600160a01b031681565b6005546102b19060ff1681565b60405190151581526020016101c6565b6101bc6102cf36600461139a565b6001600160a01b03166000908152600f602052604090205490565b600654610284906001600160a01b031681565b610202610a21565b6101bc60085481565b6101bc610b0b565b6102026103243660046113b4565b610b19565b6101bc61033736600461139a565b600c6020526000908152604090205481565b600054610284906001600160a01b031681565b6101bc60045481565b6102026103733660046114b3565b610cd7565b6101bc600a5481565b61020261038f3660046114b3565b610e9f565b6101bc610f7f565b6005546102849061010090046001600160a01b031681565b6101bc600b5481565b610202610fe1565b6101bc60075481565b6001600160a01b0381166000908152600d6020908152604080832054600c909252822054670de0b6b3a764000090610404610f7f565b61040e91906115d4565b6001600160a01b0385166000908152600f602052604090205461043191906115b5565b61043b9190611595565b610445919061157d565b92915050565b610453611004565b600180546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229061049e9083906114ff565b60405180910390a150565b6104b1611004565b60055460ff16151581151514156104c55750565b6005805460ff191682151590811790915560ff16156104e357426004555b60055460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59060200161049e565b50565b610527611004565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600060095460085461055b91906115b5565b905090565b6002600354141561058c5760405162461bcd60e51b815260040161058390611546565b60405180910390fd5b60026003553361059a610f7f565b600b556105a5610b0b565b600a556001600160a01b038116156105ec576105c0816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b600082116106305760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610583565b81600e5461063e91906115d4565b600e55336000908152600f602052604090205461065c9083906115d4565b336000818152600f6020526040902091909155600654610688916001600160a01b039091169084611076565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250506001600355565b6002546001600160a01b031633146107345760405162461bcd60e51b815260206004820152602a60248201527f43616c6c6572206973206e6f742052657761726473446973747269627574696f6044820152691b8818dbdb9d1c9858dd60b21b6064820152608401610583565b600061073e610f7f565b600b55610749610b0b565b600a556001600160a01b0381161561079057610764816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60075442106107ae576009546107a69083611595565b6008556107f0565b6000426007546107be91906115d4565b90506000600854826107d091906115b5565b9050600954816107e09190611595565b6107ea908561157d565b60085550505b6005546040516370a0823160e01b815260009161010090046001600160a01b0316906370a08231906108269030906004016114ff565b60206040518083038186803b15801561083e57600080fd5b505afa158015610852573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087691906114cb565b9050600954816108869190611595565b60085411156108d25760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b6044820152606401610583565b42600a8190556009546108e49161157d565b6007556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a1505050565b600260035414156109435760405162461bcd60e51b815260040161058390611546565b600260035533610951610f7f565b600b5561095c610b0b565b600a556001600160a01b038116156109a357610977816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b336000908152600d60205260409020548015610a1857336000818152600d60205260408120556005546109e6916101009091046001600160a01b03169083611076565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486906020016106b6565b50506001600355565b6001546001600160a01b03163314610a995760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610583565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600061055b426007546110de565b610b21611004565b6000826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610b5c57600080fd5b505afa158015610b70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b989190810190611415565b80516020918201206040805180820190915260038152620a69cb60eb1b9201919091526006547fc33e514e79311fe606801af4b4f343c83a3b72dca711239a516f2103673922d190911491506001600160a01b03848116911614801590610c1257506005546001600160a01b038481166101009092041614155b8015610c1c575080155b610c7e5760405162461bcd60e51b815260206004820152602d60248201527f43616e6e6f7420776974686472617720746865207374616b696e67206f72207260448201526c65776172647320746f6b656e7360981b6064820152608401610583565b600054610c98906001600160a01b03858116911684611076565b604080516001600160a01b0385168152602081018490527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289101610913565b60026003541415610cfa5760405162461bcd60e51b815260040161058390611546565b600260035560055460ff1615610d785760405162461bcd60e51b815260206004820152603c60248201527f5468697320616374696f6e2063616e6e6f7420626520706572666f726d65642060448201527f7768696c652074686520636f6e747261637420697320706175736564000000006064820152608401610583565b33610d81610f7f565b600b55610d8c610b0b565b600a556001600160a01b03811615610dd357610da7816103ce565b6001600160a01b0382166000908152600d6020908152604080832093909355600b54600c909152919020555b60008211610e145760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610583565b81600e54610e22919061157d565b600e55336000908152600f6020526040902054610e4090839061157d565b336000818152600f6020526040902091909155600654610e6d916001600160a01b039091169030856110f6565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016106b6565b610ea7611004565b6007541580610eb7575060075442115b610f4a5760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e672074686520647572606482015277185d1a5bdb88199bdc881d1a19481b995dc81c195c9a5bd960421b608482015260a401610583565b60098190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200161049e565b6000600e5460001415610f935750600b5490565b600e54600854600a54610fa4610b0b565b610fae91906115d4565b610fb891906115b5565b610fca90670de0b6b3a76400006115b5565b610fd49190611595565b600b5461055b919061157d565b336000908152600f6020526040902054610ffa90610560565b611002610920565b565b6000546001600160a01b031633146110025760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610583565b6040516001600160a01b0383166024820152604481018290526110d990849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611134565b505050565b60008183106110ed57816110ef565b825b9392505050565b6040516001600160a01b038085166024830152831660448201526064810182905261112e9085906323b872dd60e01b906084016110a2565b50505050565b6000611189826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112069092919063ffffffff16565b8051909150156110d957808060200190518101906111a791906113f9565b6110d95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610583565b6060611215848460008561121d565b949350505050565b60608247101561127e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610583565b843b6112cc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610583565b600080866001600160a01b031685876040516112e891906114e3565b60006040518083038185875af1925050503d8060008114611325576040519150601f19603f3d011682016040523d82523d6000602084013e61132a565b606091505b509150915061133a828286611345565b979650505050505050565b606083156113545750816110ef565b8251156113645782518084602001fd5b8160405162461bcd60e51b81526004016105839190611513565b80356001600160a01b038116811461139557600080fd5b919050565b6000602082840312156113ab578081fd5b6110ef8261137e565b600080604083850312156113c6578081fd5b6113cf8361137e565b946020939093013593505050565b6000602082840312156113ee578081fd5b81356110ef81611643565b60006020828403121561140a578081fd5b81516110ef81611643565b600060208284031215611426578081fd5b815167ffffffffffffffff8082111561143d578283fd5b818401915084601f830112611450578283fd5b8151818111156114625761146261162d565b604051601f8201601f19908116603f0116810190838211818310171561148a5761148a61162d565b816040528281528760208487010111156114a2578586fd5b61133a8360208301602088016115eb565b6000602082840312156114c4578081fd5b5035919050565b6000602082840312156114dc578081fd5b5051919050565b600082516114f58184602087016115eb565b9190910192915050565b6001600160a01b0391909116815260200190565b60208152600082518060208401526115328160408501602087016115eb565b601f01601f19169190910160400192915050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561159057611590611617565b500190565b6000826115b057634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156115cf576115cf611617565b500290565b6000828210156115e6576115e6611617565b500390565b60005b838110156116065781810151838201526020016115ee565b8381111561112e5750506000910152565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461051c57600080fdfea26469706673582212209d5a5a334d91567d4d67098ec460e150263150c1195a14ce7f10dfcd61fb18e164736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000cedad8c0ae5e0a878c01cc8c81e0ca2dba909ded000000000000000000000000cedad8c0ae5e0a878c01cc8c81e0ca2dba909ded000000000000000000000000eeaa40b28a2d1b0b08f6f97bb1dd4b75316c61070000000000000000000000002167eefb9ecb52fb6fcf1ff8f7dae6f0121f4fbc
-----Decoded View---------------
Arg [0] : _owner (address): 0xCedAD8C0Ae5e0a878c01cC8c81E0Ca2DbA909deD
Arg [1] : _rewardsDistribution (address): 0xCedAD8C0Ae5e0a878c01cC8c81E0Ca2DbA909deD
Arg [2] : _rewardsToken (address): 0xeEAA40B28A2d1b0B08f6f97bB1DD4B75316c6107
Arg [3] : _stakingToken (address): 0x2167EEFB9ECB52fB6fCf1ff8f7dAe6F0121F4fBC
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000cedad8c0ae5e0a878c01cc8c81e0ca2dba909ded
Arg [1] : 000000000000000000000000cedad8c0ae5e0a878c01cc8c81e0ca2dba909ded
Arg [2] : 000000000000000000000000eeaa40b28a2d1b0b08f6f97bb1dd4b75316c6107
Arg [3] : 0000000000000000000000002167eefb9ecb52fb6fcf1ff8f7dae6f0121f4fbc
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.031253 | 4,780.9754 | $149.42 |
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.