Contract 0x24273Ccb1A50f8B322a49D5a760c65c522772Eed

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4771879e10dfd4feac09b9abd0b65664f83555fb4414b47d749ec2bfdf4357caWork129724852021-11-26 14:42:001 day 8 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004403465
0x64126c8660fc828ff142623a2623ca5ad5ebfabc30627e465d9d96de5add2a7eWork126708022021-11-15 13:51:1712 days 9 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00446634
0x8c7fae34a605a260ddf261e5405c36efa486ac20bca5bd95be02c12226c92a79Work123926692021-11-05 16:19:2022 days 6 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004478465
0xd8ac792a5acd24fab9e85fa59e2f03da7cc70cf57029a6bfeb45cdb78d5fff30Work122040002021-10-29 23:08:0929 days 7 mins ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004658455
0x11a947794b69b8b2be36a0b3d630c8af8cc0ab8a9ff94146a308e052492cd11eWork120390362021-10-24 3:19:5334 days 19 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.003878595
0x9fa962fef89e6b7b7e527ce49e4de431080510252ccca266dee03f00d68f8c59Withdraw118603682021-10-17 20:18:1141 days 2 hrs ago0x74c6126b40a29c0a74a3a61bfafd7ae1cecb7f43 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00449823
0x6a3996415a146f81b2bd856023dd5f12f9fd75c56b8fe2a590a80937e0497932Work116850592021-10-11 16:43:0047 days 6 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00464344
0x9c06e808773617852b46f4e06c0d9f60526a01e36697718cafeb7b79a7cd8479Work114528872021-10-03 14:38:0255 days 8 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004581545
0x5c2f3e0a7b361b78a5b149ca004d0c02139447b52902b30c631519d20c8f27ffWork112824872021-09-27 15:10:3261 days 8 hrs ago0x416dc380d2684dd887e4132fdace8e6bb07cba2f IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.003938675
0x0ec280752b1f381d97e6e2972d1e42b3d972b0ef445b9a5f268fad2b9e2083e0Withdraw104116482021-08-28 3:46:5091 days 19 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.0049145
0x7136e6a49f90624c4975c04c88ec40a10536ec33fdb2337707ec32a380f534deApprove103793392021-08-26 23:54:4192 days 23 hrs ago0x74c6126b40a29c0a74a3a61bfafd7ae1cecb7f43 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00022077
0x5af40b4853dd2b02f36b7897da5ef4a068e361078fdb205a19284b9ddeb5f1c5Deposit103791322021-08-26 23:44:2092 days 23 hrs ago0x74c6126b40a29c0a74a3a61bfafd7ae1cecb7f43 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00499441
0x587fced593fed3a71c88e9824cce11bdcd847d5be665a1c4c365cd5898890126Withdraw103676012021-08-26 14:07:3193 days 9 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.005124745
0xe28a3e4dda8ff3500191de11b07f2824b77f67c3a56f9fc2d7313f1d7daa86f1Withdraw103669292021-08-26 13:33:1793 days 9 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004651105
0xa57e7b16981fd37457be026a78fdd42631e8c3dd60dca12963816dc3908fe0fdWithdraw103667742021-08-26 13:25:2693 days 9 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.001107805
0x5d6be512ee504d91ae20421f2ade765620f0420a3e3e3850dae98c6522e9a985Approve103646012021-08-26 11:36:3993 days 11 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00022077
0xc91e98f20f691477767bc6c9087348f8134fd063cb0e46d844339b84a39f7d12Deposit103645692021-08-26 11:35:0393 days 11 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00297187
0x0308f52528d0737756f1cbf3ecd9620873b696e97eab224e7a6580a50f82ab46Deposit103644582021-08-26 11:29:3093 days 11 hrs ago0xc90d3f33baef4deca7356e1fd5f04287f7c6f366 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.001049195
0x4d4789eede65420c9c141aa80ad10e9bdae8ec0fbb6c96d694f17fe7daf8695bWithdraw103628482021-08-26 10:08:5893 days 13 hrs ago0xc3d47c0572689a412289036e92150ecabe2f9584 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00458162
0xff100ed191df27e4f671a4f7ff09fdd6b73d556f996346dc4b666978272ce59dWithdraw101953712021-08-20 13:45:4799 days 9 hrs ago0xc3d47c0572689a412289036e92150ecabe2f9584 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00455831
0x4b0723a19188c53abc9cb51a2cd50fc3c4a5bd1df3ba46c813b0882fb43b7563Withdraw101661142021-08-19 13:15:02100 days 10 hrs ago0x20f38a29a4b165fd34e35134f0775b7ab3f4ec13 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004836705
0x02bcc5f98b164531070557737bf88e317e9ee657dfad47a934ebace4c15b9935Withdraw100427032021-08-15 6:03:08104 days 17 hrs ago0xc3d47c0572689a412289036e92150ecabe2f9584 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00455831
0xf6a8586c5378daf53b271775f0546074c77917a47be8e618dc89d85a7d88beb0Withdraw98608852021-08-08 19:18:49111 days 3 hrs ago0x4c7815e61b150a4e67506d41308a4b072470efbe IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.004816115
0x27ae1644a6724f6c1c7bae726e36cc786416ddb04f44efe5affe606f27527c10Approve98508532021-08-08 10:43:27111 days 12 hrs ago0xc3d47c0572689a412289036e92150ecabe2f9584 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00022071
0x9487529fb711c7391e3d0cd4065bb1b61ea6126513444c8212b9e12afc437edbDeposit98507782021-08-08 10:39:14111 days 12 hrs ago0xc3d47c0572689a412289036e92150ecabe2f9584 IN  0x24273ccb1a50f8b322a49d5a760c65c522772eed0 BNB0.00493439
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xEf4181E7EAfc31580E2479F61fdd4C3d79aCFf6C

