false
false
0
Contract Address Details
contract

0x349bF392d62C0417626547C536B2f9D9A42e5c4D

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:
MasterChefV2




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
99999
EVM Version
default




Verified at
2024-07-20T04:03:25.147137Z

Constructor Arguments

0x000000000000000000000000c36afddc739bfd5b89ee899b2cf23bd1a0bfcf46000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae3900000000000000000000000000000000000000000000000000000000000000020000000000000000000000005bd03def68a8e95dc138f8d3484f78bcac8cbe62

Arg [0] (address) : 0xc36afddc739bfd5b89ee899b2cf23bd1a0bfcf46
Arg [1] (address) : 0xeb3c930c1e0d3434ff917ffd77aa813e7d79ae39
Arg [2] (uint256) : 2
Arg [3] (address) : 0x5bd03def68a8e95dc138f8d3484f78bcac8cbe62

              

contracts/MasterChefV2.sol

Sol2uml
new
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "bsc-library/contracts/IBEP20.sol";
import "bsc-library/contracts/SafeBEP20.sol";
import "./interfaces/IMasterChef.sol";

/// @notice The (older) MasterChef contract gives out a constant number of CAKE tokens per block.
/// It is the only address with minting rights for CAKE.
/// The idea for this MasterChef V2 (MCV2) contract is therefore to be the owner of a dummy token
/// that is deposited into the MasterChef V1 (MCV1) contract.
/// The allocation point for this pool on MCV1 is the total allocation point for all pools that receive incentives.
contract MasterChefV2 is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;

    /// @notice Info of each MCV2 user.
    /// `amount` LP token amount the user has provided.
    /// `rewardDebt` Used to calculate the correct amount of rewards. See explanation below.
    ///
    /// We do some fancy math here. Basically, any point in time, the amount of CAKEs
    /// entitled to a user but is pending to be distributed is:
    ///
    ///   pending reward = (user share * pool.accCakePerShare) - user.rewardDebt
    ///
    ///   Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
    ///   1. The pool's `accCakePerShare` (and `lastRewardBlock`) gets updated.
    ///   2. User receives the pending reward sent to his/her address.
    ///   3. User's `amount` gets updated. Pool's `totalBoostedShare` gets updated.
    ///   4. User's `rewardDebt` gets updated.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 boostMultiplier;
    }

    /// @notice Info of each MCV2 pool.
    /// `allocPoint` The amount of allocation points assigned to the pool.
    ///     Also known as the amount of "multipliers". Combined with `totalXAllocPoint`, it defines the % of
    ///     CAKE rewards each pool gets.
    /// `accCakePerShare` Accumulated CAKEs per share, times 1e12.
    /// `lastRewardBlock` Last block number that pool update action is executed.
    /// `isRegular` The flag to set pool is regular or special. See below:
    ///     In MasterChef V2 farms are "regular pools". "special pools", which use a different sets of
    ///     `allocPoint` and their own `totalSpecialAllocPoint` are designed to handle the distribution of
    ///     the CAKE rewards to all the PancakeSwap products.
    /// `totalBoostedShare` The total amount of user shares in each pool. After considering the share boosts.
    struct PoolInfo {
        uint256 accCakePerShare;
        uint256 lastRewardBlock;
        uint256 allocPoint;
        uint256 totalBoostedShare;
        bool isRegular;
    }

    /// @notice Address of MCV1 contract.
    IMasterChef public immutable MASTER_CHEF;
    /// @notice Address of CAKE contract.
    IBEP20 public immutable CAKE;

    /// @notice The only address can withdraw all the burn CAKE.
    address public burnAdmin;
    /// @notice The contract handles the share boosts.
    address public boostContract;

    /// @notice Info of each MCV2 pool.
    PoolInfo[] public poolInfo;
    /// @notice Address of the LP token for each MCV2 pool.
    IBEP20[] public lpToken;

    /// @notice Info of each pool user.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    /// @notice The whitelist of addresses allowed to deposit in special pools.
    mapping(address => bool) public whiteList;

    /// @notice The pool id of the MCV2 mock token pool in MCV1.
    uint256 public immutable MASTER_PID;
    /// @notice Total regular allocation points. Must be the sum of all regular pools' allocation points.
    uint256 public totalRegularAllocPoint;
    /// @notice Total special allocation points. Must be the sum of all special pools' allocation points.
    uint256 public totalSpecialAllocPoint;
    ///  @notice 40 cakes per block in MCV1
    uint256 public constant MASTERCHEF_CAKE_PER_BLOCK = 40 * 1e18;
    uint256 public constant ACC_CAKE_PRECISION = 1e18;

    /// @notice Basic boost factor, none boosted user's boost factor
    uint256 public constant BOOST_PRECISION = 100 * 1e10;
    /// @notice Hard limit for maxmium boost factor, it must greater than BOOST_PRECISION
    uint256 public constant MAX_BOOST_PRECISION = 200 * 1e10;
    /// @notice total cake rate = toBurn + toRegular + toSpecial
    uint256 public constant CAKE_RATE_TOTAL_PRECISION = 1e12;
    /// @notice The last block number of CAKE burn action being executed.
    /// @notice CAKE distribute % for burn
    uint256 public cakeRateToBurn = 975000000000;  

    /// @notice CAKE distribute % for regular farm pool
    uint256 public cakeRateToRegularFarm =  4410331384;
    /// @notice CAKE distribute % for special pools
    uint256 public cakeRateToSpecialFarm =  20589668616;

    uint256 public lastBurnedBlock;

    event Init();
    event AddPool(uint256 indexed pid, uint256 allocPoint, IBEP20 indexed lpToken, bool isRegular);
    event SetPool(uint256 indexed pid, uint256 allocPoint);
    event UpdatePool(uint256 indexed pid, uint256 lastRewardBlock, uint256 lpSupply, uint256 accCakePerShare);
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    event UpdateCakeRate(uint256 burnRate, uint256 regularFarmRate, uint256 specialFarmRate);
    event UpdateBurnAdmin(address indexed oldAdmin, address indexed newAdmin);
    event UpdateWhiteList(address indexed user, bool isValid);
    event UpdateBoostContract(address indexed boostContract);
    event UpdateBoostMultiplier(address indexed user, uint256 pid, uint256 oldMultiplier, uint256 newMultiplier);

    /// @param _MASTER_CHEF The PancakeSwap MCV1 contract address.
    /// @param _CAKE The CAKE token contract address.
    /// @param _MASTER_PID The pool id of the dummy pool on the MCV1.
    /// @param _burnAdmin The address of burn admin.
    constructor(IMasterChef _MASTER_CHEF, IBEP20 _CAKE, uint256 _MASTER_PID, address _burnAdmin) public {
        MASTER_CHEF = _MASTER_CHEF;
        CAKE = _CAKE;
        MASTER_PID = _MASTER_PID;
        burnAdmin = _burnAdmin;
    }

    /**
     * @dev Throws if caller is not the boost contract.
     */
    modifier onlyBoostContract() {
        require(boostContract == msg.sender, "Ownable: caller is not the boost contract");
        _;
    }

    /// @notice Deposits a dummy token to `MASTER_CHEF` MCV1. This is required because MCV1 holds the minting permission of CAKE.
    /// It will transfer all the `dummyToken` in the tx sender address.
    /// The allocation point for the dummy pool on MCV1 should be equal to the total amount of allocPoint.
    /// @param dummyToken The address of the BEP-20 token to be deposited into MCV1.
    function init(IBEP20 dummyToken) external onlyOwner {
        uint256 balance = dummyToken.balanceOf(msg.sender);
        require(balance != 0, "MasterChefV2: Balance must exceed 0");
        dummyToken.safeTransferFrom(msg.sender, address(this), balance);
        dummyToken.approve(address(MASTER_CHEF), balance);
        MASTER_CHEF.deposit(MASTER_PID, balance);
        // MCV2 start to earn CAKE reward from current block in MCV1 pool
        lastBurnedBlock = block.number;
        emit Init();
    }

    /// @notice Returns the number of MCV2 pools.
    function poolLength() public view returns (uint256 pools) {
        pools = poolInfo.length;
    }

    /// @notice Add a new pool. Can only be called by the owner.
    /// DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    /// @param _allocPoint Number of allocation points for the new pool.
    /// @param _lpToken Address of the LP BEP-20 token.
    /// @param _isRegular Whether the pool is regular or special. LP farms are always "regular". "Special" pools are
    /// @param _withUpdate Whether call "massUpdatePools" operation.
    /// only for CAKE distributions within PancakeSwap products.
    function add(uint256 _allocPoint, IBEP20 _lpToken, bool _isRegular, bool _withUpdate) external onlyOwner {
        require(_lpToken.balanceOf(address(this)) >= 0, "None BEP20 tokens");
        // stake CAKE token will cause staked token and reward token mixed up,
        // may cause staked tokens withdraw as reward token,never do it.
        require(_lpToken != CAKE, "CAKE token can't be added to farm pools");

        if (_withUpdate) {
            massUpdatePools();
        }

        if (_isRegular) {
            totalRegularAllocPoint = totalRegularAllocPoint.add(_allocPoint);
        } else {
            totalSpecialAllocPoint = totalSpecialAllocPoint.add(_allocPoint);
        }
        lpToken.push(_lpToken);

        poolInfo.push(
            PoolInfo({
                allocPoint: _allocPoint,
                lastRewardBlock: block.number,
                accCakePerShare: 0,
                isRegular: _isRegular,
                totalBoostedShare: 0
            })
        );
        emit AddPool(lpToken.length.sub(1), _allocPoint, _lpToken, _isRegular);
    }

    /// @notice Update the given pool's CAKE allocation point. Can only be called by the owner.
    /// @param _pid The id of the pool. See `poolInfo`.
    /// @param _allocPoint New number of allocation points for the pool.
    /// @param _withUpdate Whether call "massUpdatePools" operation.
    function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) external onlyOwner {
        // No matter _withUpdate is true or false, we need to execute updatePool once before set the pool parameters.
        updatePool(_pid);

        if (_withUpdate) {
            massUpdatePools();
        }

        if (poolInfo[_pid].isRegular) {
            totalRegularAllocPoint = totalRegularAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        } else {
            totalSpecialAllocPoint = totalSpecialAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        }
        poolInfo[_pid].allocPoint = _allocPoint;
        emit SetPool(_pid, _allocPoint);
    }

    /// @notice View function for checking pending CAKE rewards.
    /// @param _pid The id of the pool. See `poolInfo`.
    /// @param _user Address of the user.
    function pendingCake(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo memory user = userInfo[_pid][_user];
        uint256 accCakePerShare = pool.accCakePerShare;
        uint256 lpSupply = pool.totalBoostedShare;

        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = block.number.sub(pool.lastRewardBlock);

            uint256 cakeReward = multiplier.mul(cakePerBlock(pool.isRegular)).mul(pool.allocPoint).div(
                (pool.isRegular ? totalRegularAllocPoint : totalSpecialAllocPoint)
            );
            accCakePerShare = accCakePerShare.add(cakeReward.mul(ACC_CAKE_PRECISION).div(lpSupply));
        }

        uint256 boostedAmount = user.amount.mul(getBoostMultiplier(_user, _pid)).div(BOOST_PRECISION);
        return boostedAmount.mul(accCakePerShare).div(ACC_CAKE_PRECISION).sub(user.rewardDebt);
    }

    /// @notice Update cake reward for all the active pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            PoolInfo memory pool = poolInfo[pid];
            if (pool.allocPoint != 0) {
                updatePool(pid);
            }
        }
    }

    /// @notice Calculates and returns the `amount` of CAKE per block.
    /// @param _isRegular If the pool belongs to regular or special.
    function cakePerBlock(bool _isRegular) public view returns (uint256 amount) {
        if (_isRegular) {
            amount = MASTERCHEF_CAKE_PER_BLOCK.mul(cakeRateToRegularFarm).div(CAKE_RATE_TOTAL_PRECISION);
        } else {
            amount = MASTERCHEF_CAKE_PER_BLOCK.mul(cakeRateToSpecialFarm).div(CAKE_RATE_TOTAL_PRECISION);
        }
    }

    /// @notice Calculates and returns the `amount` of CAKE per block to burn.
    function cakePerBlockToBurn() public view returns (uint256 amount) {
        amount = MASTERCHEF_CAKE_PER_BLOCK.mul(cakeRateToBurn).div(CAKE_RATE_TOTAL_PRECISION);
    }

    /// @notice Update reward variables for the given pool.
    /// @param _pid The id of the pool. See `poolInfo`.
    /// @return pool Returns the pool that was updated.
    function updatePool(uint256 _pid) public returns (PoolInfo memory pool) {
        pool = poolInfo[_pid];
        if (block.number > pool.lastRewardBlock) {
            uint256 lpSupply = pool.totalBoostedShare;
            uint256 totalAllocPoint = (pool.isRegular ? totalRegularAllocPoint : totalSpecialAllocPoint);

            if (lpSupply > 0 && totalAllocPoint > 0) {
                uint256 multiplier = block.number.sub(pool.lastRewardBlock);
                uint256 cakeReward = multiplier.mul(cakePerBlock(pool.isRegular)).mul(pool.allocPoint).div(
                    totalAllocPoint
                );
                pool.accCakePerShare = pool.accCakePerShare.add((cakeReward.mul(ACC_CAKE_PRECISION).div(lpSupply)));
            }
            pool.lastRewardBlock = block.number;
            poolInfo[_pid] = pool;
            emit UpdatePool(_pid, pool.lastRewardBlock, lpSupply, pool.accCakePerShare);
        }
    }

    /// @notice Deposit LP tokens to pool.
    /// @param _pid The id of the pool. See `poolInfo`.
    /// @param _amount Amount of LP tokens to deposit.
    function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo memory pool = updatePool(_pid);
        UserInfo storage user = userInfo[_pid][msg.sender];

        require(
            pool.isRegular || whiteList[msg.sender],
            "MasterChefV2: The address is not available to deposit in this pool"
        );

        uint256 multiplier = getBoostMultiplier(msg.sender, _pid);

        if (user.amount > 0) {
            settlePendingCake(msg.sender, _pid, multiplier);
        }

        if (_amount > 0) {
            uint256 before = lpToken[_pid].balanceOf(address(this));
            lpToken[_pid].safeTransferFrom(msg.sender, address(this), _amount);
            _amount = lpToken[_pid].balanceOf(address(this)).sub(before);
            user.amount = user.amount.add(_amount);

            // Update total boosted share.
            pool.totalBoostedShare = pool.totalBoostedShare.add(_amount.mul(multiplier).div(BOOST_PRECISION));
        }

        user.rewardDebt = user.amount.mul(multiplier).div(BOOST_PRECISION).mul(pool.accCakePerShare).div(
            ACC_CAKE_PRECISION
        );
        poolInfo[_pid] = pool;

        emit Deposit(msg.sender, _pid, _amount);
    }

    /// @notice Withdraw LP tokens from pool.
    /// @param _pid The id of the pool. See `poolInfo`.
    /// @param _amount Amount of LP tokens to withdraw.
    function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo memory pool = updatePool(_pid);
        UserInfo storage user = userInfo[_pid][msg.sender];

        require(user.amount >= _amount, "withdraw: Insufficient");

        uint256 multiplier = getBoostMultiplier(msg.sender, _pid);

        settlePendingCake(msg.sender, _pid, multiplier);

        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            lpToken[_pid].safeTransfer(msg.sender, _amount);
        }

        user.rewardDebt = user.amount.mul(multiplier).div(BOOST_PRECISION).mul(pool.accCakePerShare).div(
            ACC_CAKE_PRECISION
        );
        poolInfo[_pid].totalBoostedShare = poolInfo[_pid].totalBoostedShare.sub(
            _amount.mul(multiplier).div(BOOST_PRECISION)
        );

        emit Withdraw(msg.sender, _pid, _amount);
    }

    /// @notice Harvests CAKE from `MASTER_CHEF` MCV1 and pool `MASTER_PID` to MCV2.
    function harvestFromMasterChef() public {
        MASTER_CHEF.deposit(MASTER_PID, 0);
    }

    /// @notice Withdraw without caring about the rewards. EMERGENCY ONLY.
    /// @param _pid The id of the pool. See `poolInfo`.
    function emergencyWithdraw(uint256 _pid) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        uint256 boostedAmount = amount.mul(getBoostMultiplier(msg.sender, _pid)).div(BOOST_PRECISION);
        pool.totalBoostedShare = pool.totalBoostedShare > boostedAmount ? pool.totalBoostedShare.sub(boostedAmount) : 0;

        // Note: transfer can fail or succeed if `amount` is zero.
        lpToken[_pid].safeTransfer(msg.sender, amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    /// @notice Send CAKE pending for burn to `burnAdmin`.
    /// @param _withUpdate Whether call "massUpdatePools" operation.
    function burnCake(bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }

        uint256 multiplier = block.number.sub(lastBurnedBlock);
        uint256 pendingCakeToBurn = multiplier.mul(cakePerBlockToBurn());

        // SafeTransfer CAKE
        _safeTransfer(burnAdmin, pendingCakeToBurn);
        lastBurnedBlock = block.number;
    }

    /// @notice Update the % of CAKE distributions for burn, regular pools and special pools.
    /// @param _burnRate The % of CAKE to burn each block.
    /// @param _regularFarmRate The % of CAKE to regular pools each block.
    /// @param _specialFarmRate The % of CAKE to special pools each block.
    /// @param _withUpdate Whether call "massUpdatePools" operation.
    function updateCakeRate(
        uint256 _burnRate,
        uint256 _regularFarmRate,
        uint256 _specialFarmRate,
        bool _withUpdate
    ) external onlyOwner {
        require(
            _burnRate > 0 && _regularFarmRate > 0 && _specialFarmRate > 0,
            "MasterChefV2: Cake rate must be greater than 0"
        );
        require(
            _burnRate.add(_regularFarmRate).add(_specialFarmRate) == CAKE_RATE_TOTAL_PRECISION,
            "MasterChefV2: Total rate must be 1e12"
        );
        if (_withUpdate) {
            massUpdatePools();
        }
        // burn cake base on old burn cake rate
        burnCake(false);

        cakeRateToBurn = _burnRate;
        cakeRateToRegularFarm = _regularFarmRate;
        cakeRateToSpecialFarm = _specialFarmRate;

        emit UpdateCakeRate(_burnRate, _regularFarmRate, _specialFarmRate);
    }

    /// @notice Update burn admin address.
    /// @param _newAdmin The new burn admin address.
    function updateBurnAdmin(address _newAdmin) external onlyOwner {
        require(_newAdmin != address(0), "MasterChefV2: Burn admin address must be valid");
        require(_newAdmin != burnAdmin, "MasterChefV2: Burn admin address is the same with current address");
        address _oldAdmin = burnAdmin;
        burnAdmin = _newAdmin;
        emit UpdateBurnAdmin(_oldAdmin, _newAdmin);
    }

    /// @notice Update whitelisted addresses for special pools.
    /// @param _user The address to be updated.
    /// @param _isValid The flag for valid or invalid.
    function updateWhiteList(address _user, bool _isValid) external onlyOwner {
        require(_user != address(0), "MasterChefV2: The white list address must be valid");

        whiteList[_user] = _isValid;
        emit UpdateWhiteList(_user, _isValid);
    }

    /// @notice Update boost contract address and max boost factor.
    /// @param _newBoostContract The new address for handling all the share boosts.
    function updateBoostContract(address _newBoostContract) external onlyOwner {
        require(
            _newBoostContract != address(0) && _newBoostContract != boostContract,
            "MasterChefV2: New boost contract address must be valid"
        );

        boostContract = _newBoostContract;
        emit UpdateBoostContract(_newBoostContract);
    }

    /// @notice Update user boost factor.
    /// @param _user The user address for boost factor updates.
    /// @param _pid The pool id for the boost factor updates.
    /// @param _newMultiplier New boost multiplier.
    function updateBoostMultiplier(
        address _user,
        uint256 _pid,
        uint256 _newMultiplier
    ) external onlyBoostContract nonReentrant {
        require(_user != address(0), "MasterChefV2: The user address must be valid");
        require(poolInfo[_pid].isRegular, "MasterChefV2: Only regular farm could be boosted");
        require(
            _newMultiplier >= BOOST_PRECISION && _newMultiplier <= MAX_BOOST_PRECISION,
            "MasterChefV2: Invalid new boost multiplier"
        );

        PoolInfo memory pool = updatePool(_pid);
        UserInfo storage user = userInfo[_pid][_user];

        uint256 prevMultiplier = getBoostMultiplier(_user, _pid);
        settlePendingCake(_user, _pid, prevMultiplier);

        user.rewardDebt = user.amount.mul(_newMultiplier).div(BOOST_PRECISION).mul(pool.accCakePerShare).div(
            ACC_CAKE_PRECISION
        );
        pool.totalBoostedShare = pool.totalBoostedShare.sub(user.amount.mul(prevMultiplier).div(BOOST_PRECISION)).add(
            user.amount.mul(_newMultiplier).div(BOOST_PRECISION)
        );
        poolInfo[_pid] = pool;
        userInfo[_pid][_user].boostMultiplier = _newMultiplier;

        emit UpdateBoostMultiplier(_user, _pid, prevMultiplier, _newMultiplier);
    }

    /// @notice Get user boost multiplier for specific pool id.
    /// @param _user The user address.
    /// @param _pid The pool id.
    function getBoostMultiplier(address _user, uint256 _pid) public view returns (uint256) {
        uint256 multiplier = userInfo[_pid][_user].boostMultiplier;
        return multiplier > BOOST_PRECISION ? multiplier : BOOST_PRECISION;
    }

    /// @notice Settles, distribute the pending CAKE rewards for given user.
    /// @param _user The user address for settling rewards.
    /// @param _pid The pool id.
    /// @param _boostMultiplier The user boost multiplier in specific pool id.
    function settlePendingCake(address _user, uint256 _pid, uint256 _boostMultiplier) internal {
        UserInfo memory user = userInfo[_pid][_user];

        uint256 boostedAmount = user.amount.mul(_boostMultiplier).div(BOOST_PRECISION);
        uint256 accCake = boostedAmount.mul(poolInfo[_pid].accCakePerShare).div(ACC_CAKE_PRECISION);
        uint256 pending = accCake.sub(user.rewardDebt);
        // SafeTransfer CAKE
        _safeTransfer(_user, pending);
    }

    /// @notice Safe Transfer CAKE.
    /// @param _to The CAKE receiver address.
    /// @param _amount transfer CAKE amounts.
    function _safeTransfer(address _to, uint256 _amount) internal {
        if (_amount > 0) {
            // Check whether MCV2 has enough CAKE. If not, harvest from MCV1.
            if (CAKE.balanceOf(address(this)) < _amount) {
                harvestFromMasterChef();
            }
            uint256 balance = CAKE.balanceOf(address(this));
            if (balance < _amount) {
                _amount = balance;
            }
            CAKE.safeTransfer(_to, _amount);
        }
    }
}
        

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

