Contract 0x7Faa50cc9D632589426Ecf698ED4034a9aBaF28f

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x45914ee3f2af50114fa25c69016ea514c9ad2978a51d564cd45545581edf7b54Earn105027312021-08-31 8:35:3446 days 18 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xc22eed4b0a48681efc0070e381cd463b598756eff90832ed1582831e8b6ae29bEarn104991972021-08-31 5:35:3046 days 21 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x1e3106cc1c863825aa06936f5e6d33648bd0fba427da773dbd307656457a6c80Earn104956702021-08-31 2:35:3647 days 25 mins ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x1a6dcc3e7e6bb9b467ff427c7fe548a5b51fdcf6aaf9f1e6c5b307302244ff4cEarn104921002021-08-30 23:35:3747 days 3 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xb1b7e86baf7505290a8ccf5f7a3b8f8d574dd09920af7e25da4712e6a32b4fefEarn104885892021-08-30 20:35:3647 days 6 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x6b2f739725b6e73d00102de25095fe723c187d86fe241611fc5992886bc2a7afEarn104850182021-08-30 17:35:3247 days 9 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xab2127276d97191dbee3b76d7acbe314a2d78a2002f7f49b5f52c69cfb20d2a1Earn104814882021-08-30 14:35:3147 days 12 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x6258055451addaa5ac8117201d3a05f4406baee15c53d146268519fe2644e845Earn104782112021-08-30 11:35:3447 days 15 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x1c0713e47dbcb320d19e836acd6e75733567bc99e156469f5261d090e7fca83fEarn104746132021-08-30 8:35:3347 days 18 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xda1ebe3dce9b7d8ccf462157c899bedc0ba79401ce58ae93b0d0dfe3f464f4acEarn104710112021-08-30 5:35:2747 days 21 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xf7bd8c0f0749151388ab37e91adf53876546f234c143462df9d1fabe0a5c0af6Earn104674112021-08-30 2:35:2748 days 25 mins ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x541aacfa8b9ac723595219df5211d005d702c0c505a15377b4a8d5b8942f326aEarn104638142021-08-29 23:35:3448 days 3 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x8029f158494bb04566f9641d17a980e227e8e4b60e06e4839a781f68dc9b0cc7Earn104602152021-08-29 20:35:3148 days 6 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x83610af145b7d48264ee02cf72a2942a58775700d20fd00defe1a63c55b430f0Earn104566312021-08-29 17:35:3748 days 9 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x2480aef994c8cfafff4fff63833fa434fc335105f4a41b07f2c03d5144016cfdEarn104530682021-08-29 14:35:3548 days 12 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xec98807cfd1f17b61eff2fd2415c14c1700278df4cbc2a37edbbb44412ff1da3Earn104494662021-08-29 11:35:2748 days 15 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x33e280b1f65be4267374f02a7a84ccef83e73ca0c805979456ceb0d64ed7062fEarn104458692021-08-29 8:35:3648 days 18 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x88a3e8e4d1d3dd3c26ad06868e2d583a8cdddb1a95b548d9465a6d57ff725082Earn104422682021-08-29 5:35:3348 days 21 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x567ddeb8aa842d27737d5986de9dbf9ca92428d8f3f474db46b196d7a20ff616Earn104386662021-08-29 2:35:2749 days 25 mins ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xde49c377f0687fe720244c3575bc56baaf7f318f00cd173e5cb38f0ea84b4d14Earn104350782021-08-28 23:35:3349 days 3 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xf4aaae0eacfa36bb07e32f9e1e8a435c85adcb9ee98358450a6907e6c844ce13Earn104314752021-08-28 20:35:2449 days 6 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0xb32f64a652cd5f7c5d8cf2a0ebeb19c75a151ca3a374f43882a17b09aec12476Earn104278982021-08-28 17:35:4949 days 9 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x5677987ea482f90ec1fab4588466d2034276d77f0074db1abc880214252e9ea1Earn104208952021-08-28 11:35:3449 days 15 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x6ad013053c566422b237666e8bdffb26c659118008bee65d707817408b4db181Earn104173472021-08-28 8:35:2449 days 18 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
0x21e701d5a1134c868d1e0edf70e76353621774d22e2637706485377db576c504Earn104138182021-08-28 5:35:3449 days 21 hrs ago0x9130fc4334921f418fbbaf87d37a57e786ee75d2 IN  0x7faa50cc9d632589426ecf698ed4034a9abaf28f0 BNB0.003337575
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrategyMasterChef

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 14 : StrategyMasterChef.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;


import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

