Contract 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3

Contract Overview

Balance:
0 BNB

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00527278
0xbf61dd03025657a1da641ecd2d8fef74049a72dc3551f63978e4338bbab8438399216982021-06-21 8:00:343 days 22 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0x8025568a7f9d96e893aaf29ed1e9b38a40c2f203a46e5a6a56ff73e9bdf944dc99120972021-06-21 0:00:314 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0x8d4ecb719a3fb0b707934e6fecf910715917b247c514eaef08f50caab776c09299024952021-06-20 16:00:254 days 14 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0x82882637c4b6c7d9b6462e48c0c6e6410d322a3e1aa235f36292e2e1ff5834cd98928952021-06-20 8:00:254 days 22 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0x62b6079425ae2a52ff0a9eeb65d106f14d20dbed6f3ebe5172c2d6d34271dd2198832952021-06-20 0:00:255 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0xd82ea3930fd89b73b3cd29257b0d863bc443c38251ca5c67165b9ff5bf68150e98736952021-06-19 16:00:255 days 14 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0x45e16d38037c00b08d415949e13d8b17e378ed1caf4c969f0b4db80a04dccfd098640952021-06-19 8:00:255 days 22 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0xcb28ca3341842e7cb5415207fe05902457b64dd6632db44602b447f8ab0e35d598544952021-06-19 0:00:256 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506604
0xcc62bf70602efe4ad609b5220da9ce412a293c5e0a2388b3d32bee4b0b84b8a698448952021-06-18 16:00:256 days 14 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00521604
0xef6669d310e6d682aded4cc9d47a9525663863367f5047593fafc5ff4c9b6ecc98339302021-06-18 6:52:106 days 23 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00255636
0x77f656c192022a3999cecfd857745b6c0ec419a274e4acd0a6d61d77ab5bd28698077572021-06-17 9:03:317 days 21 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00142225
0xdd591a7b788f166a84f39d00f7cbbf152e7646c535a7ac5adda6ceb3ba4f770e98077202021-06-17 9:01:407 days 21 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00521386
0xf01e621e9aece9e90c8cb18edc6512626d38ca0e9b7ade7b59d7a3cba6d3fcb998068052021-06-17 8:15:557 days 22 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00533933
0x923c993047f0c12037322b3691262d01138510e31317ad45e9f7b5fbe4b41ced97976452021-06-17 0:37:558 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506277
0xd555264bc2658fb4ce4140496c443729e5f610bcc51fadfb0c510b1ce905047297872972021-06-16 16:00:318 days 14 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0xbbaf82428c7db7696b77ce2cf094c7385f7ef15782ba3e57ec7afe6d6dc5ac8997776972021-06-16 8:00:318 days 22 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0xe1eaba4e0166ca2cf97c3c7e222ae828827897e0e63fb82c78deb25b30af007297681022021-06-16 0:00:329 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0x79320e54b1d757b44c5f03bab661944bdfdb6bba2d9bfd7ffd2a9580e2cf8c9e97585022021-06-15 16:00:329 days 14 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0x49a5463f2954776dfd0fcb72319275a03b2a7f2883cac8888e69b4353e4cadde97489022021-06-15 8:00:319 days 22 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0xc56c6f48264ac2fda10bdd06d588b8f4a585e5af4fb562c68a4e075f22e5946097393022021-06-15 0:00:3110 days 6 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0x4e65ec961bac75969b791efb32de11f5b8a86f3840a7931354f5ce487c16684e97297022021-06-14 16:00:3110 days 14 hrs ago0x1c594c7a6cec048aa3eae163daff54f35cde3ce2 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00506168
0x401a501fad41e3619263711dc0729bc3532457735ff375d0a79116b0db7c037097268562021-06-14 13:38:1310 days 17 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00255624
0xd51f2a7598dd32183f3258d0ae2084e94b302d1ac96664176c9d479593bba05b97260422021-06-14 12:57:3110 days 17 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e30 BNB0.00142225
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x5b5191851630c7eba105cd9cec1e535dd48ff3690 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x45e8521756e1a14dd8d567efe89b7293c4db77e10 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x45e8521756e1a14dd8d567efe89b7293c4db77e10 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x5b5191851630c7eba105cd9cec1e535dd48ff3690 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xafca35f00e082d724eb5ca87f837dec56b56dd445736cddf76183aa30df2323999408952021-06-22 0:00:253 days 6 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x5b5191851630c7eba105cd9cec1e535dd48ff3690 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x45e8521756e1a14dd8d567efe89b7293c4db77e10 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x45e8521756e1a14dd8d567efe89b7293c4db77e10 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x5b5191851630c7eba105cd9cec1e535dd48ff3690 BNB
0xe0b918113dae01d3c37dc8b12b9870edc66b3c17eba84a84cf375e2a8f7ee0b699288982021-06-21 14:00:343 days 16 hrs ago 0xcbc8e06124e7ac24c41c3dae02b7cc808cf776e3 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xE7256d355dCcbE8f2754415DDE218D0A01970b81

