false
true
0

Contract Address Details

0x6349c1526Aa5AB418343f9a4c73b7d850d62895E

Contract Name
MasterChefV2
Creator
0x180f4b–a2ab00 at 0x14302b–1f65d7
Balance
0 tPLS
Tokens
Fetching tokens...
Transactions
1,167 Transactions
Transfers
3,898 Transfers
Gas Used
131,036,764
Last Balance Update
25349691
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.8.19+commit.7dd6d404




Optimization runs
200
EVM Version
default




Verified at
2023-06-11T21:07:46.945959Z

Constructor Arguments

0x000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae000000000000000000000000180f4bd2563b95564c0142e269e70c6a84a2ab00

Arg [0] (address) : 0xa7f2f1b5af8b2ec827b21f225c62cdbf1794ccae
Arg [1] (address) : 0x180f4bd2563b95564c0142e269e70c6a84a2ab00

              

contracts/farm/MasterChefV2.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.12;
pragma experimental ABIEncoderV2;

import "../libraries/SafeMath.sol";
import "../tokens/interfaces/IBEP20.sol";
import "../tokens/SafeBEP20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @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;
    }
}

/// @notice The (older) MasterChef contract gives out a constant number of BBC tokens per block.
/// It is the only address with minting rights for BBC.
/// 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 BBCs
    /// entitled to a user but is pending to be distributed is:
    ///
    ///   pending reward = (user share * pool.accBBCPerShare) - user.rewardDebt
    ///
    ///   Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
    ///   1. The pool's `accBBCPerShare` (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
    ///     BBC rewards each pool gets.
    /// `accBBCPerShare` Accumulated BBCs 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 BBC rewards to all the 9inchSwap products.
    /// `totalBoostedShare` The total amount of user shares in each pool. After considering the share boosts.
    struct PoolInfo {
        uint256 accBBCPerShare;
        uint256 lastRewardBlock;
        uint256 allocPoint;
        uint256 totalBoostedShare;
        bool isRegular;
    }

    /// @notice Address of BBC contract.
    IBEP20 public immutable BBC;

    /// @notice The only address can withdraw all the burn BBC.
    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 

    /// @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 BBCs per block in MCV1
    uint256 public constant MASTERCHEF_BBC_PER_BLOCK = 40 * 1e18;
    uint256 public constant ACC_BBC_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 BBC rate = toBurn + toRegular + toSpecial
    uint256 public constant BBC_RATE_TOTAL_PRECISION = 1e12;
    /// @notice The last block number of BBC burn action being executed.
    /// @notice BBC distribute % for burn
    uint256 public bbcRateToBurn = 643750000000;
    /// @notice BBC distribute % for regular farm pool
    uint256 public bbcRateToRegularFarm = 62847222222;
    /// @notice BBC distribute % for special pools
    uint256 public bbcRateToSpecialFarm = 293402777778;

    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 accBBCPerShare
    );
    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 UpdateBBCRate(
        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 _BBC The BBC token contract address.
    /// @param _burnAdmin The address of burn admin.
    constructor(IBEP20 _BBC, address _burnAdmin) {
        BBC = _BBC;
        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 BBC.
    /// 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 BBC 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 BBC distributions within 9inchSwap products.
    function add(
        uint256 _allocPoint,
        IBEP20 _lpToken,
        bool _isRegular,
        bool _withUpdate
    ) external onlyOwner {
        require(_lpToken.balanceOf(address(this)) >= 0, "None BEP20 tokens");
        // stake BBC token will cause staked token and reward token mixed up,
        // may cause staked tokens withdraw as reward token,never do it.
        require(_lpToken != BBC, "BBC 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,
                accBBCPerShare: 0,
                isRegular: _isRegular,
                totalBoostedShare: 0
            })
        );
        emit AddPool(lpToken.length.sub(1), _allocPoint, _lpToken, _isRegular);
    }

    /// @notice Update the given pool's BBC 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 BBC rewards.
    /// @param _pid The id of the pool. See `poolInfo`.
    /// @param _user Address of the user.
    function pendingBBC(
        uint256 _pid,
        address _user
    ) external view returns (uint256) {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo memory user = userInfo[_pid][_user];
        uint256 accBBCPerShare = pool.accBBCPerShare;
        uint256 lpSupply = pool.totalBoostedShare;

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

            uint256 bbcReward = multiplier
                .mul(bbcPerBlock(pool.isRegular))
                .mul(pool.allocPoint)
                .div(
                    (
                        pool.isRegular
                            ? totalRegularAllocPoint
                            : totalSpecialAllocPoint
                    )
                );
            accBBCPerShare = accBBCPerShare.add(
                bbcReward.mul(ACC_BBC_PRECISION).div(lpSupply)
            );
        }

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

    /// @notice Update bbc 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 BBC per block.
    /// @param _isRegular If the pool belongs to regular or special.
    function bbcPerBlock(
        bool _isRegular
    ) public view returns (uint256 amount) {
        if (_isRegular) {
            amount = MASTERCHEF_BBC_PER_BLOCK.mul(bbcRateToRegularFarm).div(
                BBC_RATE_TOTAL_PRECISION
            );
        } else {
            amount = MASTERCHEF_BBC_PER_BLOCK.mul(bbcRateToSpecialFarm).div(
                BBC_RATE_TOTAL_PRECISION
            );
        }
    }

    /// @notice Calculates and returns the `amount` of BBC per block to burn.
    function bbcPerBlockToBurn() public view returns (uint256 amount) {
        amount = MASTERCHEF_BBC_PER_BLOCK.mul(bbcRateToBurn).div(
            BBC_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 bbcReward = multiplier
                    .mul(bbcPerBlock(pool.isRegular))
                    .mul(pool.allocPoint)
                    .div(totalAllocPoint);
                BBC.mint(bbcReward);
                pool.accBBCPerShare = pool.accBBCPerShare.add(
                    (bbcReward.mul(ACC_BBC_PRECISION).div(lpSupply))
                );
            }
            pool.lastRewardBlock = block.number;
            poolInfo[_pid] = pool;
            emit UpdatePool(
                _pid,
                pool.lastRewardBlock,
                lpSupply,
                pool.accBBCPerShare
            );
        }
    }

    /// @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) {
            settlePendingBBC(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.accBBCPerShare)
            .div(ACC_BBC_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);

        settlePendingBBC(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.accBBCPerShare)
            .div(ACC_BBC_PRECISION);
        poolInfo[_pid].totalBoostedShare = poolInfo[_pid].totalBoostedShare.sub(
            _amount.mul(multiplier).div(BOOST_PRECISION)
        );

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

    /// @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 BBC pending for burn to `burnAdmin`.
    /// @param _withUpdate Whether call "massUpdatePools" operation.
    function burnBBC(bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }

        uint256 multiplier = block.number.sub(lastBurnedBlock);
        uint256 pendingBBCToBurn = multiplier.mul(bbcPerBlockToBurn());

        // SafeTransfer BBC
        _safeTransfer(burnAdmin, pendingBBCToBurn);
        lastBurnedBlock = block.number;
    }

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

        bbcRateToBurn = _burnRate;
        bbcRateToRegularFarm = _regularFarmRate;
        bbcRateToSpecialFarm = _specialFarmRate;

        emit UpdateBBCRate(_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);
        settlePendingBBC(_user, _pid, prevMultiplier);

        user.rewardDebt = user
            .amount
            .mul(_newMultiplier)
            .div(BOOST_PRECISION)
            .mul(pool.accBBCPerShare)
            .div(ACC_BBC_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 BBC 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 settlePendingBBC(
        address _user,
        uint256 _pid,
        uint256 _boostMultiplier
    ) internal {
        UserInfo memory user = userInfo[_pid][_user];

        uint256 boostedAmount = user.amount.mul(_boostMultiplier).div(
            BOOST_PRECISION
        );
        uint256 accBBC = boostedAmount.mul(poolInfo[_pid].accBBCPerShare).div(
            ACC_BBC_PRECISION
        );
        uint256 pending = accBBC.sub(user.rewardDebt);
        // SafeTransfer BBC
        _safeTransfer(_user, pending);
    }

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

    function transferOwnershipOfBBC(address _to) public onlyOwner {
        Ownable(address(BBC)).transferOwnership(_to);
    }
}
        