import "./libs/IMasterChef.sol";
import "./libs/IMasterChefRef.sol";
import "./libs/IFairLaunch.sol";
import "./libs/IUniRouter02.sol";

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

    enum MasterChefType { SINGLE, NORMAL, FAIRLAUNCH, REFERRAL }
    MasterChefType public masterChefType = MasterChefType.NORMAL;

    uint256 public pid;
    address public vaultChefAddress;
    address public masterChefAddress;
    address public wantAddress;
    address public token0Address;
    address public token1Address;
    address public earnedAddress;
    address public waiveFeeToken;
    uint256 public waiveFeeAmount;
    
    address public routerAddress;
    address public feeAddress = 0x0E46312d5759107d8988C5aab15ebcfB68e3A9c8;
    address public govAddress;

    uint256 public lastEarnBlock = block.number;
    uint256 public sharesTotal = 0;

    address public buyBackAddress = 0x348BcAB7717e6b13496738E336B944b970919CDC;
    uint256 public controllerFee = 200;
    uint256 public buyBackRate = 200;
    uint256 public constant feeMaxTotal = 1000;
    uint256 public constant feeMax = 10000; // 100 = 1%

    uint256 public withdrawFeeFactor = 9990; // 0.1% withdraw fee
    uint256 public constant withdrawFeeFactorMax = 10000;
    uint256 public constant withdrawFeeFactorLL = 9900;

    uint256 public slippageFactor = 950; // 5% default slippage tolerance
    uint256 public constant slippageFactorUL = 995;

    address[] public earnedToWBnbPath;
    address[] public earnedToToken0Path;
    address[] public earnedToToken1Path;
    address[] public token0ToEarnedPath;
    address[] public token1ToEarnedPath;

    event SetSettings(
        uint256 _controllerFee,
        uint256 _buyBackRate,
        uint256 _withdrawFeeFactor,
        uint256 _slippageFactor
    );
    event SetPaths(address[] _earnedToWBnbPath, address[] _earnedToToken0Path, address[] _earnedToToken1Path, address[] _token0ToEarnedPath, address[] _token1ToEarnedPath);
    event SetGov(address _govAddress);
    event SetRouterAddress(address _routerAddress);
    event SetFeeAddress(address _feeAddress);
    event SetBuyBackAddress(address _buyBackAddress);
    event SetWaiveFee(address _waiveFeeToken, uint256 _waiveFeeAmount);

    modifier onlyGov() {
        require(msg.sender == govAddress, "!gov");
        _;
    }

    constructor(
        address _vaultChefAddress,
        address _masterChefAddress,
        address _routerAddress,
        uint256 _pid,
        MasterChefType _masterChefType,
        address _wantAddress,
        address _token0Address,
        address _token1Address,
        address _earnedAddress,
        address _waiveFeeToken,
        uint256 _waiveFeeAmount
    ) public {
        govAddress = msg.sender;
        vaultChefAddress = _vaultChefAddress;
        masterChefAddress = _masterChefAddress;
        routerAddress = _routerAddress;

        wantAddress = _wantAddress;
        token0Address = _token0Address;
        token1Address = _token1Address;

        pid = _pid;
        masterChefType = _masterChefType;
        earnedAddress = _earnedAddress;
        waiveFeeToken = _waiveFeeToken;
        waiveFeeAmount = _waiveFeeAmount;

        transferOwnership(vaultChefAddress);
        
        _resetAllowances();
    }
    
    function deposit(uint256 _wantAmt) external onlyOwner nonReentrant whenNotPaused returns (uint256) {
        // Call must happen before transfer
        uint256 wantLockedBefore = wantLockedTotal();

        IERC20(wantAddress).safeTransferFrom(
            address(msg.sender),
            address(this),
            _wantAmt
        );

        // Proper deposit amount for tokens with fees, or vaults with deposit fees
        uint256 sharesAdded = _farm();
        if (sharesTotal > 0) {
            sharesAdded = sharesAdded.mul(sharesTotal).div(wantLockedBefore);
        }
        sharesTotal = sharesTotal.add(sharesAdded);
        return sharesAdded;
    }

    function _farm() internal returns (uint256) {
        uint256 wantAmt = IERC20(wantAddress).balanceOf(address(this));
        if (wantAmt == 0) return 0;
        
        uint256 sharesBefore = vaultSharesTotal();

        if (MasterChefType.SINGLE == masterChefType) {
            IMasterChef(masterChefAddress).enterStaking(wantAmt);
        } else if (MasterChefType.FAIRLAUNCH == masterChefType) {
            IFairLaunch(masterChefAddress).deposit(address(this), pid, wantAmt);
        } else if (MasterChefType.REFERRAL == masterChefType) {
            IMasterChefRef(masterChefAddress).deposit(pid, wantAmt, address(0));
        } else {
            IMasterChef(masterChefAddress).deposit(pid, wantAmt);
        }
        uint256 sharesAfter = vaultSharesTotal();
        
        return sharesAfter.sub(sharesBefore);
    }

    function _unfarm(uint256 _wantAmt) internal {
        if (MasterChefType.SINGLE == masterChefType) {
            IMasterChef(masterChefAddress).leaveStaking(_wantAmt);
        } else if (MasterChefType.FAIRLAUNCH == masterChefType) {
            IFairLaunch(masterChefAddress).withdraw(address(this), pid, _wantAmt);
        } else {
            IMasterChef(masterChefAddress).withdraw(pid, _wantAmt);
        }
    }

    function withdraw(address _userAddress , uint256 _wantAmt) external onlyOwner nonReentrant returns (uint256) {
        require(_wantAmt > 0, "withdraw: _wantAmt is 0");
        
        uint256 wantAmt = IERC20(wantAddress).balanceOf(address(this));
        
        // Check if strategy has tokens from panic
        if (_wantAmt > wantAmt) {
            _unfarm(_wantAmt.sub(wantAmt));
            wantAmt = IERC20(wantAddress).balanceOf(address(this));
        }

        if (_wantAmt > wantAmt) {
            _wantAmt = wantAmt;
        }

        if (_wantAmt > wantLockedTotal()) {
            _wantAmt = wantLockedTotal();
        }

        uint256 sharesRemoved = _wantAmt.mul(sharesTotal).div(wantLockedTotal());
        if (sharesRemoved > sharesTotal) {
            sharesRemoved = sharesTotal;
        }
        sharesTotal = sharesTotal.sub(sharesRemoved);
        
        // Withdraw fee
        uint256 userFeeAmount = IERC20(waiveFeeToken).balanceOf(_userAddress);
        if (waiveFeeAmount > userFeeAmount) {
            uint256 withdrawFee = _wantAmt
                .mul(withdrawFeeFactorMax.sub(withdrawFeeFactor))
                .div(withdrawFeeFactorMax);
            IERC20(wantAddress).safeTransfer(feeAddress, withdrawFee);
            _wantAmt = _wantAmt.sub(withdrawFee);
        }

        // Transfer to VaultChef
        IERC20(wantAddress).safeTransfer(vaultChefAddress, _wantAmt);
        return sharesRemoved;
    }

    function earn() external nonReentrant whenNotPaused onlyGov {
        // Harvest farm tokens
        if (MasterChefType.SINGLE == masterChefType) {
            IMasterChef(masterChefAddress).leaveStaking(0); // Just for single staking, we dont use withdraw()
        } else if (MasterChefType.FAIRLAUNCH == masterChefType) {
            IFairLaunch(masterChefAddress).harvest(pid);
        } else {
            IMasterChef(masterChefAddress).withdraw(pid, 0);
        }

        // Converts farm tokens into want tokens
        uint256 earnedAmt = IERC20(earnedAddress).balanceOf(address(this));

        if (earnedAmt > 0) {
            earnedAmt = distributeFees(earnedAmt);
            earnedAmt = buyBack(earnedAmt);

            if (MasterChefType.SINGLE == masterChefType || wantAddress == earnedAddress) { // single staking
                lastEarnBlock = block.number;
                _farm();
                return;
            }

            if (earnedAddress != token0Address) {
                // Swap half earned to token0
                _safeSwap(
                    earnedAmt.div(2),
                    earnedToToken0Path,
                    address(this)
                );
            }
    
            if (earnedAddress != token1Address) {
                // Swap half earned to token1
                _safeSwap(
                    earnedAmt.div(2),
                    earnedToToken1Path,
                    address(this)
                );
            }
    
            // Get want tokens, ie. add liquidity
            uint256 token0Amt = IERC20(token0Address).balanceOf(address(this));
            uint256 token1Amt = IERC20(token1Address).balanceOf(address(this));
            if (token0Amt > 0 && token1Amt > 0) {
                IUniRouter02(routerAddress).addLiquidity(
                    token0Address,
                    token1Address,
                    token0Amt,
                    token1Amt,
                    0,
                    0,
                    address(this),
                    now.add(600)
                );
            }
    
            lastEarnBlock = block.number;
            _farm();
        }
    }

    function distributeFees(uint256 _earnedAmt) internal returns (uint256) {
        // Performance fee
        if (controllerFee > 0) {
            uint256 fee = _earnedAmt.mul(controllerFee).div(feeMax);
    
            _safeSwapWBnb(
                fee,
                earnedToWBnbPath,
                feeAddress
            );
            
            _earnedAmt = _earnedAmt.sub(fee);
        }
        return _earnedAmt;
    }

    function buyBack(uint256 _earnedAmt) internal returns (uint256) {
        if (buyBackRate > 0) {
            uint256 buyBackAmt = _earnedAmt.mul(buyBackRate).div(feeMax);

            _safeSwapWBnb(
                buyBackAmt,
                earnedToWBnbPath,
                buyBackAddress
            );

            _earnedAmt = _earnedAmt.sub(buyBackAmt);
        }
        return _earnedAmt;
    }

    function convertDustToEarned() external nonReentrant whenNotPaused {
        require(MasterChefType.SINGLE != masterChefType, "convertDustToEarned: isSingle");
        require(wantAddress != earnedAddress, "convertDustToEarned: same token");
        // Converts dust tokens into earned tokens, which will be reinvested on the next earn().

        // Converts token0 dust (if any) to earned tokens
        uint256 token0Amt = IERC20(token0Address).balanceOf(address(this));
        if (token0Amt > 0 && token0Address != earnedAddress) {
            // Swap all dust tokens to earned tokens
            _safeSwap(
                token0Amt,
                token0ToEarnedPath,
                address(this)
            );
        }

        // Converts token1 dust (if any) to earned tokens
        uint256 token1Amt = IERC20(token1Address).balanceOf(address(this));
        if (token1Amt > 0 && token1Address != earnedAddress) {
            // Swap all dust tokens to earned tokens
            _safeSwap(
                token1Amt,
                token1ToEarnedPath,
                address(this)
            );
        }
    }

    function vaultSharesTotal() public view returns (uint256) {
        (uint256 amount,) = IMasterChef(masterChefAddress).userInfo(pid, address(this));
        return amount;
    }
    
    function wantLockedTotal() public view returns (uint256) {
        return IERC20(wantAddress).balanceOf(address(this))
            .add(vaultSharesTotal());
    }

    function _resetAllowances() internal {
        IERC20(wantAddress).safeApprove(masterChefAddress, uint256(0));
        IERC20(wantAddress).safeIncreaseAllowance(
            masterChefAddress,
            uint256(-1)
        );

        IERC20(earnedAddress).safeApprove(routerAddress, uint256(0));
        IERC20(earnedAddress).safeIncreaseAllowance(
            routerAddress,
            uint256(-1)
        );

        if (MasterChefType.SINGLE != masterChefType && wantAddress != earnedAddress) {
            IERC20(token0Address).safeApprove(routerAddress, uint256(0));
            IERC20(token0Address).safeIncreaseAllowance(
                routerAddress,
                uint256(-1)
            );

            IERC20(token1Address).safeApprove(routerAddress, uint256(0));
            IERC20(token1Address).safeIncreaseAllowance(
                routerAddress,
                uint256(-1)
            );
        }
    }

    function resetAllowances() external onlyGov {
        _resetAllowances();
    }

    // Emergency!!
    function pause() external onlyGov {
        _pause();
    }

    function unpause() external onlyGov {
        _unpause();
        _resetAllowances();
    }

    function panic() external onlyGov {
        _pause();
        _unfarm(vaultSharesTotal());
    }

    function emergencyPanic() external onlyGov {
        _pause();
        IMasterChef(masterChefAddress).emergencyWithdraw(pid);
    }

    function unpanic() external onlyGov {
        _unpause();
        _farm();
    }
    
    function _safeSwap(
        uint256 _amountIn,
        address[] memory _path,
        address _to
    ) internal {
        uint256[] memory amounts = IUniRouter02(routerAddress).getAmountsOut(_amountIn, _path);
        uint256 amountOut = amounts[amounts.length.sub(1)];

        IUniRouter02(routerAddress).swapExactTokensForTokens(
            _amountIn,
            amountOut.mul(slippageFactor).div(1000),
            _path,
            _to,
            now.add(600)
        );
    }
    
    function _safeSwapWBnb(
        uint256 _amountIn,
        address[] memory _path,
        address _to
    ) internal {
        uint256[] memory amounts = IUniRouter02(routerAddress).getAmountsOut(_amountIn, _path);
        uint256 amountOut = amounts[amounts.length.sub(1)];

        IUniRouter02(routerAddress).swapExactTokensForETH(
            _amountIn,
            amountOut.mul(slippageFactor).div(1000),
            _path,
            _to,
            now.add(600)
        );
    }

    function setSettings(
        uint256 _controllerFee,
        uint256 _buyBackRate,
        uint256 _withdrawFeeFactor,
        uint256 _slippageFactor
    ) external onlyGov {
        require(_controllerFee.add(_buyBackRate) <= feeMaxTotal, "setSettings: Max fee of 10%");
        require(_withdrawFeeFactor >= withdrawFeeFactorLL, "setSettings: _withdrawFeeFactor too low");
        require(_withdrawFeeFactor <= withdrawFeeFactorMax, "setSettings: _withdrawFeeFactor too high");
        require(_slippageFactor <= slippageFactorUL, "setSettings: _slippageFactor too high");
        controllerFee = _controllerFee;
        buyBackRate = _buyBackRate;
        withdrawFeeFactor = _withdrawFeeFactor;
        slippageFactor = _slippageFactor;

        emit SetSettings(_controllerFee, _buyBackRate, _withdrawFeeFactor, _slippageFactor);
    }

    function setPaths(
        address[] memory _earnedToWBnbPath,
        address[] memory _earnedToToken0Path,
        address[] memory _earnedToToken1Path,
        address[] memory _token0ToEarnedPath,
        address[] memory _token1ToEarnedPath
    ) external onlyGov {
        earnedToWBnbPath = _earnedToWBnbPath;
        earnedToToken0Path = _earnedToToken0Path;
        earnedToToken1Path = _earnedToToken1Path;
        token0ToEarnedPath = _token0ToEarnedPath;
        token1ToEarnedPath = _token1ToEarnedPath;

        emit SetPaths(_earnedToWBnbPath, _earnedToToken0Path, _earnedToToken1Path, _token0ToEarnedPath, _token1ToEarnedPath);
    }

    function setGov(address _govAddress) external onlyGov {
        govAddress = _govAddress;
        emit SetGov(_govAddress);
    }

    function setRouterAddress(address _routerAddress) external onlyGov {
        routerAddress = _routerAddress;
        emit SetRouterAddress(_routerAddress);
    }

    function setFeeAddress(address _feeAddress) external onlyGov {
        feeAddress = _feeAddress;
        emit SetFeeAddress(_feeAddress);
    }

    function setBuyBackAddress(address _buyBackAddress) external onlyGov {
        buyBackAddress = _buyBackAddress;
        emit SetBuyBackAddress(_buyBackAddress);
    }

    function setWaiveFee(address _waiveFeeToken, uint256 _waiveFeeAmount) external onlyGov {
        waiveFeeToken = _waiveFeeToken;
        waiveFeeAmount = _waiveFeeAmount;
        emit SetWaiveFee(_waiveFeeToken, _waiveFeeAmount);
    }

    function inCaseTokensGetStuck(
        address _token,
        uint256 _amount,
        address _to
    ) external onlyGov {
        require(_token != earnedAddress, "inCaseTokensGetStuck: !safe");
        require(_token != wantAddress, "inCaseTokensGetStuck: !safe");
        IERC20(_token).safeTransfer(_to, _amount);
    }
}