Contract Name:
InfiniteeVault

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : InfiniteeVault.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "../interface/Vault.sol";
import "../interface/FeeManager.sol";
import "../interface/YieldWorker.sol";

contract InfiniteeVault is ERC20, Vault, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    // Info about reward, amount of user.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 withdrawableBlock;
    }

    // The yield worker currently in use by the vault.
    YieldWorker public worker;
    // Fee Manager for calculate vault fee.
    FeeManager public feeManager;
    // Reward amount per share.
    uint256 public rewardPerShare;
    // Total share amount minted
    uint256 public totalShare;
    // Delay block for withdraw after deposit into vault.
    uint256 public delayWithdrawalBlock = 1;
    // Info of each user that using vaults.
    mapping(address => UserInfo) public userInfos;
    // Operator address.
    address public operator;
    // Maximum withdrawal delay blocks (1200 Blocks ~ 1 Hour)
    uint256 constant public MAX_WITHDRAWAL_DELAY = 1200;

    modifier onlyOperator {
        require(msg.sender == operator, "permission: not operator!");
        _;
    }

    event Deposit(address user, uint256 amount);
    event Withdraw(address user, uint256 amount);
    event OperatorWork(uint256 rewardPerShare);
    event WorkerChanged(address newWorker);
    event FeeManagerChanged(address newFeeManager);

    constructor(
        YieldWorker _worker,
        FeeManager _feeManager,
        string memory _name,
        string memory _symbol
    ) public ERC20(_name, _symbol) {
        worker = _worker;
        feeManager = _feeManager;
        operator = msg.sender;
    }

    // View

    function farmToken() public view override returns (address) {
        return worker.farmToken();
    }

    function rewardToken() public view override returns (address) {
        return worker.userRewardToken();
    }

    function pendingReward() public view override returns (uint256) {
        return worker.pendingReward();
    }

    function totalRewardPerShare() public view override returns (uint256) {
        uint256 _rewardPerShare = rewardPerShare;
        uint256 _pendingReward = pendingReward();
        uint256 _totalSupply = totalShare;

        if (_pendingReward != 0 && _totalSupply != 0) {
            uint256 _pendingRewardPerShare = _pendingReward.mul(1e12).div(_totalSupply);
            _rewardPerShare = _rewardPerShare.add(_pendingRewardPerShare);
        }

        return _rewardPerShare;
    }

    function userPendingReward(address _user) public view override returns (uint256) {
        UserInfo memory user = userInfos[_user];
        uint256 pending = user.amount.mul(totalRewardPerShare()).div(1e12).sub(user.rewardDebt);
        return pending;
    }

    function userInfo(address _user) external view override returns(uint256 amount, uint256 rewardDebt, uint256 withdrawableBlock) {
        UserInfo memory user = userInfos[_user];
        return (user.amount, user.rewardDebt, user.withdrawableBlock);
    }

    // Mutation

    function deposit(uint256 _amount, bytes calldata data) external override nonReentrant {
        UserInfo storage user = userInfos[msg.sender];

        worker.work(data);
        claimRewardAndPayFee();

        if (_amount > 0) {
            IERC20(farmToken()).safeTransferFrom(msg.sender, address(worker), _amount);
            worker.deposit();
            user.amount = user.amount.add(_amount);
            user.withdrawableBlock = block.number.add(delayWithdrawalBlock);
        }

        user.rewardDebt = user.amount.mul(totalRewardPerShare()).div(1e12);

        _mint(msg.sender, _amount);
        totalShare = totalShare.add(_amount);

        emit Deposit(msg.sender, _amount);
    }

    function withdrawAll(bytes calldata data) external override {
        UserInfo storage user = userInfos[msg.sender];
        withdraw(user.amount, data);
    }

    function withdraw(uint256 _amount, bytes calldata data) public override nonReentrant {
        UserInfo storage user = userInfos[msg.sender];
        require(user.amount >= _amount, "withdraw: not enough fund!");
        require(block.number >= user.withdrawableBlock, "withdraw: too fast after deposit!");

        worker.work(data);
        claimRewardAndPayFee();

        if (_amount > 0) {
            uint256 balance = balanceOf(msg.sender);
            require(balance >= _amount, "withdraw: not enough token!");

            _burn(msg.sender, _amount);
            totalShare = totalShare.sub(_amount);
            user.amount = user.amount.sub(_amount);
            
            worker.withdraw(_amount);
            IERC20(farmToken()).safeTransfer(msg.sender, _amount);
        }

        user.rewardDebt = user.amount.mul(totalRewardPerShare()).div(1e12);

        emit Withdraw(msg.sender, _amount);
    }

    function work(bytes calldata data) external override onlyOperator {
        worker.work(data);
        emit OperatorWork(rewardPerShare);
    }

    function updateVault() external override {
        require(msg.sender == address(worker), "vault: only worker!");
        rewardPerShare = totalRewardPerShare();
    }

    function emergencyWithdrawWorker() external onlyOperator {
        worker.emergencyWithdraw();
    }

    function userEmergencyWithdraw() external nonReentrant {
        UserInfo storage user = userInfos[msg.sender];
        uint256 amount = user.amount;
        if (amount > 0) {
            user.amount = 0;
            user.rewardDebt = 0;
            totalShare = totalShare.sub(amount);
            _burn(msg.sender, amount);
            IERC20(farmToken()).safeTransfer(msg.sender, amount);
        }
    }

    function setWorker(YieldWorker _worker) external onlyOwner {
        require(address(worker) == address(0), "Worker is already set.");
        worker = _worker;
        emit WorkerChanged(address(_worker));
    }

    function setFeeManager(FeeManager _feeManager) external onlyOwner {
        feeManager = _feeManager;
        emit FeeManagerChanged(address(_feeManager));
    }

    function setDelayWithdrawalBlock(uint256 _delay) external onlyOwner {
        require(_delay <= MAX_WITHDRAWAL_DELAY, "withdraw delay: must not longer than limit.");
        delayWithdrawalBlock = _delay;
    }

    function setOperator(address _operator) external onlyOperator {
        operator = _operator;
    }

    // Private

    function claimRewardAndPayFee() private {
        uint256 _pendingReward = userPendingReward(msg.sender);

        if (_pendingReward > 0) {
            worker.claimReward(_pendingReward);

            UserInfo memory user = userInfos[msg.sender];
            uint256 _feeRateBPS = feeManager.feeRateBPS(msg.sender, user.amount, user.rewardDebt);

            if (_feeRateBPS > 0) {
                uint256 _fee = _pendingReward.mul(_feeRateBPS).div(10000);
                IERC20(rewardToken()).safeTransfer(feeManager.feeAddress(), _fee);
                IERC20(rewardToken()).safeTransfer(msg.sender, _pendingReward.sub(_fee));
            } else {
                IERC20(rewardToken()).safeTransfer(msg.sender, _pendingReward);
            }
        }
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

File 3 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    mapping (address => uint256) public _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

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

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

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

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

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

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

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

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

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

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

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

File 4 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 6 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

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

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 9 of 12 : Vault.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

interface Vault {
    function farmToken() external view returns (address);
    function rewardToken() external view returns (address);
    function pendingReward() external view returns (uint256);
    function totalRewardPerShare() external view returns (uint256);
    function userPendingReward(address) external view returns (uint256);
    function userInfo(address) external view returns(uint256 amount, uint256 rewardDebt, uint256 withdrawableBlock);
    function deposit(uint256, bytes calldata) external;
    function withdraw(uint256, bytes calldata) external;
    function withdrawAll(bytes calldata) external;
    function work(bytes calldata) external;
    function updateVault() external;
}

File 10 of 12 : FeeManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

interface FeeManager {
    function feeAddress() external view returns (address);
    function feeRateBPS(address user, uint256 _depositAmount, uint256 _debt) external view returns (uint256);
}

File 11 of 12 : YieldWorker.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

interface YieldWorker {
    function farmToken() external view returns (address);

    function farmRewardToken() external view returns (address);

    function userRewardToken() external view returns (address);

    function pendingReward() external view returns (uint256);

    function deposit() external;

    function withdraw(uint256) external;

    function claimReward(uint256) external;

    function work(bytes calldata) external;

    function emergencyWithdraw() external;
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract YieldWorker","name":"_worker","type":"address"},{"internalType":"contract FeeManager","name":"_feeManager","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newFeeManager","type":"address"}],"name":"FeeManagerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"name":"OperatorWork","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newWorker","type":"address"}],"name":"WorkerChanged","type":"event"},{"inputs":[],"name":"MAX_WITHDRAWAL_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delayWithdrawalBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"farmToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeManager","outputs":[{"internalType":"contract FeeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"setDelayWithdrawalBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract FeeManager","name":"_feeManager","type":"address"}],"name":"setFeeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract YieldWorker","name":"_worker","type":"address"}],"name":"setWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userEmergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"withdrawableBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfos","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"withdrawableBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userPendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"work","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"worker","outputs":[{"internalType":"contract YieldWorker","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040526001600b553480156200001657600080fd5b5060405162002e9338038062002e93833981810160405260808110156200003c57600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200006857600080fd5b9083019060208201858111156200007e57600080fd5b82516401000000008111828201881017156200009957600080fd5b82525081516020918201929091019080838360005b83811015620000c8578181015183820152602001620000ae565b50505050905090810190601f168015620000f65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011a57600080fd5b9083019060208201858111156200013057600080fd5b82516401000000008111828201881017156200014b57600080fd5b82525081516020918201929091019080838360005b838110156200017a57818101518382015260200162000160565b50505050905090810190601f168015620001a85780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001c89060039060208501906200029d565b508051620001de9060049060208401906200029d565b50506005805460ff19166012179055506000620001fa62000299565b60058054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35050600160065550600780546001600160a01b039384166001600160a01b031991821617909155600880549290931691811691909117909155600d80549091163317905562000339565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002e057805160ff191683800117855562000310565b8280016001018555821562000310579182015b8281111562000310578251825591602001919060010190620002f3565b506200031e92915062000322565b5090565b5b808211156200031e576000815560010162000323565b612b4a80620003496000396000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c80636ebcf6071161017b578063a9059cbb116100d8578063dd62ed3e1161008c578063f061aaba11610071578063f061aaba14610879578063f2fde38b14610881578063f7c618c1146108a7576102c8565b8063dd62ed3e146107db578063ea827cef14610809576102c8565b8063c2442f93116100bd578063c2442f93146107a5578063c26f6d44146107ad578063d0fb0203146107d3576102c8565b8063a9059cbb14610753578063b3ab15fb1461077f576102c8565b80638da5cb5b1161012f578063a238f9df11610114578063a238f9df14610717578063a457c2d71461071f578063a8f180c41461074b576102c8565b80638da5cb5b1461070757806395d89b411461070f576102c8565b8063715018a611610160578063715018a6146106d15780637174df70146106d95780637196e841146106ff576102c8565b80636ebcf6071461068557806370a08231146106ab576102c8565b806323b872dd11610229578063472d35b9116101dd5780634d547ada116101c25780634d547ada146105e2578063570ca735146106065780635d3035191461060e576102c8565b8063472d35b91461054c5780634a6ee1b114610572576102c8565b8063395093511161020e57806339509351146104f257806343b0215f1461051e578063446a2ec814610544576102c8565b806323b872dd1461049e578063313ce567146104d4576102c8565b8063095ea7b311610280578063137ee36e11610265578063137ee36e1461044a57806318160ddd146104525780631959a0021461045a576102c8565b8063095ea7b3146104025780630f03245014610442576102c8565b806306fdde03116102b157806306fdde0314610360578063083b59df146103dd578063088df973146103e5576102c8565b8063026c4207146102cd578063030ba25d146102e7575b600080fd5b6102d56108af565b60408051918252519081900360200190f35b61035e600480360360408110156102fd57600080fd5b8135919081019060408101602082013564010000000081111561031f57600080fd5b82018360208201111561033157600080fd5b8035906020019184600183028401116401000000008311171561035357600080fd5b5090925090506108b5565b005b610368610c04565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103a257818101518382015260200161038a565b50505050905090810190601f1680156103cf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102d5610cb8565b61035e600480360360208110156103fb57600080fd5b5035610cbe565b61042e6004803603604081101561041857600080fd5b506001600160a01b038135169060200135610d78565b604080519115158252519081900360200190f35b61035e610d96565b6102d5610e44565b6102d5610ed3565b6104806004803603602081101561047057600080fd5b50356001600160a01b0316610ed9565b60408051938452602084019290925282820152519081900360600190f35b61042e600480360360608110156104b457600080fd5b506001600160a01b03813581169160208101359091169060400135610f2e565b6104dc610fb6565b6040805160ff9092168252519081900360200190f35b61042e6004803603604081101561050857600080fd5b506001600160a01b038135169060200135610fbf565b6104806004803603602081101561053457600080fd5b50356001600160a01b031661100d565b6102d561102e565b61035e6004803603602081101561056257600080fd5b50356001600160a01b0316611034565b61035e6004803603602081101561058857600080fd5b8101906020810181356401000000008111156105a357600080fd5b8201836020820111156105b557600080fd5b803590602001918460018302840111640100000000831117156105d757600080fd5b509092509050611114565b6105ea611255565b604080516001600160a01b039092168252519081900360200190f35b6105ea611264565b61035e6004803603604081101561062457600080fd5b8135919081019060408101602082013564010000000081111561064657600080fd5b82018360208201111561065857600080fd5b8035906020019184600183028401116401000000008311171561067a57600080fd5b509092509050611273565b6102d56004803603602081101561069b57600080fd5b50356001600160a01b03166114c6565b6102d5600480360360208110156106c157600080fd5b50356001600160a01b03166114d8565b61035e6114f3565b6102d5600480360360208110156106ef57600080fd5b50356001600160a01b03166115ce565b61035e611648565b6105ea6116b4565b6103686116c8565b6102d5611747565b61042e6004803603604081101561073557600080fd5b506001600160a01b03813516906020013561174d565b6102d56117b5565b61042e6004803603604081101561076957600080fd5b506001600160a01b03813516906020013561180a565b61035e6004803603602081101561079557600080fd5b50356001600160a01b031661181e565b6105ea6118b7565b61035e600480360360208110156107c357600080fd5b50356001600160a01b0316611915565b6105ea611a53565b6102d5600480360360408110156107f157600080fd5b506001600160a01b0381358116916020013516611a62565b61035e6004803603602081101561081f57600080fd5b81019060208101813564010000000081111561083a57600080fd5b82018360208201111561084c57600080fd5b8035906020019184600183028401116401000000008311171561086e57600080fd5b509092509050611a8d565b61035e611aae565b61035e6004803603602081101561089757600080fd5b50356001600160a01b0316611b77565b6105ea611cae565b600a5481565b6002600654141561090d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600655336000908152600c602052604090208054841115610977576040805162461bcd60e51b815260206004820152601a60248201527f77697468647261773a206e6f7420656e6f7567682066756e6421000000000000604482015290519081900360640190fd5b80600201544310156109ba5760405162461bcd60e51b81526004018080602001828103825260218152602001806129f26021913960400191505060405180910390fd5b6007546040517f4a6ee1b1000000000000000000000000000000000000000000000000000000008152602060048201908152602482018590526001600160a01b0390921691634a6ee1b191869186918190604401848480828437600081840152601f19601f8201169050808301925050509350505050600060405180830381600087803b158015610a4a57600080fd5b505af1158015610a5e573d6000803e3d6000fd5b50505050610a6a611d0c565b8315610b97576000610a7b336114d8565b905084811015610ad2576040805162461bcd60e51b815260206004820152601b60248201527f77697468647261773a206e6f7420656e6f75676820746f6b656e210000000000604482015290519081900360640190fd5b610adc3386611f44565b600a54610ae99086612040565b600a558154610af89086612040565b8255600754604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810188905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610b6057600080fd5b505af1158015610b74573d6000803e3d6000fd5b50505050610b953386610b856118b7565b6001600160a01b0316919061209d565b505b610bb964e8d4a51000610bb3610bab6117b5565b84549061211d565b90612176565b6001820155604080513381526020810186905281517f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364929181900390910190a1505060016006555050565b60038054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610cae5780601f10610c8357610100808354040283529160200191610cae565b820191906000526020600020905b815481529060010190602001808311610c9157829003601f168201915b5050505050905090565b600b5481565b610cc66121dd565b6001600160a01b0316610cd76116b4565b6001600160a01b031614610d32576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104b0811115610d735760405162461bcd60e51b815260040180806020018281038252602b8152602001806129a1602b913960400191505060405180910390fd5b600b55565b6000610d8c610d856121dd565b84846121e1565b5060015b92915050565b60026006541415610dee576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600655336000908152600c6020526040902080548015610e3b5760008083556001830155600a54610e219082612040565b600a55610e2e3382611f44565b610e3b3382610b856118b7565b50506001600655565b600754604080517f137ee36e00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163137ee36e916004808301926020929190829003018186803b158015610ea257600080fd5b505afa158015610eb6573d6000803e3d6000fd5b505050506040513d6020811015610ecc57600080fd5b5051905090565b60025490565b6000806000610ee66128f2565b505050506001600160a01b03166000908152600c6020908152604091829020825160608101845281548082526001830154938201849052600290920154930183905292909190565b6000610f3b8484846122cd565b610fab84610f476121dd565b610fa685604051806060016040528060288152602001612a34602891396001600160a01b038a16600090815260016020526040812090610f856121dd565b6001600160a01b031681526020810191909152604001600020549190612428565b6121e1565b5060015b9392505050565b60055460ff1690565b6000610d8c610fcc6121dd565b84610fa68560016000610fdd6121dd565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906124bf565b600c6020526000908152604090208054600182015460029092015490919083565b60095481565b61103c6121dd565b6001600160a01b031661104d6116b4565b6001600160a01b0316146110a8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600880546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f45d7e621935e768c84854481fb8a41a30200fbe59f86660d5e02dd876563d8989181900360200190a150565b600d546001600160a01b03163314611173576040805162461bcd60e51b815260206004820152601960248201527f7065726d697373696f6e3a206e6f74206f70657261746f722100000000000000604482015290519081900360640190fd5b6007546040517f4a6ee1b1000000000000000000000000000000000000000000000000000000008152602060048201908152602482018490526001600160a01b0390921691634a6ee1b191859185918190604401848480828437600081840152601f19601f8201169050808301925050509350505050600060405180830381600087803b15801561120357600080fd5b505af1158015611217573d6000803e3d6000fd5b505060095460408051918252517f6099cd46ed79776f0eb374b0ba6175e503436427e5a8303992b044f99ef82b269350908190036020019150a15050565b6007546001600160a01b031681565b600d546001600160a01b031681565b600260065414156112cb576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600655336000908152600c602090815260409182902060075492517f4a6ee1b1000000000000000000000000000000000000000000000000000000008152600481019283526024810185905290926001600160a01b031691634a6ee1b191869186918190604401848480828437600081840152601f19601f8201169050808301925050509350505050600060405180830381600087803b15801561137057600080fd5b505af1158015611384573d6000803e3d6000fd5b50505050611390611d0c565b831561144d576007546113c29033906001600160a01b0316866113b16118b7565b6001600160a01b0316929190612519565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561141257600080fd5b505af1158015611426573d6000803e3d6000fd5b5050825461143792509050856124bf565b8155600b546114479043906124bf565b60028201555b61146164e8d4a51000610bb3610bab6117b5565b600182015561147033856125a1565b600a5461147d90856124bf565b600a55604080513381526020810186905281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1505060016006555050565b60006020819052908152604090205481565b6001600160a01b031660009081526020819052604090205490565b6114fb6121dd565b6001600160a01b031661150c6116b4565b6001600160a01b031614611567576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b60006115d86128f2565b506001600160a01b0382166000908152600c6020908152604080832081516060810183528154815260018201549381018490526002909101549181019190915291906116409061163a64e8d4a51000610bb36116326117b5565b87519061211d565b90612040565b949350505050565b6007546001600160a01b031633146116a7576040805162461bcd60e51b815260206004820152601360248201527f7661756c743a206f6e6c7920776f726b65722100000000000000000000000000604482015290519081900360640190fd5b6116af6117b5565b600955565b60055461010090046001600160a01b031690565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610cae5780601f10610c8357610100808354040283529160200191610cae565b6104b081565b6000610d8c61175a6121dd565b84610fa685604051806060016040528060258152602001612af060259139600160006117846121dd565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612428565b600954600090816117c4610e44565b600a5490915081158015906117d857508015155b156118025760006117f282610bb38564e8d4a5100061211d565b90506117fe84826124bf565b9350505b509091505090565b6000610d8c6118176121dd565b84846122cd565b600d546001600160a01b0316331461187d576040805162461bcd60e51b815260206004820152601960248201527f7065726d697373696f6e3a206e6f74206f70657261746f722100000000000000604482015290519081900360640190fd5b600d80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600754604080517fc2442f9300000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163c2442f93916004808301926020929190829003018186803b158015610ea257600080fd5b61191d6121dd565b6001600160a01b031661192e6116b4565b6001600160a01b031614611989576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6007546001600160a01b0316156119e7576040805162461bcd60e51b815260206004820152601660248201527f576f726b657220697320616c7265616479207365742e00000000000000000000604482015290519081900360640190fd5b600780546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f7631012635592f7be4acbde4c948a3017c9f918383ca54dec195aad1ce8a57359181900360200190a150565b6008546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b336000908152600c602052604090208054611aa99084846108b5565b505050565b600d546001600160a01b03163314611b0d576040805162461bcd60e51b815260206004820152601960248201527f7065726d697373696f6e3a206e6f74206f70657261746f722100000000000000604482015290519081900360640190fd5b600760009054906101000a90046001600160a01b03166001600160a01b031663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611b5d57600080fd5b505af1158015611b71573d6000803e3d6000fd5b50505050565b611b7f6121dd565b6001600160a01b0316611b906116b4565b6001600160a01b031614611beb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116611c305760405162461bcd60e51b81526004018080602001828103825260268152602001806129596026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b600754604080517ffb7b79e900000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163fb7b79e9916004808301926020929190829003018186803b158015610ea257600080fd5b6000611d17336115ce565b90508015611f4157600754604080517fae169a500000000000000000000000000000000000000000000000000000000081526004810184905290516001600160a01b039092169163ae169a509160248082019260009290919082900301818387803b158015611d8557600080fd5b505af1158015611d99573d6000803e3d6000fd5b50505050611da56128f2565b50336000818152600c602090815260408083208151606081018352815480825260018301548286018190526002909301548285015260085484517f56fa95af000000000000000000000000000000000000000000000000000000008152600481019890985260248801919091526044870192909252915191946001600160a01b03909116926356fa95af92606480840193829003018186803b158015611e4a57600080fd5b505afa158015611e5e573d6000803e3d6000fd5b505050506040513d6020811015611e7457600080fd5b505190508015611f34576000611e90612710610bb3868561211d565b9050611f18600860009054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b815260040160206040518083038186803b158015611ee357600080fd5b505afa158015611ef7573d6000803e3d6000fd5b505050506040513d6020811015611f0d57600080fd5b505182610b85611cae565b611f2e33611f268684612040565b610b85611cae565b50611aa9565b611aa93384610b85611cae565b50565b6001600160a01b038216611f895760405162461bcd60e51b8152600401808060200182810382526021815260200180612a5c6021913960400191505060405180910390fd5b611f9582600083611aa9565b611fd281604051806060016040528060228152602001612937602291396001600160a01b0385166000908152602081905260409020549190612428565b6001600160a01b038316600090815260208190526040902055600254611ff89082612040565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082821115612097576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611aa9908490612691565b60008261212c57506000610d90565b8282028284828161213957fe5b0414610faf5760405162461bcd60e51b8152600401808060200182810382526021815260200180612a136021913960400191505060405180910390fd5b60008082116121cc576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816121d557fe5b049392505050565b3390565b6001600160a01b0383166122265760405162461bcd60e51b8152600401808060200182810382526024815260200180612aa26024913960400191505060405180910390fd5b6001600160a01b03821661226b5760405162461bcd60e51b815260040180806020018281038252602281526020018061297f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166123125760405162461bcd60e51b8152600401808060200182810382526025815260200180612a7d6025913960400191505060405180910390fd5b6001600160a01b0382166123575760405162461bcd60e51b81526004018080602001828103825260238152602001806129146023913960400191505060405180910390fd5b612362838383611aa9565b61239f816040518060600160405280602681526020016129cc602691396001600160a01b0386166000908152602081905260409020549190612428565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546123ce90826124bf565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156124b75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561247c578181015183820152602001612464565b50505050905090810190601f1680156124a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610faf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611b71908590612691565b6001600160a01b0382166125fc576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61260860008383611aa9565b60025461261590826124bf565b6002556001600160a01b03821660009081526020819052604090205461263b90826124bf565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60606126e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127429092919063ffffffff16565b805190915015611aa95780806020019051602081101561270557600080fd5b5051611aa95760405162461bcd60e51b815260040180806020018281038252602a815260200180612ac6602a913960400191505060405180910390fd5b606061164084846000858561275685612886565b6127a7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061280457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016127c7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612866576040519150601f19603f3d011682016040523d82523d6000602084013e61286b565b606091505b509150915061287b82828661288c565b979650505050505050565b3b151590565b6060831561289b575081610faf565b8251156128ab5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561247c578181015183820152602001612464565b6040518060600160405280600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737377697468647261772064656c61793a206d757374206e6f74206c6f6e676572207468616e206c696d69742e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636577697468647261773a20746f6f2066617374206166746572206465706f73697421536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220579ca771e9233357d67720b171860e4a52e54ab34f6f06c311d3b11b0234024064736f6c634300060c003300000000000000000000000087dc45e0249db9c3a74a98e95d17c40daeb915aa0000000000000000000000008a24b159d3eca84f2b991ed1d341cc3588884053000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000001c5661756c74494e4654454520425443422d555344542042697377617000000000000000000000000000000000000000000000000000000000000000000000001076494e465445452d425443425553445400000000000000000000000000000000

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.