Contract 0xE840142F40666F3a998e4402eD9a0777D30D9219

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4df1c660ed33d18a98e50d600579a26a9b5975a8e7e2346717fd46a5c39e1fd40x60e06040201725072022-09-23 10:26:495 days 23 hrs ago0xdd5cf30f56c37d3243a23543dc5bd5ee576970e2 IN  Create: BaseRewardPool0 AVAX0.045869052628.35
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BaseRewardPool

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : BaseRewardPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
 *Submitted for verification at Etherscan.io on 2020-07-17
 */

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/
* Synthetix: BaseRewardPool.sol
*
* Docs: https://docs.synthetix.io/
*
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

import "SafeERC20.sol";
import "Ownable.sol";
import "IERC20Metadata.sol";

/// @title A contract for managing rewards for a pool
/// @author Vector Team
/// @notice You can use this contract for getting informations about rewards for a specific pools
contract BaseRewardPool is Ownable {
    using SafeERC20 for IERC20Metadata;

    address public mainRewardToken;
    address public immutable stakingToken;
    address public immutable operator;
    address public immutable rewardManager;

    address[] public rewardTokens;

    uint256 private _totalSupply;

    struct Reward {
        address rewardToken;
        uint256 rewardPerTokenStored;
        uint256 queuedRewards;
        uint256 historicalRewards;
    }

    mapping(address => uint256) private _balances;
    mapping(address => Reward) public rewards;
    mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
    mapping(address => mapping(address => uint256)) public userRewards;
    mapping(address => bool) public isRewardToken;

    event RewardAdded(uint256 reward, address indexed token);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward, address indexed token);

    constructor(
        address _stakingToken,
        address _rewardToken,
        address _operator,
        address _rewardManager
    ) {
        stakingToken = _stakingToken;
        operator = _operator;
        if (_rewardToken != address(0)) {
            rewards[_rewardToken] = Reward({
                rewardToken: _rewardToken,
                rewardPerTokenStored: 0,
                queuedRewards: 0,
                historicalRewards: 0
            });
            rewardTokens.push(_rewardToken);
            isRewardToken[_rewardToken] = true;
        }
        rewardManager = _rewardManager;
    }

    /// @notice Returns decimals of reward token
    /// @param _rewardToken Address of reward token
    /// @return Returns decimals of reward token
    function rewardDecimals(address _rewardToken) public view returns (uint256) {
        return IERC20Metadata(_rewardToken).decimals();
    }

    /// @notice Returns address of staking token
    /// @return address of staking token
    function getStakingToken() external view returns (address) {
        return stakingToken;
    }

    /// @notice Returns decimals of staking token
    /// @return Returns decimals of staking token
    function stakingDecimals() public view returns (uint256) {
        return IERC20Metadata(stakingToken).decimals();
    }

    /// @notice Returns current supply of staked tokens
    /// @return Returns current supply of staked tokens
    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

    /// @notice Returns amount of staked tokens by account
    /// @param _account Address account
    /// @return Returns amount of staked tokens by account
    function balanceOf(address _account) external view returns (uint256) {
        return _balances[_account];
    }

    modifier updateReward(address _account) {
        uint256 rewardTokensLength = rewardTokens.length;
        for (uint256 index = 0; index < rewardTokensLength; ++index) {
            address rewardToken = rewardTokens[index];
            userRewards[rewardToken][_account] = earned(_account, rewardToken);
            userRewardPerTokenPaid[rewardToken][_account] = rewardPerToken(rewardToken);
        }
        _;
    }

    modifier onlyManager() {
        require(msg.sender == rewardManager, "Only Manager");
        _;
    }

    modifier onlyOperator() {
        require(msg.sender == operator, "Only Operator");
        _;
    }

    /// @notice Updates the reward information for one account
    /// @param _account Address account
    function updateFor(address _account) external {
        uint256 length = rewardTokens.length;
        for (uint256 index = 0; index < length; ++index) {
            address rewardToken = rewardTokens[index];
            userRewards[rewardToken][_account] = earned(_account, rewardToken);
            userRewardPerTokenPaid[rewardToken][_account] = rewardPerToken(rewardToken);
        }
    }

    /// @notice Returns amount of reward token per staking tokens in pool
    /// @param _rewardToken Address reward token
    /// @return Returns amount of reward token per staking tokens in pool
    function rewardPerToken(address _rewardToken) public view returns (uint256) {
        return rewards[_rewardToken].rewardPerTokenStored;
    }

    /// @notice Returns amount of reward token earned by a user
    /// @param _account Address account
    /// @param _rewardToken Address reward token
    /// @return Returns amount of reward token earned by a user
    function earned(address _account, address _rewardToken) public view returns (uint256) {
        return (
            (((_balances[_account] *
                (rewardPerToken(_rewardToken) - userRewardPerTokenPaid[_rewardToken][_account])) /
                (10**stakingDecimals())) + userRewards[_rewardToken][_account])
        );
    }

    /// @notice Updates information for a user in case of staking. Can only be called by the Masterchief operator
    /// @param _for Address account
    /// @param _amount Amount of newly staked tokens by the user on masterchief
    /// @return Returns True
    function stakeFor(address _for, uint256 _amount)
        external
        onlyOperator
        updateReward(_for)
        returns (bool)
    {
        _totalSupply = _totalSupply + _amount;
        _balances[_for] = _balances[_for] + _amount;

        emit Staked(_for, _amount);

        return true;
    }

    /// @notice Updates informaiton for a user in case of a withdraw. Can only be called by the Masterchief operator
    /// @param _for Address account
    /// @param _amount Amount of withdrawed tokens by the user on masterchief
    /// @return Returns True
    function withdrawFor(
        address _for,
        uint256 _amount,
        bool claim
    ) external virtual onlyOperator updateReward(_for) returns (bool) {
        _totalSupply = _totalSupply - _amount;
        _balances[_for] = _balances[_for] - _amount;

        emit Withdrawn(_for, _amount);

        if (claim) {
            getReward(_for);
        }

        return true;
    }

    /// @notice Calculates and sends reward to user. Only callable by masterchief
    /// @param _account Address account
    /// @return Returns True
    function getReward(address _account) public updateReward(_account) onlyOperator returns (bool) {
        uint256 length = rewardTokens.length;
        for (uint256 index = 0; index < length; ++index) {
            address rewardToken = rewardTokens[index];
            uint256 reward = earned(_account, rewardToken);
            if (reward > 0) {
                userRewards[rewardToken][_account] = 0;
                IERC20Metadata(rewardToken).safeTransfer(_account, reward);
                emit RewardPaid(_account, reward, rewardToken);
            }
        }
        return true;
    }

    /// @notice Calculates and sends reward to user
    /// @return Returns True
    function getRewardUser() public updateReward(msg.sender) returns (bool) {
        uint256 length = rewardTokens.length;
        for (uint256 index = 0; index < length; ++index) {
            address rewardToken = rewardTokens[index];
            uint256 reward = earned(msg.sender, rewardToken);
            if (reward > 0) {
                userRewards[rewardToken][msg.sender] = 0;
                IERC20Metadata(rewardToken).safeTransfer(msg.sender, reward);
                emit RewardPaid(msg.sender, reward, rewardToken);
            }
        }
        return true;
    }

    /// @notice Sends new rewards to be distributed to the users staking. Only callable by MainStaking
    /// @param _amountReward Amount of reward token to be distributed
    /// @param _rewardToken Address reward token
    /// @return Returns True
    function queueNewRewards(uint256 _amountReward, address _rewardToken)
        external
        onlyManager
        returns (bool)
    {
        if (!isRewardToken[_rewardToken]) {
            rewardTokens.push(_rewardToken);
            isRewardToken[_rewardToken] = true;
        }
        IERC20Metadata(_rewardToken).safeTransferFrom(msg.sender, address(this), _amountReward);
        Reward storage rewardInfo = rewards[_rewardToken];
        rewardInfo.historicalRewards = rewardInfo.historicalRewards + _amountReward;
        if (_totalSupply == 0) {
            rewardInfo.queuedRewards += _amountReward;
        } else {
            if (rewardInfo.queuedRewards > 0) {
                _amountReward += rewardInfo.queuedRewards;
                rewardInfo.queuedRewards = 0;
            }
            rewardInfo.rewardPerTokenStored =
                rewardInfo.rewardPerTokenStored +
                (_amountReward * 10**stakingDecimals()) /
                _totalSupply;
        }
        emit RewardAdded(_amountReward, _rewardToken);
        return true;
    }

    /// @notice Sends new rewards to be distributed to the users staking. Only possible to donate already registered token
    /// @param _amountReward Amount of reward token to be distributed
    /// @param _rewardToken Address reward token
    /// @return Returns True
    function donateRewards(uint256 _amountReward, address _rewardToken) external returns (bool) {
        require(isRewardToken[_rewardToken]);
        IERC20Metadata(_rewardToken).safeTransferFrom(msg.sender, address(this), _amountReward);
        Reward storage rewardInfo = rewards[_rewardToken];
        rewardInfo.historicalRewards = rewardInfo.historicalRewards + _amountReward;
        if (_totalSupply == 0) {
            rewardInfo.queuedRewards += _amountReward;
        } else {
            if (rewardInfo.queuedRewards > 0) {
                _amountReward += rewardInfo.queuedRewards;
                rewardInfo.queuedRewards = 0;
            }
            rewardInfo.rewardPerTokenStored =
                rewardInfo.rewardPerTokenStored +
                (_amountReward * 10**stakingDecimals()) /
                _totalSupply;
        }
        emit RewardAdded(_amountReward, _rewardToken);
        return true;
    }
}