File 2 of 14 : 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 3 of 14 : 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 4 of 14 : 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 5 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 6 of 14 : 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 emergencyWithdraw(uint256 _pid) external;

    function enterStaking(uint256 _amount) external;

    function leaveStaking(uint256 _amount) external;

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

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

pragma solidity 0.6.12;

interface IMasterChefRef {
    function deposit(uint256 _pid, uint256 _amount, address _referrer) external;

    function withdraw(uint256 _pid, uint256 _amount) external;

    function emergencyWithdraw(uint256 _pid) external;

    function enterStaking(uint256 _amount) external;

    function leaveStaking(uint256 _amount) external;

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

File 8 of 14 : IFairLaunch.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IFairLaunch {
    function deposit(address _for, uint256 _pid, uint256 _amount) external;

    function withdraw(address _for, uint256 _pid, uint256 _amount) external;

    function emergencyWithdraw(uint256 _pid) external;

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

File 9 of 14 : IUniRouter02.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./IUniRouter01.sol";

interface IUniRouter02 is IUniRouter01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 10 of 14 : 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 14 : 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 12 of 14 : 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 13 of 14 : 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 14 of 14 : IUniRouter01.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IUniRouter01 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vaultChefAddress","type":"address"},{"internalType":"address","name":"_masterChefAddress","type":"address"},{"internalType":"address","name":"_routerAddress","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"enum StrategyMasterChef.MasterChefType","name":"_masterChefType","type":"uint8"},{"internalType":"address","name":"_wantAddress","type":"address"},{"internalType":"address","name":"_token0Address","type":"address"},{"internalType":"address","name":"_token1Address","type":"address"},{"internalType":"address","name":"_earnedAddress","type":"address"},{"internalType":"address","name":"_waiveFeeToken","type":"address"},{"internalType":"uint256","name":"_waiveFeeAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyBackAddress","type":"address"}],"name":"SetBuyBackAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_feeAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_govAddress","type":"address"}],"name":"SetGov","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_earnedToWBnbPath","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_earnedToToken0Path","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_earnedToToken1Path","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_token0ToEarnedPath","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_token1ToEarnedPath","type":"address[]"}],"name":"SetPaths","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_routerAddress","type":"address"}],"name":"SetRouterAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_controllerFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_buyBackRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_withdrawFeeFactor","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_slippageFactor","type":"uint256"}],"name":"SetSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_waiveFeeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_waiveFeeAmount","type":"uint256"}],"name":"SetWaiveFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"buyBackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyBackRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controllerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convertDustToEarned","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wantAmt","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earnedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"earnedToToken0Path","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"earnedToToken1Path","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"earnedToWBnbPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyPanic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeMaxTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"govAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastEarnBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterChefAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterChefType","outputs":[{"internalType":"enum StrategyMasterChef.MasterChefType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[],"stateMutability":"nonpayable","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":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetAllowances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"routerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buyBackAddress","type":"address"}],"name":"setBuyBackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_govAddress","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_earnedToWBnbPath","type":"address[]"},{"internalType":"address[]","name":"_earnedToToken0Path","type":"address[]"},{"internalType":"address[]","name":"_earnedToToken1Path","type":"address[]"},{"internalType":"address[]","name":"_token0ToEarnedPath","type":"address[]"},{"internalType":"address[]","name":"_token1ToEarnedPath","type":"address[]"}],"name":"setPaths","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_routerAddress","type":"address"}],"name":"setRouterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_controllerFee","type":"uint256"},{"internalType":"uint256","name":"_buyBackRate","type":"uint256"},{"internalType":"uint256","name":"_withdrawFeeFactor","type":"uint256"},{"internalType":"uint256","name":"_slippageFactor","type":"uint256"}],"name":"setSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_waiveFeeToken","type":"address"},{"internalType":"uint256","name":"_waiveFeeAmount","type":"uint256"}],"name":"setWaiveFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharesTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slippageFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slippageFactorUL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token0Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"token0ToEarnedPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"token1ToEarnedPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpanic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultChefAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultSharesTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"waiveFeeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"waiveFeeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wantAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wantLockedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"},{"internalType":"uint256","name":"_wantAmt","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFeeFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeeFactorLL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeeFactorMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526002805461ff001916610100179055600d80546001600160a01b0319908116730e46312d5759107d8988c5aab15ebcfb68e3a9c81790915543600f5560006010556011805490911673348bcab7717e6b13496738e336b944b970919cdc17905560c860128190556013556127066014556103b66015553480156200008757600080fd5b50604051620048cd380380620048cd8339818101604052610160811015620000ae57600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e08801516101008901516101208a0151610140909a015198999798969795969495939492939192909190600062000106620002fa565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350916000805160206200484d833981519152908290a350600180819055506000600260006101000a81548160ff02191690831515021790555033600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a600460006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089600560006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600c60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555085600660006101000a8154816001600160a01b0302191690836001600160a01b0316021790555084600760006101000a8154816001600160a01b0302191690836001600160a01b0316021790555083600860006101000a8154816001600160a01b0302191690836001600160a01b031602179055508760038190555086600260016101000a81548160ff021916908360038111156200029857fe5b0217905550600980546001600160a01b038086166001600160a01b031992831617909255600a80548584169216919091179055600b829055600454620002df9116620002fe565b620002e962000408565b505050505050505050505062000b36565b3390565b62000308620002fa565b6001600160a01b03166200031b620005ab565b6001600160a01b03161462000377576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620003be5760405162461bcd60e51b8152600401808060200182810382526026815260200180620048016026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206200484d83398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055460065462000434916001600160a01b0391821691166000620005ba602090811b6200271117901c565b60055460065462000461916001600160a01b039182169116600019620006de602090811b6200282417901c565b600c546009546200048d916001600160a01b0391821691166000620005ba602090811b6200271117901c565b600c54600954620004ba916001600160a01b039182169116600019620006de602090811b6200282417901c565b600254610100900460ff166003811115620004d157fe5b15801590620004f157506009546006546001600160a01b03908116911614155b15620005a957600c5460075462000523916001600160a01b0391821691166000620005ba602090811b6200271117901c565b600c5460075462000550916001600160a01b039182169116600019620006de602090811b6200282417901c565b600c546008546200057c916001600160a01b0391821691166000620005ba602090811b6200271117901c565b600c54600854620005a9916001600160a01b039182169116600019620006de602090811b6200282417901c565b565b6000546001600160a01b031690565b80158062000644575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156200061457600080fd5b505afa15801562000629573d6000803e3d6000fd5b505050506040513d60208110156200064057600080fd5b5051155b620006815760405162461bcd60e51b8152600401808060200182810382526036815260200180620048976036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620006d9918591620007e716565b505050565b60006200078582856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156200074457600080fd5b505afa15801562000759573d6000803e3d6000fd5b505050506040513d60208110156200077057600080fd5b505190620008a3602090811b620028dd17901c565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620007e191869190620007e716565b50505050565b606062000843826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200090560201b62002940179092919060201c565b805190915015620006d9578080602001905160208110156200086457600080fd5b5051620006d95760405162461bcd60e51b815260040180806020018281038252602a8152602001806200486d602a913960400191505060405180910390fd5b600082820183811015620008fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60606200091684846000856200091e565b949350505050565b606082471015620009615760405162461bcd60e51b8152600401808060200182810382526026815260200180620048276026913960400191505060405180910390fd5b6200096c8562000a86565b620009be576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310620009ff5780518252601f199092019160209182019101620009de565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811462000a63576040519150601f19603f3d011682016040523d82523d6000602084013e62000a68565b606091505b50909250905062000a7b82828662000a8c565b979650505050505050565b3b151590565b6060831562000a9d575081620008fe565b82511562000aae5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101562000afa57818101518382015260200162000ae0565b50505050905090810190601f16801562000b285780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b613cbb8062000b466000396000f3fe608060405234801561001057600080fd5b50600436106103415760003560e01c8063815e2480116101b8578063c11c2e9211610104578063eca03fe1116100a2578063f36ba1971161007c578063f36ba19714610969578063f3fef3a314610971578063ffbd3b1f1461099d578063ffbe9f1e146104a257610341565b8063eca03fe114610692578063f10684541461093b578063f2fde38b1461094357610341565b8063d389800f116100de578063d389800f14610672578063d7cb416f1461067a578063e719847414610682578063e7a036791461068a57610341565b8063c11c2e9214610627578063c8e3d18b1461062f578063cfad57a21461064c57610341565b80638fefda0611610171578063ad740f8c1161014b578063ad740f8c146105bf578063b6b55f25146105e5578063b74cd24214610602578063b77050e71461060a57610341565b80638fefda061461056b57806396e9aff814610573578063a086f0911461059057610341565b8063815e24801461051d5780638456cb591461052557806385f02dd61461052d578063866b2018146105355780638705fcd41461053d5780638da5cb5b1461056357610341565b806342da4eb31161029257806367057b6c11610230578063715018a61161020a578063715018a6146104e8578063783478ad146104f05780637ff36fbe146104f8578063813fceef1461050057610341565b806367057b6c146104a257806367206d40146104aa57806368f54162146104e057610341565b80634700d3051161026c5780634700d3051461046e57806351df3cc7146104765780635c975abb1461047e57806365a5e30b1461049a57610341565b806342da4eb31461045657806344a3955e1461045e57806346008a071461046657610341565b80633220d732116102ff5780633b06c767116102d95780633b06c767146103f75780633f4ba83a14610420578063412753581461042857806341cb87fc1461043057610341565b80633220d732146103df5780633268cc56146103e75780633505b09f146103ef57610341565b80627a2ae31461034657806304c9d4901461037f5780630fa4e01e14610399578063178a8d07146103a157806320e34a67146103a9578063221e2e60146103d7575b600080fd5b6103636004803603602081101561035c57600080fd5b50356109a5565b604080516001600160a01b039092168252519081900360200190f35b6103876109cc565b60408051918252519081900360200190f35b610387610a54565b610387610a5a565b6103d5600480360360408110156103bf57600080fd5b506001600160a01b038135169060200135610a60565b005b610363610b09565b610363610b18565b610363610b27565b6103d5610b36565b6103ff610b88565b6040518082600381111561040f57fe5b815260200191505060405180910390f35b6103d5610b96565b610363610be6565b6103d56004803603602081101561044657600080fd5b50356001600160a01b0316610bf5565b610387610c91565b610387610d20565b610363610d26565b6103d5610d35565b610387610d95565b610486610d9b565b604080519115158252519081900360200190f35b6103d5610da4565b610387610dff565b6103d5600480360360608110156104c057600080fd5b506001600160a01b03813581169160208101359160409091013516610e05565b610387610f2c565b6103d5610f32565b610363610fde565b610363610fed565b6103636004803603602081101561051657600080fd5b5035610ffc565b610363611009565b6103d5611018565b610387611068565b61038761106e565b6103d56004803603602081101561055357600080fd5b50356001600160a01b0316611074565b610363611110565b61038761111f565b6103636004803603602081101561058957600080fd5b5035611125565b6103d5600480360360808110156105a657600080fd5b5080359060208101359060408101359060600135611132565b6103d5600480360360208110156105d557600080fd5b50356001600160a01b03166112fe565b610387600480360360208110156105fb57600080fd5b503561139a565b61038761150d565b6103636004803603602081101561062057600080fd5b5035611513565b6103d5611520565b6103636004803603602081101561064557600080fd5b5035611891565b6103d56004803603602081101561066257600080fd5b50356001600160a01b031661189e565b6103d561193a565b610363611f66565b610363611f75565b610363611f84565b6103d5600480360360a08110156106a857600080fd5b810190602081018135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460208302840111600160201b831117156106f557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561074457600080fd5b82018360208201111561075657600080fd5b803590602001918460208302840111600160201b8311171561077757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107c657600080fd5b8201836020820111156107d857600080fd5b803590602001918460208302840111600160201b831117156107f957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561084857600080fd5b82018360208201111561085a57600080fd5b803590602001918460208302840111600160201b8311171561087b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108ca57600080fd5b8201836020820111156108dc57600080fd5b803590602001918460208302840111600160201b831117156108fd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611f93945050505050565b6103876121d3565b6103d56004803603602081101561095957600080fd5b50356001600160a01b03166121d9565b6103d56122db565b6103876004803603604081101561098757600080fd5b506001600160a01b038135169060200135612395565b61038761270b565b601a81815481106109b257fe5b6000918252602090912001546001600160a01b0316905081565b600554600354604080516393f1a40b60e01b81526004810192909252306024830152805160009384936001600160a01b03909116926393f1a40b92604480840193829003018186803b158015610a2157600080fd5b505afa158015610a35573d6000803e3d6000fd5b505050506040513d6040811015610a4b57600080fd5b50519150505b90565b600f5481565b60135481565b600e546001600160a01b03163314610aa8576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b038416908117909155600b829055604080519182526020820183905280517f9f447a1117fa63f7da6729f92adcd17a99b6a147a31d9956b91266289976437f9281900390910190a15050565b6005546001600160a01b031681565b6004546001600160a01b031681565b600c546001600160a01b031681565b600e546001600160a01b03163314610b7e576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b610b86612959565b565b600254610100900460ff1681565b600e546001600160a01b03163314610bde576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b610b7e612a87565b600d546001600160a01b031681565b600e546001600160a01b03163314610c3d576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b600c80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517feb81878967dea025ef4859fd7b8b4555ee3c73cae8a039057296d25a53eaa9b69181900360200190a150565b6000610d1b610c9e6109cc565b600654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610ce957600080fd5b505afa158015610cfd573d6000803e3d6000fd5b505050506040513d6020811015610d1357600080fd5b5051906128dd565b905090565b60105481565b600e546001600160a01b031681565b600e546001600160a01b03163314610d7d576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b610d85612b27565b610b86610d906109cc565b612baa565b600b5481565b60025460ff1690565b600e546001600160a01b03163314610dec576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b610df4612a87565b610dfc612d1b565b50565b61271081565b600e546001600160a01b03163314610e4d576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b6009546001600160a01b0384811691161415610eb0576040805162461bcd60e51b815260206004820152601b60248201527f696e43617365546f6b656e73476574537475636b3a2021736166650000000000604482015290519081900360640190fd5b6006546001600160a01b0384811691161415610f13576040805162461bcd60e51b815260206004820152601b60248201527f696e43617365546f6b656e73476574537475636b3a2021736166650000000000604482015290519081900360640190fd5b610f276001600160a01b0384168284612fbd565b505050565b60145481565b610f3a61300f565b6001600160a01b0316610f4b611110565b6001600160a01b031614610f94576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdf833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6011546001600160a01b031681565b6007546001600160a01b031681565b601681815481106109b257fe5b600a546001600160a01b031681565b600e546001600160a01b03163314611060576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b610b86612b27565b60125481565b6126ac81565b600e546001600160a01b031633146110bc576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b600d80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517ffcb8a963756b148f85a52537b63147b6c4b40af694099c901ac3b99d317a2db89181900360200190a150565b6000546001600160a01b031690565b6103e881565b601881815481106109b257fe5b600e546001600160a01b0316331461117a576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b6103e861118785856128dd565b11156111da576040805162461bcd60e51b815260206004820152601b60248201527f73657453657474696e67733a204d617820666565206f66203130250000000000604482015290519081900360640190fd5b6126ac82101561121b5760405162461bcd60e51b8152600401808060200182810382526027815260200180613c296027913960400191505060405180910390fd5b61271082111561125c5760405162461bcd60e51b8152600401808060200182810382526028815260200180613b706028913960400191505060405180910390fd5b6103e381111561129d5760405162461bcd60e51b8152600401808060200182810382526025815260200180613b256025913960400191505060405180910390fd5b601284905560138390556014829055601581905560408051858152602081018590528082018490526060810183905290517fd9968429114ac80bd16723a205e45e46393aefba1f08fb7bdffbad9ef60946089181900360800190a150505050565b600e546001600160a01b03163314611346576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b601180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f200c92aaea275302bf641e37f7a5dda63f445f08f4fc74a5cde7fd643f609e099181900360200190a150565b60006113a461300f565b6001600160a01b03166113b5611110565b6001600160a01b0316146113fe576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdf833981519152604482015290519081900360640190fd5b60026001541415611444576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b05833981519152604482015290519081900360640190fd5b6002600155611451610d9b565b15611496576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60006114a0610c91565b6006549091506114bb906001600160a01b0316333086613013565b60006114c5612d1b565b601054909150156114f2576114ef826114e96010548461306d90919063ffffffff16565b906130c6565b90505b6010546114ff90826128dd565b601055600180559392505050565b6103e381565b601981815481106109b257fe5b60026001541415611566576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b05833981519152604482015290519081900360640190fd5b6002600155611573610d9b565b156115b8576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600254610100900460ff1660038111156115ce57fe5b61161f576040805162461bcd60e51b815260206004820152601d60248201527f636f6e7665727444757374546f4561726e65643a20697353696e676c65000000604482015290519081900360640190fd5b6009546006546001600160a01b0390811691161415611685576040805162461bcd60e51b815260206004820152601f60248201527f636f6e7665727444757374546f4561726e65643a2073616d6520746f6b656e00604482015290519081900360640190fd5b600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116d057600080fd5b505afa1580156116e4573d6000803e3d6000fd5b505050506040513d60208110156116fa57600080fd5b50519050801580159061171e57506009546007546001600160a01b03908116911614155b156117885761178881601980548060200260200160405190810160405280929190818152602001828054801561177d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161175f575b50505050503061312d565b600854604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156117d357600080fd5b505afa1580156117e7573d6000803e3d6000fd5b505050506040513d60208110156117fd57600080fd5b50519050801580159061182157506009546008546001600160a01b03908116911614155b156118895761188981601a80548060200260200160405190810160405280929190818152602001828054801561177d576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161175f5750505050503061312d565b505060018055565b601781815481106109b257fe5b600e546001600160a01b031633146118e6576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b600e80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f91a8c1cc2d4a3bb60738481947a00cbb9899c822916694cf8bb1d68172fdcd549181900360200190a150565b60026001541415611980576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b05833981519152604482015290519081900360640190fd5b600260015561198d610d9b565b156119d2576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600e546001600160a01b03163314611a1a576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b600254610100900460ff166003811115611a3057fe5b611a9d5760055460408051631058d28160e01b815260006004820181905291516001600160a01b0390931692631058d2819260248084019391929182900301818387803b158015611a8057600080fd5b505af1158015611a94573d6000803e3d6000fd5b50505050611b7a565b600254610100900460ff166003811115611ab357fe5b60021415611b0b5760055460035460408051636ee3193160e11b81526004810192909252516001600160a01b039092169163ddc632629160248082019260009290919082900301818387803b158015611a8057600080fd5b60055460035460408051630441a3e760e41b8152600481019290925260006024830181905290516001600160a01b039093169263441a3e7092604480820193929182900301818387803b158015611b6157600080fd5b505af1158015611b75573d6000803e3d6000fd5b505050505b600954604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611bc557600080fd5b505afa158015611bd9573d6000803e3d6000fd5b505050506040513d6020811015611bef57600080fd5b505190508015611f5e57611c0281613467565b9050611c0d81613515565b600254909150610100900460ff166003811115611c2657fe5b1580611c4257506009546006546001600160a01b039081169116145b15611c5a5743600f55611c53612d1b565b5050611f60565b6007546009546001600160a01b03908116911614611cdf57611cdf611c808260026130c6565b601780548060200260200160405190810160405280929190818152602001828054801561177d576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161175f5750505050503061312d565b6008546009546001600160a01b03908116911614611d6457611d64611d058260026130c6565b601880548060200260200160405190810160405280929190818152602001828054801561177d576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161175f5750505050503061312d565b600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611daf57600080fd5b505afa158015611dc3573d6000803e3d6000fd5b505050506040513d6020811015611dd957600080fd5b5051600854604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611e2c57600080fd5b505afa158015611e40573d6000803e3d6000fd5b505050506040513d6020811015611e5657600080fd5b505190508115801590611e695750600081115b15611f4e57600c546007546008546001600160a01b039283169263e8e337009281169116858560008030611e9f426102586128dd565b6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200198505050505050505050606060405180830381600087803b158015611f2157600080fd5b505af1158015611f35573d6000803e3d6000fd5b505050506040513d6060811015611f4b57600080fd5b50505b43600f55611f5a612d1b565b5050505b505b60018055565b6008546001600160a01b031681565b6009546001600160a01b031681565b6006546001600160a01b031681565b600e546001600160a01b03163314611fdb576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b8451611fee906016906020880190613a89565b508351612002906017906020870190613a89565b508251612016906018906020860190613a89565b50815161202a906019906020850190613a89565b50805161203e90601a906020840190613a89565b507f512d174b8eaadb80c3c2ce575cde3965e49323b5a90b9934babe86e9c9c8e9b7858585858560405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b838110156120b557818101518382015260200161209d565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b838110156120f45781810151838201526020016120dc565b50505050905001868103845289818151815260200191508051906020019060200280838360005b8381101561213357818101518382015260200161211b565b50505050905001868103835288818151815260200191508051906020019060200280838360005b8381101561217257818101518382015260200161215a565b50505050905001868103825287818151815260200191508051906020019060200280838360005b838110156121b1578181015183820152602001612199565b505050509050019a505050505050505050505060405180910390a15050505050565b60035481565b6121e161300f565b6001600160a01b03166121f2611110565b6001600160a01b03161461223b576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdf833981519152604482015290519081900360640190fd5b6001600160a01b0381166122805760405162461bcd60e51b8152600401808060200182810382526026815260200180613b4a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600e546001600160a01b03163314612323576040805162461bcd60e51b8152602060048083019190915260248201526310b3b7bb60e11b604482015290519081900360640190fd5b61232b612b27565b60055460035460408051632989754760e11b81526004810192909252516001600160a01b0390921691635312ea8e9160248082019260009290919082900301818387803b15801561237b57600080fd5b505af115801561238f573d6000803e3d6000fd5b50505050565b600061239f61300f565b6001600160a01b03166123b0611110565b6001600160a01b0316146123f9576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdf833981519152604482015290519081900360640190fd5b6002600154141561243f576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b05833981519152604482015290519081900360640190fd5b600260015581612496576040805162461bcd60e51b815260206004820152601760248201527f77697468647261773a205f77616e74416d742069732030000000000000000000604482015290519081900360640190fd5b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d602081101561250b57600080fd5b505190508083111561259e57612524610d9084836135b1565b600654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561256f57600080fd5b505afa158015612583573d6000803e3d6000fd5b505050506040513d602081101561259957600080fd5b505190505b808311156125aa578092505b6125b2610c91565b8311156125c4576125c1610c91565b92505b60006125df6125d1610c91565b6010546114e990879061306d565b90506010548111156125f057506010545b6010546125fd90826135b1565b601055600a54604080516370a0823160e01b81526001600160a01b038881166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b15801561265157600080fd5b505afa158015612665573d6000803e3d6000fd5b505050506040513d602081101561267b57600080fd5b5051600b549091508110156126e15760006126b36127106114e96126ac6014546127106135b190919063ffffffff16565b899061306d565b600d546006549192506126d3916001600160a01b03908116911683612fbd565b6126dd86826135b1565b9550505b6004546006546126fe916001600160a01b03918216911687612fbd565b5060018055949350505050565b60155481565b801580612797575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561276957600080fd5b505afa15801561277d573d6000803e3d6000fd5b505050506040513d602081101561279357600080fd5b5051155b6127d25760405162461bcd60e51b8152600401808060200182810382526036815260200180613c506036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610f2790849061360e565b600061288882856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b158015610ce957600080fd5b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905290915061238f90859061360e565b600082820183811015612937576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b606061294f84846000856136bf565b90505b9392505050565b600554600654612977916001600160a01b0391821691166000612711565b600554600654612996916001600160a01b039182169116600019612824565b600c546009546129b4916001600160a01b0391821691166000612711565b600c546009546129d3916001600160a01b039182169116600019612824565b600254610100900460ff1660038111156129e957fe5b15801590612a0857506009546006546001600160a01b03908116911614155b15610b8657600c54600754612a2b916001600160a01b0391821691166000612711565b600c54600754612a4a916001600160a01b039182169116600019612824565b600c54600854612a68916001600160a01b0391821691166000612711565b600c54600854610b86916001600160a01b039182169116600019612824565b612a8f610d9b565b612ad7576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612b0a61300f565b604080516001600160a01b039092168252519081900360200190a1565b612b2f610d9b565b15612b74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612b0a61300f565b600254610100900460ff166003811115612bc057fe5b612c2e5760055460408051631058d28160e01b81526004810184905290516001600160a01b0390921691631058d2819160248082019260009290919082900301818387803b158015612c1157600080fd5b505af1158015612c25573d6000803e3d6000fd5b50505050610dfc565b600254610100900460ff166003811115612c4457fe5b60021415612ca95760055460035460408051635ae2fb3960e11b8152306004820152602481019290925260448201849052516001600160a01b039092169163b5c5f6729160648082019260009290919082900301818387803b158015612c1157600080fd5b60055460035460408051630441a3e760e41b8152600481019290925260248201849052516001600160a01b039092169163441a3e709160448082019260009290919082900301818387803b158015612d0057600080fd5b505af1158015612d14573d6000803e3d6000fd5b5050505050565b600654604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015612d6b57600080fd5b505afa158015612d7f573d6000803e3d6000fd5b505050506040513d6020811015612d9557600080fd5b5051905080612da8576000915050610a51565b6000612db26109cc565b600254909150610100900460ff166003811115612dcb57fe5b612e3957600554604080516341441d3b60e01b81526004810185905290516001600160a01b03909216916341441d3b9160248082019260009290919082900301818387803b158015612e1c57600080fd5b505af1158015612e30573d6000803e3d6000fd5b50505050612f9f565b600254610100900460ff166003811115612e4f57fe5b60021415612eb45760055460035460408051630efe6a8b60e01b8152306004820152602481019290925260448201859052516001600160a01b0390921691630efe6a8b9160648082019260009290919082900301818387803b158015612e1c57600080fd5b600254610100900460ff166003811115612eca57fe5b60031415612f2f5760055460035460408051638dbdbe6d60e01b815260048101929092526024820185905260006044830181905290516001600160a01b0390931692638dbdbe6d92606480820193929182900301818387803b158015612e1c57600080fd5b60055460035460408051631c57762b60e31b8152600481019290925260248201859052516001600160a01b039092169163e2bbb1589160448082019260009290919082900301818387803b158015612f8657600080fd5b505af1158015612f9a573d6000803e3d6000fd5b505050505b6000612fa96109cc565b9050612fb581836135b1565b935050505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f2790849061360e565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261238f90859061360e565b60008261307c5750600061293a565b8282028284828161308957fe5b04146129375760405162461bcd60e51b8152600401808060200182810382526021815260200180613bbe6021913960400191505060405180910390fd5b600080821161311c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161312557fe5b049392505050565b600c546040805163d06ca61f60e01b815260048101868152602482019283528551604483015285516060946001600160a01b03169363d06ca61f9389938993909291606401906020808601910280838360005b83811015613198578181015183820152602001613180565b50505050905001935050505060006040518083038186803b1580156131bc57600080fd5b505afa1580156131d0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156131f957600080fd5b8101908080516040519392919084600160201b82111561321857600080fd5b90830190602082018581111561322d57600080fd5b82518660208202830111600160201b8211171561324957600080fd5b82525081516020918201928201910280838360005b8381101561327657818101518382015260200161325e565b50505050905001604052505050905060008161329d600184516135b190919063ffffffff16565b815181106132a757fe5b60200260200101519050600c60009054906101000a90046001600160a01b03166001600160a01b03166338ed1739866132f16103e86114e96015548761306d90919063ffffffff16565b87876132ff426102586128dd565b6040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561336f578181015183820152602001613357565b505050509050019650505050505050600060405180830381600087803b15801561339857600080fd5b505af11580156133ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156133d557600080fd5b8101908080516040519392919084600160201b8211156133f457600080fd5b90830190602082018581111561340957600080fd5b82518660208202830111600160201b8211171561342557600080fd5b82525081516020918201928201910280838360005b8381101561345257818101518382015260200161343a565b50505050905001604052505050505050505050565b6012546000901561351157600061348f6127106114e96012548661306d90919063ffffffff16565b90506135038160168054806020026020016040519081016040528092919081815260200182805480156134eb57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116134cd575b5050600d546001600160a01b0316925061381b915050565b61350d83826135b1565b9250505b5090565b6013546000901561351157600061353d6127106114e96013548661306d90919063ffffffff16565b905061350381601680548060200260200160405190810160405280929190818152602001828054801561359957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161357b575b50506011546001600160a01b0316925061381b915050565b600082821115613608576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6060613663826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129409092919063ffffffff16565b805190915015610f275780806020019051602081101561368257600080fd5b5051610f275760405162461bcd60e51b815260040180806020018281038252602a815260200180613bff602a913960400191505060405180910390fd5b6060824710156137005760405162461bcd60e51b8152600401808060200182810382526026815260200180613b986026913960400191505060405180910390fd5b613709856139df565b61375a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106137995780518252601f19909201916020918201910161377a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146137fb576040519150601f19603f3d011682016040523d82523d6000602084013e613800565b606091505b50915091506138108282866139e5565b979650505050505050565b600c546040805163d06ca61f60e01b815260048101868152602482019283528551604483015285516060946001600160a01b03169363d06ca61f9389938993909291606401906020808601910280838360005b8381101561388657818101518382015260200161386e565b50505050905001935050505060006040518083038186803b1580156138aa57600080fd5b505afa1580156138be573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156138e757600080fd5b8101908080516040519392919084600160201b82111561390657600080fd5b90830190602082018581111561391b57600080fd5b82518660208202830111600160201b8211171561393757600080fd5b82525081516020918201928201910280838360005b8381101561396457818101518382015260200161394c565b50505050905001604052505050905060008161398b600184516135b190919063ffffffff16565b8151811061399557fe5b60200260200101519050600c60009054906101000a90046001600160a01b03166001600160a01b03166318cbafe5866132f16103e86114e96015548761306d90919063ffffffff16565b3b151590565b606083156139f4575081612952565b825115613a045782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613a4e578181015183820152602001613a36565b50505050905090810190601f168015613a7b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215613ade579160200282015b82811115613ade57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613aa9565b506135119291505b808211156135115780546001600160a01b0319168155600101613ae656fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c0073657453657474696e67733a205f736c697070616765466163746f7220746f6f20686967684f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737373657453657474696e67733a205f7769746864726177466565466163746f7220746f6f2068696768416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656473657453657474696e67733a205f7769746864726177466565466163746f7220746f6f206c6f775361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220e1b2bf8e722c0caa0ea4713f824d5396ce65fa282cc07b3aab4b39d3a6a3c93964736f6c634300060c00334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000000000fc6b576c545f852a1bbeac5612f6870fca854a30000000000000000000000000e6be78800f25ffae4d1db7ca6d3485629bd200ed0000000000000000000000006b011d0d53b0da6ace2a3f436fd197a4e35f47ef000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c3bfdd2cd502e719132bf7aa5954c74e9c7209f50000000000000000000000003806aae953a3a873d02595f76c7698a57d4c7a57000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c0000000000000000000000003806aae953a3a873d02595f76c7698a57d4c7a570000000000000000000000000314e5a39806c30d67b869ee1bcdabee7e08de7400000000000000000000000000000000000000000000003635c9adc5dea00000

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

000000000000000000000000fc6b576c545f852a1bbeac5612f6870fca854a30000000000000000000000000e6be78800f25ffae4d1db7ca6d3485629bd200ed0000000000000000000000006b011d0d53b0da6ace2a3f436fd197a4e35f47ef000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c3bfdd2cd502e719132bf7aa5954c74e9c7209f50000000000000000000000003806aae953a3a873d02595f76c7698a57d4c7a57000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c0000000000000000000000003806aae953a3a873d02595f76c7698a57d4c7a570000000000000000000000000314e5a39806c30d67b869ee1bcdabee7e08de7400000000000000000000000000000000000000000000003635c9adc5dea00000

-----Decoded View---------------
Arg [0] : _vaultChefAddress (address): 0xfc6b576c545f852a1bbeac5612f6870fca854a30
Arg [1] : _masterChefAddress (address): 0xe6be78800f25ffae4d1db7ca6d3485629bd200ed
Arg [2] : _routerAddress (address): 0x6b011d0d53b0da6ace2a3f436fd197a4e35f47ef
Arg [3] : _pid (uint256): 11
Arg [4] : _masterChefType (uint8): 2
Arg [5] : _wantAddress (address): 0xc3bfdd2cd502e719132bf7aa5954c74e9c7209f5
Arg [6] : _token0Address (address): 0x3806aae953a3a873d02595f76c7698a57d4c7a57
Arg [7] : _token1Address (address): 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
Arg [8] : _earnedAddress (address): 0x3806aae953a3a873d02595f76c7698a57d4c7a57
Arg [9] : _waiveFeeToken (address): 0x0314e5a39806c30d67b869ee1bcdabee7e08de74
Arg [10] : _waiveFeeAmount (uint256): 1000000000000000000000

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000fc6b576c545f852a1bbeac5612f6870fca854a30
Arg [1] : 000000000000000000000000e6be78800f25ffae4d1db7ca6d3485629bd200ed
Arg [2] : 0000000000000000000000006b011d0d53b0da6ace2a3f436fd197a4e35f47ef
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [5] : 000000000000000000000000c3bfdd2cd502e719132bf7aa5954c74e9c7209f5
Arg [6] : 0000000000000000000000003806aae953a3a873d02595f76c7698a57d4c7a57
Arg [7] : 000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
Arg [8] : 0000000000000000000000003806aae953a3a873d02595f76c7698a57d4c7a57
Arg [9] : 0000000000000000000000000314e5a39806c30d67b869ee1bcdabee7e08de74
Arg [10] : 00000000000000000000000000000000000000000000003635c9adc5dea00000


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