Contract Name:
VaultInitializable

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : VaultInitializable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libs/IBEP20.sol";
import "./libs/SafeBEP20.sol";
import "./libs/IMasterChef.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";

pragma solidity 0.6.12;

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

    struct UserInfo {
        uint256 shares; // number of shares for a user
        uint256 lastDepositedTime; // keeps track of deposited time for potential penalty
        uint256 lastUserAction; // keeps track of token deposited at the last user action
        uint256 lastUserActionTime; // keeps track of the last user action time
    }

    // The address of the factory
    address public VAULT_FACTORY;

    // Whether it is initialized
    bool public isInitialized;

    IERC20 public token; // Staked Token/LP
    IERC20 public reward; // Reward Token
    uint256 public pid; // Farm pid
    IMasterChef public masterchef; // Master Chef

    mapping(address => UserInfo) public userInfo;

    uint256 public totalShares;
    uint256 public lastHarvestedTime;
    address public feeAddress;
    IUniswapV2Router02 public swapRouter;

    uint256 public constant MAX_PERFORMANCE_FEE = 500; // 5%
    uint256 public constant MAX_CALL_FEE = 100; // 1%
    uint256 public constant MAX_DEPOSIT_FEE = 400; // 4%
    uint256 public constant MAX_WITHDRAW_FEE = 400; // 4%
    uint256 public constant MAX_WITHDRAW_FEE_PERIOD = 72 hours; // 3 days

    uint256 public performanceFee = 400; // 4%
    uint256 public callFee = 50; // 0.5%
    uint256 public depositFee = 0; // 0%
    uint256 public withdrawFee = 400; // 4%
    uint256 public withdrawFeePeriod = 48 hours; // 2 days

    event Deposit(address indexed sender, uint256 amount, uint256 shares, uint256 lastDepositedTime);
    event Withdraw(address indexed sender, uint256 amount, uint256 shares);
    event Harvest(address indexed sender, uint256 performanceFee, uint256 callFee);
    event Pause();
    event Unpause();
    event SwapRouterUpdated(address indexed operator, address indexed router);

    constructor() public {
        VAULT_FACTORY = msg.sender;
    }

    /*
     * @notice Initialize the contract
     * @param _token: Staked Token/LP contract
     * @param _reward: Reward Token contract
     * @param _pid: Farm pid
     * @param _depositFee: depositFee
     * @param _masterchef: MasterChef contract
     * @param _swapRouter: Router contract
     * @param _admin: address of the admin
     * @param _feeAddress: address of the feeAddress
     */
    function initialize(
        IERC20 _token,
        IERC20 _reward,
        uint256 _pid,
        uint256 _depositFee,
        IMasterChef _masterchef,
        IUniswapV2Router02 _swapRouter,
        address _admin,
        address _feeAddress
    ) external {
        require(!isInitialized, "Already initialized");
        require(msg.sender == VAULT_FACTORY, "Not factory");

        // Make this contract initialized
        isInitialized = true;

        token = _token;
        reward = _reward;
        pid = _pid;
        depositFee = _depositFee;
        masterchef = _masterchef;
        swapRouter = _swapRouter;
        feeAddress = _feeAddress;

        // Infinite approve
        IERC20(_token).safeApprove(address(_masterchef), uint256(-1));

        // Transfer ownership to the admin address who becomes owner of the contract
        transferOwnership(_admin);
    }

    /**
     * @notice Checks if the msg.sender is a contract or a proxy
     */
    modifier notContract() {
        require(!_isContract(msg.sender), "contract not allowed");
        require(msg.sender == tx.origin, "proxy contract not allowed");
        _;
    }

    /**
     * @notice Deposits funds into the Vault
     * @dev Only possible when contract not paused.
     * @param _amount: number of tokens to deposit
     */
    function deposit(uint256 _amount) external whenNotPaused notContract {
        require(_amount > 0, "Nothing to deposit");

        uint256 pool = balanceOf();
        token.safeTransferFrom(msg.sender, address(this), _amount);

        if (depositFee > 0) {
            uint256 _depositFee = _amount.mul(depositFee).div(10000);
            if (token != reward) token.safeTransfer(feeAddress, _depositFee);
            _amount = _amount.sub(_depositFee);
        }

        uint256 currentShares = 0;
        if (totalShares != 0) {
            currentShares = (_amount.mul(totalShares)).div(pool);
        } else {
            currentShares = _amount;
        }
        UserInfo storage user = userInfo[msg.sender];

        user.shares = user.shares.add(currentShares);
        user.lastDepositedTime = block.timestamp;

        totalShares = totalShares.add(currentShares);

        user.lastUserAction = user.shares.mul(balanceOf()).div(totalShares);
        user.lastUserActionTime = block.timestamp;

        _earn();

        emit Deposit(msg.sender, _amount, currentShares, block.timestamp);
    }

    /**
     * @notice Withdraws all funds for a user
     */
    function withdrawAll() external notContract {
        withdraw(userInfo[msg.sender].shares);
    }

    /**
     * @notice Reinvests tokens into MasterChef in case reward token is different will be swaped and created lp token
     * @dev Only possible when contract not paused.
     */
    function harvest() external notContract whenNotPaused {
        IMasterChef(masterchef).deposit(pid, 0);

        uint256 bal = availableReward();
        uint256 currentCallFee = bal.mul(callFee).div(10000);
        reward.safeTransfer(msg.sender, currentCallFee);
        bal = bal.sub(currentCallFee);

        if (bal > 0 && address(token) != address(reward)) {
            reward.approve(address(swapRouter), uint256(-1));
            IUniswapV2Pair pair = IUniswapV2Pair(address(token));
            IBEP20 token0 = IBEP20(pair.token0());
            IBEP20 token1 = IBEP20(pair.token1());
            uint256 half0 = bal.div(2);
            uint256 half1 = bal.sub(half0);
            address[] memory path = new address[](2);
            path[0] = address(reward);

            if (address(token0) != address(reward)) {
                path[1] = address(token0);
                swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(half0, 0, path, address(this), block.timestamp);
                token0.approve(address(swapRouter), uint256(-1));
            }

            if (address(token1) != address(reward)) {
                path[1] = address(token1);
                swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(half1, 0, path, address(this), block.timestamp);
                token1.approve(address(swapRouter), uint256(-1));
            }

            swapRouter.addLiquidity(address(token0), address(token1), token0.balanceOf(address(this)), token1.balanceOf(address(this)), 0, 0, address(this), block.timestamp);
        }

        bal = availableToken();
        uint256 currentPerformanceFee = bal.mul(performanceFee).div(10000);
        token.safeTransfer(feeAddress, currentPerformanceFee);

        _earn();

        lastHarvestedTime = block.timestamp;

        emit Harvest(msg.sender, currentPerformanceFee, currentCallFee);
    }

    /**
     * @notice Sets feeAddress address
     * @dev Only callable by the contract owner.
     */
    function setFeeAddress(address _feeAddress) external onlyOwner {
        require(_feeAddress != address(0), "Cannot be zero address");
        feeAddress = _feeAddress;
    }

    /**
     * @notice Sets performance fee
     * @dev Only callable by the contract owner.
     */
    function setPerformanceFee(uint256 _performanceFee) external onlyOwner {
        require(_performanceFee <= MAX_PERFORMANCE_FEE, "performanceFee cannot be more than MAX_PERFORMANCE_FEE");
        performanceFee = _performanceFee;
    }

    /**
     * @notice Sets call fee
     * @dev Only callable by the contract owner.
     */
    function setCallFee(uint256 _callFee) external onlyOwner {
        require(_callFee <= MAX_CALL_FEE, "callFee cannot be more than MAX_CALL_FEE");
        callFee = _callFee;
    }

    /**
     * @notice Sets deposit fee
     * @dev Only callable by the contract owner.
     */
    function setDeposit(uint256 _depositFee) external onlyOwner {
        require(_depositFee <= MAX_DEPOSIT_FEE, "depositFee cannot be more than MAX_DEPOSIT_FEE");
        depositFee = _depositFee;
    }

    /**
     * @notice Sets withdraw fee
     * @dev Only callable by the contract owner.
     */
    function setWithdrawFee(uint256 _withdrawFee) external onlyOwner {
        require(_withdrawFee <= MAX_WITHDRAW_FEE, "withdrawFee cannot be more than MAX_WITHDRAW_FEE");
        withdrawFee = _withdrawFee;
    }

    /**
     * @notice Sets withdraw fee period
     * @dev Only callable by the contract owner.
     */
    function setWithdrawFeePeriod(uint256 _withdrawFeePeriod) external onlyOwner {
        require(
            _withdrawFeePeriod <= MAX_WITHDRAW_FEE_PERIOD,
            "withdrawFeePeriod cannot be more than MAX_WITHDRAW_FEE_PERIOD"
        );
        withdrawFeePeriod = _withdrawFeePeriod;
    }

    /**
     * @notice Withdraws from MasterChef to Vault without caring about rewards.
     * @dev EMERGENCY ONLY. Only callable by the contract owner.
     */
    function emergencyWithdraw() external onlyOwner {
        IMasterChef(masterchef).emergencyWithdraw(pid);
    }

    /**
     * @notice Withdraw unexpected tokens sent to the Vault
     */
    function inCaseTokensGetStuck(address _token) external onlyOwner {
        require(_token != address(token), "Token cannot be same as deposit token");
        require(_token != address(reward), "Token cannot be same as reward token");

        uint256 amount = IERC20(_token).balanceOf(address(this));
        IERC20(_token).safeTransfer(msg.sender, amount);
    }

    /**
     * @notice Triggers stopped state
     * @dev Only possible when contract not paused.
     */
    function pause() external onlyOwner whenNotPaused {
        _pause();
        emit Pause();
    }

    /**
     * @notice Returns to normal state
     * @dev Only possible when contract is paused.
     */
    function unpause() external onlyOwner whenPaused {
        _unpause();
        emit Unpause();
    }

    /**
     * @notice Calculates the expected harvest reward from third party
     * @return Expected reward to collect
     */
    function calculateHarvestRewards() external view returns (uint256) {
        uint256 amount = IMasterChef(masterchef).pendingDeFi(pid, address(this));
        amount = amount.add(availableReward());
        uint256 currentCallFee = amount.mul(callFee).div(10000);

        return currentCallFee;
    }

    /**
     * @notice Calculates the total pending rewards that can be restaked
     * @return Returns total pending rewards
     */
    function calculateTotalPendingRewards() external view returns (uint256) {
        uint256 amount = IMasterChef(masterchef).pendingDeFi(pid, address(this));
        amount = amount.add(availableReward());

        return amount;
    }

    /**
     * @notice Calculates the price per share
     */
    function getPricePerFullShare() external view returns (uint256) {
        return totalShares == 0 ? 1e18 : balanceOf().mul(1e18).div(totalShares);
    }

    /**
     * @notice Withdraws from funds from the Vault
     * @param _shares: Number of shares to withdraw
     */
    function withdraw(uint256 _shares) public notContract {
        UserInfo storage user = userInfo[msg.sender];
        require(_shares > 0, "Nothing to withdraw");
        require(_shares <= user.shares, "Withdraw amount exceeds balance");

        uint256 currentAmount = (balanceOf().mul(_shares)).div(totalShares);
        user.shares = user.shares.sub(_shares);
        totalShares = totalShares.sub(_shares);

        uint256 bal = availableToken();
        if (bal < currentAmount) {
            uint256 balWithdraw = currentAmount.sub(bal);
            IMasterChef(masterchef).withdraw(pid, balWithdraw);
            uint256 balAfter = availableToken();
            uint256 diff = balAfter.sub(bal);
            if (diff < balWithdraw) {
                currentAmount = bal.add(diff);
            }
        }

        if (block.timestamp < user.lastDepositedTime.add(withdrawFeePeriod)) {
            uint256 currentWithdrawFee = currentAmount.mul(withdrawFee).div(10000);
            token.safeTransfer(feeAddress, currentWithdrawFee);
            currentAmount = currentAmount.sub(currentWithdrawFee);
        }

        if (user.shares > 0) {
            user.lastUserAction = user.shares.mul(balanceOf()).div(totalShares);
        } else {
            user.lastUserAction = 0;
        }

        user.lastUserActionTime = block.timestamp;

        token.safeTransfer(msg.sender, currentAmount);

        emit Withdraw(msg.sender, currentAmount, _shares);
    }

    /**
     * @notice Custom logic for how much the vault allows to be borrowed
     * @dev The contract puts 100% of the tokens to work.
     */
    function availableToken() public view returns (uint256) {
        return token.balanceOf(address(this));
    }

    /**
     * @notice Custom logic for how much the vault allows to be borrowed
     * @dev The contract puts 100% of the tokens to work.
     */
    function availableReward() public view returns (uint256) {
        return reward.balanceOf(address(this));
    }

    /**
     * @notice Calculates the total underlying tokens
     * @dev It includes tokens held by the contract and held in MasterChef
     */
    function balanceOf() public view returns (uint256) {
        (uint256 amount, ) = IMasterChef(masterchef).userInfo(pid, address(this));
        return token.balanceOf(address(this)).add(amount);
    }

    /**
     * @notice Deposits tokens into MasterChef
     */
    function _earn() internal {
        uint256 bal = availableToken();
        if (bal > 0) {
            IMasterChef(masterchef).deposit(pid, bal);
        }
    }

    /**
     * @notice Checks if address is a contract
     * @dev It prevents contract from being targetted
     */
    function _isContract(address addr) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(addr)
        }
        return size > 0;
    }

    // Update the swap router.
    function setSwapRouter(address _router) public onlyOwner {
        swapRouter = IUniswapV2Router02(_router);
        emit SwapRouterUpdated(msg.sender, address(swapRouter));
    }
}

