ETH Price: $2,410.22 (-2.89%)
Gas: 3.68 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Activate Unlock ...211146362024-11-04 13:38:5913 hrs ago1730727539IN
0x42a05787...93049ee88
0 ETH0.000242246.19484996
Activate Unlock ...211095862024-11-03 20:44:5929 hrs ago1730666699IN
0x42a05787...93049ee88
0 ETH0.000175254.481775
Activate Unlock ...211047022024-11-03 4:24:1146 hrs ago1730607851IN
0x42a05787...93049ee88
0 ETH0.000228883.12240624
Activate Unlock ...211022042024-11-02 20:00:232 days ago1730577623IN
0x42a05787...93049ee88
0 ETH0.000205715.26074903
Activate Unlock ...210940312024-11-01 16:36:113 days ago1730478971IN
0x42a05787...93049ee88
0 ETH0.0006088415.56993074
Stake210745402024-10-29 23:20:116 days ago1730244011IN
0x42a05787...93049ee88
0 ETH0.000559137.13732592
Redeem Rewards210745302024-10-29 23:18:116 days ago1730243891IN
0x42a05787...93049ee88
0 ETH0.000776517.4903625
Activate Unlock ...210734092024-10-29 19:33:116 days ago1730230391IN
0x42a05787...93049ee88
0 ETH0.0007029417.97627875
Activate Unlock ...210630702024-10-28 8:55:117 days ago1730105711IN
0x42a05787...93049ee88
0 ETH0.000280017.1607317
Activate Unlock ...210628152024-10-28 8:03:477 days ago1730102627IN
0x42a05787...93049ee88
0 ETH0.000236156.03902556
Activate Unlock ...210625592024-10-28 7:12:117 days ago1730099531IN
0x42a05787...93049ee88
0 ETH0.000242356.19772657
Stake210622752024-10-28 6:14:477 days ago1730096087IN
0x42a05787...93049ee88
0 ETH0.000470594.18210034
Stake210597702024-10-27 21:51:118 days ago1730065871IN
0x42a05787...93049ee88
0 ETH0.000712739.09668288
Activate Unlock ...210520422024-10-26 19:59:479 days ago1729972787IN
0x42a05787...93049ee88
0 ETH0.000233665.97556827
Activate Unlock ...210507932024-10-26 15:49:119 days ago1729957751IN
0x42a05787...93049ee88
0 ETH0.000460296.2792413
Activate Unlock ...210349272024-10-24 10:41:4711 days ago1729766507IN
0x42a05787...93049ee88
0 ETH0.000376529.6289116
Stake210344052024-10-24 8:56:5911 days ago1729760219IN
0x42a05787...93049ee88
0 ETH0.0009458912.07248426
Redeem Rewards210344012024-10-24 8:56:1111 days ago1729760171IN
0x42a05787...93049ee88
0 ETH0.0010725112.38908466
Withdraw210313612024-10-23 22:44:3512 days ago1729723475IN
0x42a05787...93049ee88
0 ETH0.000625336.53297155
Redeem Rewards210313532024-10-23 22:42:5912 days ago1729723379IN
0x42a05787...93049ee88
0 ETH0.000709736.84611879
Activate Unlock ...210298082024-10-23 17:33:3512 days ago1729704815IN
0x42a05787...93049ee88
0 ETH0.0007192618.39369681
Redeem Rewards210231002024-10-22 19:06:3513 days ago1729623995IN
0x42a05787...93049ee88
0 ETH0.0015577515.77014649
Withdraw210230972024-10-22 19:05:5913 days ago1729623959IN
0x42a05787...93049ee88
0 ETH0.0018480716.37549707
Stake210009832024-10-19 17:03:1116 days ago1729357391IN
0x42a05787...93049ee88
0 ETH0.0012721816.23943896
Redeem Rewards210009612024-10-19 16:58:4716 days ago1729357127IN
0x42a05787...93049ee88
0 ETH0.0016847916.25166411
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:
StakePool

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : StakePool.sol
/*
    Copyright 2021 Memento Blockchain Pte. Ltd.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    SPDX-License-Identifier: Apache License, Version 2.0
*/

pragma solidity 0.7.6;
pragma experimental "ABIEncoderV2";

import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/presets/ERC20PresetMinterPauser.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "./IRewardsManager.sol";

