More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 394 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 19895696 | 60 days ago | IN | 0 ETH | 0.00050368 | ||||
Withdraw | 19895693 | 60 days ago | IN | 0 ETH | 0.0004743 | ||||
Withdraw | 19895441 | 60 days ago | IN | 0 ETH | 0.00044496 | ||||
Withdraw | 19889031 | 61 days ago | IN | 0 ETH | 0.0010799 | ||||
Withdraw | 19882346 | 62 days ago | IN | 0 ETH | 0.00073602 | ||||
Stake On New Loc... | 19810656 | 72 days ago | IN | 0 ETH | 0.00142295 | ||||
Stake On New Loc... | 19810431 | 72 days ago | IN | 0 ETH | 0.00132836 | ||||
Withdraw | 19796384 | 74 days ago | IN | 0 ETH | 0.00094198 | ||||
Withdraw | 19796375 | 74 days ago | IN | 0 ETH | 0.00021632 | ||||
Withdraw | 19796346 | 74 days ago | IN | 0 ETH | 0.00021585 | ||||
Stake On New Loc... | 19789392 | 75 days ago | IN | 0 ETH | 0.00101656 | ||||
Stake On New Loc... | 19789385 | 75 days ago | IN | 0 ETH | 0.00109563 | ||||
Stake On New Loc... | 19789292 | 75 days ago | IN | 0 ETH | 0.00106147 | ||||
Stake On New Loc... | 19788901 | 75 days ago | IN | 0 ETH | 0.00120859 | ||||
Stake On New Loc... | 19788868 | 75 days ago | IN | 0 ETH | 0.00143714 | ||||
Notify Reward Am... | 19788864 | 75 days ago | IN | 0 ETH | 0.00037593 | ||||
Withdraw | 19481269 | 118 days ago | IN | 0 ETH | 0.00394461 | ||||
Withdraw | 18155449 | 304 days ago | IN | 0 ETH | 0.00111239 | ||||
Withdraw | 18155447 | 304 days ago | IN | 0 ETH | 0.0011814 | ||||
Withdraw | 18154559 | 304 days ago | IN | 0 ETH | 0.00113327 | ||||
Withdraw | 18048801 | 319 days ago | IN | 0 ETH | 0.00158274 | ||||
Withdraw | 18044008 | 320 days ago | IN | 0 ETH | 0.00221755 | ||||
Withdraw | 17971457 | 330 days ago | IN | 0 ETH | 0.0089954 | ||||
Withdraw | 17904765 | 339 days ago | IN | 0 ETH | 0.00167734 | ||||
Withdraw | 17899197 | 340 days ago | IN | 0 ETH | 0.00209358 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
OGzDynamicStaking
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IUniswapRouter02.sol"; contract OGzDynamicStaking is ReentrancyGuard, Pausable, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ IERC20 public rewardsToken; IERC20 public stakingToken; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public rewardsDuration = 14 days; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; address public treasury; address public secondaryPool; struct LockedBalance { uint256 balance; uint256 duration; uint256 unlockTime; uint256 score; uint256 rewardPerTokenPaid; uint256 reward; bool withdrawn; } uint256 private _totalSupply; uint256 private _totalScore; mapping(address => LockedBalance[]) private locks; // Duration of lock period in seconds uint256 public constant minDuration = 1 days; uint256 public constant maxDuration = 14 days; IUniswapV2Router02 router; /* ========== CONSTRUCTOR ========== */ constructor( address _rewardsToken, address _stakingToken, address _router, address _treasury, address _secondaryPool ){ rewardsToken = IERC20(_rewardsToken); stakingToken = IERC20(_stakingToken); router = IUniswapV2Router02(_router); treasury = _treasury; secondaryPool = _secondaryPool; rewardsToken.approve(address(router), 2**256-1); } /* ========== VIEWS ========== */ function totalSupply() external view returns (uint256) { return _totalSupply; } function totalScore() external view returns (uint256) { return _totalScore; } function lastTimeRewardApplicable() public view returns (uint256) { return block.timestamp < periodFinish ? block.timestamp : periodFinish; } function rewardPerToken() public view returns (uint256) { if (_totalScore == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add( lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(_totalScore) ); } function locksCount(address user) external view returns (uint256) { return locks[user].length; } function lockInfo(address user, uint256 lockIdx) external view returns (uint256 balance, uint256 duration, uint256 unlockTime, uint256 score, uint256 rewardPerTokenPaid, uint256 reward, bool withdrawn) { require(lockIdx < locks[user].length, "Lock index does not exist"); LockedBalance memory lock = locks[user][lockIdx]; return (lock.balance, lock.duration, lock.unlockTime, lock.score, lock.rewardPerTokenPaid, lock.reward, lock.withdrawn); } function isUnlocked(address user, uint256 lockId) public view returns (bool) { return block.timestamp >= locks[user][lockId].unlockTime; } function isWithdrawn(address user, uint256 lockId) public view returns (bool) { return locks[user][lockId].withdrawn; } function earned(address user, uint256 lockIdx) public view returns (uint256) { require(lockIdx < locks[user].length, "Lock index does not exist"); LockedBalance memory lock = locks[user][lockIdx]; return lock.score.mul(rewardPerToken().sub(lock.rewardPerTokenPaid)).div(1e18).add(lock.reward); } function totalEarned(address user) public view returns (uint256) { uint256 total; for (uint i = 0; i < locks[user].length; i++) { if(!isWithdrawn(user, i)) total += earned(user, i); } return total; } function totalFullyClaimable(address user) public view returns (uint256) { uint256 total; uint256 len = locks[user].length; for (uint i = 0; i < len; i++) { if(isUnlocked(user, i) && !isWithdrawn(user, i)) total += earned(user, i); } return total; } function getRewardForDuration() external view returns (uint256) { return rewardRate.mul(rewardsDuration); } /* ========== PURE FUNCTIONS ========== */ function calculateScore(uint256 amount, uint256 duration) public pure returns (uint256) { return amount.mul(duration); } /* ========== MUTATIVE FUNCTIONS ========== */ function stakeOnNewLock(address user, uint256 amount, uint256 duration) external nonReentrant whenNotPaused { require(user != address(0), "User cannot be 0 address"); require(amount > 0, "Cannot stake 0"); require(duration >= minDuration && duration <= maxDuration, "Lock duration not in range"); uint256 unlockTime = block.timestamp.add(duration); require(unlockTime <= periodFinish, "Lock must end before pool finish time"); locks[user].push(LockedBalance( { balance: 0, duration: duration, unlockTime: unlockTime, score: 0, rewardPerTokenPaid: 0, reward: 0, withdrawn: false } )); uint256 lastIdx = locks[user].length - 1; updateReward(user, lastIdx); uint256 score = calculateScore(amount, duration); locks[user][lastIdx].score = score; locks[user][lastIdx].balance = amount; _totalScore = _totalScore.add(score); _totalSupply = _totalSupply.add(amount); stakingToken.safeTransferFrom(msg.sender, address(this), amount); emit Staked(user, amount, duration, lastIdx); } function stakeOnExistingLock(address user, uint256 lockId, uint256 amount) external nonReentrant whenNotPaused { require(user != address(0), "User cannot be 0 address"); require(amount > 0, "Cannot stake 0"); require(lockId < locks[user].length, "Lock index does not exist"); require(!isWithdrawn(user, lockId), "Lock already withdrawn"); updateReward(user, lockId); LockedBalance storage lock = locks[user][lockId]; uint256 scoreDelta = calculateScore(amount, lock.duration); lock.balance = lock.balance.add(amount); lock.score = lock.score.add(scoreDelta); _totalSupply = _totalSupply.add(amount); _totalScore = _totalScore.add(scoreDelta); stakingToken.safeTransferFrom(msg.sender, address(this), amount); emit Staked(user, amount, lock.duration, lockId); } function withdraw(uint256 lockId) external nonReentrant { require(lockId < locks[msg.sender].length, "Lock id does not exist"); require(!isWithdrawn(msg.sender, lockId), "Lock already withdrawn"); require(isUnlocked(msg.sender, lockId), "Cant withdraw before unlock time"); updateReward(msg.sender, lockId); LockedBalance memory lock = locks[msg.sender][lockId]; require(lock.balance > 0, "Lock position is empty"); locks[msg.sender][lockId].withdrawn = true; _totalScore = _totalScore.sub(lock.score); _totalSupply = _totalSupply.sub(lock.balance); stakingToken.safeTransfer(msg.sender, lock.balance); emit Withdrawn(msg.sender, lock.balance, lockId); getFullReward(lock.reward); } function withdrawEarly(uint256 lockId) external nonReentrant { require(lockId < locks[msg.sender].length, "Lock id does not exist"); require(!isWithdrawn(msg.sender, lockId), "Lock already withdrawn"); require(!isUnlocked(msg.sender, lockId), "Unlock time has passed, use standard withdraw instead"); updateReward(msg.sender, lockId); LockedBalance memory lock = locks[msg.sender][lockId]; require(lock.balance > 0, "Lock position is empty"); locks[msg.sender][lockId].withdrawn = true; _totalScore = _totalScore.sub(lock.score); _totalSupply = _totalSupply.sub(lock.balance); stakingToken.safeTransfer(msg.sender, lock.balance); emit Withdrawn(msg.sender, lock.balance, lockId); getPenalizedReward(lock.reward, lock.duration, lock.unlockTime); } function getFullReward(uint256 reward) internal { if(reward > 0){ rewardsToken.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } function getPenalizedReward(uint256 reward, uint256 duration, uint256 unlockTime) internal { if(reward > 0){ // send completion% * 25% to user uint256 userAmount = reward.mul(block.timestamp.sub(unlockTime.sub(duration))).div(duration); userAmount = userAmount.mul(25).div(100); if(userAmount > 0) rewardsToken.safeTransfer(msg.sender, userAmount); // apply penalty to remaining amount uint256 penaltyAmount = reward.sub(userAmount); applyPenalty(penaltyAmount); emit RewardPaid(msg.sender, userAmount); } } function applyPenalty(uint256 penaltyAmount) internal { uint256 secondaryPoolAmount = penaltyAmount.div(2); if(secondaryPoolAmount > 0) rewardsToken.safeTransfer(secondaryPool, secondaryPoolAmount); uint256 remainingAmount = penaltyAmount.sub(secondaryPoolAmount); uint256 treasuryAmount = remainingAmount.div(2); if(treasuryAmount > 0) rewardsToken.safeTransfer(treasury, treasuryAmount); uint256 swapToTreasuryAmount = remainingAmount.sub(treasuryAmount); if(swapToTreasuryAmount > 0) { // setup swap parameters uint256 amountOutMin = 1; address[] memory path = new address[](2); path[0] = address(rewardsToken); path[1] = router.WETH(); uint256 deadline = block.timestamp + 300; // approve token transfer and execute swap router.swapExactTokensForETH( swapToTreasuryAmount, amountOutMin, path, treasury, deadline ); } } function updateReward(address user, uint256 lockIdx) internal { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (user != address(0)) { locks[user][lockIdx].reward = earned(user, lockIdx); locks[user][lockIdx].rewardPerTokenPaid = rewardPerTokenStored; } } /* ========== RESTRICTED FUNCTIONS ========== */ function notifyRewardAmount(uint256 reward) external onlyOwner { updateReward(address(0), 0); if (block.timestamp >= periodFinish) { rewardRate = reward.div(rewardsDuration); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardRate = reward.add(leftover).div(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.div(rewardsDuration), "Provided reward too high"); lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(rewardsDuration); emit RewardAdded(reward); } // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner { require(tokenAddress != address(stakingToken), "Cannot withdraw the staking token"); IERC20(tokenAddress).safeTransfer(msg.sender, tokenAmount); emit Recovered(tokenAddress, tokenAmount); } function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner { require( block.timestamp > periodFinish, "Previous rewards period must be complete before changing the duration for the new period" ); rewardsDuration = _rewardsDuration; emit RewardsDurationUpdated(rewardsDuration); } function setTreasury(address _treasury) public onlyOwner { treasury = _treasury; emit SetTreasury(_treasury); } function setSecondaryPool(address _secondaryPool) public onlyOwner { secondaryPool = _secondaryPool; emit SetSecondaryPool(_secondaryPool); } // pause should be called before any critical action or bug detection // this will cause the contract main activities to cease function pause() external whenNotPaused onlyOwner { _pause(); } function unpause() external whenPaused onlyOwner { _unpause(); } /* ========== EVENTS ========== */ event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount, uint256 duration, uint256 lockId); event Withdrawn(address indexed user, uint256 amount, uint256 lockId); event RewardPaid(address indexed user, uint256 reward); event RewardsDurationUpdated(uint256 newDuration); event Recovered(address token, uint256 amount); event SetTreasury(address treasury); event SetSecondaryPool(address secondaryPool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
pragma solidity >=0.6.2; import './IUniswapRouter01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_secondaryPool","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"address","name":"secondaryPool","type":"address"}],"name":"SetSecondaryPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"SetTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"calculateScore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"lockIdx","type":"uint256"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"isUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"isWithdrawn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"user","type":"address"},{"internalType":"uint256","name":"lockIdx","type":"uint256"}],"name":"lockInfo","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"bool","name":"withdrawn","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"locksCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"pause","outputs":[],"stateMutability":"nonpayable","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":"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":[],"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":[],"name":"secondaryPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_secondaryPool","type":"address"}],"name":"setSecondaryPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeOnExistingLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"stakeOnNewLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalFullyClaimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalScore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"withdrawEarly","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006004556000600555621275006006553480156200002257600080fd5b50604051620027bc380380620027bc8339810160408190526200004591620001a8565b60016000819055805460ff191690556200005f3362000131565b600280546001600160a01b03199081166001600160a01b03888116918217909355600380548316888516179055600e80548316878516908117909155600980548416878616179055600a80549093169385169390931790915560405163095ea7b360e01b8152600481019290925260001960248301529063095ea7b3906044016020604051808303816000875af1158015620000ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000125919062000218565b50505050505062000243565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620001a357600080fd5b919050565b600080600080600060a08688031215620001c157600080fd5b620001cc866200018b565b9450620001dc602087016200018b565b9350620001ec604087016200018b565b9250620001fc606087016200018b565b91506200020c608087016200018b565b90509295509295909350565b6000602082840312156200022b57600080fd5b815180151581146200023c57600080fd5b9392505050565b61256980620002536000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c806372f702f31161013b578063c006719f116100b8578063d1af0c7d1161007c578063d1af0c7d146104c1578063df136d65146104d4578063ebe2b12b146104dd578063f0f44260146104e6578063f2fde38b146104f957600080fd5b8063c006719f14610482578063c2479c451461048a578063c8f33c911461049d578063cc1a378f146104a6578063cd3daf9d146104b957600080fd5b80638c32beed116100ff5780638c32beed146103d35780638da5cb5b146103fc578063adfb6aec14610412578063b2520a7c14610425578063b981cb051461046f57600080fd5b806372f702f3146103945780637b0a47ee146103a757806380faa57d146103b05780638456cb59146103b85780638980f11f146103c057600080fd5b80633e491d47116101c95780635c975abb1161018d5780635c975abb1461035157806361d027b31461035c578063649aca4a1461036f5780636db5c8fd14610382578063715018a61461038c57600080fd5b80633e491d47146103065780633f4ba83a146103195780634f4b48f21461032157806356715761146103345780635abe6f7e1461033e57600080fd5b80632ceba746116102105780632ceba7461461029f5780632e1a7d4d146102c257806330dbb4e4146102d7578063386a9525146102ea5780633c6b16ab146102f357600080fd5b806312d4ffed1461024257806318160ddd146102725780631c1f78eb146102845780631cb9a02a1461028c575b600080fd5b600a54610255906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600b545b604051908152602001610269565b61027661050c565b61027661029a366004612143565b61052a565b6102b26102ad36600461217a565b61053f565b6040519015158152602001610269565b6102d56102d03660046121a6565b610587565b005b6102b26102e536600461217a565b610820565b61027660065481565b6102d56103013660046121a6565b610867565b61027661031436600461217a565b610a05565b6102d5610b13565b6102d561032f3660046121a6565b610b2d565b6102766201518081565b6102d561034c3660046121bf565b610ddc565b60015460ff166102b2565b600954610255906001600160a01b031681565b61027661037d3660046121bf565b610e39565b6102766212750081565b6102d5610e9d565b600354610255906001600160a01b031681565b61027660055481565b610276610eaf565b6102d5610ec6565b6102d56103ce36600461217a565b610ede565b6102766103e13660046121bf565b6001600160a01b03166000908152600d602052604090205490565b60015461010090046001600160a01b0316610255565b6102766104203660046121bf565b610fa1565b61043861043336600461217a565b61101a565b604080519788526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e001610269565b6102d561047d3660046121e3565b611116565b600c54610276565b6102d56104983660046121e3565b611475565b61027660075481565b6102d56104b43660046121a6565b611683565b61027661175d565b600254610255906001600160a01b031681565b61027660085481565b61027660045481565b6102d56104f43660046121bf565b6117a8565b6102d56105073660046121bf565b6117fe565b600061052560065460055461187490919063ffffffff16565b905090565b60006105368383611874565b90505b92915050565b6001600160a01b0382166000908152600d6020526040812080548390811061056957610569612218565b600091825260209091206007909102016006015460ff169392505050565b61058f611880565b336000908152600d602052604090205481106105eb5760405162461bcd60e51b8152602060048201526016602482015275131bd8dac81a5908191bd95cc81b9bdd08195e1a5cdd60521b60448201526064015b60405180910390fd5b6105f5338261053f565b156106125760405162461bcd60e51b81526004016105e29061222e565b61061c3382610820565b6106685760405162461bcd60e51b815260206004820181905260248201527f43616e74207769746864726177206265666f726520756e6c6f636b2074696d6560448201526064016105e2565b61067233826118d9565b336000908152600d6020526040812080548390811061069357610693612218565b60009182526020918290206040805160e081018252600790930290910180548084526001820154948401949094526002810154918301919091526003810154606083015260048101546080830152600581015460a08301526006015460ff16151560c082015291506107405760405162461bcd60e51b81526020600482015260166024820152754c6f636b20706f736974696f6e20697320656d70747960501b60448201526064016105e2565b336000908152600d602052604090208054600191908490811061076557610765612218565b60009182526020909120600790910201600601805460ff19169115159190911790556060810151600c546107989161199a565b600c558051600b546107a99161199a565b600b5580516003546107c8916001600160a01b039091169033906119a6565b8051604080519182526020820184905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6910160405180910390a26108128160a00151611a09565b5061081d6001600055565b50565b6001600160a01b0382166000908152600d6020526040812080548390811061084a5761084a612218565b906000526020600020906007020160020154421015905092915050565b61086f611a5e565b61087a6000806118d9565b600454421061089957600654610891908290611abe565b6005556108e2565b6004546000906108a9904261199a565b905060006108c26005548361187490919063ffffffff16565b6006549091506108dc906108d68584611aca565b90611abe565b60055550505b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561092b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094f919061225e565b905061096660065482611abe90919063ffffffff16565b60055411156109b75760405162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f2068696768000000000000000060448201526064016105e2565b4260078190556006546109ca9190611aca565b6004556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a15050565b6001600160a01b0382166000908152600d60205260408120548210610a3c5760405162461bcd60e51b81526004016105e290612277565b6001600160a01b0383166000908152600d60205260408120805484908110610a6657610a66612218565b60009182526020918290206040805160e08101825260079093029091018054835260018101549383019390935260028301549082015260038201546060820152600482015460808201819052600583015460a0830181905260069093015460ff16151560c0830152909250610b0b9190610b0590670de0b6b3a7640000906108d690610afa90610af461175d565b9061199a565b606087015190611874565b90611aca565b949350505050565b610b1b611ad6565b610b23611a5e565b610b2b611b1f565b565b610b35611880565b336000908152600d60205260409020548110610b8c5760405162461bcd60e51b8152602060048201526016602482015275131bd8dac81a5908191bd95cc81b9bdd08195e1a5cdd60521b60448201526064016105e2565b610b96338261053f565b15610bb35760405162461bcd60e51b81526004016105e29061222e565b610bbd3382610820565b15610c285760405162461bcd60e51b815260206004820152603560248201527f556e6c6f636b2074696d6520686173207061737365642c20757365207374616e60448201527419185c99081dda5d1a191c985dc81a5b9cdd195859605a1b60648201526084016105e2565b610c3233826118d9565b336000908152600d60205260408120805483908110610c5357610c53612218565b60009182526020918290206040805160e081018252600790930290910180548084526001820154948401949094526002810154918301919091526003810154606083015260048101546080830152600581015460a08301526006015460ff16151560c08201529150610d005760405162461bcd60e51b81526020600482015260166024820152754c6f636b20706f736974696f6e20697320656d70747960501b60448201526064016105e2565b336000908152600d6020526040902080546001919084908110610d2557610d25612218565b60009182526020909120600790910201600601805460ff19169115159190911790556060810151600c54610d589161199a565b600c558051600b54610d699161199a565b600b558051600354610d88916001600160a01b039091169033906119a6565b8051604080519182526020820184905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6910160405180910390a26108128160a0015182602001518360400151611b71565b610de4611a5e565b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f94d8f59b90096192f8d501ca986985a084a5f94a6d12871e36e501735b75126f906020015b60405180910390a150565b60008060005b6001600160a01b0384166000908152600d6020526040902054811015610e9657610e69848261053f565b610e8457610e778482610a05565b610e8190836122c4565b91505b80610e8e816122d7565b915050610e3f565b5092915050565b610ea5611a5e565b610b2b6000611c1f565b60006004544210610ec1575060045490565b504290565b610ece611c79565b610ed6611a5e565b610b2b611cbf565b610ee6611a5e565b6003546001600160a01b0390811690831603610f4e5760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b60648201526084016105e2565b610f626001600160a01b03831633836119a6565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2891016109f9565b6001600160a01b0381166000908152600d60205260408120548190815b8181101561101157610fd08582610820565b8015610fe35750610fe1858261053f565b155b15610fff57610ff28582610a05565b610ffc90846122c4565b92505b80611009816122d7565b915050610fbe565b50909392505050565b6001600160a01b0382166000908152600d6020526040812054819081908190819081908190881061105d5760405162461bcd60e51b81526004016105e290612277565b6001600160a01b0389166000908152600d6020526040812080548a90811061108757611087612218565b60009182526020918290206040805160e0810182526007909302909101805480845260018201549484018590526002820154928401839052600382015460608501819052600483015460808601819052600584015460a0870181905260069094015460ff16151560c0909601869052919d50949b50919950929750955090935091505092959891949750929550565b61111e611880565b611126611c79565b6001600160a01b0383166111775760405162461bcd60e51b8152602060048201526018602482015277557365722063616e6e6f742062652030206164647265737360401b60448201526064016105e2565b600082116111b85760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016105e2565b6201518081101580156111ce5750621275008111155b61121a5760405162461bcd60e51b815260206004820152601a60248201527f4c6f636b206475726174696f6e206e6f7420696e2072616e676500000000000060448201526064016105e2565b60006112264283611aca565b90506004548111156112885760405162461bcd60e51b815260206004820152602560248201527f4c6f636b206d75737420656e64206265666f726520706f6f6c2066696e6973686044820152642074696d6560d81b60648201526084016105e2565b6001600160a01b0384166000818152600d60208181526040808420815160e081018352858152808401898152928101888152606082018781526080830188815260a0840189815260c085018a8152865460018082018955888d528a8d20975160079092029097019081559751888701559351600288015591516003870155516004860155516005850155516006909301805460ff1916931515939093179092559484529190529154909161133b916122f0565b905061134785826118d9565b6000611353858561052a565b6001600160a01b0387166000908152600d60205260409020805491925082918490811061138257611382612218565b90600052602060002090600702016003018190555084600d6000886001600160a01b03166001600160a01b0316815260200190815260200160002083815481106113ce576113ce612218565b6000918252602090912060079091020155600c546113ec9082611aca565b600c55600b546113fc9086611aca565b600b55600354611417906001600160a01b0316333088611cfa565b60408051868152602081018690529081018390526001600160a01b038716907fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed9060600160405180910390a25050506114706001600055565b505050565b61147d611880565b611485611c79565b6001600160a01b0383166114d65760405162461bcd60e51b8152602060048201526018602482015277557365722063616e6e6f742062652030206164647265737360401b60448201526064016105e2565b600081116115175760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016105e2565b6001600160a01b0383166000908152600d6020526040902054821061154e5760405162461bcd60e51b81526004016105e290612277565b611558838361053f565b156115755760405162461bcd60e51b81526004016105e29061222e565b61157f83836118d9565b6001600160a01b0383166000908152600d602052604081208054849081106115a9576115a9612218565b9060005260206000209060070201905060006115c983836001015461052a565b82549091506115d89084611aca565b825560038201546115e99082611aca565b6003830155600b546115fb9084611aca565b600b55600c5461160b9082611aca565b600c55600354611626906001600160a01b0316333086611cfa565b600182015460408051858152602081019290925281018590526001600160a01b038616907fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed9060600160405180910390a250506114706001600055565b61168b611a5e565b60045442116117285760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e67207468652064757260648201527f6174696f6e20666f7220746865206e657720706572696f640000000000000000608482015260a4016105e2565b60068190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d390602001610e2e565b6000600c54600003611770575060085490565b61052561179f600c546108d6670de0b6b3a7640000611799600554611799600754610af4610eaf565b90611874565b60085490611aca565b6117b0611a5e565b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef390602001610e2e565b611806611a5e565b6001600160a01b03811661186b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e2565b61081d81611c1f565b60006105368284612303565b6002600054036118d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e2565b6002600055565b6118e161175d565b6008556118ec610eaf565b6007556001600160a01b03821615611996576119088282610a05565b6001600160a01b0383166000908152600d6020526040902080548390811061193257611932612218565b906000526020600020906007020160050181905550600854600d6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061198057611980612218565b9060005260206000209060070201600401819055505b5050565b600061053682846122f0565b6040516001600160a01b03831660248201526044810182905261147090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d38565b801561081d57600254611a26906001600160a01b031633836119a6565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a250565b6001546001600160a01b03610100909104163314610b2b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e2565b6000610536828461231a565b600061053682846122c4565b60015460ff16610b2b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e2565b611b27611ad6565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b8215611470576000611b9b836108d6611b94611b8d868461199a565b429061199a565b8790611874565b9050611bad60646108d6836019611874565b90508015611bcc57600254611bcc906001600160a01b031633836119a6565b6000611bd8858361199a565b9050611be381611e0d565b60405182815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25050505050565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff1615610b2b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e2565b611cc7611c79565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833611b54565b6040516001600160a01b0380851660248301528316604482015260648101829052611d329085906323b872dd60e01b906084016119d2565b50505050565b6000611d8d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120209092919063ffffffff16565b9050805160001480611dae575080806020019051810190611dae919061233c565b6114705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e2565b6000611e1a826002611abe565b90508015611e3f57600a54600254611e3f916001600160a01b039182169116836119a6565b6000611e4b838361199a565b90506000611e5a826002611abe565b90508015611e7f57600954600254611e7f916001600160a01b039182169116836119a6565b6000611e8b838361199a565b90508015612019576040805160028082526060820183526001926000929190602083019080368337505060025482519293506001600160a01b031691839150600090611ed957611ed9612218565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f569190612374565b81600181518110611f6957611f69612218565b6001600160a01b03909216602092830291909101909101526000611f8f4261012c6122c4565b600e546009546040516318cbafe560e01b81529293506001600160a01b03918216926318cbafe592611fcd9289928992899216908890600401612391565b6000604051808303816000875af1158015611fec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120149190810190612402565b505050505b5050505050565b6060610b0b848460008585600080866001600160a01b0316858760405161204791906124e4565b60006040518083038185875af1925050503d8060008114612084576040519150601f19603f3d011682016040523d82523d6000602084013e612089565b606091505b509150915061209a878383876120a5565b979650505050505050565b6060831561211457825160000361210d576001600160a01b0385163b61210d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e2565b5081610b0b565b610b0b83838151156121295781518083602001fd5b8060405162461bcd60e51b81526004016105e29190612500565b6000806040838503121561215657600080fd5b50508035926020909101359150565b6001600160a01b038116811461081d57600080fd5b6000806040838503121561218d57600080fd5b823561219881612165565b946020939093013593505050565b6000602082840312156121b857600080fd5b5035919050565b6000602082840312156121d157600080fd5b81356121dc81612165565b9392505050565b6000806000606084860312156121f857600080fd5b833561220381612165565b95602085013595506040909401359392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252601690820152752637b1b59030b63932b0b23c903bb4ba34323930bbb760511b604082015260600190565b60006020828403121561227057600080fd5b5051919050565b60208082526019908201527f4c6f636b20696e64657820646f6573206e6f7420657869737400000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610539576105396122ae565b6000600182016122e9576122e96122ae565b5060010190565b81810381811115610539576105396122ae565b8082028115828204841417610539576105396122ae565b60008261233757634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561234e57600080fd5b815180151581146121dc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60006020828403121561238657600080fd5b81516121dc81612165565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156123e15784516001600160a01b0316835293830193918301916001016123bc565b50506001600160a01b03969096166060850152505050608001529392505050565b6000602080838503121561241557600080fd5b825167ffffffffffffffff8082111561242d57600080fd5b818501915085601f83011261244157600080fd5b8151818111156124535761245361235e565b8060051b604051601f19603f830116810181811085821117156124785761247861235e565b60405291825284820192508381018501918883111561249657600080fd5b938501935b828510156124b45784518452938501939285019261249b565b98975050505050505050565b60005b838110156124db5781810151838201526020016124c3565b50506000910152565b600082516124f68184602087016124c0565b9190910192915050565b602081526000825180602084015261251f8160408501602087016124c0565b601f01601f1916919091016040019291505056fea2646970667358221220b08df7bee6faf858913bd8ae18a68aed7428e92b1a7d951be2dbe7cc1aa6740e64736f6c63430008130033000000000000000000000000b7bda6a89e724f63572ce68fddc1a6d1d5d24bcf000000000000000000000000b7bda6a89e724f63572ce68fddc1a6d1d5d24bcf0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000ff909175f7211f5361ba9445881e590a16d536b20000000000000000000000001fa55f652f647f5320c6c26c969b15faad075a9e
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061023d5760003560e01c806372f702f31161013b578063c006719f116100b8578063d1af0c7d1161007c578063d1af0c7d146104c1578063df136d65146104d4578063ebe2b12b146104dd578063f0f44260146104e6578063f2fde38b146104f957600080fd5b8063c006719f14610482578063c2479c451461048a578063c8f33c911461049d578063cc1a378f146104a6578063cd3daf9d146104b957600080fd5b80638c32beed116100ff5780638c32beed146103d35780638da5cb5b146103fc578063adfb6aec14610412578063b2520a7c14610425578063b981cb051461046f57600080fd5b806372f702f3146103945780637b0a47ee146103a757806380faa57d146103b05780638456cb59146103b85780638980f11f146103c057600080fd5b80633e491d47116101c95780635c975abb1161018d5780635c975abb1461035157806361d027b31461035c578063649aca4a1461036f5780636db5c8fd14610382578063715018a61461038c57600080fd5b80633e491d47146103065780633f4ba83a146103195780634f4b48f21461032157806356715761146103345780635abe6f7e1461033e57600080fd5b80632ceba746116102105780632ceba7461461029f5780632e1a7d4d146102c257806330dbb4e4146102d7578063386a9525146102ea5780633c6b16ab146102f357600080fd5b806312d4ffed1461024257806318160ddd146102725780631c1f78eb146102845780631cb9a02a1461028c575b600080fd5b600a54610255906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600b545b604051908152602001610269565b61027661050c565b61027661029a366004612143565b61052a565b6102b26102ad36600461217a565b61053f565b6040519015158152602001610269565b6102d56102d03660046121a6565b610587565b005b6102b26102e536600461217a565b610820565b61027660065481565b6102d56103013660046121a6565b610867565b61027661031436600461217a565b610a05565b6102d5610b13565b6102d561032f3660046121a6565b610b2d565b6102766201518081565b6102d561034c3660046121bf565b610ddc565b60015460ff166102b2565b600954610255906001600160a01b031681565b61027661037d3660046121bf565b610e39565b6102766212750081565b6102d5610e9d565b600354610255906001600160a01b031681565b61027660055481565b610276610eaf565b6102d5610ec6565b6102d56103ce36600461217a565b610ede565b6102766103e13660046121bf565b6001600160a01b03166000908152600d602052604090205490565b60015461010090046001600160a01b0316610255565b6102766104203660046121bf565b610fa1565b61043861043336600461217a565b61101a565b604080519788526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e001610269565b6102d561047d3660046121e3565b611116565b600c54610276565b6102d56104983660046121e3565b611475565b61027660075481565b6102d56104b43660046121a6565b611683565b61027661175d565b600254610255906001600160a01b031681565b61027660085481565b61027660045481565b6102d56104f43660046121bf565b6117a8565b6102d56105073660046121bf565b6117fe565b600061052560065460055461187490919063ffffffff16565b905090565b60006105368383611874565b90505b92915050565b6001600160a01b0382166000908152600d6020526040812080548390811061056957610569612218565b600091825260209091206007909102016006015460ff169392505050565b61058f611880565b336000908152600d602052604090205481106105eb5760405162461bcd60e51b8152602060048201526016602482015275131bd8dac81a5908191bd95cc81b9bdd08195e1a5cdd60521b60448201526064015b60405180910390fd5b6105f5338261053f565b156106125760405162461bcd60e51b81526004016105e29061222e565b61061c3382610820565b6106685760405162461bcd60e51b815260206004820181905260248201527f43616e74207769746864726177206265666f726520756e6c6f636b2074696d6560448201526064016105e2565b61067233826118d9565b336000908152600d6020526040812080548390811061069357610693612218565b60009182526020918290206040805160e081018252600790930290910180548084526001820154948401949094526002810154918301919091526003810154606083015260048101546080830152600581015460a08301526006015460ff16151560c082015291506107405760405162461bcd60e51b81526020600482015260166024820152754c6f636b20706f736974696f6e20697320656d70747960501b60448201526064016105e2565b336000908152600d602052604090208054600191908490811061076557610765612218565b60009182526020909120600790910201600601805460ff19169115159190911790556060810151600c546107989161199a565b600c558051600b546107a99161199a565b600b5580516003546107c8916001600160a01b039091169033906119a6565b8051604080519182526020820184905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6910160405180910390a26108128160a00151611a09565b5061081d6001600055565b50565b6001600160a01b0382166000908152600d6020526040812080548390811061084a5761084a612218565b906000526020600020906007020160020154421015905092915050565b61086f611a5e565b61087a6000806118d9565b600454421061089957600654610891908290611abe565b6005556108e2565b6004546000906108a9904261199a565b905060006108c26005548361187490919063ffffffff16565b6006549091506108dc906108d68584611aca565b90611abe565b60055550505b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561092b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094f919061225e565b905061096660065482611abe90919063ffffffff16565b60055411156109b75760405162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f2068696768000000000000000060448201526064016105e2565b4260078190556006546109ca9190611aca565b6004556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a15050565b6001600160a01b0382166000908152600d60205260408120548210610a3c5760405162461bcd60e51b81526004016105e290612277565b6001600160a01b0383166000908152600d60205260408120805484908110610a6657610a66612218565b60009182526020918290206040805160e08101825260079093029091018054835260018101549383019390935260028301549082015260038201546060820152600482015460808201819052600583015460a0830181905260069093015460ff16151560c0830152909250610b0b9190610b0590670de0b6b3a7640000906108d690610afa90610af461175d565b9061199a565b606087015190611874565b90611aca565b949350505050565b610b1b611ad6565b610b23611a5e565b610b2b611b1f565b565b610b35611880565b336000908152600d60205260409020548110610b8c5760405162461bcd60e51b8152602060048201526016602482015275131bd8dac81a5908191bd95cc81b9bdd08195e1a5cdd60521b60448201526064016105e2565b610b96338261053f565b15610bb35760405162461bcd60e51b81526004016105e29061222e565b610bbd3382610820565b15610c285760405162461bcd60e51b815260206004820152603560248201527f556e6c6f636b2074696d6520686173207061737365642c20757365207374616e60448201527419185c99081dda5d1a191c985dc81a5b9cdd195859605a1b60648201526084016105e2565b610c3233826118d9565b336000908152600d60205260408120805483908110610c5357610c53612218565b60009182526020918290206040805160e081018252600790930290910180548084526001820154948401949094526002810154918301919091526003810154606083015260048101546080830152600581015460a08301526006015460ff16151560c08201529150610d005760405162461bcd60e51b81526020600482015260166024820152754c6f636b20706f736974696f6e20697320656d70747960501b60448201526064016105e2565b336000908152600d6020526040902080546001919084908110610d2557610d25612218565b60009182526020909120600790910201600601805460ff19169115159190911790556060810151600c54610d589161199a565b600c558051600b54610d699161199a565b600b558051600354610d88916001600160a01b039091169033906119a6565b8051604080519182526020820184905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6910160405180910390a26108128160a0015182602001518360400151611b71565b610de4611a5e565b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f94d8f59b90096192f8d501ca986985a084a5f94a6d12871e36e501735b75126f906020015b60405180910390a150565b60008060005b6001600160a01b0384166000908152600d6020526040902054811015610e9657610e69848261053f565b610e8457610e778482610a05565b610e8190836122c4565b91505b80610e8e816122d7565b915050610e3f565b5092915050565b610ea5611a5e565b610b2b6000611c1f565b60006004544210610ec1575060045490565b504290565b610ece611c79565b610ed6611a5e565b610b2b611cbf565b610ee6611a5e565b6003546001600160a01b0390811690831603610f4e5760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b60648201526084016105e2565b610f626001600160a01b03831633836119a6565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2891016109f9565b6001600160a01b0381166000908152600d60205260408120548190815b8181101561101157610fd08582610820565b8015610fe35750610fe1858261053f565b155b15610fff57610ff28582610a05565b610ffc90846122c4565b92505b80611009816122d7565b915050610fbe565b50909392505050565b6001600160a01b0382166000908152600d6020526040812054819081908190819081908190881061105d5760405162461bcd60e51b81526004016105e290612277565b6001600160a01b0389166000908152600d6020526040812080548a90811061108757611087612218565b60009182526020918290206040805160e0810182526007909302909101805480845260018201549484018590526002820154928401839052600382015460608501819052600483015460808601819052600584015460a0870181905260069094015460ff16151560c0909601869052919d50949b50919950929750955090935091505092959891949750929550565b61111e611880565b611126611c79565b6001600160a01b0383166111775760405162461bcd60e51b8152602060048201526018602482015277557365722063616e6e6f742062652030206164647265737360401b60448201526064016105e2565b600082116111b85760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016105e2565b6201518081101580156111ce5750621275008111155b61121a5760405162461bcd60e51b815260206004820152601a60248201527f4c6f636b206475726174696f6e206e6f7420696e2072616e676500000000000060448201526064016105e2565b60006112264283611aca565b90506004548111156112885760405162461bcd60e51b815260206004820152602560248201527f4c6f636b206d75737420656e64206265666f726520706f6f6c2066696e6973686044820152642074696d6560d81b60648201526084016105e2565b6001600160a01b0384166000818152600d60208181526040808420815160e081018352858152808401898152928101888152606082018781526080830188815260a0840189815260c085018a8152865460018082018955888d528a8d20975160079092029097019081559751888701559351600288015591516003870155516004860155516005850155516006909301805460ff1916931515939093179092559484529190529154909161133b916122f0565b905061134785826118d9565b6000611353858561052a565b6001600160a01b0387166000908152600d60205260409020805491925082918490811061138257611382612218565b90600052602060002090600702016003018190555084600d6000886001600160a01b03166001600160a01b0316815260200190815260200160002083815481106113ce576113ce612218565b6000918252602090912060079091020155600c546113ec9082611aca565b600c55600b546113fc9086611aca565b600b55600354611417906001600160a01b0316333088611cfa565b60408051868152602081018690529081018390526001600160a01b038716907fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed9060600160405180910390a25050506114706001600055565b505050565b61147d611880565b611485611c79565b6001600160a01b0383166114d65760405162461bcd60e51b8152602060048201526018602482015277557365722063616e6e6f742062652030206164647265737360401b60448201526064016105e2565b600081116115175760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016105e2565b6001600160a01b0383166000908152600d6020526040902054821061154e5760405162461bcd60e51b81526004016105e290612277565b611558838361053f565b156115755760405162461bcd60e51b81526004016105e29061222e565b61157f83836118d9565b6001600160a01b0383166000908152600d602052604081208054849081106115a9576115a9612218565b9060005260206000209060070201905060006115c983836001015461052a565b82549091506115d89084611aca565b825560038201546115e99082611aca565b6003830155600b546115fb9084611aca565b600b55600c5461160b9082611aca565b600c55600354611626906001600160a01b0316333086611cfa565b600182015460408051858152602081019290925281018590526001600160a01b038616907fb4caaf29adda3eefee3ad552a8e85058589bf834c7466cae4ee58787f70589ed9060600160405180910390a250506114706001600055565b61168b611a5e565b60045442116117285760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e67207468652064757260648201527f6174696f6e20666f7220746865206e657720706572696f640000000000000000608482015260a4016105e2565b60068190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d390602001610e2e565b6000600c54600003611770575060085490565b61052561179f600c546108d6670de0b6b3a7640000611799600554611799600754610af4610eaf565b90611874565b60085490611aca565b6117b0611a5e565b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef390602001610e2e565b611806611a5e565b6001600160a01b03811661186b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e2565b61081d81611c1f565b60006105368284612303565b6002600054036118d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e2565b6002600055565b6118e161175d565b6008556118ec610eaf565b6007556001600160a01b03821615611996576119088282610a05565b6001600160a01b0383166000908152600d6020526040902080548390811061193257611932612218565b906000526020600020906007020160050181905550600854600d6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061198057611980612218565b9060005260206000209060070201600401819055505b5050565b600061053682846122f0565b6040516001600160a01b03831660248201526044810182905261147090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d38565b801561081d57600254611a26906001600160a01b031633836119a6565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a250565b6001546001600160a01b03610100909104163314610b2b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e2565b6000610536828461231a565b600061053682846122c4565b60015460ff16610b2b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e2565b611b27611ad6565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b8215611470576000611b9b836108d6611b94611b8d868461199a565b429061199a565b8790611874565b9050611bad60646108d6836019611874565b90508015611bcc57600254611bcc906001600160a01b031633836119a6565b6000611bd8858361199a565b9050611be381611e0d565b60405182815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25050505050565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff1615610b2b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e2565b611cc7611c79565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833611b54565b6040516001600160a01b0380851660248301528316604482015260648101829052611d329085906323b872dd60e01b906084016119d2565b50505050565b6000611d8d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120209092919063ffffffff16565b9050805160001480611dae575080806020019051810190611dae919061233c565b6114705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e2565b6000611e1a826002611abe565b90508015611e3f57600a54600254611e3f916001600160a01b039182169116836119a6565b6000611e4b838361199a565b90506000611e5a826002611abe565b90508015611e7f57600954600254611e7f916001600160a01b039182169116836119a6565b6000611e8b838361199a565b90508015612019576040805160028082526060820183526001926000929190602083019080368337505060025482519293506001600160a01b031691839150600090611ed957611ed9612218565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f569190612374565b81600181518110611f6957611f69612218565b6001600160a01b03909216602092830291909101909101526000611f8f4261012c6122c4565b600e546009546040516318cbafe560e01b81529293506001600160a01b03918216926318cbafe592611fcd9289928992899216908890600401612391565b6000604051808303816000875af1158015611fec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120149190810190612402565b505050505b5050505050565b6060610b0b848460008585600080866001600160a01b0316858760405161204791906124e4565b60006040518083038185875af1925050503d8060008114612084576040519150601f19603f3d011682016040523d82523d6000602084013e612089565b606091505b509150915061209a878383876120a5565b979650505050505050565b6060831561211457825160000361210d576001600160a01b0385163b61210d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e2565b5081610b0b565b610b0b83838151156121295781518083602001fd5b8060405162461bcd60e51b81526004016105e29190612500565b6000806040838503121561215657600080fd5b50508035926020909101359150565b6001600160a01b038116811461081d57600080fd5b6000806040838503121561218d57600080fd5b823561219881612165565b946020939093013593505050565b6000602082840312156121b857600080fd5b5035919050565b6000602082840312156121d157600080fd5b81356121dc81612165565b9392505050565b6000806000606084860312156121f857600080fd5b833561220381612165565b95602085013595506040909401359392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252601690820152752637b1b59030b63932b0b23c903bb4ba34323930bbb760511b604082015260600190565b60006020828403121561227057600080fd5b5051919050565b60208082526019908201527f4c6f636b20696e64657820646f6573206e6f7420657869737400000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610539576105396122ae565b6000600182016122e9576122e96122ae565b5060010190565b81810381811115610539576105396122ae565b8082028115828204841417610539576105396122ae565b60008261233757634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561234e57600080fd5b815180151581146121dc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60006020828403121561238657600080fd5b81516121dc81612165565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156123e15784516001600160a01b0316835293830193918301916001016123bc565b50506001600160a01b03969096166060850152505050608001529392505050565b6000602080838503121561241557600080fd5b825167ffffffffffffffff8082111561242d57600080fd5b818501915085601f83011261244157600080fd5b8151818111156124535761245361235e565b8060051b604051601f19603f830116810181811085821117156124785761247861235e565b60405291825284820192508381018501918883111561249657600080fd5b938501935b828510156124b45784518452938501939285019261249b565b98975050505050505050565b60005b838110156124db5781810151838201526020016124c3565b50506000910152565b600082516124f68184602087016124c0565b9190910192915050565b602081526000825180602084015261251f8160408501602087016124c0565b601f01601f1916919091016040019291505056fea2646970667358221220b08df7bee6faf858913bd8ae18a68aed7428e92b1a7d951be2dbe7cc1aa6740e64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b7bda6a89e724f63572ce68fddc1a6d1d5d24bcf000000000000000000000000b7bda6a89e724f63572ce68fddc1a6d1d5d24bcf0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000ff909175f7211f5361ba9445881e590a16d536b20000000000000000000000001fa55f652f647f5320c6c26c969b15faad075a9e
-----Decoded View---------------
Arg [0] : _rewardsToken (address): 0xB7BDa6a89e724f63572Ce68FdDc1a6d1d5D24BCf
Arg [1] : _stakingToken (address): 0xB7BDa6a89e724f63572Ce68FdDc1a6d1d5D24BCf
Arg [2] : _router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [3] : _treasury (address): 0xfF909175F7211F5361bA9445881E590A16D536b2
Arg [4] : _secondaryPool (address): 0x1fa55F652f647F5320c6C26c969b15fAAd075a9E
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000b7bda6a89e724f63572ce68fddc1a6d1d5d24bcf
Arg [1] : 000000000000000000000000b7bda6a89e724f63572ce68fddc1a6d1d5d24bcf
Arg [2] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [3] : 000000000000000000000000ff909175f7211f5361ba9445881e590a16d536b2
Arg [4] : 0000000000000000000000001fa55f652f647f5320c6c26c969b15faad075a9e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.