File 2 of 15 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

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

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

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

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

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @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 15 : IMasterChef.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IMasterChef {
    function deposit(uint256 _pid, uint256 _amount) external;

    function withdraw(uint256 _pid, uint256 _amount) external;

    function pendingDeFi(uint256 _pid, address _user) external view returns (uint256);

    function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256);

    function emergencyWithdraw(uint256 _pid) external;
}

File 4 of 15 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "./IBEP20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

    function safeTransferFrom(
        IBEP20 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
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IBEP20 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),
            "SafeBEP20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IBEP20 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(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            "SafeBEP20: 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(IBEP20 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, "SafeBEP20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeBEP20: BEP20 operation did not succeed");
        }
    }
}

File 5 of 15 : 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 6 of 15 : 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 7 of 15 : 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 8 of 15 : 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 9 of 15 : 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 10 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

File 11 of 15 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

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

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

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

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 12 of 15 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 13 of 15 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 14 of 15 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 15 of 15 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastDepositedTime","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"callFee","type":"uint256"}],"name":"Harvest","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":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"router","type":"address"}],"name":"SwapRouterUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_CALL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEPOSIT_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PERFORMANCE_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAW_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAW_FEE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_FACTORY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateHarvestRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateTotalPendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IERC20","name":"_reward","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_depositFee","type":"uint256"},{"internalType":"contract IMasterChef","name":"_masterchef","type":"address"},{"internalType":"contract IUniswapV2Router02","name":"_swapRouter","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvestedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterchef","outputs":[{"internalType":"contract IMasterChef","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reward","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_callFee","type":"uint256"}],"name":"setCallFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositFee","type":"uint256"}],"name":"setDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_performanceFee","type":"uint256"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setSwapRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawFee","type":"uint256"}],"name":"setWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawFeePeriod","type":"uint256"}],"name":"setWithdrawFeePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"lastDepositedTime","type":"uint256"},{"internalType":"uint256","name":"lastUserAction","type":"uint256"},{"internalType":"uint256","name":"lastUserActionTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052610190600b556032600c556000600d55610190600e556202a300600f5534801561002d57600080fd5b5060006100386100a6565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b031916331790556100aa565b3390565b61301380620000ba6000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c80637ba132fe11610167578063c31c9c07116100ce578063e941fa7811610087578063e941fa781461058d578063f106845414610595578063f2fde38b1461059d578063f5bade66146105c3578063fb1db278146105e0578063fc0c546a146105e857610295565b8063c31c9c0714610547578063c6d87dd51461054f578063d4b0de2f1461054f578063db2e21bc14610557578063def68a9c1461055f578063df10b4e61461058557610295565b806390321e1a1161012057806390321e1a1461049a5780639b3ee16e146104a2578063b60f0531146104fd578063b6ac642a14610505578063b6b55f2514610522578063bdca91651461053f57610295565b80637ba132fe1461044c5780638456cb5914610454578063853828b61461045c5780638705fcd414610464578063877887821461048a5780638da5cb5b1461049257610295565b80633f4ba83a1161020b5780635c975abb116101c45780635c975abb1461040757806367a527931461040f57806370897b2314610417578063715018a614610434578063722713f71461043c57806377c7b8fc1461044457610295565b80633f4ba83a146103b957806341273657146103c157806341275358146103e75780634641257d146103ef5780634ad84b34146103f7578063564b28a0146103ff57610295565b80632816cc4a1161025d5780632816cc4a1461034e5780632ad5a53f146103685780632cfc5f01146103705780632e1a7d4d14610378578063392e53cd146103955780633a98ef39146103b157610295565b8063103f29071461029a5780631959a002146102be5780631efac1b81461030a578063228cb733146103295780632646582614610331575b600080fd5b6102a26105f0565b604080516001600160a01b039092168252519081900360200190f35b6102e4600480360360208110156102d457600080fd5b50356001600160a01b03166105ff565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6103276004803603602081101561032057600080fd5b5035610626565b005b6102a26106cf565b6103276004803603602081101561034757600080fd5b50356106de565b610356610785565b60408051918252519081900360200190f35b610356610825565b61035661082a565b6103276004803603602081101561038e57600080fd5b5035610831565b61039d610b79565b604080519115158252519081900360200190f35b610356610b89565b610327610b8f565b610327600480360360208110156103d757600080fd5b50356001600160a01b0316610c74565b6102a2610d28565b610327610d37565b61035661165a565b6103566116d6565b61039d611721565b610356611731565b6103276004803603602081101561042d57600080fd5b5035611737565b6103276117df565b61035661188b565b61035661198f565b6103566119c9565b610327611a82565b610327611b64565b6103276004803603602081101561047a57600080fd5b50356001600160a01b0316611c22565b610356611cfa565b6102a2611d00565b610356611d0f565b61032760048036036101008110156104b957600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013591608082013581169160a081013582169160c082013581169160e0013516611d15565b610356611e49565b6103276004803603602081101561051b57600080fd5b5035611e4f565b6103276004803603602081101561053857600080fd5b5035611ef7565b610356612197565b6102a261219d565b6103566121ac565b6103276121b2565b6103276004803603602081101561057557600080fd5b50356001600160a01b031661227e565b61035661240f565b610356612415565b61035661241b565b610327600480360360208110156105b357600080fd5b50356001600160a01b0316612421565b610327600480360360208110156105d957600080fd5b5035612523565b6102a26125cb565b6102a26125da565b6001546001600160a01b031681565b60066020526000908152604090208054600182015460028301546003909301549192909184565b61062e6125e9565b6001600160a01b031661063f611d00565b6001600160a01b031614610688576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6203f4808111156106ca5760405162461bcd60e51b815260040180806020018281038252603d815260200180612f11603d913960400191505060405180910390fd5b600f55565b6003546001600160a01b031681565b6106e66125e9565b6001600160a01b03166106f7611d00565b6001600160a01b031614610740576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b60648111156107805760405162461bcd60e51b8152600401808060200182810382526028815260200180612e726028913960400191505060405180910390fd5b600c55565b600554600480546040805163df26f69760e01b8152928301919091523060248301525160009283926001600160a01b039091169163df26f69791604480820192602092909190829003018186803b1580156107df57600080fd5b505afa1580156107f3573d6000803e3d6000fd5b505050506040513d602081101561080957600080fd5b5051905061081f61081861165a565b82906125ed565b91505090565b606481565b6203f48081565b61083a33612650565b15610883576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b3332146108d4576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b3360009081526006602052604090208161092b576040805162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015290519081900360640190fd5b8054821115610981576040805162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015290519081900360640190fd5b60006109a160075461099b8561099561188b565b90612656565b906126af565b82549091506109b09084612716565b82556007546109bf9084612716565b60075560006109cc6116d6565b905081811015610a875760006109e28383612716565b6005546004805460408051630441a3e760e41b81529283019190915260248201849052519293506001600160a01b039091169163441a3e709160448082019260009290919082900301818387803b158015610a3c57600080fd5b505af1158015610a50573d6000803e3d6000fd5b505050506000610a5e6116d6565b90506000610a6c8285612716565b905082811015610a8357610a8084826125ed565b94505b5050505b600f546001840154610a98916125ed565b421015610aea576000610abc61271061099b600e548661265690919063ffffffff16565b600954600254919250610adc916001600160a01b03908116911683612773565b610ae68382612716565b9250505b825415610b1457610b0a60075461099b610b0261188b565b865490612656565b6002840155610b1c565b600060028401555b426003840155600254610b39906001600160a01b03163384612773565b6040805183815260208101869052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a250505050565b600154600160a01b900460ff1681565b60075481565b610b976125e9565b6001600160a01b0316610ba8611d00565b6001600160a01b031614610bf1576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b610bf9611721565b610c41576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610c496127ca565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b610c7c6125e9565b6001600160a01b0316610c8d611d00565b6001600160a01b031614610cd6576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b03838116919091179182905560405191169033907fca394f95d8dbf1e8b2e76b9a8da90cacce1da85181a65508dab13212dc1df53b90600090a350565b6009546001600160a01b031681565b610d4033612650565b15610d89576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b333214610dda576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b610de2611721565b15610e27576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6005546004805460408051631c57762b60e31b81529283019190915260006024830181905290516001600160a01b039093169263e2bbb15892604480820193929182900301818387803b158015610e7d57600080fd5b505af1158015610e91573d6000803e3d6000fd5b505050506000610e9f61165a565b90506000610ebe61271061099b600c548561265690919063ffffffff16565b600354909150610ed8906001600160a01b03163383612773565b610ee28282612716565b9150600082118015610f0557506003546002546001600160a01b03908116911614155b156115c857600354600a546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610f6457600080fd5b505af1158015610f78573d6000803e3d6000fd5b505050506040513d6020811015610f8e57600080fd5b505060025460408051630dfe168160e01b815290516001600160a01b03909216916000918391630dfe168191600480820192602092909190829003018186803b158015610fda57600080fd5b505afa158015610fee573d6000803e3d6000fd5b505050506040513d602081101561100457600080fd5b50516040805163d21220a760e01b815290519192506000916001600160a01b0385169163d21220a7916004808301926020929190829003018186803b15801561104c57600080fd5b505afa158015611060573d6000803e3d6000fd5b505050506040513d602081101561107657600080fd5b5051905060006110878660026126af565b905060006110958783612716565b604080516002808252606080830184529394509091602083019080368337505060035482519293506001600160a01b0316918391506000906110d357fe5b6001600160a01b03928316602091820292909201015260035486821691161461128357848160018151811061110457fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600a60009054906101000a90046001600160a01b03166001600160a01b0316635c11d7958460008430426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156111be5781810151838201526020016111a6565b505050509050019650505050505050600060405180830381600087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b5050600a546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051918916935063095ea7b392506044808201926020929091908290030181600087803b15801561125657600080fd5b505af115801561126a573d6000803e3d6000fd5b505050506040513d602081101561128057600080fd5b50505b6003546001600160a01b038581169116146114255783816001815181106112a657fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600a60009054906101000a90046001600160a01b03166001600160a01b0316635c11d7958360008430426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611360578181015183820152602001611348565b505050509050019650505050505050600060405180830381600087803b15801561138957600080fd5b505af115801561139d573d6000803e3d6000fd5b5050600a546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051918816935063095ea7b392506044808201926020929091908290030181600087803b1580156113f857600080fd5b505af115801561140c573d6000803e3d6000fd5b505050506040513d602081101561142257600080fd5b50505b600a54604080516370a0823160e01b815230600482015290516001600160a01b039283169263e8e3370092899289928416916370a08231916024808301926020929190829003018186803b15801561147c57600080fd5b505afa158015611490573d6000803e3d6000fd5b505050506040513d60208110156114a657600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b038b16916370a08231916024808301926020929190829003018186803b1580156114ee57600080fd5b505afa158015611502573d6000803e3d6000fd5b505050506040513d602081101561151857600080fd5b5051604080516001600160e01b031960e088901b1681526001600160a01b0395861660048201529390941660248401526044830191909152606482015260006084820181905260a482018190523060c48301524260e483015291516101048083019360609383900390910190829087803b15801561159557600080fd5b505af11580156115a9573d6000803e3d6000fd5b505050506040513d60608110156115bf57600080fd5b50505050505050505b6115d06116d6565b915060006115ef61271061099b600b548661265690919063ffffffff16565b60095460025491925061160f916001600160a01b03908116911683612773565b61161761286d565b426008556040805182815260208101849052815133927f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954928290030190a2505050565b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116a557600080fd5b505afa1580156116b9573d6000803e3d6000fd5b505050506040513d60208110156116cf57600080fd5b5051905090565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116a557600080fd5b600054600160a01b900460ff1690565b600d5481565b61173f6125e9565b6001600160a01b0316611750611d00565b6001600160a01b031614611799576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6101f48111156117da5760405162461bcd60e51b8152600401808060200182810382526036815260200180612e9a6036913960400191505060405180910390fd5b600b55565b6117e76125e9565b6001600160a01b03166117f8611d00565b6001600160a01b031614611841576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055460048054604080516393f1a40b60e01b815292830191909152306024830152805160009384936001600160a01b03909116926393f1a40b92604480840193829003018186803b1580156118e057600080fd5b505afa1580156118f4573d6000803e3d6000fd5b505050506040513d604081101561190a57600080fd5b5051600254604080516370a0823160e01b8152306004820152905192935061081f9284926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d602081101561198757600080fd5b5051906125ed565b60006007546000146119ba576119b560075461099b670de0b6b3a764000061099561188b565b6119c4565b670de0b6b3a76400005b905090565b600554600480546040805163df26f69760e01b8152928301919091523060248301525160009283926001600160a01b039091169163df26f69791604480820192602092909190829003018186803b158015611a2357600080fd5b505afa158015611a37573d6000803e3d6000fd5b505050506040513d6020811015611a4d57600080fd5b50519050611a5c61081861165a565b90506000611a7b61271061099b600c548561265690919063ffffffff16565b9250505090565b611a8a6125e9565b6001600160a01b0316611a9b611d00565b6001600160a01b031614611ae4576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b611aec611721565b15611b31576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611b396128f2565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b611b6d33612650565b15611bb6576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b333214611c07576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b33600090815260066020526040902054611c2090610831565b565b611c2a6125e9565b6001600160a01b0316611c3b611d00565b6001600160a01b031614611c84576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6001600160a01b038116611cd8576040805162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600b5481565b6000546001600160a01b031690565b600c5481565b600154600160a01b900460ff1615611d6a576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b6001546001600160a01b03163314611db7576040805162461bcd60e51b815260206004820152600b60248201526a4e6f7420666163746f727960a81b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b179055600280546001600160a01b03808b166001600160a01b03199283168117909355600380548b83169084161790556004899055600d88905560058054888316908416179055600a80548783169084161790556009805491851691909216179055611e36908560001961297b565b611e3f82612421565b5050505050505050565b60085481565b611e576125e9565b6001600160a01b0316611e68611d00565b6001600160a01b031614611eb1576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b610190811115611ef25760405162461bcd60e51b8152600401808060200182810382526030815260200180612f786030913960400191505060405180910390fd5b600e55565b611eff611721565b15611f44576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611f4d33612650565b15611f96576040805162461bcd60e51b815260206004820152601460248201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604482015290519081900360640190fd5b333214611fe7576040805162461bcd60e51b815260206004820152601a6024820152791c1c9bde1e4818dbdb9d1c9858dd081b9bdd08185b1b1bddd95960321b604482015290519081900360640190fd5b60008111612031576040805162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015290519081900360640190fd5b600061203b61188b565b600254909150612056906001600160a01b0316333085612a8e565b600d54156120c157600061207b61271061099b600d548661265690919063ffffffff16565b6003546002549192506001600160a01b039182169116146120b3576009546002546120b3916001600160a01b03918216911683612773565b6120bd8382612716565b9250505b60006007546000146120ed576120e68261099b6007548661265690919063ffffffff16565b90506120f0565b50815b336000908152600660205260409020805461210b90836125ed565b815542600182015560075461212090836125ed565b600781905561213c9061099b61213461188b565b845490612656565b600282015542600382015561214f61286d565b60408051858152602081018490524281830152905133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e919081900360600190a250505050565b6101f481565b600a546001600160a01b031681565b61019081565b6121ba6125e9565b6001600160a01b03166121cb611d00565b6001600160a01b031614612214576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6005546004805460408051632989754760e11b815292830191909152516001600160a01b0390921691635312ea8e9160248082019260009290919082900301818387803b15801561226457600080fd5b505af1158015612278573d6000803e3d6000fd5b50505050565b6122866125e9565b6001600160a01b0316612297611d00565b6001600160a01b0316146122e0576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6002546001600160a01b038281169116141561232d5760405162461bcd60e51b8152600401808060200182810382526025815260200180612e276025913960400191505060405180910390fd5b6003546001600160a01b038281169116141561237a5760405162461bcd60e51b8152600401808060200182810382526024815260200180612daf6024913960400191505060405180910390fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156123c957600080fd5b505afa1580156123dd573d6000803e3d6000fd5b505050506040513d60208110156123f357600080fd5b5051905061240b6001600160a01b0383163383612773565b5050565b600f5481565b600e5481565b60045481565b6124296125e9565b6001600160a01b031661243a611d00565b6001600160a01b031614612483576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6001600160a01b0381166124c85760405162461bcd60e51b8152600401808060200182810382526026815260200180612dd36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61252b6125e9565b6001600160a01b031661253c611d00565b6001600160a01b031614612585576040805162461bcd60e51b81526020600482018190526024820152600080516020612ef1833981519152604482015290519081900360640190fd5b6101908111156125c65760405162461bcd60e51b815260040180806020018281038252602e815260200180612df9602e913960400191505060405180910390fd5b600d55565b6005546001600160a01b031681565b6002546001600160a01b031681565b3390565b600082820183811015612647576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b3b151590565b6000826126655750600061264a565b8282028284828161267257fe5b04146126475760405162461bcd60e51b8152600401808060200182810382526021815260200180612ed06021913960400191505060405180910390fd5b6000808211612705576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161270e57fe5b049392505050565b60008282111561276d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526127c5908490612ae4565b505050565b6127d2611721565b61281a576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6128506125e9565b604080516001600160a01b039092168252519081900360200190a1565b60006128776116d6565b905080156128ef576005546004805460408051631c57762b60e31b81529283019190915260248201849052516001600160a01b039092169163e2bbb1589160448082019260009290919082900301818387803b1580156128d657600080fd5b505af11580156128ea573d6000803e3d6000fd5b505050505b50565b6128fa611721565b1561293f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128506125e9565b801580612a01575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156129d357600080fd5b505afa1580156129e7573d6000803e3d6000fd5b505050506040513d60208110156129fd57600080fd5b5051155b612a3c5760405162461bcd60e51b8152600401808060200182810382526036815260200180612fa86036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526127c5908490612ae4565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526122789085905b6060612b39826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612b959092919063ffffffff16565b8051909150156127c557808060200190516020811015612b5857600080fd5b50516127c55760405162461bcd60e51b815260040180806020018281038252602a815260200180612f4e602a913960400191505060405180910390fd5b6060612ba48484600085612bae565b90505b9392505050565b606082471015612bef5760405162461bcd60e51b8152600401808060200182810382526026815260200180612e4c6026913960400191505060405180910390fd5b612bf885612650565b612c49576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612c885780518252601f199092019160209182019101612c69565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612cea576040519150601f19603f3d011682016040523d82523d6000602084013e612cef565b606091505b5091509150612cff828286612d0a565b979650505050505050565b60608315612d19575081612ba7565b825115612d295782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d73578181015183820152602001612d5b565b50505050905090810190601f168015612da05780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe546f6b656e2063616e6e6f742062652073616d652061732072657761726420746f6b656e4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736465706f7369744665652063616e6e6f74206265206d6f7265207468616e204d41585f4445504f5349545f464545546f6b656e2063616e6e6f742062652073616d65206173206465706f73697420746f6b656e416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c63616c6c4665652063616e6e6f74206265206d6f7265207468616e204d41585f43414c4c5f464545706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468616e204d41585f504552464f524d414e43455f464545536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727769746864726177466565506572696f642063616e6e6f74206265206d6f7265207468616e204d41585f57495448445241575f4645455f504552494f445361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656477697468647261774665652063616e6e6f74206265206d6f7265207468616e204d41585f57495448445241575f4645455361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a264697066735822122014ed935f5893e72e40829f7702d7af7f0b5f34c36f99e1cd6ffd4a191268593364736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading