Contract 0xFb39D0D80dd4f0266068A543297E1aB89Ba9fE6d

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x72ee9f1a06d88df1605dc112fcc8aaf1b4d6c2b24f9157fff2cd0be20cf722d894241422021-07-24 1:46:003 hrs 38 mins ago0x2169e47f429709d427a253d91683fc0c7caa0e31 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00052665
0xaf335be2a67b0a6524d4bd3f4ecb7719b6c053cda61481f0f13e6d4ff41fa7fb94241102021-07-24 1:44:243 hrs 39 mins ago0x2169e47f429709d427a253d91683fc0c7caa0e31 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.000398975
0x1153a9fbe2a3cb9a647aece809eca738c60ade17fadbff12cf25f726b7b0f88894238032021-07-24 1:29:033 hrs 55 mins ago0x2169e47f429709d427a253d91683fc0c7caa0e31 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059939
0xefb0d8aa5ab44794079687acc52bb6d7db382d9e9ba8f9aa642d362ec97061cb94174712021-07-23 20:12:189 hrs 12 mins ago0x5455c35697666dfc42ddc52a4557d9134f437ca8 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059939
0x010a0462d3c094328b2fc29a30744ca11452b51fd5d84dbfe23ecee0571a25d294111132021-07-23 14:50:1814 hrs 34 mins ago0x02410b74fe57a052ee88e5a9ed4acd003cf54ea6 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059933
0x52c9ec151b392dce6b4d93b860de8ad91b1218ca446573a9f257af9b7c4a1b2994111072021-07-23 14:50:0014 hrs 34 mins ago0x02410b74fe57a052ee88e5a9ed4acd003cf54ea6 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00038154
0x9dbb8335824fbb940e84a963284dd54b9478d18292f28bef8d8264f2b3d2b9b394107812021-07-23 14:33:4214 hrs 50 mins ago0x8812d7971849d754c2e9149be172b3a1743aac84 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00052665
0xcc8f31a06fd6d4b0850d7599d1ed72c06826a5179e4893b82fdb298d01a2b6d494106942021-07-23 14:29:2114 hrs 54 mins ago0xc9dcf3de6fdd837d1d42d6fde227d6d06d9c5c01 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059939
0x7a59a53758d91b26f629d2b4b725226ca127e07961f3b2829cbf8537a7c472c594091362021-07-23 13:10:1616 hrs 14 mins ago0x2c7bddb798218285d6bff529908ec8da2e6e6386 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059939
0x9d0a981cdc8d066b390a8e3c98dced01028e287f9a1798da87a67cc6a2bbe87f94085262021-07-23 12:39:1916 hrs 45 mins ago0x3786ebbadb80ec13d9e6c0af5a94b03b3629a516 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00052659
0x40288729748ba1f3e75d506eb88bbd2b9786b1f9407e2191bed4a53354add3d594084712021-07-23 12:36:3416 hrs 47 mins ago0x3786ebbadb80ec13d9e6c0af5a94b03b3629a516 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.000398975
0x2167a56a61d03e068b5609d27550cb39e7799403b35f2eec2f54da43a22113b394083742021-07-23 12:31:4016 hrs 52 mins ago0x5848b08120e5b5220dbe4d26693b4925d3a7eaca IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059927
0xae3cbd2805464ec403962e8c9f7c6d2de4f305357f538bbf752495c91c73a0b994083512021-07-23 12:30:2516 hrs 53 mins ago0x5848b08120e5b5220dbe4d26693b4925d3a7eaca IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059939
0x4a0fd68b4cc8461ec4126b45955295e49f4407258b9a4d78065dbb65b1a86acd94075422021-07-23 11:49:1617 hrs 35 mins ago0x4d9f584b57c22bd7438e54927abb6a4ea3f2d8b2 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059933
0xa5375b93994361bd306541619eab326a78ce1c11ee6adb237362a8c6db7ce9c794075372021-07-23 11:49:0117 hrs 35 mins ago0x4d9f584b57c22bd7438e54927abb6a4ea3f2d8b2 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00038154
0xfd70c1d186ede7c1887810d95e0b82d7ee75add0b672aaee008c0afe48e57fda94063952021-07-23 10:51:5018 hrs 32 mins ago0x267c2d469820013f455d98eb2a5f4508d2e8ddd8 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059933
0x8e1d0c34b95b0a3144ec15f0da09088ed55b429e5ae4da53f2ddbd7779238e9994050712021-07-23 9:45:1119 hrs 39 mins ago0xbbde6705856e4f79703dc1921ee0fd545e8cd780 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.000473975
0x813f0e7625527cadd130a2871e83d2e4bce2444e67907a3049baf336c18f255294040452021-07-23 8:53:5320 hrs 30 mins ago0xee8e5b5301771d956d419ba2650d11860f85380b IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059933
0xcd159d0f492b065b614bff70a3a2395fb44c83174b9ea3f8c7526aed3f1eedb893992062021-07-23 4:51:511 day 32 mins ago0x1b04d41d4d45906d98c4862835a2eb4dbf28a19a IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059933
0x61279ff5d8cf92f358e8c7b9e7e97c9cf86378e94484eaa1a2c8a52cc2895c9293992002021-07-23 4:51:331 day 32 mins ago0x1b04d41d4d45906d98c4862835a2eb4dbf28a19a IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00038154
0x41d9cb0fab8a70552359c3dc7ce3b89a17d071166a6888c510748cfca1fedecf93971442021-07-23 3:08:451 day 2 hrs ago0x89951bda1ac29770e0bc3935a65ba88b1d622c1a IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00052647
0x1346fbe49472f2b9d3c185e007497b4120c79d21365fb3f1aaf6b0613dfff98493969842021-07-23 3:00:451 day 2 hrs ago0x2169e47f429709d427a253d91683fc0c7caa0e31 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00052665
0x3d4fe800971714a97f619fe1811d06d2fd4d4dfc7f179010f102d222bf5dc45193969112021-07-23 2:57:061 day 2 hrs ago0x2169e47f429709d427a253d91683fc0c7caa0e31 IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.000473975
0x9c52539904feec435dd16458c4321d220aeee1ddca8ff304b82f400bcbb5419e93897282021-07-22 20:57:291 day 8 hrs ago0x3462bc58b963668c19e45b796adab9ffcd470daa IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00059933
0x9742c8f482707b4d35206a69bc01a913e31e4587eaeb6d35c6c5e18a7336e95693897192021-07-22 20:57:021 day 8 hrs ago0x3462bc58b963668c19e45b796adab9ffcd470daa IN  0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d0 BNB0.00038154
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x88c203fdf04be92fbc7012054f045a18ff0ca7b725bb50c085ab87ffefb9523480862332021-06-07 9:54:4346 days 19 hrs ago 0xfb39d0d80dd4f0266068a543297e1ab89ba9fe6d  Contract Creation0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakePool

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : StakePool.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.4;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { RewardTreasury } from "./RewardTreasury.sol";

/**
 * @dev The StakePool contract allows users to stake tokens in exchange for rewards.
 * Rewards can be distributed in any token, be it the same token that is being staked
 * or another one.
 *
 * A fixed number of reward tokens is distributed every block.
 * This amount can be updated anytime by the contract owner and the update will
 * be effective from the next block.
 *
 * The amount of reward entitled to each user is calculated based on its
 * weight in the pool.
 *
 * The pool opens at a specific start block.
 * After the start block is reached, users will be able to {deposit} stake tokens.
 * To receive all the accrued rewards to their wallet, they can call the {claimReward} function.
 *
 * When the end block is reached, no more rewards will be distributed and deposits will be disabled.
 * Staked tokens are still withdrawable through the {widthdraw} function and pending reward can still be claimed.
 *
 * Every time tokens are deposited or withdrawn, all the pending rewards are automatically sent to user's wallet.
 */
contract StakePool is Ownable {
    using SafeERC20 for IERC20;

    /// @dev Info of each user.
    struct UserInfo {
        // How many `stakeTokens` the user has provided.
        uint256 amount;
        // Reward debt. See explanation below.
        uint256 rewardDebt;
        //
        // Any point in time, the amount of reward tokens entitled to a user
        // but is pending to be distributed is:
        //
        //   pendingReward = (user.amount * pool.accRewardPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws tokens to the pool:
        //   1. The `accRewardPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    /// @dev The token to be staked.
    IERC20 public stakeToken;
    /// @dev The token in which rewards are distributed.
    IERC20 public rewardToken;
    /// @dev The treasury contract that holds the reward tokens to be distributed.
    RewardTreasury public rewardTreasury;
    /// @dev The most recent block up to which the rewards have been calculated.
    uint256 public lastRewardBlock;
    /// @dev Accumulated reward per share, times 1e12. See explanation above.
    uint256 public accRewardPerShare;
    /// @dev The total amount of tokens staked.
    uint256 public totalStakedTokens;
    /// @dev The block when reward distribution starts.
    uint256 public startBlock;
    /// @dev The block when reward distribution ends.
    uint256 public endBlock;
    /// @dev Reward tokens to be distributed per block.
    uint256 public rewardPerBlock;
    /// @dev Info of each user that stakes tokens.
    mapping (address => UserInfo) public usersInfo;

    /// @dev Emitter when `user` deposits some tokens.
    event Deposit(address indexed user, uint256 amount);
    /// @dev Emitter when `user` withdraws some tokens.
    event Withdraw(address indexed user, uint256 amount);
    /// @dev Emitter when `user` claims the accrues rewards.
    event RewardClaim(address indexed user, uint256 amount);
    /// @dev Emitter when `user` performs an emergency withdraw.
    event EmergencyWithdraw(address indexed user, uint256 amount);

    /**
     * @dev Initializes state variables.
     */
    constructor(
        IERC20 stakeToken_,
        IERC20 rewardToken_,
        uint256 startBlock_,
        uint256 endBlock_,
        uint256 rewardPerBlock_
    ) {
        stakeToken = stakeToken_;
        rewardToken = rewardToken_;
        startBlock = startBlock_;
        endBlock = endBlock_;
        rewardPerBlock = rewardPerBlock_;
        rewardTreasury = new RewardTreasury(rewardToken_);
    }

    /**
     * @dev Adds reward tokens to the `rewardTreasury`.
     */
    function addRewardTokens(uint256 amount) external {
        rewardToken.safeTransferFrom(msg.sender, address(rewardTreasury), amount);
    }

    /**
     * @dev Removes reward tokens from the `rewardTreasury`.
     *
     * Requirements:
     *
     * - caller must be the owner.
     */
    function removeRewardTokens(uint256 amount) external onlyOwner {
        rewardTreasury.sendReward(msg.sender, amount);
    }

    /**
     * @dev Updates the reward distributed for each block.
     *
     * Requirements:
     *
     * - caller must be the owner.
     */
    function setRewardPerBlock(uint256 rewardPerBlock_) external onlyOwner {
        _updatePool();

        rewardPerBlock = rewardPerBlock_;
    }

    /**
     * @dev Updates the block when reward distribution ends.
     *
     * Requirements:
     *
     * - caller must be the owner.
     */
    function setEndBlock(uint256 endBlock_) external onlyOwner {
        require(endBlock_ >= block.number, "Pool: new endBlock is in the past");

        _updatePool();

        if (endBlock < block.number) {
            lastRewardBlock = block.number;
        }

        endBlock = endBlock_;
    }

    /**
     * @dev Deposits tokens.
     *
     * Pending reward will be automatically sent to user's wallet.
     */
    function deposit(uint256 amount) external {
        require(amount > 0, "Pool: deposit amount is zero");
        require(block.number >= startBlock, "Pool: pool is not open yet");
        require(block.number < endBlock, "Pool: pool is already closed");

        UserInfo storage userInfo = usersInfo[msg.sender];

        _updatePool();

        if (userInfo.amount > 0) {
            _sendReward(msg.sender);
        }

        userInfo.amount += amount;
        userInfo.rewardDebt = userInfo.amount * accRewardPerShare / 1e12;
        totalStakedTokens += amount;

        stakeToken.safeTransferFrom(msg.sender, address(this), amount);

        emit Deposit(msg.sender, amount);
    }

    /**
     * @dev Withdraws tokens.
     *
     * Pending reward will be automatically sent to user's wallet.
     */
    function withdraw(uint256 amount) external {
        require(amount > 0, "Pool: withdraw amount is zero");

        UserInfo storage userInfo = usersInfo[msg.sender];

        require(userInfo.amount >= amount, "Pool: not enough staked tokens");

        _updatePool();
        _sendReward(msg.sender);

        userInfo.amount -= amount;
        userInfo.rewardDebt = userInfo.amount * accRewardPerShare / 1e12;
        totalStakedTokens -= amount;

        stakeToken.safeTransfer(msg.sender, amount);

        emit Withdraw(msg.sender, amount);
    }

    /**
     * @dev Sends all the accrued reward to user's wallet.
     */
    function claimReward() external {
        UserInfo storage userInfo = usersInfo[msg.sender];

        require(userInfo.amount > 0, "Pool: no staked token");

        _updatePool();
        _sendReward(msg.sender);
    }

    /**
     * @dev Withdraws all tokens without caring about the reward.
     *
     * Only for emergencies.
     */
    function emergencyWithdraw() external {
        UserInfo storage userInfo = usersInfo[msg.sender];

        require(userInfo.amount > 0, "Pool: nothing to withdraw");

        uint256 amount = userInfo.amount;

        userInfo.amount = 0;
        userInfo.rewardDebt = 0;
        totalStakedTokens -= amount;

        stakeToken.safeTransfer(msg.sender, amount);

        emit EmergencyWithdraw(msg.sender, amount);
    }

    /**
     * @dev Returns the amount of pending reward to be claimed.
     */
    function getPendingReward(address user) public view returns (uint256) {
        UserInfo storage userInfo = usersInfo[user];

        uint256 lastProfitableBlock = block.number > endBlock ? endBlock : block.number;
        uint256 currentAccRewardPerShare = accRewardPerShare;

        if (lastProfitableBlock > lastRewardBlock && totalStakedTokens != 0) {
            uint256 elapsedBlocks = lastProfitableBlock - lastRewardBlock;
            uint256 reward = rewardPerBlock * elapsedBlocks;

            currentAccRewardPerShare = accRewardPerShare + reward * 1e12 / totalStakedTokens;
        }

        return userInfo.amount * currentAccRewardPerShare / 1e12 - userInfo.rewardDebt;
    }

    /**
     * @dev Updated contract variables to be up-to-date.
     */
    function _updatePool() internal {
        uint256 lastProfitableBlock = block.number > endBlock ? endBlock : block.number;

        if (lastProfitableBlock <= lastRewardBlock) {
            return;
        }

        if (totalStakedTokens == 0) {
            lastRewardBlock = lastProfitableBlock;
            return;
        }

        uint256 elapsedBlocks = lastProfitableBlock - lastRewardBlock;
        uint256 reward = rewardPerBlock * elapsedBlocks;

        accRewardPerShare += reward * 1e12 / totalStakedTokens;
        lastRewardBlock = lastProfitableBlock;
    }

    /**
     * @dev Internal function to send all the accrued reward to user's wallet.
     *
     * [WARNING]
     * The pool must be updated with {_updatePool} before calling this function.
     */
    function _sendReward(address user) internal {
        uint256 pendingReward = getPendingReward(user);

        if (pendingReward > 0) {
            UserInfo storage userInfo = usersInfo[user];
            userInfo.rewardDebt = userInfo.amount * accRewardPerShare / 1e12;

            rewardTreasury.sendReward(user, pendingReward);

            emit RewardClaim(user, pendingReward);
        }
    }
}

File 2 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // 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) + 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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        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 7 : RewardTreasury.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.4;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @dev The RewardTresury contract stores the tokens to be sent as reward
 * for the StakePool.
 */
contract RewardTreasury is Ownable {
    using SafeERC20 for IERC20;

    /// @dev The token in which rewards are distributed
    IERC20 public token;

    /**
     * @dev Initializes state variables.
     */
    constructor(IERC20 token_) {
        token = token_;
    }

    /**
     * @dev Transfers the reward to user's wallet.
     */
    function sendReward(address to, uint256 amount) external onlyOwner {
        token.safeTransfer(to, amount);
    }
}

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

pragma solidity ^0.8.0;

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

        uint256 size;
        // 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);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"stakeToken_","type":"address"},{"internalType":"contract IERC20","name":"rewardToken_","type":"address"},{"internalType":"uint256","name":"startBlock_","type":"uint256"},{"internalType":"uint256","name":"endBlock_","type":"uint256"},{"internalType":"uint256","name":"rewardPerBlock_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"accRewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addRewardTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getPendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"removeRewardTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTreasury","outputs":[{"internalType":"contract RewardTreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"endBlock_","type":"uint256"}],"name":"setEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardPerBlock_","type":"uint256"}],"name":"setRewardPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedTokens","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":"","type":"address"}],"name":"usersInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405162001a2f38038062001a2f83398101604081905261003191610141565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b038088166001600160a01b031992831617909255600280549287169290911691909117905560078390556008829055600981905560405184906100bf90610117565b6001600160a01b039091168152602001604051809103906000f0801580156100eb573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b03929092169190911790555061018e9350505050565b61075280620012dd83390190565b80516001600160a01b038116811461013c57600080fd5b919050565b600080600080600060a08688031215610158578081fd5b61016186610125565b945061016f60208701610125565b6040870151606088015160809098015196999198509695945092505050565b61113f806200019e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063939d6237116100b8578063c713aa941161007c578063c713aa9414610279578063c7c934a11461028c578063db1e13601461029f578063db2e21bc146102b2578063f2fde38b146102ba578063f7c618c1146102cd57600080fd5b8063939d623714610239578063a9f8d18114610242578063b6b55f251461024b578063b88a802f1461025e578063bb872b4a1461026657600080fd5b806351ed6a301161010a57806351ed6a301461019d57806358eb9700146101c85780635d0eaaaf146101db578063715018a6146102175780638ae39cac1461021f5780638da5cb5b1461022857600080fd5b8063083c6323146101475780632e1a7d4d146101635780633ae732591461017857806348cd4cb1146101815780634df9d6ba1461018a575b600080fd5b61015060085481565b6040519081526020015b60405180910390f35b610176610171366004610fbd565b6102e0565b005b61015060065481565b61015060075481565b610150610198366004610f76565b61044e565b6001546101b0906001600160a01b031681565b6040516001600160a01b03909116815260200161015a565b6101766101d6366004610fbd565b610522565b6102026101e9366004610f76565b600a602052600090815260409020805460019091015482565b6040805192835260208301919091520161015a565b610176610544565b61015060095481565b6000546001600160a01b03166101b0565b61015060055481565b61015060045481565b610176610259366004610fbd565b6105b8565b610176610773565b610176610274366004610fbd565b6107d9565b610176610287366004610fbd565b610810565b6003546101b0906001600160a01b031681565b6101766102ad366004610fbd565b6108b0565b610176610941565b6101766102c8366004610f76565b610a0c565b6002546101b0906001600160a01b031681565b600081116103355760405162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a20776974686472617720616d6f756e74206973207a65726f00000060448201526064015b60405180910390fd5b336000908152600a6020526040902080548211156103955760405162461bcd60e51b815260206004820152601e60248201527f506f6f6c3a206e6f7420656e6f756768207374616b656420746f6b656e730000604482015260640161032c565b61039d610af6565b6103a633610b86565b818160000160008282546103ba91906110b0565b9091555050600554815464e8d4a51000916103d491611091565b6103de9190611071565b816001018190555081600660008282546103f891906110b0565b9091555050600154610414906001600160a01b03163384610c84565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a25050565b6001600160a01b0381166000908152600a6020526040812060085482904311610477574361047b565b6008545b6005546004549192509082118015610494575060065415155b156104ec576000600454836104a991906110b0565b90506000816009546104bb9190611091565b6006549091506104d08264e8d4a51000611091565b6104da9190611071565b6005546104e79190611059565b925050505b6001830154835464e8d4a5100090610505908490611091565b61050f9190611071565b61051991906110b0565b95945050505050565b600354600254610541916001600160a01b039182169133911684610cec565b50565b6000546001600160a01b0316331461056e5760405162461bcd60e51b815260040161032c90611024565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600081116106085760405162461bcd60e51b815260206004820152601c60248201527f506f6f6c3a206465706f73697420616d6f756e74206973207a65726f00000000604482015260640161032c565b60075443101561065a5760405162461bcd60e51b815260206004820152601a60248201527f506f6f6c3a20706f6f6c206973206e6f74206f70656e20796574000000000000604482015260640161032c565b60085443106106ab5760405162461bcd60e51b815260206004820152601c60248201527f506f6f6c3a20706f6f6c20697320616c726561647920636c6f73656400000000604482015260640161032c565b336000908152600a602052604090206106c2610af6565b8054156106d2576106d233610b86565b818160000160008282546106e69190611059565b9091555050600554815464e8d4a510009161070091611091565b61070a9190611071565b816001018190555081600660008282546107249190611059565b9091555050600154610741906001600160a01b0316333085610cec565b60405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90602001610442565b336000908152600a6020526040902080546107c85760405162461bcd60e51b81526020600482015260156024820152742837b7b61d1037379039ba30b5b2b2103a37b5b2b760591b604482015260640161032c565b6107d0610af6565b61054133610b86565b6000546001600160a01b031633146108035760405162461bcd60e51b815260040161032c90611024565b61080b610af6565b600955565b6000546001600160a01b0316331461083a5760405162461bcd60e51b815260040161032c90611024565b438110156108945760405162461bcd60e51b815260206004820152602160248201527f506f6f6c3a206e657720656e64426c6f636b20697320696e20746865207061736044820152601d60fa1b606482015260840161032c565b61089c610af6565b4360085410156108ab57436004555b600855565b6000546001600160a01b031633146108da5760405162461bcd60e51b815260040161032c90611024565b6003546040516307420a4160e01b8152336004820152602481018390526001600160a01b03909116906307420a4190604401600060405180830381600087803b15801561092657600080fd5b505af115801561093a573d6000803e3d6000fd5b5050505050565b336000908152600a60205260409020805461099e5760405162461bcd60e51b815260206004820152601960248201527f506f6f6c3a206e6f7468696e6720746f20776974686472617700000000000000604482015260640161032c565b8054600080835560018301819055600680548392906109be9084906110b0565b90915550506001546109da906001600160a01b03163383610c84565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969590602001610442565b6000546001600160a01b03163314610a365760405162461bcd60e51b815260040161032c90611024565b6001600160a01b038116610a9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161032c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006008544311610b075743610b0b565b6008545b90506004548111610b195750565b600654610b2557600455565b600060045482610b3591906110b0565b9050600081600954610b479190611091565b600654909150610b5c8264e8d4a51000611091565b610b669190611071565b60056000828254610b779190611059565b90915550505060049190915550565b6000610b918261044e565b90508015610c80576001600160a01b0382166000908152600a60205260409020600554815464e8d4a5100091610bc691611091565b610bd09190611071565b60018201556003546040516307420a4160e01b81526001600160a01b03858116600483015260248201859052909116906307420a4190604401600060405180830381600087803b158015610c2357600080fd5b505af1158015610c37573d6000803e3d6000fd5b50505050826001600160a01b03167f75690555e75b04e280e646889defdcbefd8401507e5394d1173fd84290944c2983604051610c7691815260200190565b60405180910390a2505b5050565b6040516001600160a01b038316602482015260448101829052610ce790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610d2a565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d249085906323b872dd60e01b90608401610cb0565b50505050565b6000610d7f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610dfc9092919063ffffffff16565b805190915015610ce75780806020019051810190610d9d9190610f9d565b610ce75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161032c565b6060610e0b8484600085610e15565b90505b9392505050565b606082471015610e765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161032c565b843b610ec45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161032c565b600080866001600160a01b03168587604051610ee09190610fd5565b60006040518083038185875af1925050503d8060008114610f1d576040519150601f19603f3d011682016040523d82523d6000602084013e610f22565b606091505b5091509150610f32828286610f3d565b979650505050505050565b60608315610f4c575081610e0e565b825115610f5c5782518084602001fd5b8160405162461bcd60e51b815260040161032c9190610ff1565b600060208284031215610f87578081fd5b81356001600160a01b0381168114610e0e578182fd5b600060208284031215610fae578081fd5b81518015158114610e0e578182fd5b600060208284031215610fce578081fd5b5035919050565b60008251610fe78184602087016110c7565b9190910192915050565b60208152600082518060208401526110108160408501602087016110c7565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561106c5761106c6110f3565b500190565b60008261108c57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156110ab576110ab6110f3565b500290565b6000828210156110c2576110c26110f3565b500390565b60005b838110156110e25781810151838201526020016110ca565b83811115610d245750506000910152565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220b45d9713d4d48964758883db374f9183f1e1a002d2f6e638f685c52f36dd71af64736f6c63430008040033608060405234801561001057600080fd5b5060405161075238038061075283398101604081905261002f91610095565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100c3565b6000602082840312156100a6578081fd5b81516001600160a01b03811681146100bc578182fd5b9392505050565b610680806100d26000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806307420a411461005c578063715018a6146100715780638da5cb5b14610079578063f2fde38b146100a2578063fc0c546a146100b5575b600080fd5b61006f61006a36600461054d565b6100c8565b005b61006f610116565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f6100b0366004610533565b61018a565b600154610086906001600160a01b031681565b6000546001600160a01b031633146100fb5760405162461bcd60e51b81526004016100f2906105e5565b60405180910390fd5b600154610112906001600160a01b03168383610274565b5050565b6000546001600160a01b031633146101405760405162461bcd60e51b81526004016100f2906105e5565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146101b45760405162461bcd60e51b81526004016100f2906105e5565b6001600160a01b0381166102195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100f2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526102c69084906102cb565b505050565b6000610320826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661039d9092919063ffffffff16565b8051909150156102c6578080602001905181019061033e9190610576565b6102c65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100f2565b60606103ac84846000856103b6565b90505b9392505050565b6060824710156104175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016100f2565b843b6104655760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100f2565b600080866001600160a01b031685876040516104819190610596565b60006040518083038185875af1925050503d80600081146104be576040519150601f19603f3d011682016040523d82523d6000602084013e6104c3565b606091505b50915091506104d38282866104de565b979650505050505050565b606083156104ed5750816103af565b8251156104fd5782518084602001fd5b8160405162461bcd60e51b81526004016100f291906105b2565b80356001600160a01b038116811461052e57600080fd5b919050565b600060208284031215610544578081fd5b6103af82610517565b6000806040838503121561055f578081fd5b61056883610517565b946020939093013593505050565b600060208284031215610587578081fd5b815180151581146103af578182fd5b600082516105a881846020870161061a565b9190910192915050565b60208152600082518060208401526105d181604085016020870161061a565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561063557818101518382015260200161061d565b83811115610644576000848401525b5050505056fea2646970667358221220acf28302c11dc0a925164ccd1a42d19e0e8f35090960d72b170ee04d2e84b8b764736f6c63430008040033000000000000000000000000feea0bdd3d07eb6fe305938878c0cadbfa169042000000000000000000000000feea0bdd3d07eb6fe305938878c0cadbfa16904200000000000000000000000000000000000000000000000000000000007bf94e000000000000000000000000000000000000000000000000000000000089284e000000000000000000000000000000000000000000000000016345785d8a0000

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

000000000000000000000000feea0bdd3d07eb6fe305938878c0cadbfa169042000000000000000000000000feea0bdd3d07eb6fe305938878c0cadbfa16904200000000000000000000000000000000000000000000000000000000007bf94e000000000000000000000000000000000000000000000000000000000089284e000000000000000000000000000000000000000000000000016345785d8a0000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000feea0bdd3d07eb6fe305938878c0cadbfa169042
Arg [1] : 000000000000000000000000feea0bdd3d07eb6fe305938878c0cadbfa169042
Arg [2] : 00000000000000000000000000000000000000000000000000000000007bf94e
Arg [3] : 000000000000000000000000000000000000000000000000000000000089284e
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000


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