@openzeppelin/contracts/math/SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

@openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

@openzeppelin/contracts/utils/ReentrancyGuard.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

bsc-library/contracts/IBEP20.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

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

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

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

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

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

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

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

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

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

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

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

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

bsc-library/contracts/SafeBEP20.sol

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

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

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

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

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

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

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

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

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

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

contracts/interfaces/IMasterChef.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

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

    function withdraw(uint256 _pid, uint256 _amount) external;

    function enterStaking(uint256 _amount) external;

    function leaveStaking(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;
}
          

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":"_MASTER_CHEF","internalType":"contract IMasterChef"},{"type":"address","name":"_CAKE","internalType":"contract IBEP20"},{"type":"uint256","name":"_MASTER_PID","internalType":"uint256"},{"type":"address","name":"_burnAdmin","internalType":"address"}]},{"type":"event","name":"AddPool","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"address","name":"lpToken","internalType":"contract IBEP20","indexed":true},{"type":"bool","name":"isRegular","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Init","inputs":[],"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":"SetPool","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateBoostContract","inputs":[{"type":"address","name":"boostContract","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateBoostMultiplier","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":false},{"type":"uint256","name":"oldMultiplier","internalType":"uint256","indexed":false},{"type":"uint256","name":"newMultiplier","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateBurnAdmin","inputs":[{"type":"address","name":"oldAdmin","internalType":"address","indexed":true},{"type":"address","name":"newAdmin","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateCakeRate","inputs":[{"type":"uint256","name":"burnRate","internalType":"uint256","indexed":false},{"type":"uint256","name":"regularFarmRate","internalType":"uint256","indexed":false},{"type":"uint256","name":"specialFarmRate","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdatePool","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256","indexed":false},{"type":"uint256","name":"lpSupply","internalType":"uint256","indexed":false},{"type":"uint256","name":"accCakePerShare","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateWhiteList","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"bool","name":"isValid","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ACC_CAKE_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BOOST_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IBEP20"}],"name":"CAKE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"CAKE_RATE_TOTAL_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MASTERCHEF_CAKE_PER_BLOCK","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMasterChef"}],"name":"MASTER_CHEF","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MASTER_PID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_BOOST_PRECISION","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IBEP20"},{"type":"bool","name":"_isRegular","internalType":"bool"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"boostContract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"burnAdmin","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burnCake","inputs":[{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"cakePerBlock","inputs":[{"type":"bool","name":"_isRegular","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"cakePerBlockToBurn","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cakeRateToBurn","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cakeRateToRegularFarm","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cakeRateToSpecialFarm","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBoostMultiplier","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"harvestFromMasterChef","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"init","inputs":[{"type":"address","name":"dummyToken","internalType":"contract IBEP20"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastBurnedBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IBEP20"}],"name":"lpToken","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingCake","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"accCakePerShare","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"totalBoostedShare","internalType":"uint256"},{"type":"bool","name":"isRegular","internalType":"bool"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"pools","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalRegularAllocPoint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSpecialAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateBoostContract","inputs":[{"type":"address","name":"_newBoostContract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateBoostMultiplier","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_newMultiplier","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateBurnAdmin","inputs":[{"type":"address","name":"_newAdmin","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateCakeRate","inputs":[{"type":"uint256","name":"_burnRate","internalType":"uint256"},{"type":"uint256","name":"_regularFarmRate","internalType":"uint256"},{"type":"uint256","name":"_specialFarmRate","internalType":"uint256"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"tuple","name":"pool","internalType":"struct MasterChefV2.PoolInfo","components":[{"type":"uint256","name":"accCakePerShare","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"totalBoostedShare","internalType":"uint256"},{"type":"bool","name":"isRegular","internalType":"bool"}]}],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateWhiteList","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"bool","name":"_isValid","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"},{"type":"uint256","name":"boostMultiplier","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"whiteList","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
              

Contract Creation Code

0x60e060405264e302875600600a55640106e050f8600b556404cb3d6908600c553480156200002c57600080fd5b5060405162003e6538038062003e658339810160408190526200004f91620000f3565b60006200005b620000ef565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055606093841b6001600160601b03199081166080529290931b90911660a05260c052600280546001600160a01b0319166001600160a01b0390921691909117905562000167565b3390565b6000806000806080858703121562000109578384fd5b845162000116816200014e565b602086015190945062000129816200014e565b60408601516060870151919450925062000143816200014e565b939692955090935050565b6001600160a01b03811681146200016457600080fd5b50565b60805160601c60a05160601c60c051613c9e620001c760003980610f7c528061133552806116925250806112a95280611f7e5280612c0a5280612cdd5280612d8a525080610e955280610f4f5280611308528061278d5250613c9e6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220b15c273fe719276f31d125899dc0d7cd6fa97307cb0d8d7e8881e11f5f124ed764736f6c634300060c0033000000000000000000000000c36afddc739bfd5b89ee899b2cf23bd1a0bfcf46000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae3900000000000000000000000000000000000000000000000000000000000000020000000000000000000000005bd03def68a8e95dc138f8d3484f78bcac8cbe62

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f000000000000000000000000c36afddc739bfd5b89ee899b2cf23bd1a0bfcf469085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c36afddc739bfd5b89ee899b2cf23bd1a0bfcf46169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000002908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae3981565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c36afddc739bfd5b89ee899b2cf23bd1a0bfcf46169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000290600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000281565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae3973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000c36afddc739bfd5b89ee899b2cf23bd1a0bfcf4681565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae3916906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae3916906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000eb3c930c1e0d3434ff917ffd77aa813e7d79ae39168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220b15c273fe719276f31d125899dc0d7cd6fa97307cb0d8d7e8881e11f5f124ed764736f6c634300060c0033