Address Details
contract

0x7c767c28381d29e964350d27f50544b6FBBad338

Contract Name
MasterChef
Creator
0x7d6740–c9cfce at 0x7f1590–fde18e
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
8803496
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
MasterChef




Optimization enabled
true
Compiler version
v0.8.10+commit.fc410830




Optimization runs
200
EVM Version
london




Verified at
2023-03-21T20:52:50.540654Z

contracts/StarFarm.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "./IStarNode.sol";

interface INFTLogic {
    function starMeta(uint256 _tokenId) view external returns (uint8, uint256, uint256, uint256);
}

// import "@nomiclabs/buidler/console.sol";
interface IMigratorChef {
    function migrate(IERC20Upgradeable token) external returns (IERC20Upgradeable);
}

// MasterChef is the master of Star. He can make Star and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once STAR is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract MasterChef is Initializable, OwnableUpgradeable {
    using SafeMathUpgradeable for uint256;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    // Info of each user.
    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        uint256 lastDeposit;
        uint256 nftAmount;
        uint256 nftRewardDebt;
        uint256 nftLastDeposit;
        //
        // We do some fancy math here. Basically, any point in time, the amount of STARs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accStarPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accStarPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }
	
    // Info of each pool.
    struct PoolInfo {
        IERC20Upgradeable lpToken;  // Address of LP token contract.
        uint256 allocPoint;         // How many allocation points assigned to this pool. STARs to distribute per block.
        uint256 lastRewardBlock;    // Last block number that STARs distribution occurs.
        uint256 accStarPerShare;    // Accumulated STARs per share, times 1e12. See below.
        uint256 extraAmount;        // Extra amount of token. users from node or NFT.
        uint256 fee;
    }

    // The STAR TOKEN!
    IERC20Upgradeable public starToken;
    // Star node.
    IStarNode public starNode;
    // Dev address.
    address public bonusAddr;
    // Star NFT.
    IERC721Upgradeable public starNFT;
    // NFT logic
    INFTLogic public nftLogic;
    // STAR tokens created per block.
    uint256 public starPerBlock;
    // Bonus muliplier for early star makers.
    uint256 public BONUS_MULTIPLIER;
    // The migrator contract. It has a lot of power. Can only be set through governance (owner).
    IMigratorChef public migrator;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (uint256 => mapping (address => UserInfo)) public userInfo;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;
    // The block number when STAR mining starts.
    uint256 public startBlock;
    address public lockAddr;
    address public teamAddr;
    address public rewardAddr;
    uint256 public lockRatio;
    uint256 public teamRatio;
    uint256 public rewardRatio;

    // Node user
    mapping (address => bool) public isNodeUser;
    // mapping (address => mapping(uint256 => bool)) public userNFT;
    //mapping (uint256 => address) public NFTOwner;
    mapping (address => uint256[]) public userNFTs;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount, bool isNodeUser);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, bool isNodeUser);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount, bool isNodeUser);

    function initialize(address _starToken, address _bonus, address _node, uint256 _starPerBlock, uint256 _startBlock) public initializer {
        __farm_init(_starToken, _bonus, _node, _starPerBlock, _startBlock);
    }

    function __farm_init(address _starToken, address _bonus, address _node, uint256 _starPerBlock, uint256 _startBlock) internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
        __farm_init_unchained(_starToken, _bonus, _node, _starPerBlock, _startBlock);
    }

    function __farm_init_unchained(address _starToken, address _bonus, address _node, uint256 _starPerBlock, uint256 _startBlock) internal initializer {
        starToken = IERC20Upgradeable(_starToken);
        bonusAddr = _bonus;
        starNode = IStarNode(_node);
        starPerBlock = _starPerBlock;
        startBlock = _startBlock;

        // staking pool
        poolInfo.push(PoolInfo({
            lpToken: IERC20Upgradeable(_starToken),
            allocPoint: 1000,
            lastRewardBlock: startBlock,
            accStarPerShare: 0,
            extraAmount: 0,
            fee: 0
        }));
		
        totalAllocPoint = 1000;
    }

    function updateMultiplier(uint256 multiplierNumber) public onlyOwner {
        BONUS_MULTIPLIER = multiplierNumber;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    function add(uint256 _allocPoint, IERC20Upgradeable _lpToken, uint256 _fee, bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accStarPerShare: 0,
            extraAmount: 0,
            fee: _fee
        }));
        updateStakingPool();
    }

    // Update the given pool's STAR allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint, uint256 _fee, bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        uint256 prevAllocPoint = poolInfo[_pid].allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].fee = _fee;

        if (prevAllocPoint != _allocPoint) {
            updateStakingPool();
        }
    }

    function updateStakingPool() internal {
        uint256 length = poolInfo.length;
        uint256 points = 0;
        for (uint256 pid = 1; pid < length; ++pid) {
            points = points.add(poolInfo[pid].allocPoint);
        }
        if (points != 0) {
            points = points.div(3);
            totalAllocPoint = totalAllocPoint.sub(poolInfo[0].allocPoint).add(points);
            poolInfo[0].allocPoint = points;
        }
    }

    // Set the migrator contract. Can only be called by the owner.
    function setMigrator(IMigratorChef _migrator) public onlyOwner {
        migrator = _migrator;
    }

    // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
    function migrate(uint256 _pid) public {
        require(address(migrator) != address(0), "migrate: no migrator");
        PoolInfo storage pool = poolInfo[_pid];
        IERC20Upgradeable lpToken = pool.lpToken;
        uint256 bal = lpToken.balanceOf(address(this));
        lpToken.safeApprove(address(migrator), bal);
        IERC20Upgradeable newLpToken = migrator.migrate(lpToken);
        require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
        pool.lpToken = newLpToken;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        return _to.sub(_from).mul(BONUS_MULTIPLIER);
    }

    // View function to see pending STARs on frontend.
    function pendingStar(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accStarPerShare = pool.accStarPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this)).add(pool.extraAmount);
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 starReward = multiplier.mul(starPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accStarPerShare = accStarPerShare.add(starReward.mul(1e12).div(lpSupply));
        }
		(uint256 _selfGain, ) = starNode.nodeGain();
        //uint256 _useramount = user.amount.sub(user.nftAmount);
        //uint256 _amountGain = _useramount.add(_useramount.mul(_selfGain).div(100));
        uint256 _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
        uint256 _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));
		
		uint256 _amountpendingStar = _amountGain.mul(accStarPerShare).div(1e12).sub(user.rewardDebt);
		uint256 _nftAmountpendingStar = _nftAmountGain.mul(accStarPerShare).div(1e12).sub(user.nftRewardDebt);
		return _amountpendingStar.sub(_nftAmountpendingStar);

        // return user.amount.mul(accStarPerShare).div(1e12).sub(user.rewardDebt);
        //return _amountGain.mul(accStarPerShare).div(1e12).add(user.nftRewardDebt).sub(user.rewardDebt);
    }
	
    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this)).add(pool.extraAmount);
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 starReward = multiplier.mul(starPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        starToken.safeTransfer(bonusAddr, starReward.div(10));
        pool.accStarPerShare = pool.accStarPerShare.add(starReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    event SendPending(string _type,uint256 pending);
    // Deposit LP tokens to MasterChef for STAR allocation.
    function deposit(uint256 _pid, uint256 _amount) public {
        //require (_pid != 0, 'withdraw STAR by unstaking');
        //if (_pid == 0) require(userNFTs[_msgSender()].length == 0, "nft user");
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_msgSender()];
        updatePool(_pid);

        (uint256 _selfGain, uint256 _parentGain) = starNode.nodeGain();
        uint256 _useramount = user.amount.sub(user.nftAmount);
        uint256 _amountGain = _useramount.add(_useramount.mul(_selfGain).div(100));
        uint256 _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));

        if (_amountGain > 0) {
            uint256 pending = _amountGain.mul(pool.accStarPerShare).div(1e12).add(user.nftRewardDebt).sub(user.rewardDebt);
            emit SendPending('deposit',pending);
            if(pending > 0) {
                starToken.safeTransfer(lockAddr,pending.mul(lockRatio).div(100));
                starToken.safeTransfer(teamAddr,pending.mul(teamRatio).div(100));
                pending = pending.sub(pending.mul(lockRatio.add(teamRatio)).div(100));
                starToken.safeTransfer(rewardAddr,pending.mul(rewardRatio).div(100));
                pending = pending.sub(pending.mul(rewardRatio).div(100));
                starToken.safeTransfer(_msgSender(), pending);
                starNode.settleNode(_msgSender(), user.amount);
            }
        }
        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(_msgSender(), address(this), _amount);
            user.amount = user.amount.add(_amount);
            user.lastDeposit = block.timestamp;
            uint256 _extraAmount = _amount.mul(_selfGain.add(_parentGain)).div(100);
            pool.extraAmount = pool.extraAmount.add(_extraAmount);
        }

        _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
        user.rewardDebt = _amountGain.mul(pool.accStarPerShare).div(1e12);
        user.nftRewardDebt = _nftAmountGain.mul(pool.accStarPerShare).div(1e12);
        emit Deposit(_msgSender(), _pid, _amount, isNodeUser[_msgSender()]);
    }
	
    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public {
        //require (_pid != 0, 'withdraw STAR by unstaking');
        //if (_pid == 0) require(userNFTs[_msgSender()].length == 0, "nft user");
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_msgSender()];
        uint256 _useramount = user.amount.sub(user.nftAmount);
        require(_useramount >= _amount, "withdraw: amount error");
        updatePool(_pid);

        (uint256 _selfGain, uint256 _parentGain) = starNode.nodeGain();
        uint256 _amountGain = _useramount.add(_useramount.mul(_selfGain).div(100));
        uint256 _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));
        uint256 pending = _amountGain.mul(pool.accStarPerShare).div(1e12).add(user.nftRewardDebt).sub(user.rewardDebt);
        emit SendPending('widthdraw',pending);

        if(pending > 0) {
            starToken.safeTransfer(lockAddr,pending.mul(lockRatio).div(100));
            starToken.safeTransfer(teamAddr,pending.mul(teamRatio).div(100));
            pending = pending.sub(pending.mul(lockRatio.add(teamRatio)).div(100));
            starToken.safeTransfer(rewardAddr,pending.mul(rewardRatio).div(100));
            pending = pending.sub(pending.mul(rewardRatio).div(100));
            if (user.lastDeposit > block.timestamp.sub(604800)) {
                starToken.safeTransfer(_msgSender(), pending.mul(90).div(100));
                pending = pending.mul(10).div(100);
                starToken.safeTransfer(bonusAddr, pending.mul(70).div(100));
                starToken.safeTransfer(lockAddr, pending.mul(30).div(100));
            }else{
                starToken.safeTransfer(_msgSender(), pending);
            }
            starNode.settleNode(_msgSender(), _useramount);
        }

        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            uint256 _extraAmount = _amount.mul(_selfGain.add(_parentGain)).div(100);
            pool.extraAmount = pool.extraAmount.sub(_extraAmount);
            pool.lpToken.safeTransfer(_msgSender(), _amount);
        }

        _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
        user.rewardDebt = _amountGain.mul(pool.accStarPerShare).div(1e12);
        user.nftRewardDebt = _nftAmountGain.mul(pool.accStarPerShare).div(1e12);
        emit Withdraw(_msgSender(), _pid, _amount, isNodeUser[_msgSender()]);
    }
		
    // Stake Star NFT to MasterChef
    function enterStakingNFT(uint256 _tokenId) public {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[0][_msgSender()];
		require(starNFT.ownerOf(_tokenId) == _msgSender(), "error NFT user");
        //require(userNFTs[_msgSender()].length > 0, "star token user");
        updatePool(0);

        (uint256 _selfGain, uint256 _parentGain) = starNode.nodeGain();
        uint256 _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
        uint256 _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));

        if (_nftAmountGain > 0) {
            uint256 pending = _nftAmountGain.mul(pool.accStarPerShare).div(1e12).sub(user.nftRewardDebt);
            emit SendPending('enterStakingNFT',pending);
            if(pending > 0) {
                starToken.safeTransfer(lockAddr,pending.mul(lockRatio).div(100));
                starToken.safeTransfer(teamAddr,pending.mul(teamRatio).div(100));
                pending = pending.sub(pending.mul(lockRatio.add(teamRatio)).div(100));
                starToken.safeTransfer(rewardAddr,pending.mul(rewardRatio).div(100));
                pending = pending.sub(pending.mul(rewardRatio).div(100));
                starToken.safeTransfer(_msgSender(), pending);
                starNode.settleNode(_msgSender(), user.nftAmount);
            }
        }
        if (_tokenId > 0) {
            starNFT.transferFrom(_msgSender(), address(this), _tokenId);
            userNFTs[_msgSender()].push(_tokenId);

            (, , uint256 _price, uint256 _multi) = nftLogic.starMeta(_tokenId);
            uint256 _amount = _price.mul(_multi).div(100);
            uint256 _extraAmount = _amount.add(_amount.mul(_selfGain.add(_parentGain)).div(100));
            pool.extraAmount = pool.extraAmount.add(_extraAmount);
            user.amount = user.amount.add(_amount);
            user.nftAmount = user.nftAmount.add(_amount);
            user.nftLastDeposit = block.timestamp;
            _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
            _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));
        }
        user.rewardDebt = _amountGain.mul(pool.accStarPerShare).div(1e12);
        user.nftRewardDebt = _nftAmountGain.mul(pool.accStarPerShare).div(1e12);
        emit Deposit(_msgSender(), 0, _tokenId, isNodeUser[_msgSender()]);
    }
	
   // Withdraw Star NFT from STAKING.
    function leaveStakingNFT(uint256 _tokenId) public {
        //PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[0][_msgSender()];
        require(userNFTs[_msgSender()].length > 0, "no NFT");
        updatePool(0);

        (uint256 _selfGain, uint256 _parentGain) = starNode.nodeGain();
        uint256 _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
        uint256 _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));
        uint256 pending = _nftAmountGain.mul(poolInfo[0].accStarPerShare).div(1e12).sub(user.nftRewardDebt);
        emit SendPending('leaveStakingNFT',pending);

        if(pending > 0) {
            starToken.safeTransfer(lockAddr,pending.mul(lockRatio).div(100));
            starToken.safeTransfer(teamAddr,pending.mul(teamRatio).div(100));
            pending = pending.sub(pending.mul(lockRatio.add(teamRatio)).div(100));
            starToken.safeTransfer(rewardAddr,pending.mul(rewardRatio).div(100));
            pending = pending.sub(pending.mul(rewardRatio).div(100));
            if (user.nftLastDeposit > block.timestamp.sub(604800)) {
                starToken.safeTransfer(_msgSender(), pending.mul(90).div(100));
                pending = pending.mul(10).div(100);
                starToken.safeTransfer(bonusAddr, pending.mul(70).div(100));
                starToken.safeTransfer(lockAddr, pending.mul(30).div(100));
            }else{
                starToken.safeTransfer(_msgSender(), pending);
            }
            starNode.settleNode(_msgSender(), user.nftAmount);
        }

        if (_tokenId > 0) {
            uint256[] storage _userNFTs = userNFTs[_msgSender()];
            for (uint256 i = 0; i < _userNFTs.length; i ++) {
                if(_userNFTs[i] == _tokenId) {
                    (, , uint256 _price, uint256 _multi) = nftLogic.starMeta(_tokenId);
                    uint256 _amount = _price.mul(_multi).div(100);

                    if(_amount > 0) {
                        uint256 _self_parentGain = _selfGain.add(_parentGain);
                        uint256 _extraAmount = _amount.add(_amount.mul(_self_parentGain).div(100));
                        poolInfo[0].extraAmount = poolInfo[0].extraAmount.sub(_extraAmount);
                        user.amount = user.amount.sub(_amount);
                        user.nftAmount = user.nftAmount.sub(_amount);
                        _userNFTs[i] = _userNFTs[_userNFTs.length - 1];
                        _userNFTs.pop();
                    }
                    starNFT.transferFrom(address(this), _msgSender(), _tokenId);

                    _amountGain = user.amount.add(user.amount.mul(_selfGain).div(100));
                    _nftAmountGain = user.nftAmount.add(user.nftAmount.mul(_selfGain).div(100));
                    user.rewardDebt = _amountGain.mul(poolInfo[0].accStarPerShare).div(1e12);
                    user.nftRewardDebt = _nftAmountGain.mul(poolInfo[0].accStarPerShare).div(1e12);
                    emit Withdraw(_msgSender(), 0, _amount, isNodeUser[_msgSender()]);
                    break;
                }
            }
        }
    }
	
    function getStakingNFTAmount(address _user) view public returns (uint256) {
        return userNFTs[_user].length;
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_msgSender()];
        pool.lpToken.safeTransfer(_msgSender(), user.amount);
        emit EmergencyWithdraw(_msgSender(), _pid, user.amount, isNodeUser[_msgSender()]);
        user.amount = 0;
        user.rewardDebt = 0;
    }

    function setBonus(address _addr) external onlyOwner {
        require(address(0) != _addr, "bonus address can not be address 0");
        bonusAddr = _addr;
    }

    function getAllocationInfo() view public returns(address ,address ,address ,uint256 ,uint256 ,uint256 ) {
        return (lockAddr,teamAddr,rewardAddr,lockRatio,teamRatio,rewardRatio);
    }
	
    function setAllocationInfo(address _lockAddr,address _teamAddr,address _rewardAddr,uint256 _lockRatio,uint256 _teamRatio,uint256 _rewardRatio) public onlyOwner {
        lockAddr = _lockAddr;
        teamAddr = _teamAddr;
        rewardAddr = _rewardAddr;
        lockRatio = _lockRatio;
        teamRatio = _teamRatio;
        rewardRatio = _rewardRatio;
    }

    function setStarNFT(address _addr) external onlyOwner {
        require(address(0) != _addr, "NFT address can not be address 0");
        starNFT = IERC721Upgradeable(_addr);
    }

    function setNFTLogic(address _addr) external onlyOwner {
        require(address(0) != _addr, "logic address can not be address 0");
        nftLogic = INFTLogic(_addr);
    }
    
    function regNodeUser(address _user) external onlyNode {
        require(address(0) != _user, '');
        isNodeUser[_user] = true;
    }

    function setNode(address _node) public onlyOwner {
        require(address(0) != _node, 'node can not be address 0');
        starNode = IStarNode(_node);
    }

    modifier onlyNode() {
        require(_msgSender() == address(starNode), "not node");
        _;
    }
}
        

