ETH Price: $3,322.55 (-1.98%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake215216522024-12-31 9:46:3525 hrs ago1735638395IN
0xCDd52b21...D516a94b8
0 ETH0.0012239513.00386937
Stake215184472024-12-30 23:02:2335 hrs ago1735599743IN
0xCDd52b21...D516a94b8
0 ETH0.0015375910.93427161
Stake215169702024-12-30 18:05:3540 hrs ago1735581935IN
0xCDd52b21...D516a94b8
0 ETH0.0018090912.43928722
Claim Rewards215134562024-12-30 6:18:592 days ago1735539539IN
0xCDd52b21...D516a94b8
0 ETH0.000224972.98505695
Stake215085512024-12-29 13:53:232 days ago1735480403IN
0xCDd52b21...D516a94b8
0 ETH0.000474155.30912636
Claim Rewards215085432024-12-29 13:51:472 days ago1735480307IN
0xCDd52b21...D516a94b8
0 ETH0.000400195.30990201
Stake215069162024-12-29 8:24:593 days ago1735460699IN
0xCDd52b21...D516a94b8
0 ETH0.000410152.91694836
Unstake215033462024-12-28 20:27:473 days ago1735417667IN
0xCDd52b21...D516a94b8
0 ETH0.000413395.47234663
Claim Rewards215033432024-12-28 20:27:113 days ago1735417631IN
0xCDd52b21...D516a94b8
0 ETH0.000401085.32167338
Stake215013542024-12-28 13:46:593 days ago1735393619IN
0xCDd52b21...D516a94b8
0 ETH0.000605936.78376277
Stake214932812024-12-27 10:45:235 days ago1735296323IN
0xCDd52b21...D516a94b8
0 ETH0.000508075.68809133
Stake214929612024-12-27 9:40:595 days ago1735292459IN
0xCDd52b21...D516a94b8
0 ETH0.000926516.58922516
Stake214870312024-12-26 13:47:115 days ago1735220831IN
0xCDd52b21...D516a94b8
0 ETH0.000751518.41352092
Stake214819562024-12-25 20:44:596 days ago1735159499IN
0xCDd52b21...D516a94b8
0 ETH0.000479075.36343344
Stake214819312024-12-25 20:39:596 days ago1735159199IN
0xCDd52b21...D516a94b8
0 ETH0.000511225.72334705
Stake214798042024-12-25 13:31:476 days ago1735133507IN
0xCDd52b21...D516a94b8
0 ETH0.000789295.42763882
Unstake214797932024-12-25 13:29:356 days ago1735133375IN
0xCDd52b21...D516a94b8
0 ETH0.000417385.52519261
Claim Rewards214690962024-12-24 1:37:118 days ago1735004231IN
0xCDd52b21...D516a94b8
0 ETH0.000577137.65756501
Claim Rewards214650422024-12-23 11:59:238 days ago1734955163IN
0xCDd52b21...D516a94b8
0 ETH0.000474436.29494101
Claim Rewards214650372024-12-23 11:58:238 days ago1734955103IN
0xCDd52b21...D516a94b8
0 ETH0.000493026.54155794
Stake214572802024-12-22 9:56:1110 days ago1734861371IN
0xCDd52b21...D516a94b8
0 ETH0.000862556.13436005
Stake214183742024-12-16 23:28:5915 days ago1734391739IN
0xCDd52b21...D516a94b8
0 ETH0.0011569212.95060021
Claim Rewards214133712024-12-16 6:45:1116 days ago1734331511IN
0xCDd52b21...D516a94b8
0 ETH0.000638748.47505104
Stake214059332024-12-15 5:48:4717 days ago1734241727IN
0xCDd52b21...D516a94b8
0 ETH0.000915356.50987331
Stake214035652024-12-14 21:53:3517 days ago1734213215IN
0xCDd52b21...D516a94b8
0 ETH0.000780678.74001376
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Staking

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 15000 runs

Other Settings:
paris EvmVersion
File 1 of 13 : Staking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

using SafeERC20 for IERC20;

// Struct to hold user data
struct UserData {
	uint256 lockStart;       // The time when the user last staked
	int256 lockRemaining;    // The time remaining before unlock
	uint256 balance;         // The balance of staked tokens
	uint256 rewards;         // The balance of rewards
}

contract Staking is Ownable, Pausable, ReentrancyGuard {
	
	// Keep the normalized balance of stake tokens for a user
	mapping(address => uint256) public userBalance;
	
	// Keep the initial balance of stake tokens for a user
	mapping(address => uint256) public userBalanceInitial;
	
	// Keep the time of staking for a user
	mapping(address => uint256) public userLock;
	
	// Address of the vault to hold reward tokens
	address public immutable vault;
	
	// Address of the token to be staked
	IERC20 public immutable token;
	
	// Total amount of tokens staked
	uint256 public totalStaked;
	
	// APY of the rewards (in percentage ex. 20)
	uint16 public apy;
	
	// Lock time (in seconds)
	uint256 public lock;
	
	// Global compound index for calculating compound interest
	uint256 public compoundIndex;
	
	// Last update time for the compound index
	uint256 public lastUpdateTime;

    // compoundIndex precision
	uint256 constant ONE = 1e18;

	// number representing 100% in apy calculations
	uint256 constant APY_ONE = 100;

	// seconds in a year: 365 * 24 * 60 * 60
	uint256 constant YEAR = 31536000;
	
	// Events
	event Stake(address indexed user, uint256 amount);
	event Unstake(address indexed user, uint256 amount);
	event Claim(address indexed user, uint256 amount);
	event Withdraw(address indexed vault, uint256 amount);
	event ApySet(uint256 apy);
	event LockSet(uint256 lock);
	
	constructor(IERC20 _token, address _owner, address _vault, uint16 _apy, uint256 _lock) Ownable(_owner) {
		token = _token;
		apy = _apy;
		lock = _lock;
		vault = _vault;
		compoundIndex = ONE;  // Initialize to 1.0 (scaled by 1e18 for precision)
		lastUpdateTime = block.timestamp;

		emit ApySet(_apy);
		emit LockSet(_lock);
	}
	
	/*
	* Internal function to update the compound index based on the elapsed time
	* @params _amount The amount to stake (in wei)
    */
	function stake(uint256 _amount) external nonReentrant whenNotPaused {
		require(_amount > 0, "Cannot stake 0 tokens");
		require(_amount <= token.balanceOf(msg.sender), "No fund available");
		
		// Update the compound index
		updateIndex();
		
		// Transfer the tokens from the user to the contract
		token.safeTransferFrom(msg.sender, address(this), _amount);
		
		// Calculate the adjusted amount based on the current compound index
		uint256 adjustedAmount = (_amount * ONE) / compoundIndex;
		
		// Update the user
		userBalance[msg.sender] += adjustedAmount;
		userBalanceInitial[msg.sender] += _amount;
		userLock[msg.sender] = block.timestamp;
		
		totalStaked += _amount;
		
		emit Stake(msg.sender, _amount);
	}
	
	/*
	* Function to unstake
    */
	function unstake() external nonReentrant whenNotPaused {
		uint256 _amount = userBalanceInitial[msg.sender];
		
		require(_amount > 0, "Cannot unstake 0 tokens");
		require(block.timestamp - userLock[msg.sender] >= lock, "Tokens are locked");
		
		// Update the compound index
		updateIndex();
		
		// Calculate rewards
		uint256 userCompoundBalance = (userBalance[msg.sender] * compoundIndex) / ONE;
		uint256 rewards = userCompoundBalance - _amount;
		
		// Transfer the total amount back to the user
		require(token.balanceOf(address(this)) - totalStaked >= rewards, "No fund available");
		token.safeTransfer(msg.sender, userCompoundBalance);
		
		// Update the user
		delete userBalance[msg.sender];
		delete userBalanceInitial[msg.sender];
		delete userLock[msg.sender];

		totalStaked -= _amount;
		
		emit Unstake(msg.sender, _amount);
		emit Claim(msg.sender, rewards);
	}
	
	/*
	* Function to claim rewards
	*/
	function claimRewards() external nonReentrant whenNotPaused {
		uint256 userStakedAmount = userBalanceInitial[msg.sender];
		require(userStakedAmount > 0, "No tokens staked");
		
		// Update the compound index
		updateIndex();
		
		// Calculate the rewards
		uint256 userCompoundBalance = (userBalance[msg.sender] * compoundIndex) / ONE;
		uint256 rewards = userCompoundBalance - userStakedAmount;
		
		require(rewards > 0, "No rewards available");
		require(token.balanceOf(address(this)) - totalStaked >= rewards, "No fund available");
		
		// Transfer the rewards to the user
		token.safeTransfer(msg.sender, rewards);
		
		// Update the balance
		userBalance[msg.sender] = userStakedAmount * ONE / compoundIndex;
		
		emit Claim(msg.sender, rewards);
	}
	
	/*
	* Function to check the balance of a user
	* @params _user Address of the user to check
	*/
	function balanceOf(address _user) public view returns (UserData memory) {
		int256 remaining = int256(userLock[_user] + lock) - int256(block.timestamp);
		
		UserData memory data;
		
		data.lockStart = userLock[_user];
		data.lockRemaining = remaining;
		data.balance = userBalanceInitial[msg.sender];
		data.rewards = pendingRewards(_user);
		
		return data;
	}
	
	// HELPERS
	
	/*
	* Internal function to update the compound index based on the elapsed time
    */
	function updateIndex() internal {
		if (block.timestamp > lastUpdateTime) {
			compoundIndex = calculateUpdatedIndex();
			lastUpdateTime = block.timestamp;
		}
	}
	
	/*
	* Internal function to calculate the pending rewards of a user
	* @param _user user to calculate rewards for
    */
	function pendingRewards(address _user) internal view returns (uint256) {
		uint256 userStakedAmount = userBalanceInitial[_user];
		if (userStakedAmount == 0) return 0;

		uint256 currentCompoundIndex = calculateUpdatedIndex();		
		uint256 userCompoundBalance = (userBalance[_user] * currentCompoundIndex) / ONE;
		uint256 rewards = userCompoundBalance - userStakedAmount;
		
		return rewards;
	}

	function calculateUpdatedIndex() internal view returns (uint256 indexUpdated) {
		uint256 timeElapsed = block.timestamp - lastUpdateTime;
		uint256 _compoundIndex = compoundIndex;
		indexUpdated = _compoundIndex + _compoundIndex * uint256(apy) * timeElapsed / (APY_ONE * YEAR);
	}
	
	// ADMIN
	
	/*
	* Function to withdraw rewards
	* Only the fund added for the rewards can be withdrawn.
	*/
	function withdraw() external onlyOwner {
		require(token.balanceOf(address(this)) - totalStaked > 0, "No rewards to withdraw");
		
		uint256 balance = token.balanceOf(address(this)) - totalStaked;
		token.safeTransfer(vault, balance);
		
		emit Withdraw(vault, balance);
	}
	
	/*
	* Function to set the APY
	* @params _apy The new apy. Effective immediately. in percent, like 20 (meaning 20%)
	*/
	function setApy(uint16 _apy) external onlyOwner {
		updateIndex();
		apy = _apy;
		
		emit ApySet(_apy);
	}
	
	/*
	* Function to set lock period
	* @params _lock The new lock period (in seconds). Effective immediately. 1 day = 86 400 seconds
	*/
	function setLock(uint256 _lock) external onlyOwner {
		lock = _lock;
		
		emit LockSet(_lock);
	}
	
	/*
	* Function to pause the staking
	*/
	function pause() external onlyOwner {
		require(!paused(), "Staking is already paused");
		_pause();
	}
	
	/*
	* Function to unpause the staking
	*/
	function unpause() external onlyOwner {
		require(paused(), "Staking is not paused");
		_unpause();
	}
}

File 2 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

File 3 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * 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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // 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;
    }
}

