false
false
0
Contract Address Details
contract

0xaB387712BeaD1e4c031977F69230245e3AF79a8F

Sponsored: ERAM, a pioneering Central Bank Blockchain. The First Banking Regulatory Blockchain, Licensed by the Central Bank.

ERAM, Central Bank Digital Currency (CBDC) (STABLE COIN)

Overview

ERAM Balance

0 ERAM

ERAM Value

$0.00

Token Holdings

Fetching tokens...

More Info

Private Name Tags

Last Balance Update

Blocks Validated

Sponsored

Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
CakePool




Optimization enabled
true
Compiler version
v0.8.1+commit.df193b15




Optimization runs
99999
EVM Version
default




Verified at
2024-07-20T02:58:13.707896Z

Constructor Arguments

0x00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee0000000000000000000000008df97eab2651e87a8a4080008ddabf6824c9f6720000000000000000000000009584c852362606653dc665e885afa2da0ad443070000000000000000000000009584c852362606653dc665e885afa2da0ad443070000000000000000000000000000000000000000000000000000000000000000

Arg [0] (address) : 0x54ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf
Arg [1] (address) : 0x17d138722cdafdd2c1ff61026d568b5332db02ee
Arg [2] (address) : 0x8df97eab2651e87a8a4080008ddabf6824c9f672
Arg [3] (address) : 0x9584c852362606653dc665e885afa2da0ad44307
Arg [4] (address) : 0x9584c852362606653dc665e885afa2da0ad44307
Arg [5] (uint256) : 0

              

contracts/CakePool.sol

Sol2uml
new
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IMasterChefV2.sol";
import "./interfaces/IBoostContract.sol";
import "./interfaces/IVCake.sol";