/_openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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);
    }
    uint256[49] private __gap;
}
          

/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}
          

/_openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

/_openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol

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

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

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

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

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

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

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

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

    /**
     * @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(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

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

/_openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}
          

/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol

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

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
          

/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}
          

/_openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
          

/_openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMathUpgradeable {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

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

/contracts/IStarNode.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IStarNode {
    function nodeGain() external view returns (uint256, uint256);
    function settleNode(address _user, uint256 _amount) external;
}
          

Contract ABI

[{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"bool","name":"isNodeUser","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"bool","name":"isNodeUser","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SendPending","inputs":[{"type":"string","name":"_type","internalType":"string","indexed":false},{"type":"uint256","name":"pending","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"bool","name":"isNodeUser","internalType":"bool","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BONUS_MULTIPLIER","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IERC20Upgradeable"},{"type":"uint256","name":"_fee","internalType":"uint256"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"bonusAddr","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enterStakingNFT","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAllocationInfo","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMultiplier","inputs":[{"type":"uint256","name":"_from","internalType":"uint256"},{"type":"uint256","name":"_to","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getStakingNFTAmount","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_starToken","internalType":"address"},{"type":"address","name":"_bonus","internalType":"address"},{"type":"address","name":"_node","internalType":"address"},{"type":"uint256","name":"_starPerBlock","internalType":"uint256"},{"type":"uint256","name":"_startBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isNodeUser","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"leaveStakingNFT","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lockAddr","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lockRatio","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrate","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMigratorChef"}],"name":"migrator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract INFTLogic"}],"name":"nftLogic","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":"pendingStar","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20Upgradeable"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"},{"type":"uint256","name":"accStarPerShare","internalType":"uint256"},{"type":"uint256","name":"extraAmount","internalType":"uint256"},{"type":"uint256","name":"fee","internalType":"uint256"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"regNodeUser","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"rewardAddr","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rewardRatio","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"uint256","name":"_fee","internalType":"uint256"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAllocationInfo","inputs":[{"type":"address","name":"_lockAddr","internalType":"address"},{"type":"address","name":"_teamAddr","internalType":"address"},{"type":"address","name":"_rewardAddr","internalType":"address"},{"type":"uint256","name":"_lockRatio","internalType":"uint256"},{"type":"uint256","name":"_teamRatio","internalType":"uint256"},{"type":"uint256","name":"_rewardRatio","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBonus","inputs":[{"type":"address","name":"_addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMigrator","inputs":[{"type":"address","name":"_migrator","internalType":"contract IMigratorChef"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNFTLogic","inputs":[{"type":"address","name":"_addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNode","inputs":[{"type":"address","name":"_node","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStarNFT","inputs":[{"type":"address","name":"_addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC721Upgradeable"}],"name":"starNFT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IStarNode"}],"name":"starNode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"starPerBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Upgradeable"}],"name":"starToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"teamAddr","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"teamRatio","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMultiplier","inputs":[{"type":"uint256","name":"multiplierNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"},{"type":"uint256","name":"lastDeposit","internalType":"uint256"},{"type":"uint256","name":"nftAmount","internalType":"uint256"},{"type":"uint256","name":"nftRewardDebt","internalType":"uint256"},{"type":"uint256","name":"nftLastDeposit","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userNFTs","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b50613ab6806100206000396000f3fe608060405234801561001057600080fd5b50600436106102945760003560e01c8063646033bc11610167578063988d7a60116100ce578063b3bcb63311610087578063b3bcb6331461065d578063b7ca51e814610690578063c21d5ab7146106a3578063c62ba370146106b6578063e2bbb158146106c9578063f2fde38b146106dc57600080fd5b8063988d7a60146105bf5780639c3709ea146105d25780639fc3ab03146105db578063a0b4f431146105e4578063a6b63eb814610637578063b0bf74e31461064a57600080fd5b80637fdab94e116101205780637fdab94e146104f15780638862445a146105045780638aa28550146105175780638da5cb5b146105205780638dbb1e3a1461053157806393f1a40b1461054457600080fd5b8063646033bc146104945780636aef28661461049d5780637015e95e146104b057806370dca974146104c3578063715018a6146104d65780637cd07e47146104de57600080fd5b80632d5ad7a91161020b5780634a5ff749116101c45780634a5ff7491461042d57806351eb05a6146104405780635312ea8e1461045357806355ab356e146104665780635ffe614614610479578063630b5ba11461048c57600080fd5b80632d5ad7a9146103af57806337ef75c8146103c25780633a4bc9c2146103d5578063441a3e70146103fe578063454b06081461041157806348cd4cb11461042457600080fd5b80631526fe271161025d5780631526fe271461031057806315bd02121461035a57806317caf6f11461036d57806323cf31181461037657806325136f1f14610389578063291c73c31461039c57600080fd5b8062ed820614610299578063081e3eda146102b557806312bdc1ca146102bd57806312dcff7a146102d057806313eaabb8146102e5575b600080fd5b6102a2606a5481565b6040519081526020015b60405180910390f35b606d546102a2565b6102a26102cb3660046135d7565b6106ef565b6102e36102de366004613607565b61096d565b005b6067546102f8906001600160a01b031681565b6040516001600160a01b0390911681526020016102ac565b61032361031e366004613624565b610a23565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016102ac565b6102e3610368366004613624565b610a73565b6102a2606f5481565b6102e3610384366004613607565b611217565b6069546102f8906001600160a01b031681565b6102a26103aa36600461363d565b611263565b6066546102f8906001600160a01b031681565b6102e36103d0366004613607565b611294565b6102a26103e3366004613607565b6001600160a01b031660009081526078602052604090205490565b6102e361040c366004613669565b611341565b6102e361041f366004613624565b611801565b6102a260705481565b6072546102f8906001600160a01b031681565b6102e361044e366004613624565b611a3b565b6102e3610461366004613624565b611b49565b6102e3610474366004613607565b611c17565b6102e3610487366004613624565b611cb9565b6102e3611ce8565b6102a260765481565b6102e36104ab36600461368b565b611d13565b6073546102f8906001600160a01b031681565b6068546102f8906001600160a01b031681565b6102e3611d8c565b606c546102f8906001600160a01b031681565b6071546102f8906001600160a01b031681565b6102e36105123660046136fe565b611dc2565b6102a2606b5481565b6033546001600160a01b03166102f8565b6102a261053f366004613669565b611ece565b6105926105523660046135d7565b606e602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016102ac565b6102e36105cd36600461373f565b611ee9565b6102a260745481565b6102a260755481565b607154607254607354607454607554607654604080516001600160a01b039788168152958716602087015295909316948401949094526060830152608082019290925260a081019190915260c0016102ac565b6102e361064536600461377e565b612094565b6102e3610658366004613607565b612112565b61068061066b366004613607565b60776020526000908152604090205460ff1681565b60405190151581526020016102ac565b6065546102f8906001600160a01b031681565b6102e36106b1366004613607565b6121b4565b6102e36106c4366004613624565b612256565b6102e36106d7366004613669565b6128a5565b6102e36106ea366004613607565b612cb6565b600080606d8481548110610705576107056137d9565b60009182526020808320878452606e825260408085206001600160a01b03898116875293528085206006949094029091016003810154600480830154835494516370a0823160e01b815230928101929092529297509495909490936107b79316906370a08231906024015b602060405180830381865afa15801561078d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b191906137ef565b90612d51565b90508360020154431180156107cb57508015155b156108375760006107e0856002015443611ece565b90506000610813606f5461080d8860010154610807606a5487612d5d90919063ffffffff16565b90612d5d565b90612d69565b905061083261082b8461080d8464e8d4a51000612d5d565b8590612d51565b935050505b6066546040805163858ce8f960e01b815281516000936001600160a01b03169263858ce8f992600480820193918290030181865afa15801561087d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a19190613808565b50905060006108cd6108c5606461080d858960000154612d5d90919063ffffffff16565b865490612d51565b905060006108fb6108f0606461080d868a60030154612d5d90919063ffffffff16565b600388015490612d51565b90506000610929876001015461092364e8d4a5100061080d8a88612d5d90919063ffffffff16565b90612d75565b90506000610951886004015461092364e8d4a5100061080d8b88612d5d90919063ffffffff16565b905061095d8282612d75565b9c9b505050505050505050505050565b6033546001600160a01b031633146109a05760405162461bcd60e51b81526004016109979061382c565b60405180910390fd5b6001600160a01b038116610a015760405162461bcd60e51b815260206004820152602260248201527f626f6e757320616464726573732063616e206e6f742062652061646472657373604482015261020360f41b6064820152608401610997565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b606d8181548110610a3357600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909286565b3360009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f60209081526040808320607890925290912054610ae25760405162461bcd60e51b81526020600482015260066024820152651b9bc813919560d21b6044820152606401610997565b610aec6000611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190613808565b915091506000610b87610b7f606461080d868860000154612d5d90919063ffffffff16565b855490612d51565b90506000610bb5610baa606461080d878960030154612d5d90919063ffffffff16565b600387015490612d51565b90506000610c02866004015461092364e8d4a5100061080d606d600081548110610be157610be16137d9565b90600052602060002090600602016003015487612d5d90919063ffffffff16565b9050600080516020613a6183398151915281604051610c4d91906040808252600f908201526e1b19585d9954dd185ada5b99d39195608a1b6060820152602081019190915260800190565b60405180910390a18015610e4757607154607454610c94916001600160a01b031690610c819060649061080d908690612d5d565b6065546001600160a01b03169190612d81565b607254607554610cba916001600160a01b031690610c819060649061080d908690612d5d565b610cea610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b8590612d5d565b8290612d75565b607354607654919250610d15916001600160a01b0390911690610c819060649061080d908690612d5d565b610d32610ce3606461080d60765485612d5d90919063ffffffff16565b9050610d414262093a80612d75565b86600501541115610db957610d61335b610c81606461080d85605a612d5d565b610d71606461080d83600a612d5d565b606754909150610d94906001600160a01b0316610c81606461080d856046612d5d565b607154610db4906001600160a01b0316610c81606461080d85601e612d5d565b610dd1565b610dd1335b6065546001600160a01b03169083612d81565b6066546001600160a01b031663986f33e03360038901546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610e2e57600080fd5b505af1158015610e42573d6000803e3d6000fd5b505050505b861561120e57336000908152607860205260408120905b815481101561120b5788828281548110610e7a57610e7a6137d9565b906000526020600020015414156111f957606954604051634b893b5760e11b8152600481018b905260009182916001600160a01b039091169063971276ae90602401608060405180830381865afa158015610ed9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efd9190613861565b9350935050506000610f1d606461080d8486612d5d90919063ffffffff16565b90508015611046576000610f318b8b612d51565b90506000610f4e610f47606461080d8686612d5d565b8490612d51565b9050610f8881606d600081548110610f6857610f686137d9565b906000526020600020906006020160040154612d7590919063ffffffff16565b606d600081548110610f9c57610f9c6137d9565b60009182526020909120600460069092020101558c54610fbc9084612d75565b8d5560038d0154610fcd9084612d75565b60038e015586548790610fe2906001906138bc565b81548110610ff257610ff26137d9565b906000526020600020015487878154811061100f5761100f6137d9565b90600052602060002001819055508680548061102d5761102d6138d3565b6001900381819060005260206000200160009055905550505b6068546001600160a01b03166323b872dd30336040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018f9052606401600060405180830381600087803b1580156110a857600080fd5b505af11580156110bc573d6000803e3d6000fd5b50508c546110df92506110d7915060649061080d908e612d5d565b8c5490612d51565b975061110b611100606461080d8d8f60030154612d5d90919063ffffffff16565b60038d015490612d51565b965061114e64e8d4a5100061080d606d60008154811061112d5761112d6137d9565b9060005260206000209060060201600301548b612d5d90919063ffffffff16565b8b6001018190555061119764e8d4a5100061080d606d600081548110611176576111766137d9565b9060005260206000209060060201600301548a612d5d90919063ffffffff16565b60048c015533600081815260776020908152604080832054815186815260ff90911615159281019290925280519293927fb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d2729281900390910190a350505061120b565b80611203816138e9565b915050610e5e565b50505b50505050505050565b6033546001600160a01b031633146112415760405162461bcd60e51b81526004016109979061382c565b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b6078602052816000526040600020818154811061127f57600080fd5b90600052602060002001600091509150505481565b6033546001600160a01b031633146112be5760405162461bcd60e51b81526004016109979061382c565b6001600160a01b03811661131f5760405162461bcd60e51b815260206004820152602260248201527f6c6f67696320616464726573732063616e206e6f742062652061646472657373604482015261020360f41b6064820152608401610997565b606980546001600160a01b0319166001600160a01b0392909216919091179055565b6000606d8381548110611356576113566137d9565b60009182526020808320868452606e9091526040832060069092020192508161137c3390565b6001600160a01b0316815260208101919091526040016000908120600381015481549193506113ab9190612d75565b9050838110156113f65760405162461bcd60e51b81526020600482015260166024820152753bb4ba34323930bb9d1030b6b7bab73a1032b93937b960511b6044820152606401610997565b6113ff85611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa158015611449573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146d9190613808565b9092509050600061148661082b606461080d8787612d5d565b905060006114a96108f0606461080d878a60030154612d5d90919063ffffffff16565b905060006114dd876001015461092389600401546107b164e8d4a5100061080d8e600301548a612d5d90919063ffffffff16565b9050600080516020613a6183398151915281604051611522919060408082526009908201526877696474686472617760b81b6060820152602081019190915260800190565b60405180910390a180156116dd57607154607454611556916001600160a01b031690610c819060649061080d908690612d5d565b60725460755461157c916001600160a01b031690610c819060649061080d908690612d5d565b61159e610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b6073546076549192506115c9916001600160a01b0390911690610c819060649061080d908690612d5d565b6115e6610ce3606461080d60765485612d5d90919063ffffffff16565b90506115f54262093a80612d75565b876002015411156116615761160933610d51565b611619606461080d83600a612d5d565b60675490915061163c906001600160a01b0316610c81606461080d856046612d5d565b60715461165c906001600160a01b0316610c81606461080d85601e612d5d565b61166a565b61166a33610dbe565b6066546001600160a01b031663986f33e0336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101899052604401600060405180830381600087803b1580156116c457600080fd5b505af11580156116d8573d6000803e3d6000fd5b505050505b881561173b5786546116ef908a612d75565b8755600061170c606461080d6117058989612d51565b8d90612d5d565b60048a015490915061171e9082612d75565b60048a0155611739338a546001600160a01b0316908c612d81565b505b865461175a906117529060649061080d9089612d5d565b885490612d51565b925061177c64e8d4a5100061080d8a6003015486612d5d90919063ffffffff16565b6001880155600388015461179c9064e8d4a510009061080d908590612d5d565b6004880155336000818152607760209081526040918290205482518d815260ff90911615159181019190915281518d93927fb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d272928290030190a350505050505050505050565b606c546001600160a01b03166118505760405162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b6044820152606401610997565b6000606d8281548110611865576118656137d9565b6000918252602082206006919091020180546040516370a0823160e01b81523060048201529193506001600160a01b0316919082906370a0823190602401602060405180830381865afa1580156118c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e491906137ef565b606c54909150611901906001600160a01b03848116911683612de9565b606c5460405163ce5494bb60e01b81526001600160a01b038481166004830152600092169063ce5494bb906024016020604051808303816000875af115801561194e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119729190613904565b6040516370a0823160e01b81523060048201529091506001600160a01b038216906370a0823190602401602060405180830381865afa1580156119b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119dd91906137ef565b8214611a1a5760405162461bcd60e51b815260206004820152600c60248201526b1b5a59dc985d194e8818985960a21b6044820152606401610997565b83546001600160a01b0319166001600160a01b039190911617909255505050565b6000606d8281548110611a5057611a506137d9565b9060005260206000209060060201905080600201544311611a6f575050565b60048181015482546040516370a0823160e01b81523093810193909352600092611aac92916001600160a01b0316906370a0823190602401610770565b905080611abe57504360029091015550565b6000611ace836002015443611ece565b90506000611af5606f5461080d8660010154610807606a5487612d5d90919063ffffffff16565b606754909150611b13906001600160a01b0316610c8183600a612d69565b611b34611b298461080d8464e8d4a51000612d5d565b600386015490612d51565b60038501555050436002909201919091555050565b6000606d8281548110611b5e57611b5e6137d9565b60009182526020808320858452606e90915260408320600690920201925081611b843390565b6001600160a01b0316815260208101919091526040016000209050611bb733825484546001600160a01b03169190612d81565b80543360008181526077602090815260409182902054825194855260ff16151590840152805186937f9fef67ca40344e5550d748f62064f1b3d31f46191945782c3c408c8aa26f3a2692908290030190a360008082556001909101555050565b6066546001600160a01b0316336001600160a01b031614611c655760405162461bcd60e51b81526020600482015260086024820152676e6f74206e6f646560c01b6044820152606401610997565b6001600160a01b038116611c955760405162461bcd60e51b81526020600482015260006024820152604401610997565b6001600160a01b03166000908152607760205260409020805460ff19166001179055565b6033546001600160a01b03163314611ce35760405162461bcd60e51b81526004016109979061382c565b606b55565b606d5460005b81811015611d0f57611cff81611a3b565b611d08816138e9565b9050611cee565b5050565b6033546001600160a01b03163314611d3d5760405162461bcd60e51b81526004016109979061382c565b607180546001600160a01b03199081166001600160a01b039889161790915560728054821696881696909617909555607380549095169390951692909217909255607491909155607555607655565b6033546001600160a01b03163314611db65760405162461bcd60e51b81526004016109979061382c565b611dc06000612efe565b565b6033546001600160a01b03163314611dec5760405162461bcd60e51b81526004016109979061382c565b8015611dfa57611dfa611ce8565b611e37836107b1606d8781548110611e1457611e146137d9565b906000526020600020906006020160010154606f54612d7590919063ffffffff16565b606f819055506000606d8581548110611e5257611e526137d9565b906000526020600020906006020160010154905083606d8681548110611e7a57611e7a6137d9565b90600052602060002090600602016001018190555082606d8681548110611ea357611ea36137d9565b906000526020600020906006020160050181905550838114611ec757611ec7612f50565b5050505050565b606b54600090611ee2906108078486612d75565b9392505050565b6033546001600160a01b03163314611f135760405162461bcd60e51b81526004016109979061382c565b8015611f2157611f21611ce8565b60006070544311611f3457607054611f36565b435b606f54909150611f469086612d51565b606f556040805160c0810182526001600160a01b038681168252602082018881529282018481526000606084018181526080850182815260a086018a8152606d8054600181018255945295517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d8600690940293840180546001600160a01b031916919096161790945594517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d982015590517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18da82015592517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18db840155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dc830155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dd90910155611ec7612f50565b600054610100900460ff16806120ad575060005460ff16155b6120c95760405162461bcd60e51b815260040161099790613921565b600054610100900460ff161580156120eb576000805461ffff19166101011790555b6120f8868686868661300c565b801561210a576000805461ff00191690555b505050505050565b6033546001600160a01b0316331461213c5760405162461bcd60e51b81526004016109979061382c565b6001600160a01b0381166121925760405162461bcd60e51b815260206004820181905260248201527f4e465420616464726573732063616e206e6f74206265206164647265737320306044820152606401610997565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146121de5760405162461bcd60e51b81526004016109979061382c565b6001600160a01b0381166122345760405162461bcd60e51b815260206004820152601960248201527f6e6f64652063616e206e6f7420626520616464726573732030000000000000006044820152606401610997565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6000606d60008154811061226c5761226c6137d9565b60009182526020808320838052606e90915260069091020191507f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f816122af3390565b6001600160a01b0316815260208101919091526040016000209050336068546040516331a9108f60e11b8152600481018690526001600160a01b039283169290911690636352211e90602401602060405180830381865afa158015612318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233c9190613904565b6001600160a01b0316146123835760405162461bcd60e51b815260206004820152600e60248201526d32b93937b91027232a103ab9b2b960911b6044820152606401610997565b61238d6000611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa1580156123d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fb9190613808565b915091506000612420610b7f606461080d868860000154612d5d90919063ffffffff16565b90506000612443610baa606461080d878960030154612d5d90919063ffffffff16565b90508015612607576000612475866004015461092364e8d4a5100061080d8b6003015487612d5d90919063ffffffff16565b9050600080516020613a61833981519152816040516124c091906040808252600f908201526e195b9d195c94dd185ada5b99d39195608a1b6060820152602081019190915260800190565b60405180910390a18015612605576071546074546124f4916001600160a01b031690610c819060649061080d908690612d5d565b60725460755461251a916001600160a01b031690610c819060649061080d908690612d5d565b61253c610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b607354607654919250612567916001600160a01b0390911690610c819060649061080d908690612d5d565b612584610ce3606461080d60765485612d5d90919063ffffffff16565b905061258f33610dbe565b6066546001600160a01b031663986f33e03360038901546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156125ec57600080fd5b505af1158015612600573d6000803e3d6000fd5b505050505b505b8615612802576068546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018a9052606401600060405180830381600087803b15801561266d57600080fd5b505af1158015612681573d6000803e3d6000fd5b50505050607860006126903390565b6001600160a01b0390811682526020808301939093526040918201600090812080546001810182559082529381209093018a90556069549151634b893b5760e11b8152600481018b905283929091169063971276ae90602401608060405180830381865afa158015612706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272a9190613861565b935093505050600061274a606461080d8486612d5d90919063ffffffff16565b9050600061277161276a606461080d6127638c8c612d51565b8690612d5d565b8390612d51565b60048b01549091506127839082612d51565b60048b015588546127949083612d51565b895560038901546127a59083612d51565b60038a01554260058a015588546127cf906127c79060649061080d908c612d5d565b8a5490612d51565b95506127fb6127f0606461080d8b8d60030154612d5d90919063ffffffff16565b60038b015490612d51565b9450505050505b61282264e8d4a5100061080d886003015485612d5d90919063ffffffff16565b600186015560038601546128429064e8d4a510009061080d908490612d5d565b60048601553360008181526077602090815260408083205481518c815260ff90911615159281019290925280519293927f6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e59281900390910190a350505050505050565b6000606d83815481106128ba576128ba6137d9565b60009182526020808320868452606e909152604083206006909202019250816128e03390565b6001600160a01b03166001600160a01b03168152602001908152602001600020905061290b84611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa158015612955573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129799190613808565b6003850154855492945090925060009161299291612d75565b905060006129a861276a606461080d8588612d5d565b905060006129cb6108f0606461080d888a60030154612d5d90919063ffffffff16565b90508115612b8c576000612a05876001015461092389600401546107b164e8d4a5100061080d8e600301548a612d5d90919063ffffffff16565b9050600080516020613a6183398151915281604051612a48919060408082526007908201526619195c1bdcda5d60ca1b6060820152602081019190915260800190565b60405180910390a18015612b8a57607154607454612a7c916001600160a01b031690610c819060649061080d908690612d5d565b607254607554612aa2916001600160a01b031690610c819060649061080d908690612d5d565b612ac4610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b607354607654919250612aef916001600160a01b0390911690610c819060649061080d908690612d5d565b612b0c610ce3606461080d60765485612d5d90919063ffffffff16565b9050612b1733610dbe565b6066546001600160a01b031663986f33e033895460405160e084901b6001600160e01b03191681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612b7157600080fd5b505af1158015612b85573d6000803e3d6000fd5b505050505b505b8715612bf157612ba93388546001600160a01b031690308b613080565b8554612bb59089612d51565b86554260028701556000612bd8606461080d612bd18989612d51565b8c90612d5d565b6004890154909150612bea9082612d51565b6004890155505b8554612c1090612c089060649061080d9089612d5d565b875490612d51565b9150612c3264e8d4a5100061080d896003015485612d5d90919063ffffffff16565b60018701556003870154612c529064e8d4a510009061080d908490612d5d565b6004870155336000818152607760209081526040918290205482518c815260ff90911615159181019190915281518c93927f6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e5928290030190a3505050505050505050565b6033546001600160a01b03163314612ce05760405162461bcd60e51b81526004016109979061382c565b6001600160a01b038116612d455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610997565b612d4e81612efe565b50565b6000611ee2828461396f565b6000611ee28284613987565b6000611ee282846139a6565b6000611ee282846138bc565b6040516001600160a01b038316602482015260448101829052612de490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526130be565b505050565b801580612e635750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6191906137ef565b155b612ece5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610997565b6040516001600160a01b038316602482015260448101829052612de490849063095ea7b360e01b90606401612dad565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606d54600060015b82811015612fa957612f97606d8281548110612f7657612f766137d9565b90600052602060002090600602016001015483612d5190919063ffffffff16565b9150612fa2816138e9565b9050612f58565b508015611d0f57612fbb816003612d69565b9050612fd8816107b1606d600081548110611e1457611e146137d9565b606f8190555080606d600081548110612ff357612ff36137d9565b9060005260206000209060060201600101819055505050565b600054610100900460ff1680613025575060005460ff16155b6130415760405162461bcd60e51b815260040161099790613921565b600054610100900460ff16158015613063576000805461ffff19166101011790555b61306b613190565b6130736131fb565b6120f8868686868661325b565b6040516001600160a01b03808516602483015283166044820152606481018290526130b89085906323b872dd60e01b90608401612dad565b50505050565b6000613113826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661344a9092919063ffffffff16565b805190915015612de4578080602001905181019061313191906139c8565b612de45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610997565b600054610100900460ff16806131a9575060005460ff16155b6131c55760405162461bcd60e51b815260040161099790613921565b600054610100900460ff161580156131e7576000805461ffff19166101011790555b8015612d4e576000805461ff001916905550565b600054610100900460ff1680613214575060005460ff16155b6132305760405162461bcd60e51b815260040161099790613921565b600054610100900460ff16158015613252576000805461ffff19166101011790555b6131e733612efe565b600054610100900460ff1680613274575060005460ff16155b6132905760405162461bcd60e51b815260040161099790613921565b600054610100900460ff161580156132b2576000805461ffff19166101011790555b606580546001600160a01b038089166001600160a01b031992831681179093556067805489831690841617905560668054888316908416179055606a86905560708590556040805160c0810182529384526103e8602085018181529185018781526000606087018181526080880182815260a08901838152606d80546001810182559452985160069093027f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d88101805494909816939098169290921790955592517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d9860155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18da85015591517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18db840155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dc83015591517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dd90910155606f55801561210a576000805461ff0019169055505050505050565b60606134598484600085613461565b949350505050565b6060824710156134c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610997565b843b6135105760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610997565b600080866001600160a01b0316858760405161352c9190613a11565b60006040518083038185875af1925050503d8060008114613569576040519150601f19603f3d011682016040523d82523d6000602084013e61356e565b606091505b509150915061357e828286613589565b979650505050505050565b60608315613598575081611ee2565b8251156135a85782518084602001fd5b8160405162461bcd60e51b81526004016109979190613a2d565b6001600160a01b0381168114612d4e57600080fd5b600080604083850312156135ea57600080fd5b8235915060208301356135fc816135c2565b809150509250929050565b60006020828403121561361957600080fd5b8135611ee2816135c2565b60006020828403121561363657600080fd5b5035919050565b6000806040838503121561365057600080fd5b823561365b816135c2565b946020939093013593505050565b6000806040838503121561367c57600080fd5b50508035926020909101359150565b60008060008060008060c087890312156136a457600080fd5b86356136af816135c2565b955060208701356136bf816135c2565b945060408701356136cf816135c2565b959894975094956060810135955060808101359460a0909101359350915050565b8015158114612d4e57600080fd5b6000806000806080858703121561371457600080fd5b8435935060208501359250604085013591506060850135613734816136f0565b939692955090935050565b6000806000806080858703121561375557600080fd5b843593506020850135613767816135c2565b9250604085013591506060850135613734816136f0565b600080600080600060a0868803121561379657600080fd5b85356137a1816135c2565b945060208601356137b1816135c2565b935060408601356137c1816135c2565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561380157600080fd5b5051919050565b6000806040838503121561381b57600080fd5b505080516020909101519092909150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000806000806080858703121561387757600080fd5b845160ff8116811461388857600080fd5b60208601516040870151606090970151919890975090945092505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156138ce576138ce6138a6565b500390565b634e487b7160e01b600052603160045260246000fd5b60006000198214156138fd576138fd6138a6565b5060010190565b60006020828403121561391657600080fd5b8151611ee2816135c2565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115613982576139826138a6565b500190565b60008160001904831182151516156139a1576139a16138a6565b500290565b6000826139c357634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156139da57600080fd5b8151611ee2816136f0565b60005b83811015613a005781810151838201526020016139e8565b838111156130b85750506000910152565b60008251613a238184602087016139e5565b9190910192915050565b6020815260008251806020840152613a4c8160408501602087016139e5565b601f01601f1916919091016040019291505056fe547d01840adadc1f91b0b7058afebd3785cf71a81ca0832f983a88f9ecad37b7a2646970667358221220cc4e7c907ca8388f7a9614713e98ca1a21ed617d0f8943a11647dae15a3f4b0464736f6c634300080a0033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106102945760003560e01c8063646033bc11610167578063988d7a60116100ce578063b3bcb63311610087578063b3bcb6331461065d578063b7ca51e814610690578063c21d5ab7146106a3578063c62ba370146106b6578063e2bbb158146106c9578063f2fde38b146106dc57600080fd5b8063988d7a60146105bf5780639c3709ea146105d25780639fc3ab03146105db578063a0b4f431146105e4578063a6b63eb814610637578063b0bf74e31461064a57600080fd5b80637fdab94e116101205780637fdab94e146104f15780638862445a146105045780638aa28550146105175780638da5cb5b146105205780638dbb1e3a1461053157806393f1a40b1461054457600080fd5b8063646033bc146104945780636aef28661461049d5780637015e95e146104b057806370dca974146104c3578063715018a6146104d65780637cd07e47146104de57600080fd5b80632d5ad7a91161020b5780634a5ff749116101c45780634a5ff7491461042d57806351eb05a6146104405780635312ea8e1461045357806355ab356e146104665780635ffe614614610479578063630b5ba11461048c57600080fd5b80632d5ad7a9146103af57806337ef75c8146103c25780633a4bc9c2146103d5578063441a3e70146103fe578063454b06081461041157806348cd4cb11461042457600080fd5b80631526fe271161025d5780631526fe271461031057806315bd02121461035a57806317caf6f11461036d57806323cf31181461037657806325136f1f14610389578063291c73c31461039c57600080fd5b8062ed820614610299578063081e3eda146102b557806312bdc1ca146102bd57806312dcff7a146102d057806313eaabb8146102e5575b600080fd5b6102a2606a5481565b6040519081526020015b60405180910390f35b606d546102a2565b6102a26102cb3660046135d7565b6106ef565b6102e36102de366004613607565b61096d565b005b6067546102f8906001600160a01b031681565b6040516001600160a01b0390911681526020016102ac565b61032361031e366004613624565b610a23565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016102ac565b6102e3610368366004613624565b610a73565b6102a2606f5481565b6102e3610384366004613607565b611217565b6069546102f8906001600160a01b031681565b6102a26103aa36600461363d565b611263565b6066546102f8906001600160a01b031681565b6102e36103d0366004613607565b611294565b6102a26103e3366004613607565b6001600160a01b031660009081526078602052604090205490565b6102e361040c366004613669565b611341565b6102e361041f366004613624565b611801565b6102a260705481565b6072546102f8906001600160a01b031681565b6102e361044e366004613624565b611a3b565b6102e3610461366004613624565b611b49565b6102e3610474366004613607565b611c17565b6102e3610487366004613624565b611cb9565b6102e3611ce8565b6102a260765481565b6102e36104ab36600461368b565b611d13565b6073546102f8906001600160a01b031681565b6068546102f8906001600160a01b031681565b6102e3611d8c565b606c546102f8906001600160a01b031681565b6071546102f8906001600160a01b031681565b6102e36105123660046136fe565b611dc2565b6102a2606b5481565b6033546001600160a01b03166102f8565b6102a261053f366004613669565b611ece565b6105926105523660046135d7565b606e602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016102ac565b6102e36105cd36600461373f565b611ee9565b6102a260745481565b6102a260755481565b607154607254607354607454607554607654604080516001600160a01b039788168152958716602087015295909316948401949094526060830152608082019290925260a081019190915260c0016102ac565b6102e361064536600461377e565b612094565b6102e3610658366004613607565b612112565b61068061066b366004613607565b60776020526000908152604090205460ff1681565b60405190151581526020016102ac565b6065546102f8906001600160a01b031681565b6102e36106b1366004613607565b6121b4565b6102e36106c4366004613624565b612256565b6102e36106d7366004613669565b6128a5565b6102e36106ea366004613607565b612cb6565b600080606d8481548110610705576107056137d9565b60009182526020808320878452606e825260408085206001600160a01b03898116875293528085206006949094029091016003810154600480830154835494516370a0823160e01b815230928101929092529297509495909490936107b79316906370a08231906024015b602060405180830381865afa15801561078d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b191906137ef565b90612d51565b90508360020154431180156107cb57508015155b156108375760006107e0856002015443611ece565b90506000610813606f5461080d8860010154610807606a5487612d5d90919063ffffffff16565b90612d5d565b90612d69565b905061083261082b8461080d8464e8d4a51000612d5d565b8590612d51565b935050505b6066546040805163858ce8f960e01b815281516000936001600160a01b03169263858ce8f992600480820193918290030181865afa15801561087d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a19190613808565b50905060006108cd6108c5606461080d858960000154612d5d90919063ffffffff16565b865490612d51565b905060006108fb6108f0606461080d868a60030154612d5d90919063ffffffff16565b600388015490612d51565b90506000610929876001015461092364e8d4a5100061080d8a88612d5d90919063ffffffff16565b90612d75565b90506000610951886004015461092364e8d4a5100061080d8b88612d5d90919063ffffffff16565b905061095d8282612d75565b9c9b505050505050505050505050565b6033546001600160a01b031633146109a05760405162461bcd60e51b81526004016109979061382c565b60405180910390fd5b6001600160a01b038116610a015760405162461bcd60e51b815260206004820152602260248201527f626f6e757320616464726573732063616e206e6f742062652061646472657373604482015261020360f41b6064820152608401610997565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b606d8181548110610a3357600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909286565b3360009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f60209081526040808320607890925290912054610ae25760405162461bcd60e51b81526020600482015260066024820152651b9bc813919560d21b6044820152606401610997565b610aec6000611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190613808565b915091506000610b87610b7f606461080d868860000154612d5d90919063ffffffff16565b855490612d51565b90506000610bb5610baa606461080d878960030154612d5d90919063ffffffff16565b600387015490612d51565b90506000610c02866004015461092364e8d4a5100061080d606d600081548110610be157610be16137d9565b90600052602060002090600602016003015487612d5d90919063ffffffff16565b9050600080516020613a6183398151915281604051610c4d91906040808252600f908201526e1b19585d9954dd185ada5b99d39195608a1b6060820152602081019190915260800190565b60405180910390a18015610e4757607154607454610c94916001600160a01b031690610c819060649061080d908690612d5d565b6065546001600160a01b03169190612d81565b607254607554610cba916001600160a01b031690610c819060649061080d908690612d5d565b610cea610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b8590612d5d565b8290612d75565b607354607654919250610d15916001600160a01b0390911690610c819060649061080d908690612d5d565b610d32610ce3606461080d60765485612d5d90919063ffffffff16565b9050610d414262093a80612d75565b86600501541115610db957610d61335b610c81606461080d85605a612d5d565b610d71606461080d83600a612d5d565b606754909150610d94906001600160a01b0316610c81606461080d856046612d5d565b607154610db4906001600160a01b0316610c81606461080d85601e612d5d565b610dd1565b610dd1335b6065546001600160a01b03169083612d81565b6066546001600160a01b031663986f33e03360038901546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610e2e57600080fd5b505af1158015610e42573d6000803e3d6000fd5b505050505b861561120e57336000908152607860205260408120905b815481101561120b5788828281548110610e7a57610e7a6137d9565b906000526020600020015414156111f957606954604051634b893b5760e11b8152600481018b905260009182916001600160a01b039091169063971276ae90602401608060405180830381865afa158015610ed9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efd9190613861565b9350935050506000610f1d606461080d8486612d5d90919063ffffffff16565b90508015611046576000610f318b8b612d51565b90506000610f4e610f47606461080d8686612d5d565b8490612d51565b9050610f8881606d600081548110610f6857610f686137d9565b906000526020600020906006020160040154612d7590919063ffffffff16565b606d600081548110610f9c57610f9c6137d9565b60009182526020909120600460069092020101558c54610fbc9084612d75565b8d5560038d0154610fcd9084612d75565b60038e015586548790610fe2906001906138bc565b81548110610ff257610ff26137d9565b906000526020600020015487878154811061100f5761100f6137d9565b90600052602060002001819055508680548061102d5761102d6138d3565b6001900381819060005260206000200160009055905550505b6068546001600160a01b03166323b872dd30336040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018f9052606401600060405180830381600087803b1580156110a857600080fd5b505af11580156110bc573d6000803e3d6000fd5b50508c546110df92506110d7915060649061080d908e612d5d565b8c5490612d51565b975061110b611100606461080d8d8f60030154612d5d90919063ffffffff16565b60038d015490612d51565b965061114e64e8d4a5100061080d606d60008154811061112d5761112d6137d9565b9060005260206000209060060201600301548b612d5d90919063ffffffff16565b8b6001018190555061119764e8d4a5100061080d606d600081548110611176576111766137d9565b9060005260206000209060060201600301548a612d5d90919063ffffffff16565b60048c015533600081815260776020908152604080832054815186815260ff90911615159281019290925280519293927fb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d2729281900390910190a350505061120b565b80611203816138e9565b915050610e5e565b50505b50505050505050565b6033546001600160a01b031633146112415760405162461bcd60e51b81526004016109979061382c565b606c80546001600160a01b0319166001600160a01b0392909216919091179055565b6078602052816000526040600020818154811061127f57600080fd5b90600052602060002001600091509150505481565b6033546001600160a01b031633146112be5760405162461bcd60e51b81526004016109979061382c565b6001600160a01b03811661131f5760405162461bcd60e51b815260206004820152602260248201527f6c6f67696320616464726573732063616e206e6f742062652061646472657373604482015261020360f41b6064820152608401610997565b606980546001600160a01b0319166001600160a01b0392909216919091179055565b6000606d8381548110611356576113566137d9565b60009182526020808320868452606e9091526040832060069092020192508161137c3390565b6001600160a01b0316815260208101919091526040016000908120600381015481549193506113ab9190612d75565b9050838110156113f65760405162461bcd60e51b81526020600482015260166024820152753bb4ba34323930bb9d1030b6b7bab73a1032b93937b960511b6044820152606401610997565b6113ff85611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa158015611449573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146d9190613808565b9092509050600061148661082b606461080d8787612d5d565b905060006114a96108f0606461080d878a60030154612d5d90919063ffffffff16565b905060006114dd876001015461092389600401546107b164e8d4a5100061080d8e600301548a612d5d90919063ffffffff16565b9050600080516020613a6183398151915281604051611522919060408082526009908201526877696474686472617760b81b6060820152602081019190915260800190565b60405180910390a180156116dd57607154607454611556916001600160a01b031690610c819060649061080d908690612d5d565b60725460755461157c916001600160a01b031690610c819060649061080d908690612d5d565b61159e610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b6073546076549192506115c9916001600160a01b0390911690610c819060649061080d908690612d5d565b6115e6610ce3606461080d60765485612d5d90919063ffffffff16565b90506115f54262093a80612d75565b876002015411156116615761160933610d51565b611619606461080d83600a612d5d565b60675490915061163c906001600160a01b0316610c81606461080d856046612d5d565b60715461165c906001600160a01b0316610c81606461080d85601e612d5d565b61166a565b61166a33610dbe565b6066546001600160a01b031663986f33e0336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101899052604401600060405180830381600087803b1580156116c457600080fd5b505af11580156116d8573d6000803e3d6000fd5b505050505b881561173b5786546116ef908a612d75565b8755600061170c606461080d6117058989612d51565b8d90612d5d565b60048a015490915061171e9082612d75565b60048a0155611739338a546001600160a01b0316908c612d81565b505b865461175a906117529060649061080d9089612d5d565b885490612d51565b925061177c64e8d4a5100061080d8a6003015486612d5d90919063ffffffff16565b6001880155600388015461179c9064e8d4a510009061080d908590612d5d565b6004880155336000818152607760209081526040918290205482518d815260ff90911615159181019190915281518d93927fb97e775637eca8401af330efee0810af7079bafae27761741e09caa14db8d272928290030190a350505050505050505050565b606c546001600160a01b03166118505760405162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b6044820152606401610997565b6000606d8281548110611865576118656137d9565b6000918252602082206006919091020180546040516370a0823160e01b81523060048201529193506001600160a01b0316919082906370a0823190602401602060405180830381865afa1580156118c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e491906137ef565b606c54909150611901906001600160a01b03848116911683612de9565b606c5460405163ce5494bb60e01b81526001600160a01b038481166004830152600092169063ce5494bb906024016020604051808303816000875af115801561194e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119729190613904565b6040516370a0823160e01b81523060048201529091506001600160a01b038216906370a0823190602401602060405180830381865afa1580156119b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119dd91906137ef565b8214611a1a5760405162461bcd60e51b815260206004820152600c60248201526b1b5a59dc985d194e8818985960a21b6044820152606401610997565b83546001600160a01b0319166001600160a01b039190911617909255505050565b6000606d8281548110611a5057611a506137d9565b9060005260206000209060060201905080600201544311611a6f575050565b60048181015482546040516370a0823160e01b81523093810193909352600092611aac92916001600160a01b0316906370a0823190602401610770565b905080611abe57504360029091015550565b6000611ace836002015443611ece565b90506000611af5606f5461080d8660010154610807606a5487612d5d90919063ffffffff16565b606754909150611b13906001600160a01b0316610c8183600a612d69565b611b34611b298461080d8464e8d4a51000612d5d565b600386015490612d51565b60038501555050436002909201919091555050565b6000606d8281548110611b5e57611b5e6137d9565b60009182526020808320858452606e90915260408320600690920201925081611b843390565b6001600160a01b0316815260208101919091526040016000209050611bb733825484546001600160a01b03169190612d81565b80543360008181526077602090815260409182902054825194855260ff16151590840152805186937f9fef67ca40344e5550d748f62064f1b3d31f46191945782c3c408c8aa26f3a2692908290030190a360008082556001909101555050565b6066546001600160a01b0316336001600160a01b031614611c655760405162461bcd60e51b81526020600482015260086024820152676e6f74206e6f646560c01b6044820152606401610997565b6001600160a01b038116611c955760405162461bcd60e51b81526020600482015260006024820152604401610997565b6001600160a01b03166000908152607760205260409020805460ff19166001179055565b6033546001600160a01b03163314611ce35760405162461bcd60e51b81526004016109979061382c565b606b55565b606d5460005b81811015611d0f57611cff81611a3b565b611d08816138e9565b9050611cee565b5050565b6033546001600160a01b03163314611d3d5760405162461bcd60e51b81526004016109979061382c565b607180546001600160a01b03199081166001600160a01b039889161790915560728054821696881696909617909555607380549095169390951692909217909255607491909155607555607655565b6033546001600160a01b03163314611db65760405162461bcd60e51b81526004016109979061382c565b611dc06000612efe565b565b6033546001600160a01b03163314611dec5760405162461bcd60e51b81526004016109979061382c565b8015611dfa57611dfa611ce8565b611e37836107b1606d8781548110611e1457611e146137d9565b906000526020600020906006020160010154606f54612d7590919063ffffffff16565b606f819055506000606d8581548110611e5257611e526137d9565b906000526020600020906006020160010154905083606d8681548110611e7a57611e7a6137d9565b90600052602060002090600602016001018190555082606d8681548110611ea357611ea36137d9565b906000526020600020906006020160050181905550838114611ec757611ec7612f50565b5050505050565b606b54600090611ee2906108078486612d75565b9392505050565b6033546001600160a01b03163314611f135760405162461bcd60e51b81526004016109979061382c565b8015611f2157611f21611ce8565b60006070544311611f3457607054611f36565b435b606f54909150611f469086612d51565b606f556040805160c0810182526001600160a01b038681168252602082018881529282018481526000606084018181526080850182815260a086018a8152606d8054600181018255945295517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d8600690940293840180546001600160a01b031916919096161790945594517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d982015590517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18da82015592517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18db840155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dc830155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dd90910155611ec7612f50565b600054610100900460ff16806120ad575060005460ff16155b6120c95760405162461bcd60e51b815260040161099790613921565b600054610100900460ff161580156120eb576000805461ffff19166101011790555b6120f8868686868661300c565b801561210a576000805461ff00191690555b505050505050565b6033546001600160a01b0316331461213c5760405162461bcd60e51b81526004016109979061382c565b6001600160a01b0381166121925760405162461bcd60e51b815260206004820181905260248201527f4e465420616464726573732063616e206e6f74206265206164647265737320306044820152606401610997565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146121de5760405162461bcd60e51b81526004016109979061382c565b6001600160a01b0381166122345760405162461bcd60e51b815260206004820152601960248201527f6e6f64652063616e206e6f7420626520616464726573732030000000000000006044820152606401610997565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6000606d60008154811061226c5761226c6137d9565b60009182526020808320838052606e90915260069091020191507f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f816122af3390565b6001600160a01b0316815260208101919091526040016000209050336068546040516331a9108f60e11b8152600481018690526001600160a01b039283169290911690636352211e90602401602060405180830381865afa158015612318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233c9190613904565b6001600160a01b0316146123835760405162461bcd60e51b815260206004820152600e60248201526d32b93937b91027232a103ab9b2b960911b6044820152606401610997565b61238d6000611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa1580156123d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fb9190613808565b915091506000612420610b7f606461080d868860000154612d5d90919063ffffffff16565b90506000612443610baa606461080d878960030154612d5d90919063ffffffff16565b90508015612607576000612475866004015461092364e8d4a5100061080d8b6003015487612d5d90919063ffffffff16565b9050600080516020613a61833981519152816040516124c091906040808252600f908201526e195b9d195c94dd185ada5b99d39195608a1b6060820152602081019190915260800190565b60405180910390a18015612605576071546074546124f4916001600160a01b031690610c819060649061080d908690612d5d565b60725460755461251a916001600160a01b031690610c819060649061080d908690612d5d565b61253c610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b607354607654919250612567916001600160a01b0390911690610c819060649061080d908690612d5d565b612584610ce3606461080d60765485612d5d90919063ffffffff16565b905061258f33610dbe565b6066546001600160a01b031663986f33e03360038901546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156125ec57600080fd5b505af1158015612600573d6000803e3d6000fd5b505050505b505b8615612802576068546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018a9052606401600060405180830381600087803b15801561266d57600080fd5b505af1158015612681573d6000803e3d6000fd5b50505050607860006126903390565b6001600160a01b0390811682526020808301939093526040918201600090812080546001810182559082529381209093018a90556069549151634b893b5760e11b8152600481018b905283929091169063971276ae90602401608060405180830381865afa158015612706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272a9190613861565b935093505050600061274a606461080d8486612d5d90919063ffffffff16565b9050600061277161276a606461080d6127638c8c612d51565b8690612d5d565b8390612d51565b60048b01549091506127839082612d51565b60048b015588546127949083612d51565b895560038901546127a59083612d51565b60038a01554260058a015588546127cf906127c79060649061080d908c612d5d565b8a5490612d51565b95506127fb6127f0606461080d8b8d60030154612d5d90919063ffffffff16565b60038b015490612d51565b9450505050505b61282264e8d4a5100061080d886003015485612d5d90919063ffffffff16565b600186015560038601546128429064e8d4a510009061080d908490612d5d565b60048601553360008181526077602090815260408083205481518c815260ff90911615159281019290925280519293927f6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e59281900390910190a350505050505050565b6000606d83815481106128ba576128ba6137d9565b60009182526020808320868452606e909152604083206006909202019250816128e03390565b6001600160a01b03166001600160a01b03168152602001908152602001600020905061290b84611a3b565b6066546040805163858ce8f960e01b8152815160009384936001600160a01b039091169263858ce8f992600480830193928290030181865afa158015612955573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129799190613808565b6003850154855492945090925060009161299291612d75565b905060006129a861276a606461080d8588612d5d565b905060006129cb6108f0606461080d888a60030154612d5d90919063ffffffff16565b90508115612b8c576000612a05876001015461092389600401546107b164e8d4a5100061080d8e600301548a612d5d90919063ffffffff16565b9050600080516020613a6183398151915281604051612a48919060408082526007908201526619195c1bdcda5d60ca1b6060820152602081019190915260800190565b60405180910390a18015612b8a57607154607454612a7c916001600160a01b031690610c819060649061080d908690612d5d565b607254607554612aa2916001600160a01b031690610c819060649061080d908690612d5d565b612ac4610ce3606461080d610cdc607554607454612d5190919063ffffffff16565b607354607654919250612aef916001600160a01b0390911690610c819060649061080d908690612d5d565b612b0c610ce3606461080d60765485612d5d90919063ffffffff16565b9050612b1733610dbe565b6066546001600160a01b031663986f33e033895460405160e084901b6001600160e01b03191681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612b7157600080fd5b505af1158015612b85573d6000803e3d6000fd5b505050505b505b8715612bf157612ba93388546001600160a01b031690308b613080565b8554612bb59089612d51565b86554260028701556000612bd8606461080d612bd18989612d51565b8c90612d5d565b6004890154909150612bea9082612d51565b6004890155505b8554612c1090612c089060649061080d9089612d5d565b875490612d51565b9150612c3264e8d4a5100061080d896003015485612d5d90919063ffffffff16565b60018701556003870154612c529064e8d4a510009061080d908490612d5d565b6004870155336000818152607760209081526040918290205482518c815260ff90911615159181019190915281518c93927f6dbb6056a2fff319358e6dd7d0d72cb3baa992cdcc7e120fb0a32cd1601840e5928290030190a3505050505050505050565b6033546001600160a01b03163314612ce05760405162461bcd60e51b81526004016109979061382c565b6001600160a01b038116612d455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610997565b612d4e81612efe565b50565b6000611ee2828461396f565b6000611ee28284613987565b6000611ee282846139a6565b6000611ee282846138bc565b6040516001600160a01b038316602482015260448101829052612de490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526130be565b505050565b801580612e635750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6191906137ef565b155b612ece5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610997565b6040516001600160a01b038316602482015260448101829052612de490849063095ea7b360e01b90606401612dad565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606d54600060015b82811015612fa957612f97606d8281548110612f7657612f766137d9565b90600052602060002090600602016001015483612d5190919063ffffffff16565b9150612fa2816138e9565b9050612f58565b508015611d0f57612fbb816003612d69565b9050612fd8816107b1606d600081548110611e1457611e146137d9565b606f8190555080606d600081548110612ff357612ff36137d9565b9060005260206000209060060201600101819055505050565b600054610100900460ff1680613025575060005460ff16155b6130415760405162461bcd60e51b815260040161099790613921565b600054610100900460ff16158015613063576000805461ffff19166101011790555b61306b613190565b6130736131fb565b6120f8868686868661325b565b6040516001600160a01b03808516602483015283166044820152606481018290526130b89085906323b872dd60e01b90608401612dad565b50505050565b6000613113826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661344a9092919063ffffffff16565b805190915015612de4578080602001905181019061313191906139c8565b612de45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610997565b600054610100900460ff16806131a9575060005460ff16155b6131c55760405162461bcd60e51b815260040161099790613921565b600054610100900460ff161580156131e7576000805461ffff19166101011790555b8015612d4e576000805461ff001916905550565b600054610100900460ff1680613214575060005460ff16155b6132305760405162461bcd60e51b815260040161099790613921565b600054610100900460ff16158015613252576000805461ffff19166101011790555b6131e733612efe565b600054610100900460ff1680613274575060005460ff16155b6132905760405162461bcd60e51b815260040161099790613921565b600054610100900460ff161580156132b2576000805461ffff19166101011790555b606580546001600160a01b038089166001600160a01b031992831681179093556067805489831690841617905560668054888316908416179055606a86905560708590556040805160c0810182529384526103e8602085018181529185018781526000606087018181526080880182815260a08901838152606d80546001810182559452985160069093027f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d88101805494909816939098169290921790955592517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d9860155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18da85015591517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18db840155517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dc83015591517f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18dd90910155606f55801561210a576000805461ff0019169055505050505050565b60606134598484600085613461565b949350505050565b6060824710156134c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610997565b843b6135105760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610997565b600080866001600160a01b0316858760405161352c9190613a11565b60006040518083038185875af1925050503d8060008114613569576040519150601f19603f3d011682016040523d82523d6000602084013e61356e565b606091505b509150915061357e828286613589565b979650505050505050565b60608315613598575081611ee2565b8251156135a85782518084602001fd5b8160405162461bcd60e51b81526004016109979190613a2d565b6001600160a01b0381168114612d4e57600080fd5b600080604083850312156135ea57600080fd5b8235915060208301356135fc816135c2565b809150509250929050565b60006020828403121561361957600080fd5b8135611ee2816135c2565b60006020828403121561363657600080fd5b5035919050565b6000806040838503121561365057600080fd5b823561365b816135c2565b946020939093013593505050565b6000806040838503121561367c57600080fd5b50508035926020909101359150565b60008060008060008060c087890312156136a457600080fd5b86356136af816135c2565b955060208701356136bf816135c2565b945060408701356136cf816135c2565b959894975094956060810135955060808101359460a0909101359350915050565b8015158114612d4e57600080fd5b6000806000806080858703121561371457600080fd5b8435935060208501359250604085013591506060850135613734816136f0565b939692955090935050565b6000806000806080858703121561375557600080fd5b843593506020850135613767816135c2565b9250604085013591506060850135613734816136f0565b600080600080600060a0868803121561379657600080fd5b85356137a1816135c2565b945060208601356137b1816135c2565b935060408601356137c1816135c2565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561380157600080fd5b5051919050565b6000806040838503121561381b57600080fd5b505080516020909101519092909150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000806000806080858703121561387757600080fd5b845160ff8116811461388857600080fd5b60208601516040870151606090970151919890975090945092505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156138ce576138ce6138a6565b500390565b634e487b7160e01b600052603160045260246000fd5b60006000198214156138fd576138fd6138a6565b5060010190565b60006020828403121561391657600080fd5b8151611ee2816135c2565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115613982576139826138a6565b500190565b60008160001904831182151516156139a1576139a16138a6565b500290565b6000826139c357634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156139da57600080fd5b8151611ee2816136f0565b60005b83811015613a005781810151838201526020016139e8565b838111156130b85750506000910152565b60008251613a238184602087016139e5565b9190910192915050565b6020815260008251806020840152613a4c8160408501602087016139e5565b601f01601f1916919091016040019291505056fe547d01840adadc1f91b0b7058afebd3785cf71a81ca0832f983a88f9ecad37b7a2646970667358221220cc4e7c907ca8388f7a9614713e98ca1a21ed617d0f8943a11647dae15a3f4b0464736f6c634300080a0033