File 2 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";
import "Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

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

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

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

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

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

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

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

File 3 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 7 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 5 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev 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 {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 6 of 7 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 7 of 7 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 999
  },
  "libraries": {
    "BaseRewardPool.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_rewardManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountReward","type":"uint256"},{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"donateRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getStakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isRewardToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainRewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountReward","type":"uint256"},{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"queueNewRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"rewardDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"},{"internalType":"uint256","name":"queuedRewards","type":"uint256"},{"internalType":"uint256","name":"historicalRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"updateFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"claim","type":"bool"}],"name":"withdrawFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162001c7338038062001c738339810160408190526200003491620001a8565b6200003f336200013b565b6001600160601b0319606085811b821660805283901b1660a0526001600160a01b038316156200012157604080516080810182526001600160a01b038581168083526000602080850182815285870183815260608701848152858552600584528885209751885497166001600160a01b031997881617885591516001808901919091559051600280890191909155915160039097019690965580548087019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180549094169092179092556008905291909120805460ff191690911790555b60601b6001600160601b03191660c0525062000205915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001a357600080fd5b919050565b60008060008060808587031215620001bf57600080fd5b620001ca856200018b565b9350620001da602086016200018b565b9250620001ea604086016200018b565b9150620001fa606086016200018b565b905092959194509250565b60805160601c60a05160601c60c05160601c611a0b620002686000396000818161025e0152610d700152600081816102dd01528181610597015281816109d90152610fcb015260008181610373015281816103e1015261110e0152611a0b6000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c806372f702f3116100ee578063a980356a11610097578063c11f534411610071578063c11f534414610466578063f12297771461046e578063f2fde38b1461049a578063f3fc7c2b146104ad57600080fd5b8063a980356a14610405578063b5fd73f814610430578063c00007b01461045357600080fd5b80638fcf4822116100c85780638fcf4822146103b957806399da1729146103cc5780639f9106d1146103df57600080fd5b806372f702f31461036e5780637bb7bed1146103955780638da5cb5b146103a857600080fd5b8063211dc32d1161015b5780635bc59ce7116101355780635bc59ce7146102ff5780637035ab981461031257806370a082311461033d578063715018a61461036657600080fd5b8063211dc32d146102b25780632ee40908146102c5578063570ca735146102d857600080fd5b80630f4ef8a61161018c5780630f4ef8a61461025957806318160ddd1461029857806318838d33146102aa57600080fd5b80630700037d146101b35780630e0a5968146102215780630e19c69914610236575b600080fd5b6101f26101c1366004611676565b60056020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b03909516855260208501939093529183015260608201526080015b60405180910390f35b61023461022f366004611676565b6104c0565b005b6102496102443660046116ee565b61058a565b6040519015158152602001610218565b6102807f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610218565b6003545b604051908152602001610218565b61024961076a565b61029c6102c0366004611691565b610910565b6102496102d33660046116c4565b6109cc565b6102807f000000000000000000000000000000000000000000000000000000000000000081565b61024961030d366004611764565b610b95565b61029c610320366004611691565b600660209081526000928352604080842090915290825290205481565b61029c61034b366004611676565b6001600160a01b031660009081526004602052604090205490565b610234610cd3565b6102807f000000000000000000000000000000000000000000000000000000000000000081565b6102806103a336600461174b565b610d39565b6000546001600160a01b0316610280565b6102496103c7366004611764565b610d63565b61029c6103da366004611676565b610e7a565b7f0000000000000000000000000000000000000000000000000000000000000000610280565b61029c610413366004611691565b600760209081526000928352604080842090915290825290205481565b61024961043e366004611676565b60086020526000908152604090205460ff1681565b610249610461366004611676565b610ef6565b61029c61110a565b61029c61047c366004611676565b6001600160a01b031660009081526005602052604090206001015490565b6102346104a8366004611676565b6111a5565b600154610280906001600160a01b031681565b60025460005b81811015610585576000600282815481106104e3576104e36119b1565b6000918252602090912001546001600160a01b031690506105048482610910565b6001600160a01b0380831660009081526007602090815260408083209389168352929052205561054c816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b0391821660009081526006602090815260408083209488168352939052919091205561057e81611980565b90506104c6565b505050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105f95760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9027b832b930ba37b960991b60448201526064015b60405180910390fd5b600254849060005b818110156106c05760006002828154811061061e5761061e6119b1565b6000918252602090912001546001600160a01b0316905061063f8482610910565b6001600160a01b03808316600090815260076020908152604080832093891683529290522055610687816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b039182166000908152600660209081526040808320948816835293905291909120556106b981611980565b9050610601565b50846003546106cf919061193d565b6003556001600160a01b0386166000908152600460205260409020546106f690869061193d565b6001600160a01b038716600081815260046020526040908190209290925590517f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906107459088815260200190565b60405180910390a2831561075e5761075c86610ef6565b505b50600195945050505050565b6002546000903390825b8181101561083357600060028281548110610791576107916119b1565b6000918252602090912001546001600160a01b031690506107b28482610910565b6001600160a01b038083166000908152600760209081526040808320938916835292905220556107fa816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b0391821660009081526006602090815260408083209488168352939052919091205561082c81611980565b9050610774565b5060025460005b8181101561090557600060028281548110610857576108576119b1565b60009182526020822001546001600160a01b031691506108773383610910565b905080156108f2576001600160a01b03821660008181526007602090815260408083203380855292528220919091556108b1919083611287565b6040518181526001600160a01b0383169033907f8e0d3fa908fd7ee819155b3ce71e292b601bbeb0cd00d7758b9d226a523cb8279060200160405180910390a35b5050806108fe90611980565b905061083a565b506001935050505090565b6001600160a01b03808216600090815260076020908152604080832093861683529290529081205461094061110a565b61094b90600a611876565b6001600160a01b038481166000818152600660209081526040808320948a1683529381528382205492825260059052919091206001015461098c919061193d565b6001600160a01b0386166000908152600460205260409020546109af919061191e565b6109b99190611811565b6109c391906117f9565b90505b92915050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a365760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9027b832b930ba37b960991b60448201526064016105f0565b600254839060005b81811015610afd57600060028281548110610a5b57610a5b6119b1565b6000918252602090912001546001600160a01b03169050610a7c8482610910565b6001600160a01b03808316600090815260076020908152604080832093891683529290522055610ac4816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b03918216600090815260066020908152604080832094881683529390529190912055610af681611980565b9050610a3e565b5083600354610b0c91906117f9565b6003556001600160a01b038516600090815260046020526040902054610b339085906117f9565b6001600160a01b038616600081815260046020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610b829087815260200190565b60405180910390a2506001949350505050565b6001600160a01b03811660009081526008602052604081205460ff16610bba57600080fd5b610bcf6001600160a01b038316333086611330565b6001600160a01b03821660009081526005602052604090206003810154610bf79085906117f9565b60038083019190915554610c245783816002016000828254610c1991906117f9565b90915550610c869050565b600281015415610c47576002810154610c3d90856117f9565b6000600283015593505b600354610c5261110a565b610c5d90600a611876565b610c67908661191e565b610c719190611811565b8160010154610c8091906117f9565b60018201555b826001600160a01b03167ffb5edb6eb340a01f6a67189edc978df97841c43752c212fc85995ea23001763585604051610cc191815260200190565b60405180910390a25060019392505050565b6000546001600160a01b03163314610d2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f0565b610d376000611387565b565b60028181548110610d4957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ddd5760405162461bcd60e51b815260206004820152600c60248201527f4f6e6c79204d616e61676572000000000000000000000000000000000000000060448201526064016105f0565b6001600160a01b03821660009081526008602052604090205460ff16610bba576002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556000818152600860205260409020805460ff1916909217909155610bcf90333086611330565b6000816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb557600080fd5b505afa158015610ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eed9190611787565b60ff1692915050565b6002546000908290825b81811015610fbf57600060028281548110610f1d57610f1d6119b1565b6000918252602090912001546001600160a01b03169050610f3e8482610910565b6001600160a01b03808316600090815260076020908152604080832093891683529290522055610f86816001600160a01b031660009081526005602052604090206001015490565b6001600160a01b03918216600090815260066020908152604080832094881683529390529190912055610fb881611980565b9050610f00565b50336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110285760405162461bcd60e51b815260206004820152600d60248201526c27b7363c9027b832b930ba37b960991b60448201526064016105f0565b60025460005b8181101561075e5760006002828154811061104b5761104b6119b1565b60009182526020822001546001600160a01b0316915061106b8883610910565b905080156110f7576001600160a01b038083166000818152600760209081526040808320948d168352939052918220919091556110a9908983611287565b816001600160a01b0316886001600160a01b03167f8e0d3fa908fd7ee819155b3ce71e292b601bbeb0cd00d7758b9d226a523cb827836040516110ee91815260200190565b60405180910390a35b50508061110390611980565b905061102e565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561116557600080fd5b505afa158015611179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119d9190611787565b60ff16905090565b6000546001600160a01b031633146111ff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f0565b6001600160a01b03811661127b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105f0565b61128481611387565b50565b6040516001600160a01b0383166024820152604481018290526105859084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113e4565b6040516001600160a01b03808516602483015283166044820152606481018290526113819085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016112cc565b50505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611439826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114c99092919063ffffffff16565b8051909150156105855780806020019051810190611457919061172e565b6105855760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105f0565b60606114d884846000856114e2565b90505b9392505050565b60608247101561155a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105f0565b843b6115a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f0565b600080866001600160a01b031685876040516115c491906117aa565b60006040518083038185875af1925050503d8060008114611601576040519150601f19603f3d011682016040523d82523d6000602084013e611606565b606091505b5091509150611616828286611621565b979650505050505050565b606083156116305750816114db565b8251156116405782518084602001fd5b8160405162461bcd60e51b81526004016105f091906117c6565b80356001600160a01b038116811461167157600080fd5b919050565b60006020828403121561168857600080fd5b6109c38261165a565b600080604083850312156116a457600080fd5b6116ad8361165a565b91506116bb6020840161165a565b90509250929050565b600080604083850312156116d757600080fd5b6116e08361165a565b946020939093013593505050565b60008060006060848603121561170357600080fd5b61170c8461165a565b9250602084013591506040840135611723816119c7565b809150509250925092565b60006020828403121561174057600080fd5b81516114db816119c7565b60006020828403121561175d57600080fd5b5035919050565b6000806040838503121561177757600080fd5b823591506116bb6020840161165a565b60006020828403121561179957600080fd5b815160ff811681146114db57600080fd5b600082516117bc818460208701611954565b9190910192915050565b60208152600082518060208401526117e5816040850160208701611954565b601f01601f19169190910160400192915050565b6000821982111561180c5761180c61199b565b500190565b60008261182e57634e487b7160e01b600052601260045260246000fd5b500490565b600181815b8085111561186e5781600019048211156118545761185461199b565b8085161561186157918102915b93841c9390800290611838565b509250929050565b60006109c3838360008261188c575060016109c6565b81611899575060006109c6565b81600181146118af57600281146118b9576118d5565b60019150506109c6565b60ff8411156118ca576118ca61199b565b50506001821b6109c6565b5060208310610133831016604e8410600b84101617156118f8575081810a6109c6565b6119028383611833565b80600019048211156119165761191661199b565b029392505050565b60008160001904831182151516156119385761193861199b565b500290565b60008282101561194f5761194f61199b565b500390565b60005b8381101561196f578181015183820152602001611957565b838111156113815750506000910152565b60006000198214156119945761199461199b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b801515811461128457600080fdfea2646970667358221220b902b0d2ddf7ad73ec355633277d5de6efa377d3cf422fef807bfc625f5e711f64736f6c634300080700330000000000000000000000005817d4f0b62a59b17f75207da1848c2ce75e7af400000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8000000000000000000000000dfda9a6a113ad32cfbe34ea85dddbb74cb22768c0000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5

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

0000000000000000000000005817d4f0b62a59b17f75207da1848c2ce75e7af400000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8000000000000000000000000dfda9a6a113ad32cfbe34ea85dddbb74cb22768c0000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5

-----Decoded View---------------
Arg [0] : _stakingToken (address): 0x5817d4f0b62a59b17f75207da1848c2ce75e7af4
Arg [1] : _rewardToken (address): 0x22d4002028f537599be9f666d1c4fa138522f9c8
Arg [2] : _operator (address): 0xdfda9a6a113ad32cfbe34ea85dddbb74cb22768c
Arg [3] : _rewardManager (address): 0x8b3d9f0017fa369cd8c164d0cc078bf4ca588ae5

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000005817d4f0b62a59b17f75207da1848c2ce75e7af4
Arg [1] : 00000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8
Arg [2] : 000000000000000000000000dfda9a6a113ad32cfbe34ea85dddbb74cb22768c
Arg [3] : 0000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.