File 4 of 13 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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 {
    bool private _paused;

    /**
     * @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);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @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 {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @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());
    }
}

File 5 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 6 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 7 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert Errors.InsufficientBalance(address(this).balance, amount);
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

File 8 of 13 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 9 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

File 10 of 13 : Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

File 11 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 12 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 13 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 15000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [],
  "evmVersion": "paris"
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint16","name":"_apy","type":"uint16"},{"internalType":"uint256","name":"_lock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"apy","type":"uint256"}],"name":"ApySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lock","type":"uint256"}],"name":"LockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","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"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"apy","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"components":[{"internalType":"uint256","name":"lockStart","type":"uint256"},{"internalType":"int256","name":"lockRemaining","type":"int256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"}],"internalType":"struct UserData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_apy","type":"uint16"}],"name":"setApy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lock","type":"uint256"}],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBalanceInitial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162001c5838038062001c58833981016040819052620000349162000198565b836001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f816200012f565b506000805460ff60a01b19169055600180556001600160a01b0385811660a0526006805461ffff191661ffff85169081179091556007839055908416608052670de0b6b3a7640000600855426009556040519081527feb96c2afe223f01218957822de6a706141023973470929f7cdff34537ac436949060200160405180910390a16040518181527fc96ac8f962bbb0ee952304839108c72982a49173fa73e62ede62c943e10f57429060200160405180910390a1505050505062000212565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200019557600080fd5b50565b600080600080600060a08688031215620001b157600080fd5b8551620001be816200017f565b6020870151909550620001d1816200017f565b6040870151909450620001e4816200017f565b606087015190935061ffff81168114620001fd57600080fd5b80925050608086015190509295509295909350565b60805160a0516119d362000285600039600081816103a70152818161056e01528181610665015281816108ca015281816109c101528181610a9f01528181610bc501528181610c560152818161105b015261116601526000818161038001528181610c780152610c9f01526119d36000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c8063817b1cd2116100e3578063c8f33c911161008c578063f83d08ba11610066578063f83d08ba14610372578063fbfa77cf1461037b578063fc0c546a146103a257600080fd5b8063c8f33c9114610343578063d3e157471461034c578063f2fde38b1461035f57600080fd5b8063a3f21105116100bd578063a3f21105146102fd578063a694fc3a14610310578063b4b69cba1461032357600080fd5b8063817b1cd2146102ad5780638456cb59146102b65780638da5cb5b146102be57600080fd5b80633f4ba83a116101455780635c975abb1161011f5780635c975abb1461023157806370a082311461025f578063715018a6146102a557600080fd5b80633f4ba83a146102005780634277766a146102085780635617a6e81461021157600080fd5b8063372500ab11610176578063372500ab146101cf5780633bcfc4b8146101d75780633ccfd60b146101f857600080fd5b80630103c92b146101925780632def6620146101c5575b600080fd5b6101b26101a0366004611836565b60026020526000908152604090205481565b6040519081526020015b60405180910390f35b6101cd6103c9565b005b6101cd610745565b6006546101e59061ffff1681565b60405161ffff90911681526020016101bc565b6101cd610a4d565b6101cd610d10565b6101b260085481565b6101b261021f366004611836565b60046020526000908152604090205481565b60005474010000000000000000000000000000000000000000900460ff1660405190151581526020016101bc565b61027261026d366004611836565b610da4565b6040516101bc91908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6101cd610e94565b6101b260055481565b6101cd610ea6565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bc565b6101cd61030b366004611873565b610f3b565b6101cd61031e366004611897565b610fb3565b6101b2610331366004611836565b60036020526000908152604090205481565b6101b260095481565b6101cd61035a366004611897565b611268565b6101cd61036d366004611836565b6112a5565b6101b260075481565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6103d1611306565b6103d9611349565b3360009081526003602052604090205480610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f7420756e7374616b65203020746f6b656e7300000000000000000060448201526064015b60405180910390fd5b6007543360009081526004602052604090205461047290426118df565b10156104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f546f6b656e7320617265206c6f636b6564000000000000000000000000000000604482015260640161044c565b6104e261139e565b600854336000908152600260205260408120549091670de0b6b3a76400009161050b91906118f8565b610515919061190f565b9050600061052383836118df565b6005546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152919250829173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d9919061194a565b6105e391906118df565b101561064b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c65000000000000000000000000000000604482015260640161044c565b61068c73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633846113b9565b3360009081526002602090815260408083208390556003825280832083905560049091528120819055600580548592906106c79084906118df565b909155505060405183815233907f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd9060200160405180910390a260405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a250505061074360018055565b565b61074d611306565b610755611349565b33600090815260036020526040902054806107cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f20746f6b656e73207374616b656400000000000000000000000000000000604482015260640161044c565b6107d461139e565b600854336000908152600260205260408120549091670de0b6b3a7640000916107fd91906118f8565b610807919061190f565b9050600061081583836118df565b905060008111610881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207265776172647320617661696c61626c65000000000000000000000000604482015260640161044c565b6005546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015282919073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610911573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610935919061194a565b61093f91906118df565b10156109a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c65000000000000000000000000000000604482015260640161044c565b6109e873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633836113b9565b6008546109fd670de0b6b3a7640000856118f8565b610a07919061190f565b33600081815260026020526040908190209290925590517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49061072f9084815260200190565b610a5561143f565b6005546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000919073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a919061194a565b610b1491906118df565b11610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f207265776172647320746f20776974686472617700000000000000000000604482015260640161044c565b6005546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000919073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610c0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c30919061194a565b610c3a91906118df565b9050610c9d73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836113b9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436482604051610d0591815260200190565b60405180910390a250565b610d1861143f565b60005474010000000000000000000000000000000000000000900460ff16610d9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5374616b696e67206973206e6f74207061757365640000000000000000000000604482015260640161044c565b610743611492565b610dcf6040518060800160405280600081526020016000815260200160008152602001600081525090565b60075473ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604081205490914291610e069190611963565b610e109190611976565b9050610e3d6040518060800160405280600081526020016000815260200160008152602001600081525090565b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083205484528382018590523383526003909152908190205490820152610e888461150f565b60608201529392505050565b610e9c61143f565b61074360006115b0565b610eae61143f565b60005474010000000000000000000000000000000000000000900460ff1615610f33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5374616b696e6720697320616c72656164792070617573656400000000000000604482015260640161044c565b610743611625565b610f4361143f565b610f4b61139e565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff83169081179091556040519081527feb96c2afe223f01218957822de6a706141023973470929f7cdff34537ac43694906020015b60405180910390a150565b610fbb611306565b610fc3611349565b6000811161102d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f43616e6e6f74207374616b65203020746f6b656e730000000000000000000000604482015260640161044c565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156110b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110db919061194a565b811115611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c65000000000000000000000000000000604482015260640161044c565b61114c61139e565b61118e73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084611694565b6008546000906111a6670de0b6b3a7640000846118f8565b6111b0919061190f565b336000908152600260205260408120805492935083929091906111d4908490611963565b909155505033600090815260036020526040812080548492906111f8908490611963565b909155505033600090815260046020526040812042905560058054849290611221908490611963565b909155505060405182815233907febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a9060200160405180910390a25061126560018055565b50565b61127061143f565b60078190556040518181527fc96ac8f962bbb0ee952304839108c72982a49173fa73e62ede62c943e10f574290602001610fa8565b6112ad61143f565b73ffffffffffffffffffffffffffffffffffffffff81166112fd576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161044c565b611265816115b0565b600260015403611342576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600155565b60005474010000000000000000000000000000000000000000900460ff1615610743576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954421115610743576113b06116e0565b60085542600955565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261143a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061173e565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610743576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161044c565b61149a6117e2565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600360205260408120548082036115455750600092915050565b600061154f6116e0565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602052604081205491925090670de0b6b3a76400009061158e9084906118f8565b611598919061190f565b905060006115a684836118df565b9695505050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61162d611349565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114e53390565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526116da9186918216906323b872dd906084016113f3565b50505050565b600080600954426116f191906118df565b6008549091506117066301e1338060646118f8565b60065483906117199061ffff16846118f8565b61172391906118f8565b61172d919061190f565b6117379082611963565b9250505090565b600080602060008451602086016000885af180611761576040513d6000823e3d81fd5b50506000513d91508115611779578060011415611793565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156116da576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161044c565b60005474010000000000000000000000000000000000000000900460ff16610743576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006020828403121561184857600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461186c57600080fd5b9392505050565b60006020828403121561188557600080fd5b813561ffff8116811461186c57600080fd5b6000602082840312156118a957600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156118f2576118f26118b0565b92915050565b80820281158282048414176118f2576118f26118b0565b600082611945577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561195c57600080fd5b5051919050565b808201808211156118f2576118f26118b0565b8181036000831280158383131683831282161715611996576119966118b0565b509291505056fea2646970667358221220db1c23cfc97e4e71b7744fe687636a37d3056cffec559d8e72917605efc56b0564736f6c634300081500330000000000000000000000004c04897259d015452e4f3fd55c58052e5401b673000000000000000000000000667e099a7843f1507463b4db6ca3ea07bec857e00000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18800000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000278d00

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018d5760003560e01c8063817b1cd2116100e3578063c8f33c911161008c578063f83d08ba11610066578063f83d08ba14610372578063fbfa77cf1461037b578063fc0c546a146103a257600080fd5b8063c8f33c9114610343578063d3e157471461034c578063f2fde38b1461035f57600080fd5b8063a3f21105116100bd578063a3f21105146102fd578063a694fc3a14610310578063b4b69cba1461032357600080fd5b8063817b1cd2146102ad5780638456cb59146102b65780638da5cb5b146102be57600080fd5b80633f4ba83a116101455780635c975abb1161011f5780635c975abb1461023157806370a082311461025f578063715018a6146102a557600080fd5b80633f4ba83a146102005780634277766a146102085780635617a6e81461021157600080fd5b8063372500ab11610176578063372500ab146101cf5780633bcfc4b8146101d75780633ccfd60b146101f857600080fd5b80630103c92b146101925780632def6620146101c5575b600080fd5b6101b26101a0366004611836565b60026020526000908152604090205481565b6040519081526020015b60405180910390f35b6101cd6103c9565b005b6101cd610745565b6006546101e59061ffff1681565b60405161ffff90911681526020016101bc565b6101cd610a4d565b6101cd610d10565b6101b260085481565b6101b261021f366004611836565b60046020526000908152604090205481565b60005474010000000000000000000000000000000000000000900460ff1660405190151581526020016101bc565b61027261026d366004611836565b610da4565b6040516101bc91908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6101cd610e94565b6101b260055481565b6101cd610ea6565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bc565b6101cd61030b366004611873565b610f3b565b6101cd61031e366004611897565b610fb3565b6101b2610331366004611836565b60036020526000908152604090205481565b6101b260095481565b6101cd61035a366004611897565b611268565b6101cd61036d366004611836565b6112a5565b6101b260075481565b6102d87f0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18881565b6102d87f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67381565b6103d1611306565b6103d9611349565b3360009081526003602052604090205480610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f7420756e7374616b65203020746f6b656e7300000000000000000060448201526064015b60405180910390fd5b6007543360009081526004602052604090205461047290426118df565b10156104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f546f6b656e7320617265206c6f636b6564000000000000000000000000000000604482015260640161044c565b6104e261139e565b600854336000908152600260205260408120549091670de0b6b3a76400009161050b91906118f8565b610515919061190f565b9050600061052383836118df565b6005546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152919250829173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67316906370a0823190602401602060405180830381865afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d9919061194a565b6105e391906118df565b101561064b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c65000000000000000000000000000000604482015260640161044c565b61068c73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b6731633846113b9565b3360009081526002602090815260408083208390556003825280832083905560049091528120819055600580548592906106c79084906118df565b909155505060405183815233907f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd9060200160405180910390a260405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a250505061074360018055565b565b61074d611306565b610755611349565b33600090815260036020526040902054806107cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f20746f6b656e73207374616b656400000000000000000000000000000000604482015260640161044c565b6107d461139e565b600854336000908152600260205260408120549091670de0b6b3a7640000916107fd91906118f8565b610807919061190f565b9050600061081583836118df565b905060008111610881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207265776172647320617661696c61626c65000000000000000000000000604482015260640161044c565b6005546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015282919073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67316906370a0823190602401602060405180830381865afa158015610911573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610935919061194a565b61093f91906118df565b10156109a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c65000000000000000000000000000000604482015260640161044c565b6109e873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b6731633836113b9565b6008546109fd670de0b6b3a7640000856118f8565b610a07919061190f565b33600081815260026020526040908190209290925590517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49061072f9084815260200190565b610a5561143f565b6005546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000919073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67316906370a0823190602401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a919061194a565b610b1491906118df565b11610b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f207265776172647320746f20776974686472617700000000000000000000604482015260640161044c565b6005546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000919073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67316906370a0823190602401602060405180830381865afa158015610c0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c30919061194a565b610c3a91906118df565b9050610c9d73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b673167f0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce188836113b9565b7f0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18873ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436482604051610d0591815260200190565b60405180910390a250565b610d1861143f565b60005474010000000000000000000000000000000000000000900460ff16610d9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5374616b696e67206973206e6f74207061757365640000000000000000000000604482015260640161044c565b610743611492565b610dcf6040518060800160405280600081526020016000815260200160008152602001600081525090565b60075473ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604081205490914291610e069190611963565b610e109190611976565b9050610e3d6040518060800160405280600081526020016000815260200160008152602001600081525090565b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083205484528382018590523383526003909152908190205490820152610e888461150f565b60608201529392505050565b610e9c61143f565b61074360006115b0565b610eae61143f565b60005474010000000000000000000000000000000000000000900460ff1615610f33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5374616b696e6720697320616c72656164792070617573656400000000000000604482015260640161044c565b610743611625565b610f4361143f565b610f4b61139e565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff83169081179091556040519081527feb96c2afe223f01218957822de6a706141023973470929f7cdff34537ac43694906020015b60405180910390a150565b610fbb611306565b610fc3611349565b6000811161102d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f43616e6e6f74207374616b65203020746f6b656e730000000000000000000000604482015260640161044c565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201527f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67373ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156110b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110db919061194a565b811115611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f2066756e6420617661696c61626c65000000000000000000000000000000604482015260640161044c565b61114c61139e565b61118e73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b67316333084611694565b6008546000906111a6670de0b6b3a7640000846118f8565b6111b0919061190f565b336000908152600260205260408120805492935083929091906111d4908490611963565b909155505033600090815260036020526040812080548492906111f8908490611963565b909155505033600090815260046020526040812042905560058054849290611221908490611963565b909155505060405182815233907febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a9060200160405180910390a25061126560018055565b50565b61127061143f565b60078190556040518181527fc96ac8f962bbb0ee952304839108c72982a49173fa73e62ede62c943e10f574290602001610fa8565b6112ad61143f565b73ffffffffffffffffffffffffffffffffffffffff81166112fd576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161044c565b611265816115b0565b600260015403611342576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600155565b60005474010000000000000000000000000000000000000000900460ff1615610743576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954421115610743576113b06116e0565b60085542600955565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261143a91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061173e565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610743576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161044c565b61149a6117e2565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600360205260408120548082036115455750600092915050565b600061154f6116e0565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602052604081205491925090670de0b6b3a76400009061158e9084906118f8565b611598919061190f565b905060006115a684836118df565b9695505050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61162d611349565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114e53390565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526116da9186918216906323b872dd906084016113f3565b50505050565b600080600954426116f191906118df565b6008549091506117066301e1338060646118f8565b60065483906117199061ffff16846118f8565b61172391906118f8565b61172d919061190f565b6117379082611963565b9250505090565b600080602060008451602086016000885af180611761576040513d6000823e3d81fd5b50506000513d91508115611779578060011415611793565b73ffffffffffffffffffffffffffffffffffffffff84163b155b156116da576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161044c565b60005474010000000000000000000000000000000000000000900460ff16610743576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006020828403121561184857600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461186c57600080fd5b9392505050565b60006020828403121561188557600080fd5b813561ffff8116811461186c57600080fd5b6000602082840312156118a957600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156118f2576118f26118b0565b92915050565b80820281158282048414176118f2576118f26118b0565b600082611945577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561195c57600080fd5b5051919050565b808201808211156118f2576118f26118b0565b8181036000831280158383131683831282161715611996576119966118b0565b509291505056fea2646970667358221220db1c23cfc97e4e71b7744fe687636a37d3056cffec559d8e72917605efc56b0564736f6c63430008150033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b673000000000000000000000000667e099a7843f1507463b4db6ca3ea07bec857e00000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce18800000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000278d00

-----Decoded View---------------
Arg [0] : _token (address): 0x4c04897259d015452E4F3fD55c58052E5401b673
Arg [1] : _owner (address): 0x667e099A7843f1507463b4Db6Ca3ea07bec857E0
Arg [2] : _vault (address): 0x4fBc79d384235e59574A2ebB6c721E4B939Ce188
Arg [3] : _apy (uint16): 40
Arg [4] : _lock (uint256): 2592000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000004c04897259d015452e4f3fd55c58052e5401b673
Arg [1] : 000000000000000000000000667e099a7843f1507463b4db6ca3ea07bec857e0
Arg [2] : 0000000000000000000000004fbc79d384235e59574a2ebb6c721e4b939ce188
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [4] : 0000000000000000000000000000000000000000000000000000000000278d00


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.