/**
 * @title StakePool
 * @author DEXTF Protocol
 *
 * Contract for Stake Pools that allow token holders to stake their tokens
 * in exchange for more token rewards. Staked tokens and reward tokens may
 * not neccessarily be the same tokens. StakePool.sol contract works in
 * conjunction with a RewardsManager.sol contract that holds and distributes
 * the reward tokens to stakers. Deployer and owner of the StakePool.sol
 * has to ensure that the right Rewards Manager and Staked/Reward Token
 * addresses, as well as the reward token distribution rate per block, the
 * unlock and relock time (in minutes) for withdrawal and redemption of
 * stake dand reward tokens are passed to the Stake Pool on deployment
 * accordingly.
*/

contract StakePool is ReentrancyGuard, Ownable, Pausable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */

    // Contract address for the staked tokens
    IERC20 public stakedToken;
    // Contract address for the reward tokens
    IERC20 public rewardsToken;
    // Contract address for Rewards Manager
    IRewardsManager public rewardsManager;
    // Amount of rewards to be distributed per block
    uint256 public rewardsDistributionRate;
    // Internal calculation of rewards accrued per staked token
    uint256 private rewardsPerStakedToken;
    // Block which this stake pool contract was last updated at
    uint256 private lastUpdatedAt;
    // Total amount of tokens staked in this stake pool
    uint256 public totalStaked;
    // Unlock time set for this contract (in minutes)
    uint256 public unlockTime;
    // Relock time set for this contract (in minutes)
    uint256 public relockTime;

    /* ========== CONSTANTS ========== */

    uint256 public constant SAFE_MULTIPLIER = 1e18;

    /* ========== STRUCTS ========== */

    struct UserInfo {
        // Amount of tokens staked by user
        uint256 stakedAmount;
        // Calculation for tracking rewards owed to user based on stake changes
        uint256 rewardsDebt;
        // Calculation for accrued rewards to user not yet redeemed, based on rewardsDebt
        uint256 rewardsAccrued;
        // Total rewards redeemed by user
        uint256 rewardsRedeemed;
        // Unlock time stored as block timestamp
        uint256 unlockTime;
        // Relock time stored as block timestamp
        uint256 relockTime;
    }

    /* ========== MAPPINGS ========== */

    mapping(address => UserInfo) public userInfo;

    /* ========== EVENTS ========== */

    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event ActivateUnlock(address indexed user);
    event RewardRedeemed(address indexed user, uint256 reward);

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _stakedToken,
        address _rewardsToken,
        address _rewardsManager,
        uint256 _rewardsDistributionRate,
        uint256 _unlockTime,
        uint256 _relockTime
    ) {
        stakedToken = IERC20(_stakedToken);
        rewardsToken = IERC20(_rewardsToken);
        rewardsManager = IRewardsManager(_rewardsManager);
        rewardsDistributionRate = _rewardsDistributionRate;
        unlockTime = _unlockTime;
        relockTime = _relockTime;
        rewardsPerStakedToken = 0;
        lastUpdatedAt = block.number;
    }

    /* ========== MODIFIERS ========== */

    /**
    * Modifier to check if user is allowed to withdraw or redeem tokens
    * @param _user      Address of staked user account
    */
    modifier whenNotLocked(address _user) {
        // If unlockTime == 0 it means we do not have any unlock time required
        if (unlockTime != 0) {
            require(userInfo[_user].unlockTime != 0, "Activate unlock for withdrawal and redemption window first");
            require(block.timestamp > userInfo[_user].unlockTime, "Unlock time still in progress");
            require(block.timestamp < userInfo[_user].relockTime, "Withdraw and redemption window has passed");
        }
        _;
    }

    /**
    * Modifier to update stake pool contract details. Triggered when staked tokens
    * amount changes.
    */
    modifier updatePool() {
        if (totalStaked > 0) {
            rewardsPerStakedToken = block.number.sub(lastUpdatedAt)
                                                .mul(rewardsDistributionRate)
                                                .mul(SAFE_MULTIPLIER)
                                                .div(totalStaked)
                                                .add(rewardsPerStakedToken);
        }
        lastUpdatedAt = block.number;
        _;
    }

    /* ========== VIEWS ========== */

    /**
    * Returns the amount of staked tokens of a user
    * @param _account           Address of a user
    * @return stakedAmount      Total amount staked by user
    */
    function balanceOf(address _account) external view returns (uint256) {
        return userInfo[_account].stakedAmount;
    }

    /**
    * Calculate the current rewards accrued per token staked
    * @return currentRewardsPerStakedToken      Current rewards per staked token
    */
    function currentRewardsPerStakedToken() public view returns (uint256) {
        if (totalStaked <= 0) {
          return rewardsDistributionRate;
        }

        return block.number.sub(lastUpdatedAt)
                           .mul(rewardsDistributionRate)
                           .mul(SAFE_MULTIPLIER)
                           .div(totalStaked)
                           .add(rewardsPerStakedToken);
    }

    /**
    * Returns the reward tokens currently accrued but not yet redeemed to a user
    * @param _account           Address of a user
    * @return rewardsEarned     Total rewards accrued to user
    */
    function rewardsEarned(address _account) public view returns (uint256) {
        return userInfo[_account].stakedAmount
                    .mul(currentRewardsPerStakedToken())
                    .sub(userInfo[_account].rewardsDebt)
                    .add(userInfo[_account].rewardsAccrued)
                    .div(SAFE_MULTIPLIER);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    /**
    * Private function used for updating the user rewardsDebt variable
    * Called when user's stake changes
    * @param _account           Address of a user
    * @param _amount            Amount of new tokens staked or amount of tokens left in stake pool
    */
    function _updateUserRewardsDebt(address _account, uint256 _amount) private {
        userInfo[_account].rewardsDebt = userInfo[_account].rewardsDebt
                                            .add(_amount.mul(rewardsPerStakedToken));
    }

    /**
    * Private function used for updating the user rewardsAccrued variable
    * Called when user is withdrawing staked tokens
    * @param _account           Address of a user
    */
    function _updateUserRewardsAccrued(address _account) private {
        userInfo[_account].rewardsAccrued = userInfo[_account].rewardsAccrued
                                                .add(userInfo[_account].stakedAmount
                                                .mul(rewardsPerStakedToken)
                                                .sub(userInfo[_account].rewardsDebt));
        userInfo[_account].rewardsDebt = 0;
    }

    /**
    * External function called when a user wants to stake tokens
    * Called when user is depositing tokens to stake
    * @param _amount           Amount of tokens to stake
    */
    function stake(uint256 _amount) external nonReentrant whenNotPaused updatePool {
        require(_amount > 0, "Cannot stake 0");

        _updateUserRewardsDebt(msg.sender, _amount);
        userInfo[msg.sender].stakedAmount = userInfo[msg.sender].stakedAmount.add(_amount);

        totalStaked = totalStaked.add(_amount);
        stakedToken.safeTransferFrom(msg.sender, address(this), _amount);
        emit Staked(msg.sender, _amount);
    }

    /**
    * External function called when a user wants to unstake tokens
    * Called when user is withdrawing staked tokens
    * @param _amount           Amount of tokens to withdraw/unstake
    */
    function withdraw(uint256 _amount) public nonReentrant whenNotPaused whenNotLocked(msg.sender) updatePool {
        require(_amount > 0, "Cannot withdraw 0");

        _updateUserRewardsAccrued(msg.sender);
        userInfo[msg.sender].stakedAmount = userInfo[msg.sender].stakedAmount.sub(_amount);
        _updateUserRewardsDebt(msg.sender, userInfo[msg.sender].stakedAmount);

        totalStaked = totalStaked.sub(_amount);
        stakedToken.safeTransfer(msg.sender, _amount);
        emit Withdrawn(msg.sender, _amount);
    }

    /**
    * External function called when a user wants to redeem accrued reward tokens
    */
    function redeemRewards() public nonReentrant whenNotPaused whenNotLocked(msg.sender) {
        uint256 rewards = rewardsEarned(msg.sender);

        if (rewards > 0) {
            userInfo[msg.sender].rewardsAccrued = 0;
            userInfo[msg.sender].rewardsRedeemed = userInfo[msg.sender].rewardsRedeemed.add(rewards);

            // Reset user's rewards debt, similar to as if user has just withdrawn and restake all
            userInfo[msg.sender].rewardsDebt = userInfo[msg.sender].stakedAmount
                                                    .mul(currentRewardsPerStakedToken());

            rewardsManager.transferRewardsToUser(msg.sender, rewards);

            emit RewardRedeemed(msg.sender, rewards);
        }
    }

    /**
    * External function called when a user wants to activate the unlock time to
    * withdraw staked towards or redeem reward tokens
    */
    function activateUnlockTime() external whenNotPaused {
      require(userInfo[msg.sender].unlockTime < block.timestamp, "Unlock time still in progress");

      userInfo[msg.sender].unlockTime = block.timestamp + unlockTime * 1 minutes;
      userInfo[msg.sender].relockTime = block.timestamp + (unlockTime + relockTime) * 1 minutes;
      emit ActivateUnlock(msg.sender);
    }

    /**
    * External function that combines the redemption of reward tokens and
    * withdrawing of all staked tokens at the same time
    */
    function exit() external {
        redeemRewards();
        withdraw(userInfo[msg.sender].stakedAmount);
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    /**
    * Owner only function to update the rewards token distribution rate
    * @param _rate      Rate of rewards token distribution per block
    */
    function updateRewardsDistributionRate(uint256 _rate) external onlyOwner updatePool {
      require(_rate >= 0, "Rate cannot be less than 0");

      rewardsDistributionRate = _rate;
    }

    /**
    * Owner only function to update the unlock time for users to withdraw
    * staked tokens or redeem reward tokens. Can be 0 for no lock
    * @param _minutes      Unlock time in minutes
    */
    function updateUnlockTime(uint256 _minutes) external onlyOwner {
      unlockTime = _minutes;
    }

    /**
    * Owner only function to update the relock time for users to lock users
    * from withdrawing staked tokens or redeeming reward tokens
    * @param _minutes      Relock time in minutes
    */
    function updateRelockTime(uint256 _minutes) external onlyOwner {
      relockTime = _minutes;
    }
}

File 2 of 17 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./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 () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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());
    }
}