@openzeppelin/contracts/access/Ownable.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

@openzeppelin/contracts/utils/Context.sol

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

pragma solidity ^0.8.0;

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

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

contracts/libraries/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.6;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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');
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        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);
            }
        }
    }
}
          

contracts/libraries/SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.4.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, 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) {
        return sub(a, b, 'SafeMath: subtraction overflow');
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, 'SafeMath: multiplication overflow');

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, 'SafeMath: division by zero');
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, 'SafeMath: modulo by zero');
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}
          

contracts/tokens/SafeBEP20.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

import './interfaces/IBEP20.sol';
import '../libraries/SafeMath.sol';
import '../libraries/Address.sol';

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

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

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

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

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

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

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

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

contracts/tokens/interfaces/IBEP20.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

interface IBEP20 {
    function mint(uint256 amount) external returns (bool);

    /**
     * @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
    );
}
          

Compiler Settings

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

Contract ABI

[{"type":"constructor","inputs":[{"type":"address","name":"_BBC","internalType":"contract IBEP20"},{"type":"address","name":"_burnAdmin","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ACC_BBC_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IBEP20"}],"name":"BBC","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BBC_RATE_TOTAL_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BOOST_PRECISION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MASTERCHEF_BBC_PER_BLOCK","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":"uint256","name":"amount","internalType":"uint256"}],"name":"bbcPerBlock","inputs":[{"type":"bool","name":"_isRegular","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"bbcPerBlockToBurn","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bbcRateToBurn","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bbcRateToRegularFarm","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bbcRateToSpecialFarm","inputs":[]},{"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":"burnBBC","inputs":[{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"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":"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":"pendingBBC","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"accBBCPerShare","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":"transferOwnershipOfBBC","inputs":[{"type":"address","name":"_to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateBBCRate","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":[],"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":[{"type":"tuple","name":"pool","internalType":"struct MasterChefV2.PoolInfo","components":[{"type":"uint256"},{"type":"uint256"},{"type":"uint256"},{"type":"uint256"},{"type":"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"}]},{"type":"event","name":"AddPool","inputs":[{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"allocPoint","indexed":false},{"type":"address","name":"lpToken","indexed":true},{"type":"bool","name":"isRegular","indexed":false}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"Init","inputs":[],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false},{"type":"event","name":"SetPool","inputs":[{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"allocPoint","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateBBCRate","inputs":[{"type":"uint256","name":"burnRate","indexed":false},{"type":"uint256","name":"regularFarmRate","indexed":false},{"type":"uint256","name":"specialFarmRate","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateBoostContract","inputs":[{"type":"address","name":"boostContract","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateBoostMultiplier","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":false},{"type":"uint256","name":"oldMultiplier","indexed":false},{"type":"uint256","name":"newMultiplier","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateBurnAdmin","inputs":[{"type":"address","name":"oldAdmin","indexed":true},{"type":"address","name":"newAdmin","indexed":true}],"anonymous":false},{"type":"event","name":"UpdatePool","inputs":[{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"lastRewardBlock","indexed":false},{"type":"uint256","name":"lpSupply","indexed":false},{"type":"uint256","name":"accBBCPerShare","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateWhiteList","inputs":[{"type":"address","name":"user","indexed":true},{"type":"bool","name":"isValid","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false}]
              

Contract Creation Code

0x60a06040526495e27d7580600a55640ea1fc81ce600b556444502b18b2600c553480156200002c57600080fd5b5060405162002c8e38038062002c8e8339810160408190526200004f91620000f0565b6200005a3362000087565b600180556001600160a01b03918216608052600280546001600160a01b031916919092161790556200012f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000ed57600080fd5b50565b600080604083850312156200010457600080fd5b82516200011181620000d7565b60208401519092506200012481620000d7565b809150509250929050565b608051612b206200016e600039600081816103fd01528181610f3b01528181611579015281816118a20152818161238d015261241b0152612b206000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c806372c58f46116101465780639dd2fcc3116100c3578063c507aeaa11610087578063c507aeaa14610584578063cc6db2da14610437578063ddaf5c4c14610597578063dfcedeee146105aa578063e2bbb158146105bd578063f2fde38b146105d057600080fd5b80639dd2fcc31461053d578063a7b4c99414610550578063ac1d06091461055f578063ae1871b314610572578063c40d337b1461057b57600080fd5b80638da5cb5b1161010a5780638da5cb5b146104b557806393f1a40b146104c6578063943efdb11461051b57806399d7e84a146105245780639c8ca64c1461052d57600080fd5b806372c58f461461046b578063767af51a1461047e57806378db4c341461048657806378ed5d1f1461048f57806381bdf98c146104a257600080fd5b806351eb05a6116101d4578063662d6d7611610198578063662d6d76146103f857806368a9c68d1461043757806369b02128146104435780636cf11afe14610450578063715018a61461046357600080fd5b806351eb05a6146103605780635312ea8e146103b757806362648a58146103ca578063630b5ba1146103dd57806364482f79146103e557600080fd5b806319ab453c1161021b57806319ab453c146102eb57806321ef632d146102fe578063372c12b11461030757806338b4d1b31461033a578063441a3e701461034d57600080fd5b8063033186e814610258578063041a84c91461027e578063081e3eda146102935780630bb844bc1461029b5780631526fe27146102ae575b600080fd5b61026b610266366004612762565b6105e3565b6040519081526020015b60405180910390f35b61029161028c36600461278e565b61062c565b005b60045461026b565b6102916102a93660046127c3565b6109e9565b6102c16102bc3660046127e0565b610b3e565b6040805195865260208601949094529284019190915260608301521515608082015260a001610275565b6102916102f93660046127c3565b610b82565b61026b600b5481565b61032a6103153660046127c3565b60076020526000908152604090205460ff1681565b6040519015158152602001610275565b61026b610348366004612807565b610bba565b61029161035b366004612824565b610c15565b61037361036e3660046127e0565b610e0e565b6040516102759190600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b6102916103c53660046127e0565b611091565b6102916103d8366004612807565b61119d565b610291611202565b6102916103f3366004612846565b61129e565b61041f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610275565b61026b64e8d4a5100081565b61026b6501d1a94a200081565b61029161045e36600461287f565b6113db565b61029161153e565b6102916104793660046127c3565b611552565b61026b6115d8565b61026b600d5481565b61041f61049d3660046127e0565b611606565b60025461041f906001600160a01b031681565b6000546001600160a01b031661041f565b6105006104d43660046128c0565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610275565b61026b600a5481565b61026b60095481565b61026b68022b1c8c1227a0000081565b61029161054b3660046127c3565b611630565b61026b670de0b6b3a764000081565b61029161056d3660046128f0565b611713565b61026b600c5481565b61026b60085481565b61029161059236600461291e565b6117eb565b61026b6105a53660046128c0565b611b08565b60035461041f906001600160a01b031681565b6102916105cb366004612824565b611c92565b6102916105de3660046127c3565b611ffb565b60008181526006602090815260408083206001600160a01b038616845290915281206002015464e8d4a5100081116106205764e8d4a51000610622565b805b9150505b92915050565b6003546001600160a01b0316331461069d5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b60648201526084015b60405180910390fd5b6002600154036106bf5760405162461bcd60e51b815260040161069490612966565b60026001556001600160a01b03831661072f5760405162461bcd60e51b815260206004820152602c60248201527f4d61737465724368656656323a2054686520757365722061646472657373206d60448201526b1d5cdd081899481d985b1a5960a21b6064820152608401610694565b600482815481106107425761074261299d565b600091825260209091206004600590920201015460ff166107be5760405162461bcd60e51b815260206004820152603060248201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060448201526f18dbdd5b1908189948189bdbdcdd195960821b6064820152608401610694565b64e8d4a5100081101580156107d957506501d1a94a20008111155b6108385760405162461bcd60e51b815260206004820152602a60248201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060448201526936bab63a34b83634b2b960b11b6064820152608401610694565b600061084383610e0e565b60008481526006602090815260408083206001600160a01b0389168452909152812091925061087286866105e3565b905061087f868683612074565b6108bf670de0b6b3a76400006108b385600001516108b964e8d4a510006108b38a896000015461214190919063ffffffff16565b906121c3565b90612141565b6001830155815461090b906108df9064e8d4a51000906108b39088612141565b8354610905906108fa9064e8d4a51000906108b39087612141565b60608701519061220c565b9061224e565b606084015260048054849190879081106109275761092761299d565b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608087015160038601556080909601516004909401805460ff191694151594909417909355898452600682528084206001600160a01b038c1680865290835293819020909201889055815189815290810185905290810187905290917f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba910160405180910390a250506001805550505050565b6109f16122ad565b6001600160a01b038116610a5e5760405162461bcd60e51b815260206004820152602e60248201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360448201526d081b5d5cdd081899481d985b1a5960921b6064820152608401610694565b6002546001600160a01b0390811690821603610aec5760405162461bcd60e51b815260206004820152604160248201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360448201527f206973207468652073616d6520776974682063757272656e74206164647265736064820152607360f81b608482015260a401610694565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b60048181548110610b4e57600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610b8a6122ad565b43600d556040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a150565b60008115610be95761062664e8d4a510006108b3600b5468022b1c8c1227a0000061214190919063ffffffff16565b61062664e8d4a510006108b3600c5468022b1c8c1227a0000061214190919063ffffffff16565b919050565b600260015403610c375760405162461bcd60e51b815260040161069490612966565b60026001556000610c4783610e0e565b60008481526006602090815260408083203384529091529020805491925090831115610cae5760405162461bcd60e51b81526020600482015260166024820152751dda5d1a191c985dce88125b9cdd59999a58da595b9d60521b6044820152606401610694565b6000610cba33866105e3565b9050610cc7338683612074565b8315610d15578154610cd9908561220c565b8260000181905550610d15338560058881548110610cf957610cf961299d565b6000918252602090912001546001600160a01b03169190612307565b610d49670de0b6b3a76400006108b385600001516108b964e8d4a510006108b387896000015461214190919063ffffffff16565b6001830155610d97610d6464e8d4a510006108b38785612141565b60048781548110610d7757610d7761299d565b90600052602060002090600502016003015461220c90919063ffffffff16565b60048681548110610daa57610daa61299d565b90600052602060002090600502016003018190555084336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56886604051610dfb91815260200190565b60405180910390a3505060018055505050565b610e426040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60048281548110610e5557610e5561299d565b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff16151560808201529150431115610c105760608101516080820151600090610ec757600954610ecb565b6008545b9050600082118015610edd5750600081115b15610fd7576000610efb84602001514361220c90919063ffffffff16565b90506000610f22836108b387604001516108b9610f1b8a60800151610bba565b8790612141565b60405163140e25ad60e31b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a0712d68906024016020604051808303816000875af1158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb091906129b3565b50610fd2610fca856108b384670de0b6b3a7640000612141565b86519061224e565b855250505b4360208401526004805484919086908110610ff457610ff461299d565b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608085015160038401556080909401516004909201805460ff19169215159290921790915585820151865182519182529281018690529081019190915285917f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46910160405180910390a25050919050565b6002600154036110b35760405162461bcd60e51b815260040161069490612966565b60026001819055506000600482815481106110d0576110d061299d565b6000918252602080832085845260068252604080852033808752935284208054858255600182018690556005909402909101945092906111269064e8d4a51000906108b39061111f90896105e3565b8590612141565b90508084600301541161113a576000611149565b6003840154611149908261220c565b8460030181905550611169338360058881548110610cf957610cf961299d565b604051828152859033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059590602001610dfb565b6111a56122ad565b80156111b3576111b3611202565b60006111ca600d544361220c90919063ffffffff16565b905060006111e06111d96115d8565b8390612141565b6002549091506111f9906001600160a01b03168261236f565b505043600d5550565b60045460005b8181101561129a576000600482815481106112255761122561299d565b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff16151560808201529150156112895761128782610e0e565b505b50611293816129e6565b9050611208565b5050565b6112a66122ad565b6112af83610e0e565b5080156112be576112be611202565b600483815481106112d1576112d161299d565b600091825260209091206004600590920201015460ff16156113325761132a82610905600486815481106113075761130761299d565b90600052602060002090600502016002015460085461220c90919063ffffffff16565b600855611373565b61136f826109056004868154811061134c5761134c61299d565b90600052602060002090600502016002015460095461220c90919063ffffffff16565b6009555b81600484815481106113875761138761299d565b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516113ce91815260200190565b60405180910390a2505050565b6113e36122ad565b6000841180156113f35750600083115b80156113ff5750600082115b6114615760405162461bcd60e51b815260206004820152602d60248201527f4d61737465724368656656323a204242432072617465206d757374206265206760448201526c0726561746572207468616e203609c1b6064820152608401610694565b64e8d4a5100061147583610905878761224e565b146114d05760405162461bcd60e51b815260206004820152602560248201527f4d61737465724368656656323a20546f74616c2072617465206d7573742062656044820152641018b2989960d91b6064820152608401610694565b80156114de576114de611202565b6114e8600061119d565b600a849055600b839055600c82905560408051858152602081018590529081018390527f39553c5b0dbe76e52b3370d675429e32b8140f6c8c509daef867598c537a31f79060600160405180910390a150505050565b6115466122ad565b6115506000612442565b565b61155a6122ad565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156115bd57600080fd5b505af11580156115d1573d6000803e3d6000fd5b5050505050565b600061160164e8d4a510006108b3600a5468022b1c8c1227a0000061214190919063ffffffff16565b905090565b6005818154811061161657600080fd5b6000918252602090912001546001600160a01b0316905081565b6116386122ad565b6001600160a01b0381161580159061165e57506003546001600160a01b03828116911614155b6116c95760405162461bcd60e51b815260206004820152603660248201527f4d61737465724368656656323a204e657720626f6f737420636f6e7472616374604482015275081859191c995cdcc81b5d5cdd081899481d985b1a5960521b6064820152608401610694565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b61171b6122ad565b6001600160a01b03821661178c5760405162461bcd60e51b815260206004820152603260248201527f4d61737465724368656656323a20546865207768697465206c697374206164646044820152711c995cdcc81b5d5cdd081899481d985b1a5960721b6064820152608401610694565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d51910160405180910390a25050565b6117f36122ad565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561183a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185e91906129ff565b10156118a05760405162461bcd60e51b81526020600482015260116024820152704e6f6e6520424550323020746f6b656e7360781b6044820152606401610694565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316036119305760405162461bcd60e51b815260206004820152602660248201527f42424320746f6b656e2063616e277420626520616464656420746f206661726d60448201526520706f6f6c7360d01b6064820152608401610694565b801561193e5761193e611202565b811561195957600854611951908561224e565b60085561196a565b600954611966908561224e565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180546001600160a01b0319166001600160a01b0387169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f909101805460ff19169115159190911790559154611ac89161220c565b6040805187815285151560208201527f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa910160405180910390a350505050565b60008060048481548110611b1e57611b1e61299d565b600091825260208083206040805160a081018252600590940290910180548452600180820154858501908152600280840154878601526003840154606080890191825260049095015460ff16151560808901528c8952600687528589206001600160a01b038d168a528752978590208551948501865280548552928301549584019590955293015491810191909152825193519151929450929143118015611bc557508015155b15611c3e576000611be385602001514361220c90919063ffffffff16565b90506000611c178660800151611bfb57600954611bff565b6008545b6108b388604001516108b9610f1b8b60800151610bba565b9050611c39611c32846108b384670de0b6b3a7640000612141565b859061224e565b935050505b6000611c5e64e8d4a510006108b3611c568a8c6105e3565b875190612141565b6020850151909150611c8690611c80670de0b6b3a76400006108b38588612141565b9061220c565b98975050505050505050565b600260015403611cb45760405162461bcd60e51b815260040161069490612966565b60026001556000611cc483610e0e565b6000848152600660209081526040808320338452909152902060808201519192509080611d0057503360009081526007602052604090205460ff165b611d7d5760405162461bcd60e51b815260206004820152604260248201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460448201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f6064820152611bdb60f21b608482015260a401610694565b6000611d8933866105e3565b825490915015611d9e57611d9e338683612074565b8315611f2b57600060058681548110611db957611db961299d565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2e91906129ff565b9050611e6633308760058a81548110611e4957611e4961299d565b6000918252602090912001546001600160a01b0316929190612492565b611ef28160058881548110611e7d57611e7d61299d565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8091906129ff565b8354909550611f01908661224e565b8355611f24611f1964e8d4a510006108b38886612141565b60608601519061224e565b6060850152505b611f5f670de0b6b3a76400006108b385600001516108b964e8d4a510006108b387896000015461214190919063ffffffff16565b82600101819055508260048681548110611f7b57611f7b61299d565b60009182526020918290208351600592909202019081558282015160018201556040808401516002830155606084015160038301556080909301516004909101805460ff19169115159190911790559051858152869133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159101610dfb565b6120036122ad565b6001600160a01b0381166120685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610694565b61207181612442565b50565b60008281526006602090815260408083206001600160a01b03871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906120d39064e8d4a51000906108b39086612141565b90506000612111670de0b6b3a76400006108b3600488815481106120f9576120f961299d565b60009182526020909120600590910201548590612141565b9050600061212c84602001518361220c90919063ffffffff16565b9050612138878261236f565b50505050505050565b60008260000361215357506000610626565b600061215f8385612a18565b90508261216c8583612a2f565b146106205760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610694565b600061220583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124d0565b9392505050565b600061220583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612507565b60008061225b8385612a51565b9050838110156106205760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610694565b6000546001600160a01b031633146115505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610694565b6040516001600160a01b03831660248201526044810182905261236a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612538565b505050565b801561129a576040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156123dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240091906129ff565b90508181101561240e578091505b61236a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168484612307565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526124ca9085906323b872dd60e01b90608401612333565b50505050565b600081836124f15760405162461bcd60e51b81526004016106949190612a88565b5060006124fe8486612a2f565b95945050505050565b6000818484111561252b5760405162461bcd60e51b81526004016106949190612a88565b5060006124fe8486612abb565b600061258d826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661260a9092919063ffffffff16565b80519091501561236a57808060200190518101906125ab91906129b3565b61236a5760405162461bcd60e51b815260206004820152602a60248201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610694565b60606126198484600085612621565b949350505050565b606061262c85612714565b6126785760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610694565b600080866001600160a01b031685876040516126949190612ace565b60006040518083038185875af1925050503d80600081146126d1576040519150601f19603f3d011682016040523d82523d6000602084013e6126d6565b606091505b509150915081156126ea5791506126199050565b8051156126fa5780518082602001fd5b8360405162461bcd60e51b81526004016106949190612a88565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612619575050151592915050565b6001600160a01b038116811461207157600080fd5b6000806040838503121561277557600080fd5b82356127808161274d565b946020939093013593505050565b6000806000606084860312156127a357600080fd5b83356127ae8161274d565b95602085013595506040909401359392505050565b6000602082840312156127d557600080fd5b81356106208161274d565b6000602082840312156127f257600080fd5b5035919050565b801515811461207157600080fd5b60006020828403121561281957600080fd5b8135610620816127f9565b6000806040838503121561283757600080fd5b50508035926020909101359150565b60008060006060848603121561285b57600080fd5b83359250602084013591506040840135612874816127f9565b809150509250925092565b6000806000806080858703121561289557600080fd5b84359350602085013592506040850135915060608501356128b5816127f9565b939692955090935050565b600080604083850312156128d357600080fd5b8235915060208301356128e58161274d565b809150509250929050565b6000806040838503121561290357600080fd5b823561290e8161274d565b915060208301356128e5816127f9565b6000806000806080858703121561293457600080fd5b8435935060208501356129468161274d565b92506040850135612956816127f9565b915060608501356128b5816127f9565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156129c557600080fd5b8151610620816127f9565b634e487b7160e01b600052601160045260246000fd5b6000600182016129f8576129f86129d0565b5060010190565b600060208284031215612a1157600080fd5b5051919050565b8082028115828204841417610626576106266129d0565b600082612a4c57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610626576106266129d0565b60005b83811015612a7f578181015183820152602001612a67565b50506000910152565b6020815260008251806020840152612aa7816040850160208701612a64565b601f01601f19169190910160400192915050565b81810381811115610626576106266129d0565b60008251612ae0818460208701612a64565b919091019291505056fea26469706673582212208888d91caefbc17add43ed8decf511b720f73e1117464ba24e6cd0d4bd9115d664736f6c63430008130033000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae000000000000000000000000180f4bd2563b95564c0142e269e70c6a84a2ab00

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106102535760003560e01c806372c58f46116101465780639dd2fcc3116100c3578063c507aeaa11610087578063c507aeaa14610584578063cc6db2da14610437578063ddaf5c4c14610597578063dfcedeee146105aa578063e2bbb158146105bd578063f2fde38b146105d057600080fd5b80639dd2fcc31461053d578063a7b4c99414610550578063ac1d06091461055f578063ae1871b314610572578063c40d337b1461057b57600080fd5b80638da5cb5b1161010a5780638da5cb5b146104b557806393f1a40b146104c6578063943efdb11461051b57806399d7e84a146105245780639c8ca64c1461052d57600080fd5b806372c58f461461046b578063767af51a1461047e57806378db4c341461048657806378ed5d1f1461048f57806381bdf98c146104a257600080fd5b806351eb05a6116101d4578063662d6d7611610198578063662d6d76146103f857806368a9c68d1461043757806369b02128146104435780636cf11afe14610450578063715018a61461046357600080fd5b806351eb05a6146103605780635312ea8e146103b757806362648a58146103ca578063630b5ba1146103dd57806364482f79146103e557600080fd5b806319ab453c1161021b57806319ab453c146102eb57806321ef632d146102fe578063372c12b11461030757806338b4d1b31461033a578063441a3e701461034d57600080fd5b8063033186e814610258578063041a84c91461027e578063081e3eda146102935780630bb844bc1461029b5780631526fe27146102ae575b600080fd5b61026b610266366004612762565b6105e3565b6040519081526020015b60405180910390f35b61029161028c36600461278e565b61062c565b005b60045461026b565b6102916102a93660046127c3565b6109e9565b6102c16102bc3660046127e0565b610b3e565b6040805195865260208601949094529284019190915260608301521515608082015260a001610275565b6102916102f93660046127c3565b610b82565b61026b600b5481565b61032a6103153660046127c3565b60076020526000908152604090205460ff1681565b6040519015158152602001610275565b61026b610348366004612807565b610bba565b61029161035b366004612824565b610c15565b61037361036e3660046127e0565b610e0e565b6040516102759190600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b6102916103c53660046127e0565b611091565b6102916103d8366004612807565b61119d565b610291611202565b6102916103f3366004612846565b61129e565b61041f7f000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae81565b6040516001600160a01b039091168152602001610275565b61026b64e8d4a5100081565b61026b6501d1a94a200081565b61029161045e36600461287f565b6113db565b61029161153e565b6102916104793660046127c3565b611552565b61026b6115d8565b61026b600d5481565b61041f61049d3660046127e0565b611606565b60025461041f906001600160a01b031681565b6000546001600160a01b031661041f565b6105006104d43660046128c0565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610275565b61026b600a5481565b61026b60095481565b61026b68022b1c8c1227a0000081565b61029161054b3660046127c3565b611630565b61026b670de0b6b3a764000081565b61029161056d3660046128f0565b611713565b61026b600c5481565b61026b60085481565b61029161059236600461291e565b6117eb565b61026b6105a53660046128c0565b611b08565b60035461041f906001600160a01b031681565b6102916105cb366004612824565b611c92565b6102916105de3660046127c3565b611ffb565b60008181526006602090815260408083206001600160a01b038616845290915281206002015464e8d4a5100081116106205764e8d4a51000610622565b805b9150505b92915050565b6003546001600160a01b0316331461069d5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b60648201526084015b60405180910390fd5b6002600154036106bf5760405162461bcd60e51b815260040161069490612966565b60026001556001600160a01b03831661072f5760405162461bcd60e51b815260206004820152602c60248201527f4d61737465724368656656323a2054686520757365722061646472657373206d60448201526b1d5cdd081899481d985b1a5960a21b6064820152608401610694565b600482815481106107425761074261299d565b600091825260209091206004600590920201015460ff166107be5760405162461bcd60e51b815260206004820152603060248201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060448201526f18dbdd5b1908189948189bdbdcdd195960821b6064820152608401610694565b64e8d4a5100081101580156107d957506501d1a94a20008111155b6108385760405162461bcd60e51b815260206004820152602a60248201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060448201526936bab63a34b83634b2b960b11b6064820152608401610694565b600061084383610e0e565b60008481526006602090815260408083206001600160a01b0389168452909152812091925061087286866105e3565b905061087f868683612074565b6108bf670de0b6b3a76400006108b385600001516108b964e8d4a510006108b38a896000015461214190919063ffffffff16565b906121c3565b90612141565b6001830155815461090b906108df9064e8d4a51000906108b39088612141565b8354610905906108fa9064e8d4a51000906108b39087612141565b60608701519061220c565b9061224e565b606084015260048054849190879081106109275761092761299d565b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608087015160038601556080909601516004909401805460ff191694151594909417909355898452600682528084206001600160a01b038c1680865290835293819020909201889055815189815290810185905290810187905290917f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba910160405180910390a250506001805550505050565b6109f16122ad565b6001600160a01b038116610a5e5760405162461bcd60e51b815260206004820152602e60248201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360448201526d081b5d5cdd081899481d985b1a5960921b6064820152608401610694565b6002546001600160a01b0390811690821603610aec5760405162461bcd60e51b815260206004820152604160248201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360448201527f206973207468652073616d6520776974682063757272656e74206164647265736064820152607360f81b608482015260a401610694565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b60048181548110610b4e57600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610b8a6122ad565b43600d556040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a150565b60008115610be95761062664e8d4a510006108b3600b5468022b1c8c1227a0000061214190919063ffffffff16565b61062664e8d4a510006108b3600c5468022b1c8c1227a0000061214190919063ffffffff16565b919050565b600260015403610c375760405162461bcd60e51b815260040161069490612966565b60026001556000610c4783610e0e565b60008481526006602090815260408083203384529091529020805491925090831115610cae5760405162461bcd60e51b81526020600482015260166024820152751dda5d1a191c985dce88125b9cdd59999a58da595b9d60521b6044820152606401610694565b6000610cba33866105e3565b9050610cc7338683612074565b8315610d15578154610cd9908561220c565b8260000181905550610d15338560058881548110610cf957610cf961299d565b6000918252602090912001546001600160a01b03169190612307565b610d49670de0b6b3a76400006108b385600001516108b964e8d4a510006108b387896000015461214190919063ffffffff16565b6001830155610d97610d6464e8d4a510006108b38785612141565b60048781548110610d7757610d7761299d565b90600052602060002090600502016003015461220c90919063ffffffff16565b60048681548110610daa57610daa61299d565b90600052602060002090600502016003018190555084336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56886604051610dfb91815260200190565b60405180910390a3505060018055505050565b610e426040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60048281548110610e5557610e5561299d565b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff16151560808201529150431115610c105760608101516080820151600090610ec757600954610ecb565b6008545b9050600082118015610edd5750600081115b15610fd7576000610efb84602001514361220c90919063ffffffff16565b90506000610f22836108b387604001516108b9610f1b8a60800151610bba565b8790612141565b60405163140e25ad60e31b8152600481018290529091507f000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae6001600160a01b03169063a0712d68906024016020604051808303816000875af1158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb091906129b3565b50610fd2610fca856108b384670de0b6b3a7640000612141565b86519061224e565b855250505b4360208401526004805484919086908110610ff457610ff461299d565b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608085015160038401556080909401516004909201805460ff19169215159290921790915585820151865182519182529281018690529081019190915285917f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46910160405180910390a25050919050565b6002600154036110b35760405162461bcd60e51b815260040161069490612966565b60026001819055506000600482815481106110d0576110d061299d565b6000918252602080832085845260068252604080852033808752935284208054858255600182018690556005909402909101945092906111269064e8d4a51000906108b39061111f90896105e3565b8590612141565b90508084600301541161113a576000611149565b6003840154611149908261220c565b8460030181905550611169338360058881548110610cf957610cf961299d565b604051828152859033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059590602001610dfb565b6111a56122ad565b80156111b3576111b3611202565b60006111ca600d544361220c90919063ffffffff16565b905060006111e06111d96115d8565b8390612141565b6002549091506111f9906001600160a01b03168261236f565b505043600d5550565b60045460005b8181101561129a576000600482815481106112255761122561299d565b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff16151560808201529150156112895761128782610e0e565b505b50611293816129e6565b9050611208565b5050565b6112a66122ad565b6112af83610e0e565b5080156112be576112be611202565b600483815481106112d1576112d161299d565b600091825260209091206004600590920201015460ff16156113325761132a82610905600486815481106113075761130761299d565b90600052602060002090600502016002015460085461220c90919063ffffffff16565b600855611373565b61136f826109056004868154811061134c5761134c61299d565b90600052602060002090600502016002015460095461220c90919063ffffffff16565b6009555b81600484815481106113875761138761299d565b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516113ce91815260200190565b60405180910390a2505050565b6113e36122ad565b6000841180156113f35750600083115b80156113ff5750600082115b6114615760405162461bcd60e51b815260206004820152602d60248201527f4d61737465724368656656323a204242432072617465206d757374206265206760448201526c0726561746572207468616e203609c1b6064820152608401610694565b64e8d4a5100061147583610905878761224e565b146114d05760405162461bcd60e51b815260206004820152602560248201527f4d61737465724368656656323a20546f74616c2072617465206d7573742062656044820152641018b2989960d91b6064820152608401610694565b80156114de576114de611202565b6114e8600061119d565b600a849055600b839055600c82905560408051858152602081018590529081018390527f39553c5b0dbe76e52b3370d675429e32b8140f6c8c509daef867598c537a31f79060600160405180910390a150505050565b6115466122ad565b6115506000612442565b565b61155a6122ad565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae169063f2fde38b90602401600060405180830381600087803b1580156115bd57600080fd5b505af11580156115d1573d6000803e3d6000fd5b5050505050565b600061160164e8d4a510006108b3600a5468022b1c8c1227a0000061214190919063ffffffff16565b905090565b6005818154811061161657600080fd5b6000918252602090912001546001600160a01b0316905081565b6116386122ad565b6001600160a01b0381161580159061165e57506003546001600160a01b03828116911614155b6116c95760405162461bcd60e51b815260206004820152603660248201527f4d61737465724368656656323a204e657720626f6f737420636f6e7472616374604482015275081859191c995cdcc81b5d5cdd081899481d985b1a5960521b6064820152608401610694565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b61171b6122ad565b6001600160a01b03821661178c5760405162461bcd60e51b815260206004820152603260248201527f4d61737465724368656656323a20546865207768697465206c697374206164646044820152711c995cdcc81b5d5cdd081899481d985b1a5960721b6064820152608401610694565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d51910160405180910390a25050565b6117f36122ad565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561183a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185e91906129ff565b10156118a05760405162461bcd60e51b81526020600482015260116024820152704e6f6e6520424550323020746f6b656e7360781b6044820152606401610694565b7f000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae6001600160a01b0316836001600160a01b0316036119305760405162461bcd60e51b815260206004820152602660248201527f42424320746f6b656e2063616e277420626520616464656420746f206661726d60448201526520706f6f6c7360d01b6064820152608401610694565b801561193e5761193e611202565b811561195957600854611951908561224e565b60085561196a565b600954611966908561224e565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180546001600160a01b0319166001600160a01b0387169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f909101805460ff19169115159190911790559154611ac89161220c565b6040805187815285151560208201527f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa910160405180910390a350505050565b60008060048481548110611b1e57611b1e61299d565b600091825260208083206040805160a081018252600590940290910180548452600180820154858501908152600280840154878601526003840154606080890191825260049095015460ff16151560808901528c8952600687528589206001600160a01b038d168a528752978590208551948501865280548552928301549584019590955293015491810191909152825193519151929450929143118015611bc557508015155b15611c3e576000611be385602001514361220c90919063ffffffff16565b90506000611c178660800151611bfb57600954611bff565b6008545b6108b388604001516108b9610f1b8b60800151610bba565b9050611c39611c32846108b384670de0b6b3a7640000612141565b859061224e565b935050505b6000611c5e64e8d4a510006108b3611c568a8c6105e3565b875190612141565b6020850151909150611c8690611c80670de0b6b3a76400006108b38588612141565b9061220c565b98975050505050505050565b600260015403611cb45760405162461bcd60e51b815260040161069490612966565b60026001556000611cc483610e0e565b6000848152600660209081526040808320338452909152902060808201519192509080611d0057503360009081526007602052604090205460ff165b611d7d5760405162461bcd60e51b815260206004820152604260248201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460448201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f6064820152611bdb60f21b608482015260a401610694565b6000611d8933866105e3565b825490915015611d9e57611d9e338683612074565b8315611f2b57600060058681548110611db957611db961299d565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2e91906129ff565b9050611e6633308760058a81548110611e4957611e4961299d565b6000918252602090912001546001600160a01b0316929190612492565b611ef28160058881548110611e7d57611e7d61299d565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8091906129ff565b8354909550611f01908661224e565b8355611f24611f1964e8d4a510006108b38886612141565b60608601519061224e565b6060850152505b611f5f670de0b6b3a76400006108b385600001516108b964e8d4a510006108b387896000015461214190919063ffffffff16565b82600101819055508260048681548110611f7b57611f7b61299d565b60009182526020918290208351600592909202019081558282015160018201556040808401516002830155606084015160038301556080909301516004909101805460ff19169115159190911790559051858152869133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159101610dfb565b6120036122ad565b6001600160a01b0381166120685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610694565b61207181612442565b50565b60008281526006602090815260408083206001600160a01b03871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906120d39064e8d4a51000906108b39086612141565b90506000612111670de0b6b3a76400006108b3600488815481106120f9576120f961299d565b60009182526020909120600590910201548590612141565b9050600061212c84602001518361220c90919063ffffffff16565b9050612138878261236f565b50505050505050565b60008260000361215357506000610626565b600061215f8385612a18565b90508261216c8583612a2f565b146106205760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610694565b600061220583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124d0565b9392505050565b600061220583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612507565b60008061225b8385612a51565b9050838110156106205760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610694565b6000546001600160a01b031633146115505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610694565b6040516001600160a01b03831660248201526044810182905261236a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612538565b505050565b801561129a576040516370a0823160e01b81523060048201526000907f000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae6001600160a01b0316906370a0823190602401602060405180830381865afa1580156123dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240091906129ff565b90508181101561240e578091505b61236a6001600160a01b037f000000000000000000000000a7f2f1b5af8b2ec827b21f225c62cdbf1794ccae168484612307565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526124ca9085906323b872dd60e01b90608401612333565b50505050565b600081836124f15760405162461bcd60e51b81526004016106949190612a88565b5060006124fe8486612a2f565b95945050505050565b6000818484111561252b5760405162461bcd60e51b81526004016106949190612a88565b5060006124fe8486612abb565b600061258d826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661260a9092919063ffffffff16565b80519091501561236a57808060200190518101906125ab91906129b3565b61236a5760405162461bcd60e51b815260206004820152602a60248201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610694565b60606126198484600085612621565b949350505050565b606061262c85612714565b6126785760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610694565b600080866001600160a01b031685876040516126949190612ace565b60006040518083038185875af1925050503d80600081146126d1576040519150601f19603f3d011682016040523d82523d6000602084013e6126d6565b606091505b509150915081156126ea5791506126199050565b8051156126fa5780518082602001fd5b8360405162461bcd60e51b81526004016106949190612a88565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612619575050151592915050565b6001600160a01b038116811461207157600080fd5b6000806040838503121561277557600080fd5b82356127808161274d565b946020939093013593505050565b6000806000606084860312156127a357600080fd5b83356127ae8161274d565b95602085013595506040909401359392505050565b6000602082840312156127d557600080fd5b81356106208161274d565b6000602082840312156127f257600080fd5b5035919050565b801515811461207157600080fd5b60006020828403121561281957600080fd5b8135610620816127f9565b6000806040838503121561283757600080fd5b50508035926020909101359150565b60008060006060848603121561285b57600080fd5b83359250602084013591506040840135612874816127f9565b809150509250925092565b6000806000806080858703121561289557600080fd5b84359350602085013592506040850135915060608501356128b5816127f9565b939692955090935050565b600080604083850312156128d357600080fd5b8235915060208301356128e58161274d565b809150509250929050565b6000806040838503121561290357600080fd5b823561290e8161274d565b915060208301356128e5816127f9565b6000806000806080858703121561293457600080fd5b8435935060208501356129468161274d565b92506040850135612956816127f9565b915060608501356128b5816127f9565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156129c557600080fd5b8151610620816127f9565b634e487b7160e01b600052601160045260246000fd5b6000600182016129f8576129f86129d0565b5060010190565b600060208284031215612a1157600080fd5b5051919050565b8082028115828204841417610626576106266129d0565b600082612a4c57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610626576106266129d0565b60005b83811015612a7f578181015183820152602001612a67565b50506000910152565b6020815260008251806020840152612aa7816040850160208701612a64565b601f01601f19169190910160400192915050565b81810381811115610626576106266129d0565b60008251612ae0818460208701612a64565b919091019291505056fea26469706673582212208888d91caefbc17add43ed8decf511b720f73e1117464ba24e6cd0d4bd9115d664736f6c63430008130033