contract CakePool is Ownable, Pausable {
    using SafeERC20 for IERC20;

    struct UserInfo {
        uint256 shares; // number of shares for a user.
        uint256 lastDepositedTime; // keep track of deposited time for potential penalty.
        uint256 cakeAtLastUserAction; // keep track of cake deposited at the last user action.
        uint256 lastUserActionTime; // keep track of the last user action time.
        uint256 lockStartTime; // lock start time.
        uint256 lockEndTime; // lock end time.
        uint256 userBoostedShare; // boost share, in order to give the user higher reward. The user only enjoys the reward, so the principal needs to be recorded as a debt.
        bool locked; //lock status.
        uint256 lockedAmount; // amount deposited during lock period.
    }

    IERC20 public immutable token; // cake token.

    IMasterChefV2 public immutable masterchefV2;

    address public boostContract; // boost contract used in Masterchef.
    address public VCake;

    mapping(address => UserInfo) public userInfo;
    mapping(address => bool) public freePerformanceFeeUsers; // free performance fee users.
    mapping(address => bool) public freeWithdrawFeeUsers; // free withdraw fee users.
    mapping(address => bool) public freeOverdueFeeUsers; // free overdue fee users.

    uint256 public totalShares;
    address public admin;
    address public treasury;
    address public operator;
    uint256 public cakePoolPID;
    uint256 public totalBoostDebt; // total boost debt.
    uint256 public totalLockedAmount; // total lock amount.

    uint256 public constant MAX_PERFORMANCE_FEE = 2000; // 20%
    uint256 public constant MAX_WITHDRAW_FEE = 500; // 5%
    uint256 public constant MAX_OVERDUE_FEE = 100 * 1e10; // 100%
    uint256 public constant MAX_WITHDRAW_FEE_PERIOD = 1 weeks; // 1 week
    uint256 public constant MIN_LOCK_DURATION = 1 weeks; // 1 week
    uint256 public constant MAX_LOCK_DURATION_LIMIT = 1000 days; // 1000 days
    uint256 public constant BOOST_WEIGHT_LIMIT = 5000 * 1e10; // 5000%
    uint256 public constant PRECISION_FACTOR = 1e12; // precision factor.
    uint256 public constant PRECISION_FACTOR_SHARE = 1e28; // precision factor for share.
    uint256 public constant MIN_DEPOSIT_AMOUNT = 0.00001 ether;
    uint256 public constant MIN_WITHDRAW_AMOUNT = 0.00001 ether;
    uint256 public UNLOCK_FREE_DURATION = 1 weeks; // 1 week
    uint256 public MAX_LOCK_DURATION = 365 days; // 365 days
    uint256 public DURATION_FACTOR = 365 days; // 365 days, in order to calculate user additional boost.
    uint256 public DURATION_FACTOR_OVERDUE = 180 days; // 180 days, in order to calculate overdue fee.
    uint256 public BOOST_WEIGHT = 100 * 1e10; // 100%

    uint256 public performanceFee = 200; // 2%
    uint256 public performanceFeeContract = 200; // 2%
    uint256 public withdrawFee = 10; // 0.1%
    uint256 public withdrawFeeContract = 10; // 0.1%
    uint256 public overdueFee = 100 * 1e10; // 100%
    uint256 public withdrawFeePeriod = 72 hours; // 3 days

    event Deposit(address indexed sender, uint256 amount, uint256 shares, uint256 duration, uint256 lastDepositedTime);
    event Withdraw(address indexed sender, uint256 amount, uint256 shares);
    event Harvest(address indexed sender, uint256 amount);
    event Pause();
    event Unpause();
    event Init();
    event Lock(
        address indexed sender,
        uint256 lockedAmount,
        uint256 shares,
        uint256 lockedDuration,
        uint256 blockTimestamp
    );
    event Unlock(address indexed sender, uint256 amount, uint256 blockTimestamp);
    event NewAdmin(address admin);
    event NewTreasury(address treasury);
    event NewOperator(address operator);
    event NewBoostContract(address boostContract);
    event NewVCakeContract(address VCake);
    event FreeFeeUser(address indexed user, bool indexed free);
    event NewPerformanceFee(uint256 performanceFee);
    event NewPerformanceFeeContract(uint256 performanceFeeContract);
    event NewWithdrawFee(uint256 withdrawFee);
    event NewOverdueFee(uint256 overdueFee);
    event NewWithdrawFeeContract(uint256 withdrawFeeContract);
    event NewWithdrawFeePeriod(uint256 withdrawFeePeriod);
    event NewMaxLockDuration(uint256 maxLockDuration);
    event NewDurationFactor(uint256 durationFactor);
    event NewDurationFactorOverdue(uint256 durationFactorOverdue);
    event NewUnlockFreeDuration(uint256 unlockFreeDuration);
    event NewBoostWeight(uint256 boostWeight);

    /**
     * @notice Constructor
     * @param _token: Cake token contract
     * @param _masterchefV2: MasterChefV2 contract
     * @param _admin: address of the admin
     * @param _treasury: address of the treasury (collects fees)
     * @param _operator: address of operator
     * @param _pid: cake pool ID in MasterChefV2
     */
    constructor(
        IERC20 _token,
        IMasterChefV2 _masterchefV2,
        address _admin,
        address _treasury,
        address _operator,
        uint256 _pid
    ) {
        token = _token;
        masterchefV2 = _masterchefV2;
        admin = _admin;
        treasury = _treasury;
        operator = _operator;
        cakePoolPID = _pid;
    }

    /**
     * @notice Deposits a dummy token to `MASTER_CHEF` MCV2.
     * It will transfer all the `dummyToken` in the tx sender address.
     * @param dummyToken The address of the token to be deposited into MCV2.
     */
    function init(IERC20 dummyToken) external onlyOwner {
        uint256 balance = dummyToken.balanceOf(msg.sender);
        require(balance != 0, "Balance must exceed 0");
        dummyToken.safeTransferFrom(msg.sender, address(this), balance);
        dummyToken.approve(address(masterchefV2), balance);
        masterchefV2.deposit(cakePoolPID, balance);
        emit Init();
    }

    /**
     * @notice Checks if the msg.sender is the admin address.
     */
    modifier onlyAdmin() {
        require(msg.sender == admin, "admin: wut?");
        _;
    }

    /**
     * @notice Checks if the msg.sender is either the cake owner address or the operator address.
     */
    modifier onlyOperatorOrCakeOwner(address _user) {
        require(msg.sender == _user || msg.sender == operator, "Not operator or primex owner");
        _;
    }

    /**
     * @notice Update user info in Boost Contract.
     * @param _user: User address
     */
    function updateBoostContractInfo(address _user) internal {
        if (boostContract != address(0)) {
            UserInfo storage user = userInfo[_user];
            uint256 lockDuration = user.lockEndTime - user.lockStartTime;
            IBoostContract(boostContract).onCakePoolUpdate(
                _user,
                user.lockedAmount,
                lockDuration,
                totalLockedAmount,
                DURATION_FACTOR
            );
        }
    }

    /**
     * @notice Update user share When need to unlock or charges a fee.
     * @param _user: User address
     */
    function updateUserShare(address _user) internal {
        UserInfo storage user = userInfo[_user];
        if (user.shares > 0) {
            if (user.locked) {
                // Calculate the user's current token amount and update related parameters.
                uint256 currentAmount = (balanceOf() * (user.shares)) / totalShares - user.userBoostedShare;
                totalBoostDebt -= user.userBoostedShare;
                user.userBoostedShare = 0;
                totalShares -= user.shares;
                //Charge a overdue fee after the free duration has expired.
                if (!freeOverdueFeeUsers[_user] && ((user.lockEndTime + UNLOCK_FREE_DURATION) < block.timestamp)) {
                    uint256 earnAmount = currentAmount - user.lockedAmount;
                    uint256 overdueDuration = block.timestamp - user.lockEndTime - UNLOCK_FREE_DURATION;
                    if (overdueDuration > DURATION_FACTOR_OVERDUE) {
                        overdueDuration = DURATION_FACTOR_OVERDUE;
                    }
                    // Rates are calculated based on the user's overdue duration.
                    uint256 overdueWeight = (overdueDuration * overdueFee) / DURATION_FACTOR_OVERDUE;
                    uint256 currentOverdueFee = (earnAmount * overdueWeight) / PRECISION_FACTOR;
                    token.safeTransfer(treasury, currentOverdueFee);
                    currentAmount -= currentOverdueFee;
                }
                // Recalculate the user's share.
                uint256 pool = balanceOf();
                uint256 currentShares;
                if (totalShares != 0) {
                    currentShares = (currentAmount * totalShares) / (pool - currentAmount);
                } else {
                    currentShares = currentAmount;
                }
                user.shares = currentShares;
                totalShares += currentShares;
                // After the lock duration, update related parameters.
                if (user.lockEndTime < block.timestamp) {
                    user.locked = false;
                    user.lockStartTime = 0;
                    user.lockEndTime = 0;
                    totalLockedAmount -= user.lockedAmount;
                    user.lockedAmount = 0;
                    emit Unlock(_user, currentAmount, block.timestamp);
                }
            } else if (!freePerformanceFeeUsers[_user]) {
                // Calculate Performance fee.
                uint256 totalAmount = (user.shares * balanceOf()) / totalShares;
                totalShares -= user.shares;
                user.shares = 0;
                uint256 earnAmount = totalAmount - user.cakeAtLastUserAction;
                uint256 feeRate = performanceFee;
                if (_isContract(_user)) {
                    feeRate = performanceFeeContract;
                }
                uint256 currentPerformanceFee = (earnAmount * feeRate) / 10000;
                if (currentPerformanceFee > 0) {
                    token.safeTransfer(treasury, currentPerformanceFee);
                    totalAmount -= currentPerformanceFee;
                }
                // Recalculate the user's share.
                uint256 pool = balanceOf();
                uint256 newShares;
                if (totalShares != 0) {
                    newShares = (totalAmount * totalShares) / (pool - totalAmount);
                } else {
                    newShares = totalAmount;
                }
                user.shares = newShares;
                totalShares += newShares;
            }
        }
    }

    /**
     * @notice Unlock user cake funds.
     * @dev Only possible when contract not paused.
     * @param _user: User address
     */
    function unlock(address _user) external onlyOperatorOrCakeOwner(_user) whenNotPaused {
        UserInfo storage user = userInfo[_user];
        require(user.locked && user.lockEndTime < block.timestamp, "Cannot unlock yet");
        depositOperation(0, 0, _user);
    }

    /**
     * @notice Deposit funds into the Cake Pool.
     * @dev Only possible when contract not paused.
     * @param _amount: number of tokens to deposit (in CAKE)
     * @param _lockDuration: Token lock duration
     */
    function deposit(uint256 _amount, uint256 _lockDuration) external whenNotPaused {
        require(_amount > 0 || _lockDuration > 0, "Nothing to deposit");
        depositOperation(_amount, _lockDuration, msg.sender);
    }

    /**
     * @notice The operation of deposite.
     * @param _amount: number of tokens to deposit (in CAKE)
     * @param _lockDuration: Token lock duration
     * @param _user: User address
     */
    function depositOperation(uint256 _amount, uint256 _lockDuration, address _user) internal {
        UserInfo storage user = userInfo[_user];
        if (user.shares == 0 || _amount > 0) {
            require(_amount > MIN_DEPOSIT_AMOUNT, "Deposit amount must be greater than MIN_DEPOSIT_AMOUNT");
        }
        // Calculate the total lock duration and check whether the lock duration meets the conditions.
        uint256 totalLockDuration = _lockDuration;
        if (user.lockEndTime >= block.timestamp) {
            // Adding funds during the lock duration is equivalent to re-locking the position, needs to update some variables.
            if (_amount > 0) {
                user.lockStartTime = block.timestamp;
                totalLockedAmount -= user.lockedAmount;
                user.lockedAmount = 0;
            }
            totalLockDuration += user.lockEndTime - user.lockStartTime;
        }
        require(_lockDuration == 0 || totalLockDuration >= MIN_LOCK_DURATION, "Minimum lock period is one week");
        require(totalLockDuration <= MAX_LOCK_DURATION, "Maximum lock period exceeded");

        if (VCake != address(0)) {
            IVCake(VCake).deposit(_user, _amount, _lockDuration);
        }

        // Harvest tokens from Masterchef.
        harvest();

        // Handle stock funds.
        if (totalShares == 0) {
            uint256 stockAmount = available();
            token.safeTransfer(treasury, stockAmount);
        }
        // Update user share.
        updateUserShare(_user);

        // Update lock duration.
        if (_lockDuration > 0) {
            if (user.lockEndTime < block.timestamp) {
                user.lockStartTime = block.timestamp;
                user.lockEndTime = block.timestamp + _lockDuration;
            } else {
                user.lockEndTime += _lockDuration;
            }
            user.locked = true;
        }

        uint256 currentShares;
        uint256 currentAmount;
        uint256 userCurrentLockedBalance;
        uint256 pool = balanceOf();
        if (_amount > 0) {
            token.safeTransferFrom(_user, address(this), _amount);
            currentAmount = _amount;
        }

        // Calculate lock funds
        if (user.shares > 0 && user.locked) {
            userCurrentLockedBalance = (pool * user.shares) / totalShares;
            currentAmount += userCurrentLockedBalance;
            totalShares -= user.shares;
            user.shares = 0;

            // Update lock amount
            if (user.lockStartTime == block.timestamp) {
                user.lockedAmount = userCurrentLockedBalance;
                totalLockedAmount += user.lockedAmount;
            }
        }
        if (totalShares != 0) {
            currentShares = (currentAmount * totalShares) / (pool - userCurrentLockedBalance);
        } else {
            currentShares = currentAmount;
        }

        // Calculate the boost weight share.
        if (user.lockEndTime > user.lockStartTime) {
            // Calculate boost share.
            uint256 boostWeight = ((user.lockEndTime - user.lockStartTime) * BOOST_WEIGHT) / DURATION_FACTOR;
            uint256 boostShares = (boostWeight * currentShares) / PRECISION_FACTOR;
            currentShares += boostShares;
            user.shares += currentShares;

            // Calculate boost share , the user only enjoys the reward, so the principal needs to be recorded as a debt.
            uint256 userBoostedShare = (boostWeight * currentAmount) / PRECISION_FACTOR;
            user.userBoostedShare += userBoostedShare;
            totalBoostDebt += userBoostedShare;

            // Update lock amount.
            user.lockedAmount += _amount;
            totalLockedAmount += _amount;

            emit Lock(_user, user.lockedAmount, user.shares, (user.lockEndTime - user.lockStartTime), block.timestamp);
        } else {
            user.shares += currentShares;
        }

        if (_amount > 0 || _lockDuration > 0) {
            user.lastDepositedTime = block.timestamp;
        }
        totalShares += currentShares;

        user.cakeAtLastUserAction = (user.shares * balanceOf()) / totalShares - user.userBoostedShare;
        user.lastUserActionTime = block.timestamp;

        // Update user info in Boost Contract.
        updateBoostContractInfo(_user);

        emit Deposit(_user, _amount, currentShares, _lockDuration, block.timestamp);
    }

    /**
     * @notice Withdraw funds from the Cake Pool.
     * @param _amount: Number of amount to withdraw
     */
    function withdrawByAmount(uint256 _amount) public whenNotPaused {
        require(_amount > MIN_WITHDRAW_AMOUNT, "Withdraw amount must be greater than MIN_WITHDRAW_AMOUNT");
        withdrawOperation(0, _amount);
    }

    /**
     * @notice Withdraw funds from the Cake Pool.
     * @param _shares: Number of shares to withdraw
     */
    function withdraw(uint256 _shares) public whenNotPaused {
        require(_shares > 0, "Nothing to withdraw");
        withdrawOperation(_shares, 0);
    }

    /**
     * @notice The operation of withdraw.
     * @param _shares: Number of shares to withdraw
     * @param _amount: Number of amount to withdraw
     */
    function withdrawOperation(uint256 _shares, uint256 _amount) internal {
        UserInfo storage user = userInfo[msg.sender];
        require(_shares <= user.shares, "Withdraw amount exceeds balance");
        require(user.lockEndTime < block.timestamp, "Still in lock");

        if (VCake != address(0)) {
            IVCake(VCake).withdraw(msg.sender);
        }

        // Calculate the percent of withdraw shares, when unlocking or calculating the Performance fee, the shares will be updated.
        uint256 currentShare = _shares;
        uint256 sharesPercent = (_shares * PRECISION_FACTOR_SHARE) / user.shares;

        // Harvest token from MasterchefV2.
        harvest();

        // Update user share.
        updateUserShare(msg.sender);

        if (_shares == 0 && _amount > 0) {
            uint256 pool = balanceOf();
            currentShare = (_amount * totalShares) / pool; // Calculate equivalent shares
            if (currentShare > user.shares) {
                currentShare = user.shares;
            }
        } else {
            currentShare = (sharesPercent * user.shares) / PRECISION_FACTOR_SHARE;
        }
        uint256 currentAmount = (balanceOf() * currentShare) / totalShares;
        user.shares -= currentShare;
        totalShares -= currentShare;

        // Calculate withdraw fee
        if (!freeWithdrawFeeUsers[msg.sender] && (block.timestamp < user.lastDepositedTime + withdrawFeePeriod)) {
            uint256 feeRate = withdrawFee;
            if (_isContract(msg.sender)) {
                feeRate = withdrawFeeContract;
            }
            uint256 currentWithdrawFee = (currentAmount * feeRate) / 10000;
            token.safeTransfer(treasury, currentWithdrawFee);
            currentAmount -= currentWithdrawFee;
        }

        token.safeTransfer(msg.sender, currentAmount);

        if (user.shares > 0) {
            user.cakeAtLastUserAction = (user.shares * balanceOf()) / totalShares;
        } else {
            user.cakeAtLastUserAction = 0;
        }

        user.lastUserActionTime = block.timestamp;

        // Update user info in Boost Contract.
        updateBoostContractInfo(msg.sender);

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

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

    /**
     * @notice Harvest pending CAKE tokens from MasterChef
     */
    function harvest() internal {
        uint256 pendingCake = masterchefV2.pendingCake(cakePoolPID, address(this));
        if (pendingCake > 0) {
            uint256 balBefore = available();
            masterchefV2.withdraw(cakePoolPID, 0);
            uint256 balAfter = available();
            emit Harvest(msg.sender, (balAfter - balBefore));
        }
    }

    /**
     * @notice Set admin address
     * @dev Only callable by the contract owner.
     */
    function setAdmin(address _admin) external onlyOwner {
        require(_admin != address(0), "Cannot be zero address");
        admin = _admin;
        emit NewAdmin(admin);
    }

    /**
     * @notice Set treasury address
     * @dev Only callable by the contract owner.
     */
    function setTreasury(address _treasury) external onlyOwner {
        require(_treasury != address(0), "Cannot be zero address");
        treasury = _treasury;
        emit NewTreasury(treasury);
    }

    /**
     * @notice Set operator address
     * @dev Callable by the contract owner.
     */
    function setOperator(address _operator) external onlyOwner {
        require(_operator != address(0), "Cannot be zero address");
        operator = _operator;
        emit NewOperator(operator);
    }

    /**
     * @notice Set Boost Contract address
     * @dev Callable by the contract admin.
     */
    function setBoostContract(address _boostContract) external onlyAdmin {
        require(_boostContract != address(0), "Cannot be zero address");
        boostContract = _boostContract;
        emit NewBoostContract(boostContract);
    }

    /**
     * @notice Set VCake Contract address
     * @dev Callable by the contract admin.
     */
    function setVCakeContract(address _VCake) external onlyAdmin {
        require(_VCake != address(0), "Cannot be zero address");
        VCake = _VCake;
        emit NewVCakeContract(VCake);
    }

    /**
     * @notice Set free performance fee address
     * @dev Only callable by the contract admin.
     * @param _user: User address
     * @param _free: true:free false:not free
     */
    function setFreePerformanceFeeUser(address _user, bool _free) external onlyAdmin {
        require(_user != address(0), "Cannot be zero address");
        freePerformanceFeeUsers[_user] = _free;
        emit FreeFeeUser(_user, _free);
    }

    /**
     * @notice Set free overdue fee address
     * @dev Only callable by the contract admin.
     * @param _user: User address
     * @param _free: true:free false:not free
     */
    function setOverdueFeeUser(address _user, bool _free) external onlyAdmin {
        require(_user != address(0), "Cannot be zero address");
        freeOverdueFeeUsers[_user] = _free;
        emit FreeFeeUser(_user, _free);
    }

    /**
     * @notice Set free withdraw fee address
     * @dev Only callable by the contract admin.
     * @param _user: User address
     * @param _free: true:free false:not free
     */
    function setWithdrawFeeUser(address _user, bool _free) external onlyAdmin {
        require(_user != address(0), "Cannot be zero address");
        freeWithdrawFeeUsers[_user] = _free;
        emit FreeFeeUser(_user, _free);
    }

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

    /**
     * @notice Set performance fee for contract
     * @dev Only callable by the contract admin.
     */
    function setPerformanceFeeContract(uint256 _performanceFeeContract) external onlyAdmin {
        require(
            _performanceFeeContract <= MAX_PERFORMANCE_FEE,
            "performanceFee cannot be more than MAX_PERFORMANCE_FEE"
        );
        performanceFeeContract = _performanceFeeContract;
        emit NewPerformanceFeeContract(performanceFeeContract);
    }

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

    /**
     * @notice Set overdue fee
     * @dev Only callable by the contract admin.
     */
    function setOverdueFee(uint256 _overdueFee) external onlyAdmin {
        require(_overdueFee <= MAX_OVERDUE_FEE, "overdueFee cannot be more than MAX_OVERDUE_FEE");
        overdueFee = _overdueFee;
        emit NewOverdueFee(_overdueFee);
    }

    /**
     * @notice Set withdraw fee for contract
     * @dev Only callable by the contract admin.
     */
    function setWithdrawFeeContract(uint256 _withdrawFeeContract) external onlyAdmin {
        require(_withdrawFeeContract <= MAX_WITHDRAW_FEE, "withdrawFee cannot be more than MAX_WITHDRAW_FEE");
        withdrawFeeContract = _withdrawFeeContract;
        emit NewWithdrawFeeContract(withdrawFeeContract);
    }

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

    /**
     * @notice Set MAX_LOCK_DURATION
     * @dev Only callable by the contract admin.
     */
    function setMaxLockDuration(uint256 _maxLockDuration) external onlyAdmin {
        require(
            _maxLockDuration <= MAX_LOCK_DURATION_LIMIT,
            "MAX_LOCK_DURATION cannot be more than MAX_LOCK_DURATION_LIMIT"
        );
        MAX_LOCK_DURATION = _maxLockDuration;
        emit NewMaxLockDuration(_maxLockDuration);
    }

    /**
     * @notice Set DURATION_FACTOR
     * @dev Only callable by the contract admin.
     */
    function setDurationFactor(uint256 _durationFactor) external onlyAdmin {
        require(_durationFactor > 0, "DURATION_FACTOR cannot be zero");
        DURATION_FACTOR = _durationFactor;
        emit NewDurationFactor(_durationFactor);
    }

    /**
     * @notice Set DURATION_FACTOR_OVERDUE
     * @dev Only callable by the contract admin.
     */
    function setDurationFactorOverdue(uint256 _durationFactorOverdue) external onlyAdmin {
        require(_durationFactorOverdue > 0, "DURATION_FACTOR_OVERDUE cannot be zero");
        DURATION_FACTOR_OVERDUE = _durationFactorOverdue;
        emit NewDurationFactorOverdue(_durationFactorOverdue);
    }

    /**
     * @notice Set UNLOCK_FREE_DURATION
     * @dev Only callable by the contract admin.
     */
    function setUnlockFreeDuration(uint256 _unlockFreeDuration) external onlyAdmin {
        require(_unlockFreeDuration > 0, "UNLOCK_FREE_DURATION cannot be zero");
        UNLOCK_FREE_DURATION = _unlockFreeDuration;
        emit NewUnlockFreeDuration(_unlockFreeDuration);
    }

    /**
     * @notice Set BOOST_WEIGHT
     * @dev Only callable by the contract admin.
     */
    function setBoostWeight(uint256 _boostWeight) external onlyAdmin {
        require(_boostWeight <= BOOST_WEIGHT_LIMIT, "BOOST_WEIGHT cannot be more than BOOST_WEIGHT_LIMIT");
        BOOST_WEIGHT = _boostWeight;
        emit NewBoostWeight(_boostWeight);
    }

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

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

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

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

    /**
     * @notice Calculate Performance fee.
     * @param _user: User address
     * @return Returns Performance fee.
     */
    function calculatePerformanceFee(address _user) public view returns (uint256) {
        UserInfo storage user = userInfo[_user];
        if (user.shares > 0 && !user.locked && !freePerformanceFeeUsers[_user]) {
            uint256 pool = balanceOf() + calculateTotalPendingCakeRewards();
            uint256 totalAmount = (user.shares * pool) / totalShares;
            uint256 earnAmount = totalAmount - user.cakeAtLastUserAction;
            uint256 feeRate = performanceFee;
            if (_isContract(_user)) {
                feeRate = performanceFeeContract;
            }
            uint256 currentPerformanceFee = (earnAmount * feeRate) / 10000;
            return currentPerformanceFee;
        }
        return 0;
    }

    /**
     * @notice Calculate overdue fee.
     * @param _user: User address
     * @return Returns Overdue fee.
     */
    function calculateOverdueFee(address _user) public view returns (uint256) {
        UserInfo storage user = userInfo[_user];
        if (
            user.shares > 0 &&
            user.locked &&
            !freeOverdueFeeUsers[_user] &&
            ((user.lockEndTime + UNLOCK_FREE_DURATION) < block.timestamp)
        ) {
            uint256 pool = balanceOf() + calculateTotalPendingCakeRewards();
            uint256 currentAmount = (pool * (user.shares)) / totalShares - user.userBoostedShare;
            uint256 earnAmount = currentAmount - user.lockedAmount;
            uint256 overdueDuration = block.timestamp - user.lockEndTime - UNLOCK_FREE_DURATION;
            if (overdueDuration > DURATION_FACTOR_OVERDUE) {
                overdueDuration = DURATION_FACTOR_OVERDUE;
            }
            // Rates are calculated based on the user's overdue duration.
            uint256 overdueWeight = (overdueDuration * overdueFee) / DURATION_FACTOR_OVERDUE;
            uint256 currentOverdueFee = (earnAmount * overdueWeight) / PRECISION_FACTOR;
            return currentOverdueFee;
        }
        return 0;
    }

    /**
     * @notice Calculate Performance Fee Or Overdue Fee
     * @param _user: User address
     * @return Returns  Performance Fee Or Overdue Fee.
     */
    function calculatePerformanceFeeOrOverdueFee(address _user) internal view returns (uint256) {
        return calculatePerformanceFee(_user) + calculateOverdueFee(_user);
    }

    /**
     * @notice Calculate withdraw fee.
     * @param _user: User address
     * @param _shares: Number of shares to withdraw
     * @return Returns Withdraw fee.
     */
    function calculateWithdrawFee(address _user, uint256 _shares) public view returns (uint256) {
        UserInfo storage user = userInfo[_user];
        if (user.shares < _shares) {
            _shares = user.shares;
        }
        if (!freeWithdrawFeeUsers[msg.sender] && (block.timestamp < user.lastDepositedTime + withdrawFeePeriod)) {
            uint256 pool = balanceOf() + calculateTotalPendingCakeRewards();
            uint256 sharesPercent = (_shares * PRECISION_FACTOR) / user.shares;
            uint256 currentTotalAmount = (pool * (user.shares)) /
                totalShares -
                user.userBoostedShare -
                calculatePerformanceFeeOrOverdueFee(_user);
            uint256 currentAmount = (currentTotalAmount * sharesPercent) / PRECISION_FACTOR;
            uint256 feeRate = withdrawFee;
            if (_isContract(msg.sender)) {
                feeRate = withdrawFeeContract;
            }
            uint256 currentWithdrawFee = (currentAmount * feeRate) / 10000;
            return currentWithdrawFee;
        }
        return 0;
    }

    /**
     * @notice Calculates the total pending rewards that can be harvested
     * @return Returns total pending cake rewards
     */
    function calculateTotalPendingCakeRewards() public view returns (uint256) {
        uint256 amount = masterchefV2.pendingCake(cakePoolPID, address(this));
        return amount;
    }

    function getPricePerFullShare() external view returns (uint256) {
        return totalShares == 0 ? 1e18 : (((balanceOf() + calculateTotalPendingCakeRewards()) * (1e18)) / totalShares);
    }

    /**
     * @notice Current pool available balance
     * @dev The contract puts 100% of the tokens to work.
     */
    function available() public view returns (uint256) {
        return token.balanceOf(address(this));
    }

    /**
     * @notice Calculates the total underlying tokens
     * @dev It includes tokens held by the contract and the boost debt amount.
     */
    function balanceOf() public view returns (uint256) {
        return token.balanceOf(address(this)) + totalBoostDebt;
    }

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

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

@openzeppelin/contracts/security/Pausable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/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() {
        _paused = false;
    }

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        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());
    }
}
          

@openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}
          

@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}
          

@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

@openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}
          

@openzeppelin/contracts/utils/Context.sol

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

pragma solidity ^0.8.0;

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

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

contracts/interfaces/IBoostContract.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IBoostContract {
    function onCakePoolUpdate(
        address _user,
        uint256 _lockedAmount,
        uint256 _lockedDuration,
        uint256 _totalLockedAmount,
        uint256 _maxLockDuration
    ) external;
}
          

contracts/interfaces/IMasterChefV2.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

    function withdraw(uint256 _pid, uint256 _amount) external;

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

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

    function emergencyWithdraw(uint256 _pid) external;
}
          

contracts/interfaces/IVCake.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IVCake {
    function deposit(address _user, uint256 _amount, uint256 _lockDuration) external;

    function withdraw(address _user) external;
}
          

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":99999,"enabled":true},"libraries":{}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20"},{"type":"address","name":"_masterchefV2","internalType":"contract IMasterChefV2"},{"type":"address","name":"_admin","internalType":"address"},{"type":"address","name":"_treasury","internalType":"address"},{"type":"address","name":"_operator","internalType":"address"},{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"shares","internalType":"uint256","indexed":false},{"type":"uint256","name":"duration","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastDepositedTime","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FreeFeeUser","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"bool","name":"free","internalType":"bool","indexed":true}],"anonymous":false},{"type":"event","name":"Harvest","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Init","inputs":[],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"lockedAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"shares","internalType":"uint256","indexed":false},{"type":"uint256","name":"lockedDuration","internalType":"uint256","indexed":false},{"type":"uint256","name":"blockTimestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewAdmin","inputs":[{"type":"address","name":"admin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewBoostContract","inputs":[{"type":"address","name":"boostContract","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewBoostWeight","inputs":[{"type":"uint256","name":"boostWeight","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewDurationFactor","inputs":[{"type":"uint256","name":"durationFactor","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewDurationFactorOverdue","inputs":[{"type":"uint256","name":"durationFactorOverdue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewMaxLockDuration","inputs":[{"type":"uint256","name":"maxLockDuration","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewOperator","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewOverdueFee","inputs":[{"type":"uint256","name":"overdueFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewPerformanceFee","inputs":[{"type":"uint256","name":"performanceFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewPerformanceFeeContract","inputs":[{"type":"uint256","name":"performanceFeeContract","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewTreasury","inputs":[{"type":"address","name":"treasury","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewUnlockFreeDuration","inputs":[{"type":"uint256","name":"unlockFreeDuration","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewVCakeContract","inputs":[{"type":"address","name":"VCake","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewWithdrawFee","inputs":[{"type":"uint256","name":"withdrawFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewWithdrawFeeContract","inputs":[{"type":"uint256","name":"withdrawFeeContract","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewWithdrawFeePeriod","inputs":[{"type":"uint256","name":"withdrawFeePeriod","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Pause","inputs":[],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"blockTimestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpause","inputs":[],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"shares","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BOOST_WEIGHT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BOOST_WEIGHT_LIMIT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"DURATION_FACTOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"DURATION_FACTOR_OVERDUE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_LOCK_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_LOCK_DURATION_LIMIT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_OVERDUE_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_PERFORMANCE_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_WITHDRAW_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_WITHDRAW_FEE_PERIOD","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MIN_DEPOSIT_AMOUNT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MIN_LOCK_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MIN_WITHDRAW_AMOUNT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PRECISION_FACTOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PRECISION_FACTOR_SHARE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"UNLOCK_FREE_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"VCake","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"admin","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"available","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"boostContract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cakePoolPID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateOverdueFee","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculatePerformanceFee","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateTotalPendingCakeRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateWithdrawFee","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"uint256","name":"_shares","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_lockDuration","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"freeOverdueFeeUsers","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"freePerformanceFeeUsers","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"freeWithdrawFeeUsers","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPricePerFullShare","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"inCaseTokensGetStuck","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"init","inputs":[{"type":"address","name":"dummyToken","internalType":"contract IERC20"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMasterChefV2"}],"name":"masterchefV2","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"operator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"overdueFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"performanceFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"performanceFeeContract","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAdmin","inputs":[{"type":"address","name":"_admin","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBoostContract","inputs":[{"type":"address","name":"_boostContract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBoostWeight","inputs":[{"type":"uint256","name":"_boostWeight","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDurationFactor","inputs":[{"type":"uint256","name":"_durationFactor","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDurationFactorOverdue","inputs":[{"type":"uint256","name":"_durationFactorOverdue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFreePerformanceFeeUser","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"bool","name":"_free","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxLockDuration","inputs":[{"type":"uint256","name":"_maxLockDuration","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setOperator","inputs":[{"type":"address","name":"_operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setOverdueFee","inputs":[{"type":"uint256","name":"_overdueFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setOverdueFeeUser","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"bool","name":"_free","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPerformanceFee","inputs":[{"type":"uint256","name":"_performanceFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPerformanceFeeContract","inputs":[{"type":"uint256","name":"_performanceFeeContract","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTreasury","inputs":[{"type":"address","name":"_treasury","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setUnlockFreeDuration","inputs":[{"type":"uint256","name":"_unlockFreeDuration","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setVCakeContract","inputs":[{"type":"address","name":"_VCake","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawFee","inputs":[{"type":"uint256","name":"_withdrawFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawFeeContract","inputs":[{"type":"uint256","name":"_withdrawFeeContract","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawFeePeriod","inputs":[{"type":"uint256","name":"_withdrawFeePeriod","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawFeeUser","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"bool","name":"_free","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalBoostDebt","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalLockedAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalShares","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlock","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"shares","internalType":"uint256"},{"type":"uint256","name":"lastDepositedTime","internalType":"uint256"},{"type":"uint256","name":"cakeAtLastUserAction","internalType":"uint256"},{"type":"uint256","name":"lastUserActionTime","internalType":"uint256"},{"type":"uint256","name":"lockStartTime","internalType":"uint256"},{"type":"uint256","name":"lockEndTime","internalType":"uint256"},{"type":"uint256","name":"userBoostedShare","internalType":"uint256"},{"type":"bool","name":"locked","internalType":"bool"},{"type":"uint256","name":"lockedAmount","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_shares","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawAll","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawByAmount","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawFeeContract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawFeePeriod","inputs":[]}]
              

Contract Creation Code

0x60c060405262093a80600e556301e13380600f556301e1338060105562ed4e0060115564e8d4a5100060125560c860135560c8601455600a601555600a60165564e8d4a510006017556203f4806018553480156200005c57600080fd5b5060405162005037380380620050378339810160408190526200007f9162000157565b620000936200008d62000103565b62000107565b6000805460ff60a01b191690556001600160601b0319606096871b81166080529490951b90931660a052600880546001600160a01b039384166001600160a01b0319918216179091556009805492841692821692909217909155600a8054929093169116179055600b55620001f7565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008060008060c0878903121562000170578182fd5b86516200017d81620001de565b60208801519096506200019081620001de565b6040880151909550620001a381620001de565b6060880151909450620001b681620001de565b6080880151909350620001c981620001de565b8092505060a087015190509295509295509295565b6001600160a01b0381168114620001f457600080fd5b50565b60805160601c60a05160601c614db26200028560003960008181610c6001528181610d1d015281816116280152818161231b0152818161384e0152613928015260008181611408015281816118d9015281816124aa015281816129ab01528181612e0f01528181612e61015281816131650152818161324001528181613b7b0152613db30152614db26000f3fe608060405234801561001057600080fd5b50600436106105145760003560e01c806387788782116102a1578063cb528b521161016b578063e464c623116100e3578063f2fde38b11610097578063f851a4401161007c578063f851a440146108fb578063fc0c546a14610903578063fd253b641461090b57610514565b8063f2fde38b146108d5578063f786b958146108e857610514565b8063e73008bc116100c8578063e73008bc146108b2578063e941fa78146108ba578063f0f44260146108c257610514565b8063e464c623146108a2578063e4b37ef5146108aa57610514565b8063def68a9c1161013a578063df10b4e61161011f578063df10b4e61461087f578063dfcedeee14610887578063e2bbb1581461088f57610514565b8063def68a9c14610859578063def7869d1461086c57610514565b8063cb528b5214610836578063ccd34cd51461076e578063d4b0de2f1461083e578063d826ed061461084657610514565b8063acaf88cd11610219578063bc75f4b8116101cd578063beba0fa0116101b2578063beba0fa0146107fd578063c54d349c14610810578063c6ed51be1461082357610514565b8063bc75f4b8146107ed578063bdca9165146107f557610514565b8063b6857844116101fe578063b6857844146105a2578063b6ac642a146107c7578063bb9f408d146107da57610514565b8063acaf88cd146107ac578063b3ab15fb146107b457610514565b8063948a03f211610270578063a3639b3911610255578063a3639b3914610789578063a5834e061461079c578063aaada5da146107a457610514565b8063948a03f21461076e57806395dc14e11461077657610514565b8063877887821461073857806387d4bda9146107405780638da5cb5b1461075357806393c99e6a1461075b57610514565b806348a0d754116103e25780636d4710b91161035a578063731ff24a1161030e57806378b4330f116102f357806378b4330f146105d05780638456cb5914610728578063853828b61461073057610514565b8063731ff24a1461071857806377c7b8fc1461072057610514565b806370897b231161033f57806370897b23146106f5578063715018a614610708578063722713f71461071057610514565b80636d4710b9146106da578063704b6c02146106e257610514565b8063570ca735116103b15780635c975abb116103965780635c975abb146106b757806361d027b3146106bf578063668679ba146106c757610514565b8063570ca735146106a757806358ebceb6146106af57610514565b806348a0d754146106715780634e4de1e9146106795780634f1bfc9e1461068c5780635521e9bf1461069457610514565b80632cfc5f01116104905780633a98ef39116104445780633f4ba83a116104295780633f4ba83a146106365780633fec4e321461063e578063423b93ed1461065e57610514565b80633a98ef39146106265780633eb788741461062e57610514565b80632e1a7d4d116104755780632e1a7d4d146105ed5780632f6c493c14610600578063359819211461061357610514565b80632cfc5f01146105d05780632d19b982146105d857610514565b80631959a002116104e75780631ea30fef116104cc5780631ea30fef146105a25780631efac1b8146105aa57806329a5cfd6146105bd57610514565b80631959a0021461056757806319ab453c1461058f57610514565b806301e813261461051957806305a9f274146105375780630c59696b1461053f57806314ff303914610554575b600080fd5b610521610913565b60405161052e9190614bb5565b60405180910390f35b61052161091b565b61055261054d366004614187565b610921565b005b610552610562366004614187565b6109fa565b61057a6105753660046140e5565b610abc565b60405161052e99989796959493929190614c0b565b61055261059d3660046140e5565b610b0e565b610521610db2565b6105526105b8366004614187565b610dbc565b6105216105cb366004614140565b610e7f565b610521610fce565b6105e0610fd5565b60405161052e91906141f4565b6105526105fb366004614187565b610ff1565b61055261060e3660046140e5565b611041565b610552610621366004614187565b61113e565b6105216111fe565b610521611204565b61055261120a565b61065161064c3660046140e5565b611296565b60405161052e91906142d5565b61055261066c366004614108565b6112ab565b6105216113c8565b610552610687366004614108565b611492565b6105216115af565b6105526106a2366004614187565b6115b5565b6105e0611607565b610521611623565b6106516116d9565b6105e06116fa565b6106516106d53660046140e5565b611716565b61052161172b565b6105526106f03660046140e5565b611731565b610552610703366004614187565b6117fc565b6105526118be565b6105216118d2565b61052161198a565b61052161199a565b6105526119f1565b610552611a7d565b610521611a96565b61065161074e3660046140e5565b611a9c565b6105e0611ab1565b610552610769366004614187565b611acd565b610521611b93565b6105216107843660046140e5565b611b9c565b610552610797366004614187565b611d0d565b610521611dcd565b610521611dd3565b610521611dd9565b6105526107c23660046140e5565b611ddf565b6105526107d5366004614187565b611eaa565b6105526107e8366004614187565b611f6c565b61052161202e565b610521612034565b61055261080b366004614108565b61203a565b61055261081e366004614187565b612157565b6105216108313660046140e5565b612217565b6105e0612319565b61052161233d565b6105526108543660046140e5565b612343565b6105526108673660046140e5565b612457565b61055261087a3660046140e5565b6125fa565b61052161270e565b6105e0612714565b61055261089d3660046141b7565b612730565b610521612788565b61052161278e565b610521612794565b61052161279a565b6105526108d03660046140e5565b6127a0565b6105526108e33660046140e5565b61286b565b6105526108f6366004614187565b6128c9565b6105e061298d565b6105e06129a9565b6105216129cd565b6305265c0081565b600d5481565b60085473ffffffffffffffffffffffffffffffffffffffff16331461097b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b60405180910390fd5b64e8d4a510008111156109ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906147bc565b60178190556040517ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906109ef908390614bb5565b60405180910390a150565b60085473ffffffffffffffffffffffffffffffffffffffff163314610a4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6101f4811115610a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614ac4565b60168190556040517fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef906109ef908390614bb5565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b610b166129d7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610b6b9033906004016141f4565b60206040518083038186803b158015610b8357600080fd5b505afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb919061419f565b905080610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906144fe565b610c1673ffffffffffffffffffffffffffffffffffffffff8316333084612a4a565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610c8a907f0000000000000000000000000000000000000000000000000000000000000000908590600401614246565b602060405180830381600087803b158015610ca457600080fd5b505af1158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc919061416b565b50600b546040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163e2bbb15891610d5391908590600401614be2565b600060405180830381600087803b158015610d6d57600080fd5b505af1158015610d81573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6509184e72a00081565b60085473ffffffffffffffffffffffffffffffffffffffff163314610e0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b62093a80811115610e4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906149d3565b60188190556040517fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc906109ef908390614bb5565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081208054831115610eb257805492505b3360009081526005602052604090205460ff16158015610ee257506018548160010154610edf9190614c4c565b42105b15610fc2576000610ef1611623565b610ef96118d2565b610f039190614c4c565b8254909150600090610f1a64e8d4a5100087614c9d565b610f249190614c64565b90506000610f3187612af3565b60068501546007548654610f459087614c9d565b610f4f9190614c64565b610f599190614cda565b610f639190614cda565b9050600064e8d4a51000610f778484614c9d565b610f819190614c64565b601554909150610f9033612b11565b15610f9a57506016545b6000612710610fa98385614c9d565b610fb39190614c64565b9750610fc89650505050505050565b60009150505b92915050565b62093a8081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b610ff9612b17565b60008111611033576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061439f565b61103e816000612b56565b50565b803373ffffffffffffffffffffffffffffffffffffffff8216148061107d5750600a5473ffffffffffffffffffffffffffffffffffffffff1633145b6110b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614a8d565b6110bb612b17565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020600781015460ff1680156110f75750428160050154105b61112d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614b7e565b61113960008085612f29565b505050565b60085473ffffffffffffffffffffffffffffffffffffffff16331461118f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b600081116111c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061475f565b60118190556040517f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe906109ef908390614bb5565b60075481565b60145481565b60085473ffffffffffffffffffffffffffffffffffffffff16331461125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b61126361359f565b61126b6135dd565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60046020526000908152604090205460ff1681565b60085473ffffffffffffffffffffffffffffffffffffffff1633146112fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff8216611349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915590519092917f3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d4491a35050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a082319061143d9030906004016141f4565b60206040518083038186803b15801561145557600080fd5b505afa158015611469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148d919061419f565b905090565b60085473ffffffffffffffffffffffffffffffffffffffff1633146114e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff8216611530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b73ffffffffffffffffffffffffffffffffffffffff821660008181526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915590519092917f3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d4491a35050565b600f5481565b6115bd612b17565b6509184e72a00081116115fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061493f565b61103e600082612b56565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631175a1dd600b54306040518363ffffffff1660e01b8152600401611683929190614bbe565b60206040518083038186803b15801561169b57600080fd5b505afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d3919061419f565b91505090565b60005474010000000000000000000000000000000000000000900460ff1690565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60066020526000908152604090205460ff1681565b600b5481565b6117396129d7565b73ffffffffffffffffffffffffffffffffffffffff8116611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c926109ef9216906141f4565b60085473ffffffffffffffffffffffffffffffffffffffff16331461184d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6107d0811115611889576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614694565b60138190556040517fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c4906109ef908390614bb5565b6118c66129d7565b6118d0600061364d565b565b6000600c547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161193091906141f4565b60206040518083038186803b15801561194857600080fd5b505afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611980919061419f565b61148d9190614c4c565b6b204fce5e3e2502611000000081565b60006007546000146119e4576007546119b1611623565b6119b96118d2565b6119c39190614c4c565b6119d590670de0b6b3a7640000614c9d565b6119df9190614c64565b61148d565b50670de0b6b3a764000090565b60085473ffffffffffffffffffffffffffffffffffffffff163314611a42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b611a4a612b17565b611a526136c2565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b336000908152600360205260409020546118d090610ff1565b60135481565b60056020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60085473ffffffffffffffffffffffffffffffffffffffff163314611b1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b652d79883d2000811115611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906144a1565b60128190556040517f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e906109ef908390614bb5565b64e8d4a5100081565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600360205260408120805415801590611bd55750600781015460ff165b8015611c07575073ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090205460ff16155b8015611c23575042600e548260050154611c219190614c4c565b105b15611d02576000611c32611623565b611c3a6118d2565b611c449190614c4c565b60068301546007548454929350600092611c5e9085614c9d565b611c689190614c64565b611c729190614cda565b90506000836008015482611c869190614cda565b90506000600e54856005015442611c9d9190614cda565b611ca79190614cda565b9050601154811115611cb857506011545b600060115460175483611ccb9190614c9d565b611cd59190614c64565b9050600064e8d4a51000611ce98386614c9d565b611cf39190614c64565b9750611d089650505050505050565b60009150505b919050565b60085473ffffffffffffffffffffffffffffffffffffffff163314611d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b60008111611d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614433565b60108190556040517f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde906109ef908390614bb5565b60175481565b600e5481565b60115481565b611de76129d7565b73ffffffffffffffffffffffffffffffffffffffff8116611e34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a926109ef9216906141f4565b60085473ffffffffffffffffffffffffffffffffffffffff163314611efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6101f4811115611f37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614ac4565b60158190556040517fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d906109ef908390614bb5565b60085473ffffffffffffffffffffffffffffffffffffffff163314611fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6107d0811115611ff9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614694565b60148190556040517fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d906109ef908390614bb5565b60125481565b6107d081565b60085473ffffffffffffffffffffffffffffffffffffffff16331461208b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff82166120d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915590519092917f3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d4491a35050565b60085473ffffffffffffffffffffffffffffffffffffffff1633146121a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b600081116121e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614b21565b600e8190556040517ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad906109ef908390614bb5565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604081208054158015906122515750600781015460ff16155b8015612283575073ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205460ff16155b15611d02576000612292611623565b61229a6118d2565b6122a49190614c4c565b905060006007548284600001546122bb9190614c9d565b6122c59190614c64565b905060008360020154826122d99190614cda565b6013549091506122e887612b11565b156122f257506014545b60006127106123018385614c9d565b61230b9190614c64565b9650611d0895505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101f481565b60085473ffffffffffffffffffffffffffffffffffffffff163314612394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff81166123e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f1926109ef9216906141f4565b60085473ffffffffffffffffffffffffffffffffffffffff1633146124a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561252e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614535565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a08231906125839030906004016141f4565b60206040518083038186803b15801561259b57600080fd5b505afa1580156125af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d3919061419f565b90506125f673ffffffffffffffffffffffffffffffffffffffff83163383613732565b5050565b60085473ffffffffffffffffffffffffffffffffffffffff16331461264b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff8116612698576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b2926109ef9216906141f4565b60185481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b612738612b17565b60008211806127475750600081115b61277d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614331565b6125f6828233612f29565b60105481565b60165481565b600c5481565b60155481565b6127a86129d7565b73ffffffffffffffffffffffffffffffffffffffff81166127f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea086926109ef9216906141f4565b6128736129d7565b73ffffffffffffffffffffffffffffffffffffffff81166128c0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906143d6565b61103e8161364d565b60085473ffffffffffffffffffffffffffffffffffffffff16331461291a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6305265c00811115612958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614876565b600f8190556040517fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe906109ef908390614bb5565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b652d79883d200081565b6129df613751565b73ffffffffffffffffffffffffffffffffffffffff166129fd611ab1565b73ffffffffffffffffffffffffffffffffffffffff16146118d0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906148d3565b612aed846323b872dd60e01b858585604051602401612a6b93929190614215565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613755565b50505050565b6000612afe82611b9c565b612b0783612217565b610fc89190614c4c565b3b151590565b612b1f6116d9565b156118d0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906146f1565b3360009081526003602052604090208054831115612ba0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614592565b42816005015410612bdd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061446a565b60025473ffffffffffffffffffffffffffffffffffffffff1615612c84576002546040517f51cff8d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906351cff8d990612c519033906004016141f4565b600060405180830381600087803b158015612c6b57600080fd5b505af1158015612c7f573d6000803e3d6000fd5b505050505b80548390600090612ca16b204fce5e3e2502611000000084614c9d565b612cab9190614c64565b9050612cb561380b565b612cbe336139e2565b84158015612ccc5750600084115b15612d0d576000612cdb6118d2565b90508060075486612cec9190614c9d565b612cf69190614c64565b8454909350831115612d0757835492505b50612d34565b82546b204fce5e3e2502611000000090612d279083614c9d565b612d319190614c64565b91505b600060075483612d426118d2565b612d4c9190614c9d565b612d569190614c64565b905082846000016000828254612d6c9190614cda565b925050819055508260076000828254612d859190614cda565b90915550503360009081526005602052604090205460ff16158015612dba57506018548460010154612db79190614c4c565b42105b15612e4757601554612dcb33612b11565b15612dd557506016545b6000612710612de48385614c9d565b612dee9190614c64565b600954909150612e389073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116911683613732565b612e428184614cda565b925050505b612e8873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383613732565b835415612eba57600754612e9a6118d2565b8554612ea69190614c9d565b612eb09190614c64565b6002850155612ec2565b600060028501555b426003850155612ed133613e53565b3373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5688285604051612f19929190614be2565b60405180910390a2505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260036020526040902080541580612f5c5750600084115b15612fa0576509184e72a0008411612fa0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614819565b600581015483904211612ffe578415612fdd574260048301556008820154600d8054600090612fd0908490614cda565b9091555050600060088301555b81600401548260050154612ff19190614cda565b612ffb9082614c4c565b90505b83158061300e575062093a808110155b613044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614600565b600f54811115613080576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906145c9565b60025473ffffffffffffffffffffffffffffffffffffffff161561312b576002546040517f0efe6a8b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690630efe6a8b906130f89086908990899060040161426c565b600060405180830381600087803b15801561311257600080fd5b505af1158015613126573d6000803e3d6000fd5b505050505b61313361380b565b6007546131905760006131446113c8565b60095490915061318e9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116911683613732565b505b613199836139e2565b83156132105742826005015410156131c85742600483018190556131be908590614c4c565b60058301556131e2565b838260050160008282546131dc9190614c4c565b90915550505b6007820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b60008060008061321e6118d2565b9050881561326c5761326873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001688308c612a4a565b8892505b8554158015906132805750600786015460ff165b156132f95760075486546132949083614c9d565b61329e9190614c64565b91506132aa8284614c4c565b92508560000154600760008282546132c29190614cda565b90915550506000865560048601544214156132f95760088601829055600d80548391906000906132f3908490614c4c565b90915550505b600754156133295761330b8282614cda565b6007546133189085614c9d565b6133229190614c64565b935061332d565b8293505b8560040154866005015411156134b0576000601054601254886004015489600501546133599190614cda565b6133639190614c9d565b61336d9190614c64565b9050600064e8d4a510006133818784614c9d565b61338b9190614c64565b90506133978187614c4c565b9550858860000160008282546133ad9190614c4c565b909155506000905064e8d4a510006133c58785614c9d565b6133cf9190614c64565b9050808960060160008282546133e59190614c4c565b9250508190555080600c60008282546133fe9190614c4c565b925050819055508b8960080160008282546134199190614c4c565b925050819055508b600d60008282546134329190614c4c565b925050819055508973ffffffffffffffffffffffffffffffffffffffff167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d6005015461348f9190614cda565b426040516134a09493929190614bf0565b60405180910390a25050506134ca565b838660000160008282546134c49190614c4c565b90915550505b60008911806134d95750600088115b156134e5574260018701555b83600760008282546134f79190614c4c565b9091555050600686015460075461350c6118d2565b88546135189190614c9d565b6135229190614c64565b61352c9190614cda565b600287015542600387015561354087613e53565b8673ffffffffffffffffffffffffffffffffffffffff167f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f98a868b4260405161358c9493929190614bf0565b60405180910390a2505050505050505050565b6135a76116d9565b6118d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614368565b6135e561359f565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613636613751565b60405161364391906141f4565b60405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6136ca612b17565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613636613751565b6111398363a9059cbb60e01b8484604051602401612a6b929190614246565b3390565b60006137b7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613f4d9092919063ffffffff16565b80519091501561113957808060200190518101906137d5919061416b565b611139576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614a30565b600b546040517f1175a1dd00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691631175a1dd91613883913090600401614bbe565b60206040518083038186803b15801561389b57600080fd5b505afa1580156138af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d3919061419f565b9050801561103e5760006138e56113c8565b600b546040517f441a3e7000000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163441a3e709161395e91600090600401614be2565b600060405180830381600087803b15801561397857600080fd5b505af115801561398c573d6000803e3d6000fd5b50505050600061399a6113c8565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba6139c88484614cda565b6040516139d59190614bb5565b60405180910390a2505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604090208054156125f657600781015460ff1615613cda57600081600601546007548360000154613a326118d2565b613a3c9190614c9d565b613a469190614c64565b613a509190614cda565b90508160060154600c6000828254613a689190614cda565b909155505060006006830181905582546007805491929091613a8b908490614cda565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090205460ff16158015613ad6575042600e548360050154613ad49190614c4c565b105b15613bb5576000826008015482613aed9190614cda565b90506000600e54846005015442613b049190614cda565b613b0e9190614cda565b9050601154811115613b1f57506011545b600060115460175483613b329190614c9d565b613b3c9190614c64565b9050600064e8d4a51000613b508386614c9d565b613b5a9190614c64565b600954909150613ba49073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116911683613732565b613bae8186614cda565b9450505050505b6000613bbf6118d2565b90506000600754600014613bf557613bd78383614cda565b600754613be49085614c9d565b613bee9190614c64565b9050613bf8565b50815b80845560078054829190600090613c10908490614c4c565b90915550506005840154421115613cd2576007840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600060048501819055600585018190556008850154600d805491929091613c73908490614cda565b90915550506000600885015560405173ffffffffffffffffffffffffffffffffffffffff8616907ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c200490613cc99086904290614be2565b60405180910390a25b5050506125f6565b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604090205460ff166125f6576000600754613d146118d2565b8354613d209190614c9d565b613d2a9190614c64565b9050816000015460076000828254613d429190614cda565b909155505060008083556002830154613d5b9083614cda565b601354909150613d6a85612b11565b15613d7457506014545b6000612710613d838385614c9d565b613d8d9190614c64565b90508015613de957600954613ddc9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116911683613732565b613de68185614cda565b93505b6000613df36118d2565b90506000600754600014613e2957613e0b8683614cda565b600754613e189088614c9d565b613e229190614c64565b9050613e2c565b50845b80875560078054829190600090613e44908490614c4c565b90915550505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff161561103e5773ffffffffffffffffffffffffffffffffffffffff8116600090815260036020526040812060048101546005820154919291613ead9190614cda565b6001546008840154600d546010546040517fe874fdaf00000000000000000000000000000000000000000000000000000000815294955073ffffffffffffffffffffffffffffffffffffffff9093169363e874fdaf93613f16938993909288929060040161429a565b600060405180830381600087803b158015613f3057600080fd5b505af1158015613f44573d6000803e3d6000fd5b50505050505050565b6060613f5c8484600085613f64565b949350505050565b606082471015613fa0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614637565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613fc991906141d8565b60006040518083038185875af1925050503d8060008114614006576040519150601f19603f3d011682016040523d82523d6000602084013e61400b565b606091505b509150915061401c87838387614027565b979650505050505050565b6060831561407b5782516140745761403e85614085565b614074576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061499c565b5081613f5c565b613f5c83836140a1565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8151156140b15781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097291906142e0565b6000602082840312156140f6578081fd5b813561410181614d4c565b9392505050565b6000806040838503121561411a578081fd5b823561412581614d4c565b9150602083013561413581614d6e565b809150509250929050565b60008060408385031215614152578182fd5b823561415d81614d4c565b946020939093013593505050565b60006020828403121561417c578081fd5b815161410181614d6e565b600060208284031215614198578081fd5b5035919050565b6000602082840312156141b0578081fd5b5051919050565b600080604083850312156141c9578182fd5b50508035926020909101359150565b600082516141ea818460208701614cf1565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9390931683526020830191909152604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff959095168552602085019390935260408401919091526060830152608082015260a00190565b901515815260200190565b60006020825282518060208401526142ff816040850160208701614cf1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526012908201527f4e6f7468696e6720746f206465706f7369740000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526013908201527f4e6f7468696e6720746f20776974686472617700000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604082015260600190565b6020808252600d908201527f5374696c6c20696e206c6f636b00000000000000000000000000000000000000604082015260600190565b60208082526033908201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e60408201527f20424f4f53545f5745494748545f4c494d495400000000000000000000000000606082015260800190565b60208082526015908201527f42616c616e6365206d7573742065786365656420300000000000000000000000604082015260600190565b60208082526025908201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f7369742060408201527f746f6b656e000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604082015260600190565b6020808252601c908201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604082015260600190565b6020808252601f908201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f726520746860408201527f616e204d41585f504552464f524d414e43455f46454500000000000000000000606082015260800190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b60208082526016908201527f43616e6e6f74206265207a65726f206164647265737300000000000000000000604082015260600190565b60208082526026908201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260408201527f65207a65726f0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60408201527f41585f4f5645524455455f464545000000000000000000000000000000000000606082015260800190565b60208082526036908201527f4465706f73697420616d6f756e74206d7573742062652067726561746572207460408201527f68616e204d494e5f4445504f5349545f414d4f554e5400000000000000000000606082015260800190565b6020808252603d908201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560408201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201527f61646d696e3a207775743f000000000000000000000000000000000000000000604082015260600190565b60208082526038908201527f576974686472617720616d6f756e74206d75737420626520677265617465722060408201527f7468616e204d494e5f57495448445241575f414d4f554e540000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252603d908201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560408201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4e6f74206f70657261746f72206f72207072696d6578206f776e657200000000604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201527f4d41585f57495448445241575f46454500000000000000000000000000000000606082015260800190565b60208082526023908201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60408201527f65726f0000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526011908201527f43616e6e6f7420756e6c6f636b20796574000000000000000000000000000000604082015260600190565b90815260200190565b91825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b918252602082015260400190565b93845260208401929092526040830152606082015260800190565b988952602089019790975260408801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200190565b60008219821115614c5f57614c5f614d1d565b500190565b600082614c98577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614cd557614cd5614d1d565b500290565b600082821015614cec57614cec614d1d565b500390565b60005b83811015614d0c578181015183820152602001614cf4565b83811115612aed5750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461103e57600080fd5b801515811461103e57600080fdfea2646970667358221220c7260c0f278d120e9dce04e67d9c35b9b0eba64349aa650772b0c2742b0f696364736f6c6343000801003300000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee0000000000000000000000008df97eab2651e87a8a4080008ddabf6824c9f6720000000000000000000000009584c852362606653dc665e885afa2da0ad443070000000000000000000000009584c852362606653dc665e885afa2da0ad443070000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106105145760003560e01c806387788782116102a1578063cb528b521161016b578063e464c623116100e3578063f2fde38b11610097578063f851a4401161007c578063f851a440146108fb578063fc0c546a14610903578063fd253b641461090b57610514565b8063f2fde38b146108d5578063f786b958146108e857610514565b8063e73008bc116100c8578063e73008bc146108b2578063e941fa78146108ba578063f0f44260146108c257610514565b8063e464c623146108a2578063e4b37ef5146108aa57610514565b8063def68a9c1161013a578063df10b4e61161011f578063df10b4e61461087f578063dfcedeee14610887578063e2bbb1581461088f57610514565b8063def68a9c14610859578063def7869d1461086c57610514565b8063cb528b5214610836578063ccd34cd51461076e578063d4b0de2f1461083e578063d826ed061461084657610514565b8063acaf88cd11610219578063bc75f4b8116101cd578063beba0fa0116101b2578063beba0fa0146107fd578063c54d349c14610810578063c6ed51be1461082357610514565b8063bc75f4b8146107ed578063bdca9165146107f557610514565b8063b6857844116101fe578063b6857844146105a2578063b6ac642a146107c7578063bb9f408d146107da57610514565b8063acaf88cd146107ac578063b3ab15fb146107b457610514565b8063948a03f211610270578063a3639b3911610255578063a3639b3914610789578063a5834e061461079c578063aaada5da146107a457610514565b8063948a03f21461076e57806395dc14e11461077657610514565b8063877887821461073857806387d4bda9146107405780638da5cb5b1461075357806393c99e6a1461075b57610514565b806348a0d754116103e25780636d4710b91161035a578063731ff24a1161030e57806378b4330f116102f357806378b4330f146105d05780638456cb5914610728578063853828b61461073057610514565b8063731ff24a1461071857806377c7b8fc1461072057610514565b806370897b231161033f57806370897b23146106f5578063715018a614610708578063722713f71461071057610514565b80636d4710b9146106da578063704b6c02146106e257610514565b8063570ca735116103b15780635c975abb116103965780635c975abb146106b757806361d027b3146106bf578063668679ba146106c757610514565b8063570ca735146106a757806358ebceb6146106af57610514565b806348a0d754146106715780634e4de1e9146106795780634f1bfc9e1461068c5780635521e9bf1461069457610514565b80632cfc5f01116104905780633a98ef39116104445780633f4ba83a116104295780633f4ba83a146106365780633fec4e321461063e578063423b93ed1461065e57610514565b80633a98ef39146106265780633eb788741461062e57610514565b80632e1a7d4d116104755780632e1a7d4d146105ed5780632f6c493c14610600578063359819211461061357610514565b80632cfc5f01146105d05780632d19b982146105d857610514565b80631959a002116104e75780631ea30fef116104cc5780631ea30fef146105a25780631efac1b8146105aa57806329a5cfd6146105bd57610514565b80631959a0021461056757806319ab453c1461058f57610514565b806301e813261461051957806305a9f274146105375780630c59696b1461053f57806314ff303914610554575b600080fd5b610521610913565b60405161052e9190614bb5565b60405180910390f35b61052161091b565b61055261054d366004614187565b610921565b005b610552610562366004614187565b6109fa565b61057a6105753660046140e5565b610abc565b60405161052e99989796959493929190614c0b565b61055261059d3660046140e5565b610b0e565b610521610db2565b6105526105b8366004614187565b610dbc565b6105216105cb366004614140565b610e7f565b610521610fce565b6105e0610fd5565b60405161052e91906141f4565b6105526105fb366004614187565b610ff1565b61055261060e3660046140e5565b611041565b610552610621366004614187565b61113e565b6105216111fe565b610521611204565b61055261120a565b61065161064c3660046140e5565b611296565b60405161052e91906142d5565b61055261066c366004614108565b6112ab565b6105216113c8565b610552610687366004614108565b611492565b6105216115af565b6105526106a2366004614187565b6115b5565b6105e0611607565b610521611623565b6106516116d9565b6105e06116fa565b6106516106d53660046140e5565b611716565b61052161172b565b6105526106f03660046140e5565b611731565b610552610703366004614187565b6117fc565b6105526118be565b6105216118d2565b61052161198a565b61052161199a565b6105526119f1565b610552611a7d565b610521611a96565b61065161074e3660046140e5565b611a9c565b6105e0611ab1565b610552610769366004614187565b611acd565b610521611b93565b6105216107843660046140e5565b611b9c565b610552610797366004614187565b611d0d565b610521611dcd565b610521611dd3565b610521611dd9565b6105526107c23660046140e5565b611ddf565b6105526107d5366004614187565b611eaa565b6105526107e8366004614187565b611f6c565b61052161202e565b610521612034565b61055261080b366004614108565b61203a565b61055261081e366004614187565b612157565b6105216108313660046140e5565b612217565b6105e0612319565b61052161233d565b6105526108543660046140e5565b612343565b6105526108673660046140e5565b612457565b61055261087a3660046140e5565b6125fa565b61052161270e565b6105e0612714565b61055261089d3660046141b7565b612730565b610521612788565b61052161278e565b610521612794565b61052161279a565b6105526108d03660046140e5565b6127a0565b6105526108e33660046140e5565b61286b565b6105526108f6366004614187565b6128c9565b6105e061298d565b6105e06129a9565b6105216129cd565b6305265c0081565b600d5481565b60085473ffffffffffffffffffffffffffffffffffffffff16331461097b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b60405180910390fd5b64e8d4a510008111156109ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906147bc565b60178190556040517ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906109ef908390614bb5565b60405180910390a150565b60085473ffffffffffffffffffffffffffffffffffffffff163314610a4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6101f4811115610a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614ac4565b60168190556040517fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef906109ef908390614bb5565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b610b166129d7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610b6b9033906004016141f4565b60206040518083038186803b158015610b8357600080fd5b505afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb919061419f565b905080610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906144fe565b610c1673ffffffffffffffffffffffffffffffffffffffff8316333084612a4a565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610c8a907f00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee908590600401614246565b602060405180830381600087803b158015610ca457600080fd5b505af1158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc919061416b565b50600b546040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee169163e2bbb15891610d5391908590600401614be2565b600060405180830381600087803b158015610d6d57600080fd5b505af1158015610d81573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6509184e72a00081565b60085473ffffffffffffffffffffffffffffffffffffffff163314610e0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b62093a80811115610e4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906149d3565b60188190556040517fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc906109ef908390614bb5565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081208054831115610eb257805492505b3360009081526005602052604090205460ff16158015610ee257506018548160010154610edf9190614c4c565b42105b15610fc2576000610ef1611623565b610ef96118d2565b610f039190614c4c565b8254909150600090610f1a64e8d4a5100087614c9d565b610f249190614c64565b90506000610f3187612af3565b60068501546007548654610f459087614c9d565b610f4f9190614c64565b610f599190614cda565b610f639190614cda565b9050600064e8d4a51000610f778484614c9d565b610f819190614c64565b601554909150610f9033612b11565b15610f9a57506016545b6000612710610fa98385614c9d565b610fb39190614c64565b9750610fc89650505050505050565b60009150505b92915050565b62093a8081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b610ff9612b17565b60008111611033576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061439f565b61103e816000612b56565b50565b803373ffffffffffffffffffffffffffffffffffffffff8216148061107d5750600a5473ffffffffffffffffffffffffffffffffffffffff1633145b6110b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614a8d565b6110bb612b17565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020600781015460ff1680156110f75750428160050154105b61112d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614b7e565b61113960008085612f29565b505050565b60085473ffffffffffffffffffffffffffffffffffffffff16331461118f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b600081116111c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061475f565b60118190556040517f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe906109ef908390614bb5565b60075481565b60145481565b60085473ffffffffffffffffffffffffffffffffffffffff16331461125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b61126361359f565b61126b6135dd565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60046020526000908152604090205460ff1681565b60085473ffffffffffffffffffffffffffffffffffffffff1633146112fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff8216611349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915590519092917f3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d4491a35050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf16906370a082319061143d9030906004016141f4565b60206040518083038186803b15801561145557600080fd5b505afa158015611469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148d919061419f565b905090565b60085473ffffffffffffffffffffffffffffffffffffffff1633146114e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff8216611530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b73ffffffffffffffffffffffffffffffffffffffff821660008181526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915590519092917f3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d4491a35050565b600f5481565b6115bd612b17565b6509184e72a00081116115fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061493f565b61103e600082612b56565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b6000807f00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee73ffffffffffffffffffffffffffffffffffffffff16631175a1dd600b54306040518363ffffffff1660e01b8152600401611683929190614bbe565b60206040518083038186803b15801561169b57600080fd5b505afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d3919061419f565b91505090565b60005474010000000000000000000000000000000000000000900460ff1690565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60066020526000908152604090205460ff1681565b600b5481565b6117396129d7565b73ffffffffffffffffffffffffffffffffffffffff8116611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c926109ef9216906141f4565b60085473ffffffffffffffffffffffffffffffffffffffff16331461184d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6107d0811115611889576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614694565b60138190556040517fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c4906109ef908390614bb5565b6118c66129d7565b6118d0600061364d565b565b6000600c547f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161193091906141f4565b60206040518083038186803b15801561194857600080fd5b505afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611980919061419f565b61148d9190614c4c565b6b204fce5e3e2502611000000081565b60006007546000146119e4576007546119b1611623565b6119b96118d2565b6119c39190614c4c565b6119d590670de0b6b3a7640000614c9d565b6119df9190614c64565b61148d565b50670de0b6b3a764000090565b60085473ffffffffffffffffffffffffffffffffffffffff163314611a42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b611a4a612b17565b611a526136c2565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b336000908152600360205260409020546118d090610ff1565b60135481565b60056020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60085473ffffffffffffffffffffffffffffffffffffffff163314611b1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b652d79883d2000811115611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906144a1565b60128190556040517f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e906109ef908390614bb5565b64e8d4a5100081565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600360205260408120805415801590611bd55750600781015460ff165b8015611c07575073ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090205460ff16155b8015611c23575042600e548260050154611c219190614c4c565b105b15611d02576000611c32611623565b611c3a6118d2565b611c449190614c4c565b60068301546007548454929350600092611c5e9085614c9d565b611c689190614c64565b611c729190614cda565b90506000836008015482611c869190614cda565b90506000600e54856005015442611c9d9190614cda565b611ca79190614cda565b9050601154811115611cb857506011545b600060115460175483611ccb9190614c9d565b611cd59190614c64565b9050600064e8d4a51000611ce98386614c9d565b611cf39190614c64565b9750611d089650505050505050565b60009150505b919050565b60085473ffffffffffffffffffffffffffffffffffffffff163314611d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b60008111611d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614433565b60108190556040517f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde906109ef908390614bb5565b60175481565b600e5481565b60115481565b611de76129d7565b73ffffffffffffffffffffffffffffffffffffffff8116611e34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a926109ef9216906141f4565b60085473ffffffffffffffffffffffffffffffffffffffff163314611efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6101f4811115611f37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614ac4565b60158190556040517fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d906109ef908390614bb5565b60085473ffffffffffffffffffffffffffffffffffffffff163314611fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6107d0811115611ff9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614694565b60148190556040517fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d906109ef908390614bb5565b60125481565b6107d081565b60085473ffffffffffffffffffffffffffffffffffffffff16331461208b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff82166120d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915590519092917f3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d4491a35050565b60085473ffffffffffffffffffffffffffffffffffffffff1633146121a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b600081116121e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614b21565b600e8190556040517ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad906109ef908390614bb5565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604081208054158015906122515750600781015460ff16155b8015612283575073ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205460ff16155b15611d02576000612292611623565b61229a6118d2565b6122a49190614c4c565b905060006007548284600001546122bb9190614c9d565b6122c59190614c64565b905060008360020154826122d99190614cda565b6013549091506122e887612b11565b156122f257506014545b60006127106123018385614c9d565b61230b9190614c64565b9650611d0895505050505050565b7f00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee81565b6101f481565b60085473ffffffffffffffffffffffffffffffffffffffff163314612394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff81166123e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f1926109ef9216906141f4565b60085473ffffffffffffffffffffffffffffffffffffffff1633146124a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561252e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614535565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a08231906125839030906004016141f4565b60206040518083038186803b15801561259b57600080fd5b505afa1580156125af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d3919061419f565b90506125f673ffffffffffffffffffffffffffffffffffffffff83163383613732565b5050565b60085473ffffffffffffffffffffffffffffffffffffffff16331461264b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b73ffffffffffffffffffffffffffffffffffffffff8116612698576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b2926109ef9216906141f4565b60185481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b612738612b17565b60008211806127475750600081115b61277d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614331565b6125f6828233612f29565b60105481565b60165481565b600c5481565b60155481565b6127a86129d7565b73ffffffffffffffffffffffffffffffffffffffff81166127f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614728565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea086926109ef9216906141f4565b6128736129d7565b73ffffffffffffffffffffffffffffffffffffffff81166128c0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906143d6565b61103e8161364d565b60085473ffffffffffffffffffffffffffffffffffffffff16331461291a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614908565b6305265c00811115612958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614876565b600f8190556040517fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe906109ef908390614bb5565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf81565b652d79883d200081565b6129df613751565b73ffffffffffffffffffffffffffffffffffffffff166129fd611ab1565b73ffffffffffffffffffffffffffffffffffffffff16146118d0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906148d3565b612aed846323b872dd60e01b858585604051602401612a6b93929190614215565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613755565b50505050565b6000612afe82611b9c565b612b0783612217565b610fc89190614c4c565b3b151590565b612b1f6116d9565b156118d0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906146f1565b3360009081526003602052604090208054831115612ba0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614592565b42816005015410612bdd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061446a565b60025473ffffffffffffffffffffffffffffffffffffffff1615612c84576002546040517f51cff8d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906351cff8d990612c519033906004016141f4565b600060405180830381600087803b158015612c6b57600080fd5b505af1158015612c7f573d6000803e3d6000fd5b505050505b80548390600090612ca16b204fce5e3e2502611000000084614c9d565b612cab9190614c64565b9050612cb561380b565b612cbe336139e2565b84158015612ccc5750600084115b15612d0d576000612cdb6118d2565b90508060075486612cec9190614c9d565b612cf69190614c64565b8454909350831115612d0757835492505b50612d34565b82546b204fce5e3e2502611000000090612d279083614c9d565b612d319190614c64565b91505b600060075483612d426118d2565b612d4c9190614c9d565b612d569190614c64565b905082846000016000828254612d6c9190614cda565b925050819055508260076000828254612d859190614cda565b90915550503360009081526005602052604090205460ff16158015612dba57506018548460010154612db79190614c4c565b42105b15612e4757601554612dcb33612b11565b15612dd557506016545b6000612710612de48385614c9d565b612dee9190614c64565b600954909150612e389073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf8116911683613732565b612e428184614cda565b925050505b612e8873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf163383613732565b835415612eba57600754612e9a6118d2565b8554612ea69190614c9d565b612eb09190614c64565b6002850155612ec2565b600060028501555b426003850155612ed133613e53565b3373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5688285604051612f19929190614be2565b60405180910390a2505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260036020526040902080541580612f5c5750600084115b15612fa0576509184e72a0008411612fa0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614819565b600581015483904211612ffe578415612fdd574260048301556008820154600d8054600090612fd0908490614cda565b9091555050600060088301555b81600401548260050154612ff19190614cda565b612ffb9082614c4c565b90505b83158061300e575062093a808110155b613044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614600565b600f54811115613080576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610972906145c9565b60025473ffffffffffffffffffffffffffffffffffffffff161561312b576002546040517f0efe6a8b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690630efe6a8b906130f89086908990899060040161426c565b600060405180830381600087803b15801561311257600080fd5b505af1158015613126573d6000803e3d6000fd5b505050505b61313361380b565b6007546131905760006131446113c8565b60095490915061318e9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf8116911683613732565b505b613199836139e2565b83156132105742826005015410156131c85742600483018190556131be908590614c4c565b60058301556131e2565b838260050160008282546131dc9190614c4c565b90915550505b6007820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b60008060008061321e6118d2565b9050881561326c5761326873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf1688308c612a4a565b8892505b8554158015906132805750600786015460ff165b156132f95760075486546132949083614c9d565b61329e9190614c64565b91506132aa8284614c4c565b92508560000154600760008282546132c29190614cda565b90915550506000865560048601544214156132f95760088601829055600d80548391906000906132f3908490614c4c565b90915550505b600754156133295761330b8282614cda565b6007546133189085614c9d565b6133229190614c64565b935061332d565b8293505b8560040154866005015411156134b0576000601054601254886004015489600501546133599190614cda565b6133639190614c9d565b61336d9190614c64565b9050600064e8d4a510006133818784614c9d565b61338b9190614c64565b90506133978187614c4c565b9550858860000160008282546133ad9190614c4c565b909155506000905064e8d4a510006133c58785614c9d565b6133cf9190614c64565b9050808960060160008282546133e59190614c4c565b9250508190555080600c60008282546133fe9190614c4c565b925050819055508b8960080160008282546134199190614c4c565b925050819055508b600d60008282546134329190614c4c565b925050819055508973ffffffffffffffffffffffffffffffffffffffff167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d6005015461348f9190614cda565b426040516134a09493929190614bf0565b60405180910390a25050506134ca565b838660000160008282546134c49190614c4c565b90915550505b60008911806134d95750600088115b156134e5574260018701555b83600760008282546134f79190614c4c565b9091555050600686015460075461350c6118d2565b88546135189190614c9d565b6135229190614c64565b61352c9190614cda565b600287015542600387015561354087613e53565b8673ffffffffffffffffffffffffffffffffffffffff167f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f98a868b4260405161358c9493929190614bf0565b60405180910390a2505050505050505050565b6135a76116d9565b6118d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614368565b6135e561359f565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613636613751565b60405161364391906141f4565b60405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6136ca612b17565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613636613751565b6111398363a9059cbb60e01b8484604051602401612a6b929190614246565b3390565b60006137b7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613f4d9092919063ffffffff16565b80519091501561113957808060200190518101906137d5919061416b565b611139576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614a30565b600b546040517f1175a1dd00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee1691631175a1dd91613883913090600401614bbe565b60206040518083038186803b15801561389b57600080fd5b505afa1580156138af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d3919061419f565b9050801561103e5760006138e56113c8565b600b546040517f441a3e7000000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000017d138722cdafdd2c1ff61026d568b5332db02ee169163441a3e709161395e91600090600401614be2565b600060405180830381600087803b15801561397857600080fd5b505af115801561398c573d6000803e3d6000fd5b50505050600061399a6113c8565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba6139c88484614cda565b6040516139d59190614bb5565b60405180910390a2505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604090208054156125f657600781015460ff1615613cda57600081600601546007548360000154613a326118d2565b613a3c9190614c9d565b613a469190614c64565b613a509190614cda565b90508160060154600c6000828254613a689190614cda565b909155505060006006830181905582546007805491929091613a8b908490614cda565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090205460ff16158015613ad6575042600e548360050154613ad49190614c4c565b105b15613bb5576000826008015482613aed9190614cda565b90506000600e54846005015442613b049190614cda565b613b0e9190614cda565b9050601154811115613b1f57506011545b600060115460175483613b329190614c9d565b613b3c9190614c64565b9050600064e8d4a51000613b508386614c9d565b613b5a9190614c64565b600954909150613ba49073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf8116911683613732565b613bae8186614cda565b9450505050505b6000613bbf6118d2565b90506000600754600014613bf557613bd78383614cda565b600754613be49085614c9d565b613bee9190614c64565b9050613bf8565b50815b80845560078054829190600090613c10908490614c4c565b90915550506005840154421115613cd2576007840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600060048501819055600585018190556008850154600d805491929091613c73908490614cda565b90915550506000600885015560405173ffffffffffffffffffffffffffffffffffffffff8616907ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c200490613cc99086904290614be2565b60405180910390a25b5050506125f6565b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604090205460ff166125f6576000600754613d146118d2565b8354613d209190614c9d565b613d2a9190614c64565b9050816000015460076000828254613d429190614cda565b909155505060008083556002830154613d5b9083614cda565b601354909150613d6a85612b11565b15613d7457506014545b6000612710613d838385614c9d565b613d8d9190614c64565b90508015613de957600954613ddc9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000054ba4075ceb2e31ed20e0cc442ea8ca0f3479ccf8116911683613732565b613de68185614cda565b93505b6000613df36118d2565b90506000600754600014613e2957613e0b8683614cda565b600754613e189088614c9d565b613e229190614c64565b9050613e2c565b50845b80875560078054829190600090613e44908490614c4c565b90915550505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff161561103e5773ffffffffffffffffffffffffffffffffffffffff8116600090815260036020526040812060048101546005820154919291613ead9190614cda565b6001546008840154600d546010546040517fe874fdaf00000000000000000000000000000000000000000000000000000000815294955073ffffffffffffffffffffffffffffffffffffffff9093169363e874fdaf93613f16938993909288929060040161429a565b600060405180830381600087803b158015613f3057600080fd5b505af1158015613f44573d6000803e3d6000fd5b50505050505050565b6060613f5c8484600085613f64565b949350505050565b606082471015613fa0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097290614637565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613fc991906141d8565b60006040518083038185875af1925050503d8060008114614006576040519150601f19603f3d011682016040523d82523d6000602084013e61400b565b606091505b509150915061401c87838387614027565b979650505050505050565b6060831561407b5782516140745761403e85614085565b614074576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109729061499c565b5081613f5c565b613f5c83836140a1565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b8151156140b15781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097291906142e0565b6000602082840312156140f6578081fd5b813561410181614d4c565b9392505050565b6000806040838503121561411a578081fd5b823561412581614d4c565b9150602083013561413581614d6e565b809150509250929050565b60008060408385031215614152578182fd5b823561415d81614d4c565b946020939093013593505050565b60006020828403121561417c578081fd5b815161410181614d6e565b600060208284031215614198578081fd5b5035919050565b6000602082840312156141b0578081fd5b5051919050565b600080604083850312156141c9578182fd5b50508035926020909101359150565b600082516141ea818460208701614cf1565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9390931683526020830191909152604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff959095168552602085019390935260408401919091526060830152608082015260a00190565b901515815260200190565b60006020825282518060208401526142ff816040850160208701614cf1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526012908201527f4e6f7468696e6720746f206465706f7369740000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526013908201527f4e6f7468696e6720746f20776974686472617700000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604082015260600190565b6020808252600d908201527f5374696c6c20696e206c6f636b00000000000000000000000000000000000000604082015260600190565b60208082526033908201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e60408201527f20424f4f53545f5745494748545f4c494d495400000000000000000000000000606082015260800190565b60208082526015908201527f42616c616e6365206d7573742065786365656420300000000000000000000000604082015260600190565b60208082526025908201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f7369742060408201527f746f6b656e000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604082015260600190565b6020808252601c908201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604082015260600190565b6020808252601f908201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f726520746860408201527f616e204d41585f504552464f524d414e43455f46454500000000000000000000606082015260800190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b60208082526016908201527f43616e6e6f74206265207a65726f206164647265737300000000000000000000604082015260600190565b60208082526026908201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260408201527f65207a65726f0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60408201527f41585f4f5645524455455f464545000000000000000000000000000000000000606082015260800190565b60208082526036908201527f4465706f73697420616d6f756e74206d7573742062652067726561746572207460408201527f68616e204d494e5f4445504f5349545f414d4f554e5400000000000000000000606082015260800190565b6020808252603d908201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560408201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201527f61646d696e3a207775743f000000000000000000000000000000000000000000604082015260600190565b60208082526038908201527f576974686472617720616d6f756e74206d75737420626520677265617465722060408201527f7468616e204d494e5f57495448445241575f414d4f554e540000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252603d908201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560408201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4e6f74206f70657261746f72206f72207072696d6578206f776e657200000000604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201527f4d41585f57495448445241575f46454500000000000000000000000000000000606082015260800190565b60208082526023908201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60408201527f65726f0000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526011908201527f43616e6e6f7420756e6c6f636b20796574000000000000000000000000000000604082015260600190565b90815260200190565b91825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b918252602082015260400190565b93845260208401929092526040830152606082015260800190565b988952602089019790975260408801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200190565b60008219821115614c5f57614c5f614d1d565b500190565b600082614c98577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614cd557614cd5614d1d565b500290565b600082821015614cec57614cec614d1d565b500390565b60005b83811015614d0c578181015183820152602001614cf4565b83811115612aed5750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461103e57600080fd5b801515811461103e57600080fdfea2646970667358221220c7260c0f278d120e9dce04e67d9c35b9b0eba64349aa650772b0c2742b0f696364736f6c63430008010033