File 3 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 5 of 17 : ERC20PresetMinterPauser.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../access/AccessControl.sol";
import "../utils/Context.sol";
import "../token/ERC20/ERC20.sol";
import "../token/ERC20/ERC20Burnable.sol";
import "../token/ERC20/ERC20Pausable.sol";

/**
 * @dev {ERC20} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a minter role that allows for token minting (creation)
 *  - a pauser role that allows to stop all token transfers
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 */
contract ERC20PresetMinterPauser is Context, AccessControl, ERC20Burnable, ERC20Pausable {
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
     * account that deploys the contract.
     *
     * See {ERC20-constructor}.
     */
    constructor(string memory name, string memory symbol) public ERC20(name, symbol) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());
    }

    /**
     * @dev Creates `amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 amount) public virtual {
        require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint");
        _mint(to, amount);
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause");
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause");
        _unpause();
    }

    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Pausable) {
        super._beforeTokenTransfer(from, to, amount);
    }
}

File 6 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 7 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
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) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        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) {
        // 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) {
        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) {
        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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        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) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @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. 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) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b > 0, "SafeMath: modulo by zero");
        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) {
        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.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        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) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 9 of 17 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 10 of 17 : IRewardsManager.sol
pragma solidity 0.7.6;

interface IRewardsManager {
    function transferRewardsToUser(address _account, uint256 _rewards) external;
}

File 11 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 12 of 17 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 13 of 17 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 14 of 17 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./ERC20.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    using SafeMath for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}

File 15 of 17 : ERC20Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./ERC20.sol";
import "../../utils/Pausable.sol";

/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20Pausable is ERC20, Pausable {
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
}

File 16 of 17 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 17 of 17 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakedToken","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_rewardsManager","type":"address"},{"internalType":"uint256","name":"_rewardsDistributionRate","type":"uint256"},{"internalType":"uint256","name":"_unlockTime","type":"uint256"},{"internalType":"uint256","name":"_relockTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"ActivateUnlock","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":"reward","type":"uint256"}],"name":"RewardRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"Withdrawn","type":"event"},{"inputs":[],"name":"SAFE_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateUnlockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRewardsPerStakedToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"relockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsDistributionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardsEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsManager","outputs":[{"internalType":"contract IRewardsManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedToken","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":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minutes","type":"uint256"}],"name":"updateRelockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"updateRewardsDistributionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minutes","type":"uint256"}],"name":"updateUnlockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"rewardsDebt","type":"uint256"},{"internalType":"uint256","name":"rewardsAccrued","type":"uint256"},{"internalType":"uint256","name":"rewardsRedeemed","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"},{"internalType":"uint256","name":"relockTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620019653803806200196583398101604081905262000034916200011d565b6001600090815562000045620000fc565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001805460ff60a01b19169055600280546001600160a01b03199081166001600160a01b039889161790915560038054821696881696909617909555600480549095169390951692909217909255600591909155600955600a5560006006554360075562000182565b3390565b80516001600160a01b03811681146200011857600080fd5b919050565b60008060008060008060c0878903121562000136578182fd5b620001418762000100565b9550620001516020880162000100565b9450620001616040880162000100565b9350606087015192506080870151915060a087015190509295509295509295565b6117d380620001926000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063a694fc3a116100c3578063e97cc2121161007c578063e97cc2121461027e578063e9fad8ee14610286578063f0fc4ec11461028e578063f2fde38b14610296578063f93ea586146102a9578063fd6cddee146102b157610158565b8063a694fc3a14610243578063c8dc6bc714610256578063cc7a262e1461025e578063d1af0c7d14610266578063dc7e0ce81461026e578063defe20531461027657610158565b8063817b1cd211610115578063817b1cd2146101e5578063887ae14b146101ed5780638bfea439146101f55780638da5cb5b146102085780638f5dd49b1461021d5780639dda5a141461023057610158565b80631959a0021461015d578063251c1aa31461018b5780632e1a7d4d146101a05780635c975abb146101b557806370a08231146101ca578063715018a6146101dd575b600080fd5b61017061016b36600461150e565b6102c4565b604051610182969594939291906116be565b60405180910390f35b6101936102f9565b60405161018291906116b5565b6101b36101ae366004611535565b6102ff565b005b6101bd61058a565b604051610182919061157a565b6101936101d836600461150e565b61059b565b6101b36105b6565b610193610662565b610193610668565b61019361020336600461150e565b6106b4565b610210610724565b604051610182919061154d565b6101b361022b366004611535565b610733565b6101b361023e366004611535565b61079a565b6101b3610251366004611535565b610801565b6101936109b0565b6102106109b6565b6102106109c5565b6101936109d4565b6102106109e0565b6101b36109ef565b6101b3610acd565b6101b3610af0565b6101b36102a436600461150e565b610d79565b610193610e7c565b6101b36102bf366004611535565b610e82565b600b60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b60095481565b60026000541415610357576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005561036461058a565b156103a9576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b33600954600014610469576001600160a01b0381166000908152600b60205260409020600401546103f55760405162461bcd60e51b81526004016103ec906115e4565b60405180910390fd5b6001600160a01b0381166000908152600b6020526040902060040154421161042f5760405162461bcd60e51b81526004016103ec906115ad565b6001600160a01b0381166000908152600b602052604090206005015442106104695760405162461bcd60e51b81526004016103ec9061166c565b600854156104ba576104b66006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b90610f89565b90610fe9565b90611050565b6006555b43600755816104db5760405162461bcd60e51b81526004016103ec90611641565b6104e4336110aa565b336000908152600b60205260409020546104fe9083610f2c565b336000818152600b6020526040902082905561051991611129565b6008546105269083610f2c565b600855600254610540906001600160a01b03163384611186565b336001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58360405161057991906116b5565b60405180910390a250506001600055565b600154600160a01b900460ff165b90565b6001600160a01b03166000908152600b602052604090205490565b6105be6111dd565b6001600160a01b03166105cf610724565b6001600160a01b031614610618576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b60085481565b6000806008541161067c5750600554610598565b6106af6006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b905090565b6001600160a01b0381166000908152600b60205260408120600281015460019091015461071e91670de0b6b3a7640000916104aa91906104b0906107186106f9610668565b6001600160a01b038a166000908152600b602052604090205490610f89565b90610f2c565b92915050565b6001546001600160a01b031690565b61073b6111dd565b6001600160a01b031661074c610724565b6001600160a01b031614610795576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b600955565b6107a26111dd565b6001600160a01b03166107b3610724565b6001600160a01b0316146107fc576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b600a55565b60026000541415610859576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005561086661058a565b156108ab576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600854156108ea576108e66006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b6006555b436007558061090b5760405162461bcd60e51b81526004016103ec90611585565b6109153382611129565b336000908152600b602052604090205461092f9082611050565b336000908152600b602052604090205560085461094c9082611050565b600855600254610967906001600160a01b03163330846111e1565b336001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d826040516109a091906116b5565b60405180910390a2506001600055565b60055481565b6002546001600160a01b031681565b6003546001600160a01b031681565b670de0b6b3a764000081565b6004546001600160a01b031681565b6109f761058a565b15610a3c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b336000908152600b60205260409020600401544211610a6d5760405162461bcd60e51b81526004016103ec906115ad565b60098054336000818152600b602052604080822042603c95860281016004830155600a54965490960190940290940160059093019290925591517fcd75a9884db26484a3a235b0c2f3e5807d731ffbf506a0637a403077a69afe949190a2565b610ad5610af0565b336000908152600b6020526040902054610aee906102ff565b565b60026000541415610b48576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055610b5561058a565b15610b9a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b33600954600014610c51576001600160a01b0381166000908152600b6020526040902060040154610bdd5760405162461bcd60e51b81526004016103ec906115e4565b6001600160a01b0381166000908152600b60205260409020600401544211610c175760405162461bcd60e51b81526004016103ec906115ad565b6001600160a01b0381166000908152600b60205260409020600501544210610c515760405162461bcd60e51b81526004016103ec9061166c565b6000610c5c336106b4565b90508015610d7057336000908152600b60205260408120600281019190915560030154610c899082611050565b336000908152600b6020526040902060030155610cbd610ca7610668565b336000908152600b602052604090205490610f89565b336000818152600b6020526040908190206001019290925560048054925163c53a315360e01b81526001600160a01b039093169263c53a315392610d05929091869101611561565b600060405180830381600087803b158015610d1f57600080fd5b505af1158015610d33573d6000803e3d6000fd5b50505050336001600160a01b03167f9eac3fe9056119387c5d3c787803d1d83956985560f6780c569bb99870760e368260405161057991906116b5565b50506001600055565b610d816111dd565b6001600160a01b0316610d92610724565b6001600160a01b031614610ddb576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b6001600160a01b038116610e205760405162461bcd60e51b81526004018080602001828103825260268152602001806116e76026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600a5481565b610e8a6111dd565b6001600160a01b0316610e9b610724565b6001600160a01b031614610ee4576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b60085415610f2357610f1f6006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b6006555b43600755600555565b600082821115610f83576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610f985750600061071e565b82820282848281610fa557fe5b0414610fe25760405162461bcd60e51b81526004018080602001828103825260218152602001806117336021913960400191505060405180910390fd5b9392505050565b600080821161103f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161104857fe5b049392505050565b600082820183811015610fe2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b0381166000908152600b6020526040902060018101546006549154611100926110de929161071891610f89565b6001600160a01b0383166000908152600b602052604090206002015490611050565b6001600160a01b039091166000908152600b602052604081206002810192909255600190910155565b61116361114160065483610f8990919063ffffffff16565b6001600160a01b0384166000908152600b602052604090206001015490611050565b6001600160a01b039092166000908152600b602052604090206001019190915550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111d8908490611241565b505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261123b908590611241565b50505050565b6000611296826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112f29092919063ffffffff16565b8051909150156111d8578080602001905160208110156112b557600080fd5b50516111d85760405162461bcd60e51b815260040180806020018281038252602a815260200180611774602a913960400191505060405180910390fd5b60606113018484600085611309565b949350505050565b60608247101561134a5760405162461bcd60e51b815260040180806020018281038252602681526020018061170d6026913960400191505060405180910390fd5b61135385611464565b6113a4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106113e25780518252601f1990920191602091820191016113c3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611444576040519150601f19603f3d011682016040523d82523d6000602084013e611449565b606091505b509150915061145982828661146a565b979650505050505050565b3b151590565b60608315611479575081610fe2565b8251156114895782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114d35781810151838201526020016114bb565b50505050905090810190601f1680156115005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60006020828403121561151f578081fd5b81356001600160a01b0381168114610fe2578182fd5b600060208284031215611546578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6020808252600e908201526d043616e6e6f74207374616b6520360941b604082015260600190565b6020808252601d908201527f556e6c6f636b2074696d65207374696c6c20696e2070726f6772657373000000604082015260600190565b6020808252603a908201527f416374697661746520756e6c6f636b20666f72207769746864726177616c206160408201527f6e6420726564656d7074696f6e2077696e646f77206669727374000000000000606082015260800190565b602080825260119082015270043616e6e6f74207769746864726177203607c1b604082015260600190565b60208082526029908201527f576974686472617720616e6420726564656d7074696f6e2077696e646f772068604082015268185cc81c185cdcd95960ba1b606082015260800190565b90815260200190565b958652602086019490945260408501929092526060840152608083015260a082015260c0019056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d02905544aee3f8bdf3245cc0c29ab72c8333bbb596591ec1af5267bcd5efecf64736f6c634300070600330000000000000000000000005f64ab1544d28732f0a24f4713c2c8ec0da089f00000000000000000000000005f64ab1544d28732f0a24f4713c2c8ec0da089f000000000000000000000000066bebc3c950245f05cd1e393a55cee56cb99b245000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038400000000000000000000000000000000000000000000000000000000000000b40

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c8063a694fc3a116100c3578063e97cc2121161007c578063e97cc2121461027e578063e9fad8ee14610286578063f0fc4ec11461028e578063f2fde38b14610296578063f93ea586146102a9578063fd6cddee146102b157610158565b8063a694fc3a14610243578063c8dc6bc714610256578063cc7a262e1461025e578063d1af0c7d14610266578063dc7e0ce81461026e578063defe20531461027657610158565b8063817b1cd211610115578063817b1cd2146101e5578063887ae14b146101ed5780638bfea439146101f55780638da5cb5b146102085780638f5dd49b1461021d5780639dda5a141461023057610158565b80631959a0021461015d578063251c1aa31461018b5780632e1a7d4d146101a05780635c975abb146101b557806370a08231146101ca578063715018a6146101dd575b600080fd5b61017061016b36600461150e565b6102c4565b604051610182969594939291906116be565b60405180910390f35b6101936102f9565b60405161018291906116b5565b6101b36101ae366004611535565b6102ff565b005b6101bd61058a565b604051610182919061157a565b6101936101d836600461150e565b61059b565b6101b36105b6565b610193610662565b610193610668565b61019361020336600461150e565b6106b4565b610210610724565b604051610182919061154d565b6101b361022b366004611535565b610733565b6101b361023e366004611535565b61079a565b6101b3610251366004611535565b610801565b6101936109b0565b6102106109b6565b6102106109c5565b6101936109d4565b6102106109e0565b6101b36109ef565b6101b3610acd565b6101b3610af0565b6101b36102a436600461150e565b610d79565b610193610e7c565b6101b36102bf366004611535565b610e82565b600b60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b60095481565b60026000541415610357576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005561036461058a565b156103a9576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b33600954600014610469576001600160a01b0381166000908152600b60205260409020600401546103f55760405162461bcd60e51b81526004016103ec906115e4565b60405180910390fd5b6001600160a01b0381166000908152600b6020526040902060040154421161042f5760405162461bcd60e51b81526004016103ec906115ad565b6001600160a01b0381166000908152600b602052604090206005015442106104695760405162461bcd60e51b81526004016103ec9061166c565b600854156104ba576104b66006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b90610f89565b90610fe9565b90611050565b6006555b43600755816104db5760405162461bcd60e51b81526004016103ec90611641565b6104e4336110aa565b336000908152600b60205260409020546104fe9083610f2c565b336000818152600b6020526040902082905561051991611129565b6008546105269083610f2c565b600855600254610540906001600160a01b03163384611186565b336001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58360405161057991906116b5565b60405180910390a250506001600055565b600154600160a01b900460ff165b90565b6001600160a01b03166000908152600b602052604090205490565b6105be6111dd565b6001600160a01b03166105cf610724565b6001600160a01b031614610618576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b60085481565b6000806008541161067c5750600554610598565b6106af6006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b905090565b6001600160a01b0381166000908152600b60205260408120600281015460019091015461071e91670de0b6b3a7640000916104aa91906104b0906107186106f9610668565b6001600160a01b038a166000908152600b602052604090205490610f89565b90610f2c565b92915050565b6001546001600160a01b031690565b61073b6111dd565b6001600160a01b031661074c610724565b6001600160a01b031614610795576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b600955565b6107a26111dd565b6001600160a01b03166107b3610724565b6001600160a01b0316146107fc576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b600a55565b60026000541415610859576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005561086661058a565b156108ab576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600854156108ea576108e66006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b6006555b436007558061090b5760405162461bcd60e51b81526004016103ec90611585565b6109153382611129565b336000908152600b602052604090205461092f9082611050565b336000908152600b602052604090205560085461094c9082611050565b600855600254610967906001600160a01b03163330846111e1565b336001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d826040516109a091906116b5565b60405180910390a2506001600055565b60055481565b6002546001600160a01b031681565b6003546001600160a01b031681565b670de0b6b3a764000081565b6004546001600160a01b031681565b6109f761058a565b15610a3c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b336000908152600b60205260409020600401544211610a6d5760405162461bcd60e51b81526004016103ec906115ad565b60098054336000818152600b602052604080822042603c95860281016004830155600a54965490960190940290940160059093019290925591517fcd75a9884db26484a3a235b0c2f3e5807d731ffbf506a0637a403077a69afe949190a2565b610ad5610af0565b336000908152600b6020526040902054610aee906102ff565b565b60026000541415610b48576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055610b5561058a565b15610b9a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b33600954600014610c51576001600160a01b0381166000908152600b6020526040902060040154610bdd5760405162461bcd60e51b81526004016103ec906115e4565b6001600160a01b0381166000908152600b60205260409020600401544211610c175760405162461bcd60e51b81526004016103ec906115ad565b6001600160a01b0381166000908152600b60205260409020600501544210610c515760405162461bcd60e51b81526004016103ec9061166c565b6000610c5c336106b4565b90508015610d7057336000908152600b60205260408120600281019190915560030154610c899082611050565b336000908152600b6020526040902060030155610cbd610ca7610668565b336000908152600b602052604090205490610f89565b336000818152600b6020526040908190206001019290925560048054925163c53a315360e01b81526001600160a01b039093169263c53a315392610d05929091869101611561565b600060405180830381600087803b158015610d1f57600080fd5b505af1158015610d33573d6000803e3d6000fd5b50505050336001600160a01b03167f9eac3fe9056119387c5d3c787803d1d83956985560f6780c569bb99870760e368260405161057991906116b5565b50506001600055565b610d816111dd565b6001600160a01b0316610d92610724565b6001600160a01b031614610ddb576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b6001600160a01b038116610e205760405162461bcd60e51b81526004018080602001828103825260268152602001806116e76026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600a5481565b610e8a6111dd565b6001600160a01b0316610e9b610724565b6001600160a01b031614610ee4576040805162461bcd60e51b81526020600482018190526024820152600080516020611754833981519152604482015290519081900360640190fd5b60085415610f2357610f1f6006546104b06008546104aa670de0b6b3a76400006104a46005546104a460075443610f2c90919063ffffffff16565b6006555b43600755600555565b600082821115610f83576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610f985750600061071e565b82820282848281610fa557fe5b0414610fe25760405162461bcd60e51b81526004018080602001828103825260218152602001806117336021913960400191505060405180910390fd5b9392505050565b600080821161103f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161104857fe5b049392505050565b600082820183811015610fe2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b0381166000908152600b6020526040902060018101546006549154611100926110de929161071891610f89565b6001600160a01b0383166000908152600b602052604090206002015490611050565b6001600160a01b039091166000908152600b602052604081206002810192909255600190910155565b61116361114160065483610f8990919063ffffffff16565b6001600160a01b0384166000908152600b602052604090206001015490611050565b6001600160a01b039092166000908152600b602052604090206001019190915550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111d8908490611241565b505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261123b908590611241565b50505050565b6000611296826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112f29092919063ffffffff16565b8051909150156111d8578080602001905160208110156112b557600080fd5b50516111d85760405162461bcd60e51b815260040180806020018281038252602a815260200180611774602a913960400191505060405180910390fd5b60606113018484600085611309565b949350505050565b60608247101561134a5760405162461bcd60e51b815260040180806020018281038252602681526020018061170d6026913960400191505060405180910390fd5b61135385611464565b6113a4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106113e25780518252601f1990920191602091820191016113c3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611444576040519150601f19603f3d011682016040523d82523d6000602084013e611449565b606091505b509150915061145982828661146a565b979650505050505050565b3b151590565b60608315611479575081610fe2565b8251156114895782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114d35781810151838201526020016114bb565b50505050905090810190601f1680156115005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60006020828403121561151f578081fd5b81356001600160a01b0381168114610fe2578182fd5b600060208284031215611546578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6020808252600e908201526d043616e6e6f74207374616b6520360941b604082015260600190565b6020808252601d908201527f556e6c6f636b2074696d65207374696c6c20696e2070726f6772657373000000604082015260600190565b6020808252603a908201527f416374697661746520756e6c6f636b20666f72207769746864726177616c206160408201527f6e6420726564656d7074696f6e2077696e646f77206669727374000000000000606082015260800190565b602080825260119082015270043616e6e6f74207769746864726177203607c1b604082015260600190565b60208082526029908201527f576974686472617720616e6420726564656d7074696f6e2077696e646f772068604082015268185cc81c185cdcd95960ba1b606082015260800190565b90815260200190565b958652602086019490945260408501929092526060840152608083015260a082015260c0019056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d02905544aee3f8bdf3245cc0c29ab72c8333bbb596591ec1af5267bcd5efecf64736f6c63430007060033

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

0000000000000000000000005f64ab1544d28732f0a24f4713c2c8ec0da089f00000000000000000000000005f64ab1544d28732f0a24f4713c2c8ec0da089f000000000000000000000000066bebc3c950245f05cd1e393a55cee56cb99b245000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038400000000000000000000000000000000000000000000000000000000000000b40

-----Decoded View---------------
Arg [0] : _stakedToken (address): 0x5F64Ab1544D28732F0A24F4713c2C8ec0dA089f0
Arg [1] : _rewardsToken (address): 0x5F64Ab1544D28732F0A24F4713c2C8ec0dA089f0
Arg [2] : _rewardsManager (address): 0x66BEBC3c950245F05Cd1e393A55CEE56cB99b245
Arg [3] : _rewardsDistributionRate (uint256): 0
Arg [4] : _unlockTime (uint256): 14400
Arg [5] : _relockTime (uint256): 2880

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f64ab1544d28732f0a24f4713c2c8ec0da089f0
Arg [1] : 0000000000000000000000005f64ab1544d28732f0a24f4713c2c8ec0da089f0
Arg [2] : 00000000000000000000000066bebc3c950245f05cd1e393a55cee56cb99b245
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000003840
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000b40


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.