Address Details
contract

0x8ead7E560720c960FcE94E5081442d75F3219bb1

Contract Name
StarNFTLogic
Creator
0x7d6740–c9cfce at 0x1df639–37b20e
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
9202807
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
StarNFTLogic




Optimization enabled
false
Compiler version
v0.8.7+commit.e28d00a7




EVM Version
london




Verified at
2023-03-15T06:04:45.674392Z

contracts/StarNFTLogic.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/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.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 "./IStarNFT.sol";

interface IERC20Burnable is IERC20Upgradeable {
    function burnFrom(address account, uint256 amount) external;
}

interface IBonus {
    function getlockRatio() view external returns (uint256);
    function getlockAddress() view external returns (address);
}

contract StarNFTLogic is ContextUpgradeable, OwnableUpgradeable {
    using SafeERC20Upgradeable for IERC20Upgradeable;
    using SafeMathUpgradeable for uint256;

    using CountersUpgradeable for CountersUpgradeable.Counter;
    CountersUpgradeable.Counter private cateIds;

    struct StarCate {
        uint256 maxUnit;
        uint256 multiple;
        uint256 usedUnit;
    }

    struct StarMeta {
        StarLevel level;
        uint256 cateId;
        uint256 price;
        uint256 multiple;
    }

    struct LevelMethod {
        uint256 usedUnit;
        uint256 burned;
        uint256 price;
        bool isInc;
        uint256 base;
        uint256 step;
        bool isUnique;
    }

    enum StarLevel {
        COMMON,
        SPECIAL,
        EXCLUSIVE
    }

    IERC20Burnable public starToken;
    IBonus private Bonus;
    IStarNFT public starNFT;
    address public bonusAddr;
    uint256 public totalPrice;
    uint256 public fee;
    uint256[] private _allTokensId;
    mapping(uint256 => StarCate) public cateId;
    mapping(StarLevel => uint256[]) public starCate;
    mapping(StarLevel => LevelMethod) public levelMethod;
    mapping(uint256 => StarMeta) public starMeta;
    mapping (uint256 => uint256) public bonusToken;

    function initialize(address _starToken, address _bonus, address _starNFT, uint256 _fee) public initializer {
        __starNFTLogic_init(_starToken, _bonus, _starNFT, _fee);
    }

    function __starNFTLogic_init(address _starToken, address _bonus, address _starNFT, uint256 _fee) internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
        __starNFTLogic_init_unchained(_starToken, _bonus, _starNFT, _fee);
    }

    function __starNFTLogic_init_unchained(address _starToken, address _bonus, address _starNFT, uint256 _fee) internal initializer {
        starToken = IERC20Burnable(_starToken);
        starNFT = IStarNFT(_starNFT);
        bonusAddr = _bonus;
        Bonus = IBonus(bonusAddr);
        fee = _fee;
    }

    //mint function
    function mint() public returns (uint256) {
        uint256 _cateId = starCate[StarLevel.COMMON][getRndCateIndex(StarLevel.COMMON)];
        LevelMethod storage _levelMethod = levelMethod[StarLevel.COMMON];
        uint256 _price = _levelMethod.price;
        require(_price > 0, "level price error");
        if (_levelMethod.isInc && _levelMethod.base > 0) {
            _price = _price.add(_levelMethod.usedUnit.mod(_levelMethod.base).mul(_levelMethod.step));
        }
        uint256 indexLength = _allTokensId.length;
        uint256 _fee = _price.mul(fee).div(100);
        uint256 lockRatio = Bonus.getlockRatio();
        starToken.transferFrom(_msgSender(), address(this), _price);
        starToken.burnFrom(address(this), _price.sub(_fee));
        starToken.transferFrom(address(this), bonusAddr, _fee.mul(100 - lockRatio).div(100));
        starToken.transferFrom(address(this), Bonus.getlockAddress(), _fee.mul(lockRatio).div(100));
        uint256 _starId = starNFT.mint(_msgSender(), _cateId);
        uint256 _multi = cateId[_cateId].multiple;
        starMeta[_starId] = StarMeta(StarLevel.COMMON, _cateId, _price, _multi);
        cateId[_cateId].usedUnit += 1;
        _levelMethod.usedUnit += 1;
        totalPrice = totalPrice.add(_price.mul(_multi).div(100));
        uint256 amountBonus = _fee.mul(100 - lockRatio).div(100);
        if(indexLength > 0){
            uint256 divAmountBonus = amountBonus.mul(1e12).div(indexLength);
            for(uint256 i = 0;i< indexLength;i++){
                uint256 tokenId = _allTokensId[i];
                uint256 UserBonusToken = bonusToken[tokenId];
                bonusToken[tokenId] = divAmountBonus.div(1e12).add(UserBonusToken);
            }
        }
        _allTokensId.push(_starId);
        return _starId;
    }

    function melt(uint256[] memory _tokenIds, StarLevel _from, StarLevel _to) public returns (uint256) {
        require(uint256(_to) == uint256(_from) + 1, "melt level error");
        require(starNFT.massVerifyOwner(_msgSender(), _tokenIds), "not your tokens");
        (uint256 _price, uint256 _multiple) = verifyTokens(_from, _to, _tokenIds);
        require(_price != 0, "token error");
        starNFT.massBurn(_tokenIds);
        uint256 TransferBonus = 0;
        for (uint256 i = 0 ; i < _tokenIds.length; i ++) {
            for (uint256 j = 0 ; j < _allTokensId.length; j ++){
                if(_allTokensId[j] == _tokenIds[i]){
                    TransferBonus += bonusToken[_tokenIds[i]];
                    uint256 NewTokenId = _allTokensId[_allTokensId.length - 1];
                    _allTokensId[_allTokensId.length - 1] = _allTokensId[j];
                    _allTokensId[j] = NewTokenId;
                    _allTokensId.pop();
                }
            }
        }
        levelMethod[_from].burned += _tokenIds.length;
        uint256 _cateId = starCate[_to][getRndCateIndex(_to)];
        uint256 _starId = starNFT.mint(_msgSender(), _cateId);
        uint256 _multi = _multiple.mul(cateId[_cateId].multiple).div(100);
        starMeta[_starId] = StarMeta(_to, _cateId, _price, _multi);
        cateId[_cateId].usedUnit += 1;
        levelMethod[_to].usedUnit += 1;
        totalPrice = totalPrice.add(_price.mul(_multi).div(100));
        bonusToken[_starId] = TransferBonus;
        _allTokensId.push(_starId);
        return _starId;
    }

    function verifyTokens(StarLevel _level, StarLevel _newLevel, uint256[] memory _tokenIds) view internal returns (uint256, uint256) {
        LevelMethod memory _levelMethod = levelMethod[_newLevel];
        uint256 _price = _levelMethod.price;
        if (_levelMethod.isInc && _levelMethod.base > 0) {
             _price.add(_levelMethod.usedUnit.div(_levelMethod.base).mul(_levelMethod.step));
        }
        require(_tokenIds.length == _price, "token amount error");
        uint256 multiple;
        uint256 price;
        uint256[] memory _cateIds = new uint256[](_tokenIds.length);
        for (uint256 i = 0; i < _tokenIds.length; i ++) {
            require(starMeta[_tokenIds[i]].level == _level, "error level");
            price = price.add(starMeta[_tokenIds[i]].price);
            multiple = multiple.add(starMeta[_tokenIds[i]].multiple);
            if (!_levelMethod.isUnique) {
                require(!indexOf(_cateIds, starMeta[_tokenIds[i]].cateId), "must be unique cate");
            }
            _cateIds[i] = starMeta[_tokenIds[i]].cateId;
        }
        return (price, multiple.div(_tokenIds.length));
    }

    function getCateLength(StarLevel _level) internal view returns (uint256) {
        return starCate[_level].length;
    }

    function getRndCateIndex(StarLevel _level) view public returns (uint256) {
        uint256[] storage _cate = starCate[_level];
        require(_cate.length > 0, "no cate");
        uint256 _rndCateIndex;
        // uint256 _rndCateIndex2;
        // uint256 nonce;
        do {
            _rndCateIndex = uint256(keccak256(abi.encodePacked(block.coinbase, msg.sender, block.timestamp))) % _cate.length;
            // _rndCateIndex = uint256(keccak256(abi.encodePacked(block.coinbase, msg.sender, nonce, block.timestamp))) % (_cate.length -1);
            // _rndCateIndex2 = uint256(keccak256(abi.encodePacked(block.coinbase, msg.sender, nonce, block.timestamp))) % (_cate.length -1) + 1;
            // if (cateId[_cate[_rndCateIndex2]].maxUnit > cateId[_cate[_rndCateIndex2]].usedUnit){
            //     _rndCateIndex = _rndCateIndex2;
            // }
            if (cateId[_cate[_rndCateIndex]].maxUnit > cateId[_cate[_rndCateIndex]].usedUnit) break;
        //     nonce ++;
        } while (true);
        return _rndCateIndex;
    }

    function addCate(StarLevel _level, uint256 _maxUnit, uint256 _multiple, string memory _cateUri) onlyOwner public {
        cateIds.increment();
        uint256 _cateId = cateIds.current();
        cateId[_cateId] = StarCate(_maxUnit, _multiple, 0);
        starCate[_level].push(_cateId);
        starNFT.setCateURI(_cateId, _cateUri);
    }

    function editCate(uint256 _cateId, uint256 _maxUnit, uint256 _multiple, string memory _cateUri) onlyOwner public {
        StarCate storage _cate = cateId[_cateId];
        _cate.maxUnit = _maxUnit;
        _cate.multiple = _multiple;
        starNFT.setCateURI(_cateId, _cateUri);
    }

    function setLevelMethod(StarLevel _level, uint256 _price, bool _isInc, uint256 _base, uint256 _step, bool _isUnique) onlyOwner public {
        LevelMethod storage _levelMethod = levelMethod[_level];
        _levelMethod.price = _price;
        _levelMethod.isInc = _isInc;
        _levelMethod.base = _base;
        _levelMethod.step = _step;
        _levelMethod.isUnique = _isUnique;
    }

    function disposeBonusToke(uint256 _tokenId) view external returns (uint256) {
        return bonusToken[_tokenId];
    }

    function getTokensId(uint256 _index) view public returns(uint256){
        return _allTokensId[_index];
    }

    function getAllTokenId() view external returns(uint256[] memory){
        return  _allTokensId;
    }

    function setBonusToke(uint256 _tokenId,uint256 _amountBonus) external {
        bonusToken[_tokenId] = _amountBonus;
    }

    function setStarNFT(address _starNFT) onlyOwner public {
        require(_starNFT != address(0), "address error");
        starNFT = IStarNFT(_starNFT);
    }

    function setBonus(address _bonus) onlyOwner public {
        require(_bonus != address(0), "address error");
        bonusAddr = _bonus;
        Bonus = IBonus(bonusAddr);
    }

    function setStarToken(address _starToken) onlyOwner public {
        require(_starToken != address(0), "address error");
        starToken = IERC20Burnable(_starToken);
    }

    function indexOf(uint256[] memory A, uint256 a) internal pure returns (bool) {
        uint256 length = A.length;
        for (uint256 i = 0; i < length; i++) {
            if (A[i] == a) {
                return true;
            }
        }
        return false;
    }
    }
        

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

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

/**
 * @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() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}
          

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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.1 (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.1 (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.1 (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.1 (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 onlyInitializing {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    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/CountersUpgradeable.sol

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

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library CountersUpgradeable {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}
          

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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.1 (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/IStarNFT.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IStarNFT {
    function mint(address _owner, uint256 _cateId) external returns (uint256);
    function setCateURI(uint256 _cateId, string memory _cateUri) external;
    function massVerifyOwner(address owner, uint256[] memory _tokenIds) view external returns (bool);
    function massBurn(uint256[] memory _tokenIds) external;
    function setSale(bool _sale) external;
    function balanceOf(address owner) view external returns (uint256);
    function tokenOfOwnerByIndex(address owner,uint256 tokenid) view external returns (uint256);
}
          

Contract ABI

[{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addCate","inputs":[{"type":"uint8","name":"_level","internalType":"enum StarNFTLogic.StarLevel"},{"type":"uint256","name":"_maxUnit","internalType":"uint256"},{"type":"uint256","name":"_multiple","internalType":"uint256"},{"type":"string","name":"_cateUri","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"bonusAddr","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bonusToken","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"maxUnit","internalType":"uint256"},{"type":"uint256","name":"multiple","internalType":"uint256"},{"type":"uint256","name":"usedUnit","internalType":"uint256"}],"name":"cateId","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"disposeBonusToke","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"editCate","inputs":[{"type":"uint256","name":"_cateId","internalType":"uint256"},{"type":"uint256","name":"_maxUnit","internalType":"uint256"},{"type":"uint256","name":"_multiple","internalType":"uint256"},{"type":"string","name":"_cateUri","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getAllTokenId","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRndCateIndex","inputs":[{"type":"uint8","name":"_level","internalType":"enum StarNFTLogic.StarLevel"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokensId","inputs":[{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_starToken","internalType":"address"},{"type":"address","name":"_bonus","internalType":"address"},{"type":"address","name":"_starNFT","internalType":"address"},{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"usedUnit","internalType":"uint256"},{"type":"uint256","name":"burned","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"bool","name":"isInc","internalType":"bool"},{"type":"uint256","name":"base","internalType":"uint256"},{"type":"uint256","name":"step","internalType":"uint256"},{"type":"bool","name":"isUnique","internalType":"bool"}],"name":"levelMethod","inputs":[{"type":"uint8","name":"","internalType":"enum StarNFTLogic.StarLevel"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"melt","inputs":[{"type":"uint256[]","name":"_tokenIds","internalType":"uint256[]"},{"type":"uint8","name":"_from","internalType":"enum StarNFTLogic.StarLevel"},{"type":"uint8","name":"_to","internalType":"enum StarNFTLogic.StarLevel"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBonus","inputs":[{"type":"address","name":"_bonus","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBonusToke","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"},{"type":"uint256","name":"_amountBonus","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLevelMethod","inputs":[{"type":"uint8","name":"_level","internalType":"enum StarNFTLogic.StarLevel"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"bool","name":"_isInc","internalType":"bool"},{"type":"uint256","name":"_base","internalType":"uint256"},{"type":"uint256","name":"_step","internalType":"uint256"},{"type":"bool","name":"_isUnique","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStarNFT","inputs":[{"type":"address","name":"_starNFT","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStarToken","inputs":[{"type":"address","name":"_starToken","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"starCate","inputs":[{"type":"uint8","name":"","internalType":"enum StarNFTLogic.StarLevel"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"level","internalType":"enum StarNFTLogic.StarLevel"},{"type":"uint256","name":"cateId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"uint256","name":"multiple","internalType":"uint256"}],"name":"starMeta","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IStarNFT"}],"name":"starNFT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Burnable"}],"name":"starToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalPrice","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b506142dd806100206000396000f3fe608060405234801561001057600080fd5b50600436106101a85760003560e01c8063715018a6116100f9578063b7ca51e811610097578063cf756fdf11610071578063cf756fdf146104d8578063dd6fd842146104f4578063ddca3f4314610524578063f2fde38b14610542576101a8565b8063b7ca51e81461045a578063c9f09b9c14610478578063ca7c15d4146104a8576101a8565b8063971276ae116100d3578063971276ae146103d15780639c2fc62314610404578063ab0d92dd14610420578063b0bf74e31461043e576101a8565b8063715018a614610373578063866285421461037d5780638da5cb5b146103b3576101a8565b80631d7cf6c611610166578063334d491d11610140578063334d491d146103015780634d85ca261461031d5780636b57d9bd1461033957806370dca97414610355576101a8565b80631d7cf6c6146102835780631e2f2912146102b35780632018ce8b146102cf576101a8565b80621917d7146101ad57806304764089146101dd578063069f2c0d146101fb5780631249c58b1461022b57806312dcff7a1461024957806313eaabb814610265575b600080fd5b6101c760048036038101906101c2919061322f565b61055e565b6040516101d49190613995565b60405180910390f35b6101e5610576565b6040516101f29190613758565b60405180910390f35b610215600480360381019061021091906130df565b6105ce565b6040516102229190613995565b60405180910390f35b6102336105ff565b6040516102409190613995565b60405180910390f35b610263600480360381019061025e9190612f55565b610f3f565b005b61026d6110d2565b60405161027a91906136ad565b60405180910390f35b61029d60048036038101906102989190613016565b6110f8565b6040516102aa9190613995565b60405180910390f35b6102cd60048036038101906102c89190613289565b611829565b005b6102e960048036038101906102e4919061322f565b611845565b6040516102f8939291906139e0565b60405180910390f35b61031b60048036038101906103169190612f55565b61186f565b005b610337600480360381019061033291906132c9565b61199f565b005b610353600480360381019061034e919061311f565b611ada565b005b61035d611bed565b60405161036a9190613795565b60405180910390f35b61037b611c13565b005b610397600480360381019061039291906130b2565b611c9b565b6040516103aa9796959493929190613a17565b60405180910390f35b6103bb611cf7565b6040516103c891906136ad565b60405180910390f35b6103eb60048036038101906103e6919061322f565b611d21565b6040516103fb94939291906137b0565b60405180910390f35b61041e600480360381019061041991906131ac565b611d5e565b005b610428611f36565b6040516104359190613995565b60405180910390f35b61045860048036038101906104539190612f55565b611f3c565b005b61046261206c565b60405161046f919061377a565b60405180910390f35b610492600480360381019061048d919061322f565b612092565b60405161049f9190613995565b60405180910390f35b6104c260048036038101906104bd91906130b2565b6120af565b6040516104cf9190613995565b60405180910390f35b6104f260048036038101906104ed9190612faf565b6121f8565b005b61050e6004803603810190610509919061322f565b6122ec565b60405161051b9190613995565b60405180910390f35b61052c612314565b6040516105399190613995565b60405180910390f35b61055c60048036038101906105579190612f55565b61231a565b005b60716020528060005260406000206000915090505481565b6060606c8054806020026020016040519081016040528092919081815260200182805480156105c457602002820191906000526020600020905b8154815260200190600101908083116105b0575b5050505050905090565b606e60205281600052604060002081815481106105ea57600080fd5b90600052602060002001600091509150505481565b600080606e600080600281111561061957610618613ec4565b5b600281111561062b5761062a613ec4565b5b815260200190815260200160002061064360006120af565b8154811061065457610653613f22565b5b906000526020600020015490506000606f600080600281111561067a57610679613ec4565b5b600281111561068c5761068b613ec4565b5b81526020019081526020016000209050600081600201549050600081116106e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106df90613895565b60405180910390fd5b8160030160009054906101000a900460ff16801561070a575060008260040154115b156107555761075261074383600501546107358560040154866000015461241290919063ffffffff16565b61242890919063ffffffff16565b8261243e90919063ffffffff16565b90505b6000606c8054905090506000610789606461077b606b548661242890919063ffffffff16565b61245490919063ffffffff16565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340ee7ce26040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d919061325c565b9050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd61087561246a565b30876040518463ffffffff1660e01b8152600401610895939291906136c8565b602060405180830381600087803b1580156108af57600080fd5b505af11580156108c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190613085565b50606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379cc67903061093a858861247290919063ffffffff16565b6040518363ffffffff1660e01b815260040161095792919061372f565b600060405180830381600087803b15801561097157600080fd5b505af1158015610985573d6000803e3d6000fd5b50505050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610a1d6064610a0f876064610a009190613c3e565b8961242890919063ffffffff16565b61245490919063ffffffff16565b6040518463ffffffff1660e01b8152600401610a3b939291906136c8565b602060405180830381600087803b158015610a5557600080fd5b505af1158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d9190613085565b50606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638b6e15e56040518163ffffffff1660e01b815260040160206040518083038186803b158015610b3557600080fd5b505afa158015610b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6d9190612f82565b610b936064610b85878961242890919063ffffffff16565b61245490919063ffffffff16565b6040518463ffffffff1660e01b8152600401610bb1939291906136c8565b602060405180830381600087803b158015610bcb57600080fd5b505af1158015610bdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c039190613085565b506000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19610c4c61246a565b896040518363ffffffff1660e01b8152600401610c6a92919061372f565b602060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbc919061325c565b90506000606d6000898152602001908152602001600020600101549050604051806080016040528060006002811115610cf857610cf7613ec4565b5b8152602001898152602001878152602001828152506070600084815260200190815260200160002060008201518160000160006101000a81548160ff02191690836002811115610d4b57610d4a613ec4565b5b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d60008a81526020019081526020016000206002016000828254610d989190613b5d565b925050819055506001876000016000828254610db49190613b5d565b92505081905550610df5610de46064610dd6848a61242890919063ffffffff16565b61245490919063ffffffff16565b606a5461243e90919063ffffffff16565b606a819055506000610e2f6064610e21866064610e129190613c3e565b8861242890919063ffffffff16565b61245490919063ffffffff16565b90506000861115610f07576000610e6687610e5864e8d4a510008561242890919063ffffffff16565b61245490919063ffffffff16565b905060005b87811015610f04576000606c8281548110610e8957610e88613f22565b5b90600052602060002001549050600060716000838152602001908152602001600020549050610ed881610eca64e8d4a510008761245490919063ffffffff16565b61243e90919063ffffffff16565b607160008481526020019081526020016000208190555050508080610efc90613dac565b915050610e6b565b50505b606c83908060018154018082558091505060019003906000526020600020016000909190919091505582995050505050505050505090565b610f4761246a565b73ffffffffffffffffffffffffffffffffffffffff16610f65611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614610fbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb2906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561102b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102290613815565b60405180910390fd5b80606960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600183600281111561110f5761110e613ec4565b5b6111199190613b5d565b82600281111561112c5761112b613ec4565b5b1461116c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611163906138b5565b60405180910390fd5b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f69b8626111b261246a565b866040518363ffffffff1660e01b81526004016111d09291906136ff565b60206040518083038186803b1580156111e857600080fd5b505afa1580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112209190613085565b61125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125690613955565b60405180910390fd5b60008061126d858588612488565b9150915060008214156112b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ac906137f5565b60405180910390fd5b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b1d73026876040518263ffffffff1660e01b81526004016113109190613758565b600060405180830381600087803b15801561132a57600080fd5b505af115801561133e573d6000803e3d6000fd5b505050506000805b87518110156114d45760005b606c805490508110156114c05788828151811061137257611371613f22565b5b6020026020010151606c828154811061138e5761138d613f22565b5b906000526020600020015414156114ad57607160008a84815181106113b6576113b5613f22565b5b6020026020010151815260200190815260200160002054836113d89190613b5d565b92506000606c6001606c805490506113f09190613c3e565b8154811061140157611400613f22565b5b90600052602060002001549050606c828154811061142257611421613f22565b5b9060005260206000200154606c6001606c805490506114419190613c3e565b8154811061145257611451613f22565b5b906000526020600020018190555080606c838154811061147557611474613f22565b5b9060005260206000200181905550606c80548061149557611494613ef3565b5b60019003818190600052602060002001600090559055505b80806114b890613dac565b915050611352565b5080806114cc90613dac565b915050611346565b508651606f60008860028111156114ee576114ed613ec4565b5b6002811115611500576114ff613ec4565b5b815260200190815260200160002060010160008282546115209190613b5d565b925050819055506000606e60008760028111156115405761153f613ec4565b5b600281111561155257611551613ec4565b5b8152602001908152602001600020611569876120af565b8154811061157a57611579613f22565b5b906000526020600020015490506000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f196115cf61246a565b846040518363ffffffff1660e01b81526004016115ed92919061372f565b602060405180830381600087803b15801561160757600080fd5b505af115801561161b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163f919061325c565b9050600061167f6064611671606d6000878152602001908152602001600020600101548861242890919063ffffffff16565b61245490919063ffffffff16565b9050604051806080016040528089600281111561169f5761169e613ec4565b5b8152602001848152602001878152602001828152506070600084815260200190815260200160002060008201518160000160006101000a81548160ff021916908360028111156116f2576116f1613ec4565b5b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d6000858152602001908152602001600020600201600082825461173f9190613b5d565b925050819055506001606f60008a600281111561175f5761175e613ec4565b5b600281111561177157611770613ec4565b5b815260200190815260200160002060000160008282546117919190613b5d565b925050819055506117d26117c160646117b3848a61242890919063ffffffff16565b61245490919063ffffffff16565b606a5461243e90919063ffffffff16565b606a81905550836071600084815260200190815260200160002081905550606c8290806001815401808255809150506001900390600052602060002001600090919091909150558196505050505050509392505050565b8060716000848152602001908152602001600020819055505050565b606d6020528060005260406000206000915090508060000154908060010154908060020154905083565b61187761246a565b73ffffffffffffffffffffffffffffffffffffffff16611895611cf7565b73ffffffffffffffffffffffffffffffffffffffff16146118eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e2906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561195b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195290613815565b60405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6119a761246a565b73ffffffffffffffffffffffffffffffffffffffff166119c5611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611a1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a12906138f5565b60405180910390fd5b6000606d60008681526020019081526020016000209050838160000181905550828160010181905550606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adc84d2e86846040518363ffffffff1660e01b8152600401611aa19291906139b0565b600060405180830381600087803b158015611abb57600080fd5b505af1158015611acf573d6000803e3d6000fd5b505050505050505050565b611ae261246a565b73ffffffffffffffffffffffffffffffffffffffff16611b00611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4d906138f5565b60405180910390fd5b6000606f6000886002811115611b6f57611b6e613ec4565b5b6002811115611b8157611b80613ec4565b5b81526020019081526020016000209050858160020181905550848160030160006101000a81548160ff021916908315150217905550838160040181905550828160050181905550818160060160006101000a81548160ff02191690831515021790555050505050505050565b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611c1b61246a565b73ffffffffffffffffffffffffffffffffffffffff16611c39611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c86906138f5565b60405180910390fd5b611c99600061287c565b565b606f6020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900460ff16908060040154908060050154908060060160009054906101000a900460ff16905087565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60706020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154908060030154905084565b611d6661246a565b73ffffffffffffffffffffffffffffffffffffffff16611d84611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611dda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd1906138f5565b60405180910390fd5b611de46065612942565b6000611df06065612958565b905060405180606001604052808581526020018481526020016000815250606d6000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050606e6000866002811115611e5957611e58613ec4565b5b6002811115611e6b57611e6a613ec4565b5b8152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915055606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adc84d2e82846040518363ffffffff1660e01b8152600401611efd9291906139b0565b600060405180830381600087803b158015611f1757600080fd5b505af1158015611f2b573d6000803e3d6000fd5b505050505050505050565b606a5481565b611f4461246a565b73ffffffffffffffffffffffffffffffffffffffff16611f62611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faf906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612028576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201f90613815565b60405180910390fd5b80606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060716000838152602001908152602001600020549050919050565b600080606e60008460028111156120c9576120c8613ec4565b5b60028111156120db576120da613ec4565b5b815260200190815260200160002090506000818054905011612132576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212990613875565b60405180910390fd5b60005b818054905041334260405160200161214f93929190613670565b6040516020818303038152906040528051906020012060001c6121729190613e35565b9050606d600083838154811061218b5761218a613f22565b5b9060005260206000200154815260200190815260200160002060020154606d60008484815481106121bf576121be613f22565b5b906000526020600020015481526020019081526020016000206000015411156121e7576121ee565b6001612135575b8092505050919050565b600060019054906101000a900460ff166122205760008054906101000a900460ff1615612229565b612228612966565b5b612268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225f906138d5565b60405180910390fd5b60008060019054906101000a900460ff1615905080156122b8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6122c485858585612977565b80156122e55760008060016101000a81548160ff0219169083151502179055505b5050505050565b6000606c828154811061230257612301613f22565b5b90600052602060002001549050919050565b606b5481565b61232261246a565b73ffffffffffffffffffffffffffffffffffffffff16612340611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614612396576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238d906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612406576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fd90613835565b60405180910390fd5b61240f8161287c565b50565b600081836124209190613e35565b905092915050565b600081836124369190613be4565b905092915050565b6000818361244c9190613b5d565b905092915050565b600081836124629190613bb3565b905092915050565b600033905090565b600081836124809190613c3e565b905092915050565b6000806000606f60008660028111156124a4576124a3613ec4565b5b60028111156124b6576124b5613ec4565b5b81526020019081526020016000206040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900460ff1615151515815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff161515151581525050905060008160400151905081606001518015612557575060008260800151115b156125a15761259f6125908360a001516125828560800151866000015161245490919063ffffffff16565b61242890919063ffffffff16565b8261243e90919063ffffffff16565b505b808551146125e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125db90613975565b60405180910390fd5b6000806000875167ffffffffffffffff81111561260457612603613f51565b5b6040519080825280602002602001820160405280156126325781602001602082028036833780820191505090505b50905060005b8851811015612855578a600281111561265457612653613ec4565b5b607060008b848151811061266b5761266a613f22565b5b6020026020010151815260200190815260200160002060000160009054906101000a900460ff1660028111156126a4576126a3613ec4565b5b146126e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126db90613855565b60405180910390fd5b612727607060008b84815181106126fe576126fd613f22565b5b60200260200101518152602001908152602001600020600201548461243e90919063ffffffff16565b925061276c607060008b848151811061274357612742613f22565b5b60200260200101518152602001908152602001600020600301548561243e90919063ffffffff16565b93508560c001516127f2576127b182607060008c858151811061279257612791613f22565b5b6020026020010151815260200190815260200160002060010154612a7b565b156127f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127e890613915565b60405180910390fd5b5b607060008a838151811061280957612808613f22565b5b602002602001015181526020019081526020016000206001015482828151811061283657612835613f22565b5b602002602001018181525050808061284d90613dac565b915050612638565b508161286b89518561245490919063ffffffff16565b965096505050505050935093915050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001816000016000828254019250508190555050565b600081600001549050919050565b600061297130612ada565b15905090565b600060019054906101000a900460ff1661299f5760008054906101000a900460ff16156129a8565b6129a7612966565b5b6129e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129de906138d5565b60405180910390fd5b60008060019054906101000a900460ff161590508015612a37576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612a3f612aed565b612a47612b3e565b612a5385858585612b9f565b8015612a745760008060016101000a81548160ff0219169083151502179055505b5050505050565b6000808351905060005b81811015612acd5783858281518110612aa157612aa0613f22565b5b60200260200101511415612aba57600192505050612ad4565b8080612ac590613dac565b915050612a85565b5060009150505b92915050565b600080823b905060008111915050919050565b600060019054906101000a900460ff16612b3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3390613935565b60405180910390fd5b565b600060019054906101000a900460ff16612b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8490613935565b60405180910390fd5b612b9d612b9861246a565b61287c565b565b600060019054906101000a900460ff16612bc75760008054906101000a900460ff1615612bd0565b612bcf612966565b5b612c0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c06906138d5565b60405180910390fd5b60008060019054906101000a900460ff161590508015612c5f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b84606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606b819055508015612dad5760008060016101000a81548160ff0219169083151502179055505b5050505050565b6000612dc7612dc284613aab565b613a86565b90508083825260208201905082856020860282011115612dea57612de9613f85565b5b60005b85811015612e1a5781612e008882612f2b565b845260208401935060208301925050600181019050612ded565b5050509392505050565b6000612e37612e3284613ad7565b613a86565b905082815260208101848484011115612e5357612e52613f8a565b5b612e5e848285613d39565b509392505050565b600081359050612e7581614252565b92915050565b600081519050612e8a81614252565b92915050565b600082601f830112612ea557612ea4613f80565b5b8135612eb5848260208601612db4565b91505092915050565b600081359050612ecd81614269565b92915050565b600081519050612ee281614269565b92915050565b600081359050612ef781614280565b92915050565b600082601f830112612f1257612f11613f80565b5b8135612f22848260208601612e24565b91505092915050565b600081359050612f3a81614290565b92915050565b600081519050612f4f81614290565b92915050565b600060208284031215612f6b57612f6a613f94565b5b6000612f7984828501612e66565b91505092915050565b600060208284031215612f9857612f97613f94565b5b6000612fa684828501612e7b565b91505092915050565b60008060008060808587031215612fc957612fc8613f94565b5b6000612fd787828801612e66565b9450506020612fe887828801612e66565b9350506040612ff987828801612e66565b925050606061300a87828801612f2b565b91505092959194509250565b60008060006060848603121561302f5761302e613f94565b5b600084013567ffffffffffffffff81111561304d5761304c613f8f565b5b61305986828701612e90565b935050602061306a86828701612ee8565b925050604061307b86828701612ee8565b9150509250925092565b60006020828403121561309b5761309a613f94565b5b60006130a984828501612ed3565b91505092915050565b6000602082840312156130c8576130c7613f94565b5b60006130d684828501612ee8565b91505092915050565b600080604083850312156130f6576130f5613f94565b5b600061310485828601612ee8565b925050602061311585828601612f2b565b9150509250929050565b60008060008060008060c0878903121561313c5761313b613f94565b5b600061314a89828a01612ee8565b965050602061315b89828a01612f2b565b955050604061316c89828a01612ebe565b945050606061317d89828a01612f2b565b935050608061318e89828a01612f2b565b92505060a061319f89828a01612ebe565b9150509295509295509295565b600080600080608085870312156131c6576131c5613f94565b5b60006131d487828801612ee8565b94505060206131e587828801612f2b565b93505060406131f687828801612f2b565b925050606085013567ffffffffffffffff81111561321757613216613f8f565b5b61322387828801612efd565b91505092959194509250565b60006020828403121561324557613244613f94565b5b600061325384828501612f2b565b91505092915050565b60006020828403121561327257613271613f94565b5b600061328084828501612f40565b91505092915050565b600080604083850312156132a05761329f613f94565b5b60006132ae85828601612f2b565b92505060206132bf85828601612f2b565b9150509250929050565b600080600080608085870312156132e3576132e2613f94565b5b60006132f187828801612f2b565b945050602061330287828801612f2b565b935050604061331387828801612f2b565b925050606085013567ffffffffffffffff81111561333457613333613f8f565b5b61334087828801612efd565b91505092959194509250565b6000613358838361363b565b60208301905092915050565b61337561337082613c84565b613e07565b82525050565b61338481613c72565b82525050565b61339b61339682613c72565b613df5565b82525050565b60006133ac82613b18565b6133b68185613b3b565b93506133c183613b08565b8060005b838110156133f25781516133d9888261334c565b97506133e483613b2e565b9250506001810190506133c5565b5085935050505092915050565b61340881613c96565b82525050565b61341781613cdf565b82525050565b61342681613cf1565b82525050565b61343581613d03565b82525050565b600061344682613b23565b6134508185613b4c565b9350613460818560208601613d48565b61346981613f99565b840191505092915050565b6000613481600b83613b4c565b915061348c82613fb7565b602082019050919050565b60006134a4600d83613b4c565b91506134af82613fe0565b602082019050919050565b60006134c7602683613b4c565b91506134d282614009565b604082019050919050565b60006134ea600b83613b4c565b91506134f582614058565b602082019050919050565b600061350d600783613b4c565b915061351882614081565b602082019050919050565b6000613530601183613b4c565b915061353b826140aa565b602082019050919050565b6000613553601083613b4c565b915061355e826140d3565b602082019050919050565b6000613576602e83613b4c565b9150613581826140fc565b604082019050919050565b6000613599602083613b4c565b91506135a48261414b565b602082019050919050565b60006135bc601383613b4c565b91506135c782614174565b602082019050919050565b60006135df602b83613b4c565b91506135ea8261419d565b604082019050919050565b6000613602600f83613b4c565b915061360d826141ec565b602082019050919050565b6000613625601283613b4c565b915061363082614215565b602082019050919050565b61364481613cd5565b82525050565b61365381613cd5565b82525050565b61366a61366582613cd5565b613e2b565b82525050565b600061367c8286613364565b60148201915061368c828561338a565b60148201915061369c8284613659565b602082019150819050949350505050565b60006020820190506136c2600083018461337b565b92915050565b60006060820190506136dd600083018661337b565b6136ea602083018561337b565b6136f7604083018461364a565b949350505050565b6000604082019050613714600083018561337b565b818103602083015261372681846133a1565b90509392505050565b6000604082019050613744600083018561337b565b613751602083018461364a565b9392505050565b6000602082019050818103600083015261377281846133a1565b905092915050565b600060208201905061378f600083018461340e565b92915050565b60006020820190506137aa600083018461341d565b92915050565b60006080820190506137c5600083018761342c565b6137d2602083018661364a565b6137df604083018561364a565b6137ec606083018461364a565b95945050505050565b6000602082019050818103600083015261380e81613474565b9050919050565b6000602082019050818103600083015261382e81613497565b9050919050565b6000602082019050818103600083015261384e816134ba565b9050919050565b6000602082019050818103600083015261386e816134dd565b9050919050565b6000602082019050818103600083015261388e81613500565b9050919050565b600060208201905081810360008301526138ae81613523565b9050919050565b600060208201905081810360008301526138ce81613546565b9050919050565b600060208201905081810360008301526138ee81613569565b9050919050565b6000602082019050818103600083015261390e8161358c565b9050919050565b6000602082019050818103600083015261392e816135af565b9050919050565b6000602082019050818103600083015261394e816135d2565b9050919050565b6000602082019050818103600083015261396e816135f5565b9050919050565b6000602082019050818103600083015261398e81613618565b9050919050565b60006020820190506139aa600083018461364a565b92915050565b60006040820190506139c5600083018561364a565b81810360208301526139d7818461343b565b90509392505050565b60006060820190506139f5600083018661364a565b613a02602083018561364a565b613a0f604083018461364a565b949350505050565b600060e082019050613a2c600083018a61364a565b613a39602083018961364a565b613a46604083018861364a565b613a5360608301876133ff565b613a60608083018661364a565b613a6d60a083018561364a565b613a7a60c08301846133ff565b98975050505050505050565b6000613a90613aa1565b9050613a9c8282613d7b565b919050565b6000604051905090565b600067ffffffffffffffff821115613ac657613ac5613f51565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613af257613af1613f51565b5b613afb82613f99565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613b6882613cd5565b9150613b7383613cd5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ba857613ba7613e66565b5b828201905092915050565b6000613bbe82613cd5565b9150613bc983613cd5565b925082613bd957613bd8613e95565b5b828204905092915050565b6000613bef82613cd5565b9150613bfa83613cd5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613c3357613c32613e66565b5b828202905092915050565b6000613c4982613cd5565b9150613c5483613cd5565b925082821015613c6757613c66613e66565b5b828203905092915050565b6000613c7d82613cb5565b9050919050565b6000613c8f82613cb5565b9050919050565b60008115159050919050565b6000819050613cb08261423e565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613cea82613d15565b9050919050565b6000613cfc82613d15565b9050919050565b6000613d0e82613ca2565b9050919050565b6000613d2082613d27565b9050919050565b6000613d3282613cb5565b9050919050565b82818337600083830152505050565b60005b83811015613d66578082015181840152602081019050613d4b565b83811115613d75576000848401525b50505050565b613d8482613f99565b810181811067ffffffffffffffff82111715613da357613da2613f51565b5b80604052505050565b6000613db782613cd5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613dea57613de9613e66565b5b600182019050919050565b6000613e0082613e19565b9050919050565b6000613e1282613e19565b9050919050565b6000613e2482613faa565b9050919050565b6000819050919050565b6000613e4082613cd5565b9150613e4b83613cd5565b925082613e5b57613e5a613e95565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f746f6b656e206572726f72000000000000000000000000000000000000000000600082015250565b7f61646472657373206572726f7200000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f6572726f72206c6576656c000000000000000000000000000000000000000000600082015250565b7f6e6f206361746500000000000000000000000000000000000000000000000000600082015250565b7f6c6576656c207072696365206572726f72000000000000000000000000000000600082015250565b7f6d656c74206c6576656c206572726f7200000000000000000000000000000000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6d75737420626520756e69717565206361746500000000000000000000000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b7f6e6f7420796f757220746f6b656e730000000000000000000000000000000000600082015250565b7f746f6b656e20616d6f756e74206572726f720000000000000000000000000000600082015250565b6003811061424f5761424e613ec4565b5b50565b61425b81613c72565b811461426657600080fd5b50565b61427281613c96565b811461427d57600080fd5b50565b6003811061428d57600080fd5b50565b61429981613cd5565b81146142a457600080fd5b5056fea2646970667358221220da608beb8c999accd819c7e2f6d3c55a38b69451b1fef49dc90aab8a8ddb0c9864736f6c63430008070033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101a85760003560e01c8063715018a6116100f9578063b7ca51e811610097578063cf756fdf11610071578063cf756fdf146104d8578063dd6fd842146104f4578063ddca3f4314610524578063f2fde38b14610542576101a8565b8063b7ca51e81461045a578063c9f09b9c14610478578063ca7c15d4146104a8576101a8565b8063971276ae116100d3578063971276ae146103d15780639c2fc62314610404578063ab0d92dd14610420578063b0bf74e31461043e576101a8565b8063715018a614610373578063866285421461037d5780638da5cb5b146103b3576101a8565b80631d7cf6c611610166578063334d491d11610140578063334d491d146103015780634d85ca261461031d5780636b57d9bd1461033957806370dca97414610355576101a8565b80631d7cf6c6146102835780631e2f2912146102b35780632018ce8b146102cf576101a8565b80621917d7146101ad57806304764089146101dd578063069f2c0d146101fb5780631249c58b1461022b57806312dcff7a1461024957806313eaabb814610265575b600080fd5b6101c760048036038101906101c2919061322f565b61055e565b6040516101d49190613995565b60405180910390f35b6101e5610576565b6040516101f29190613758565b60405180910390f35b610215600480360381019061021091906130df565b6105ce565b6040516102229190613995565b60405180910390f35b6102336105ff565b6040516102409190613995565b60405180910390f35b610263600480360381019061025e9190612f55565b610f3f565b005b61026d6110d2565b60405161027a91906136ad565b60405180910390f35b61029d60048036038101906102989190613016565b6110f8565b6040516102aa9190613995565b60405180910390f35b6102cd60048036038101906102c89190613289565b611829565b005b6102e960048036038101906102e4919061322f565b611845565b6040516102f8939291906139e0565b60405180910390f35b61031b60048036038101906103169190612f55565b61186f565b005b610337600480360381019061033291906132c9565b61199f565b005b610353600480360381019061034e919061311f565b611ada565b005b61035d611bed565b60405161036a9190613795565b60405180910390f35b61037b611c13565b005b610397600480360381019061039291906130b2565b611c9b565b6040516103aa9796959493929190613a17565b60405180910390f35b6103bb611cf7565b6040516103c891906136ad565b60405180910390f35b6103eb60048036038101906103e6919061322f565b611d21565b6040516103fb94939291906137b0565b60405180910390f35b61041e600480360381019061041991906131ac565b611d5e565b005b610428611f36565b6040516104359190613995565b60405180910390f35b61045860048036038101906104539190612f55565b611f3c565b005b61046261206c565b60405161046f919061377a565b60405180910390f35b610492600480360381019061048d919061322f565b612092565b60405161049f9190613995565b60405180910390f35b6104c260048036038101906104bd91906130b2565b6120af565b6040516104cf9190613995565b60405180910390f35b6104f260048036038101906104ed9190612faf565b6121f8565b005b61050e6004803603810190610509919061322f565b6122ec565b60405161051b9190613995565b60405180910390f35b61052c612314565b6040516105399190613995565b60405180910390f35b61055c60048036038101906105579190612f55565b61231a565b005b60716020528060005260406000206000915090505481565b6060606c8054806020026020016040519081016040528092919081815260200182805480156105c457602002820191906000526020600020905b8154815260200190600101908083116105b0575b5050505050905090565b606e60205281600052604060002081815481106105ea57600080fd5b90600052602060002001600091509150505481565b600080606e600080600281111561061957610618613ec4565b5b600281111561062b5761062a613ec4565b5b815260200190815260200160002061064360006120af565b8154811061065457610653613f22565b5b906000526020600020015490506000606f600080600281111561067a57610679613ec4565b5b600281111561068c5761068b613ec4565b5b81526020019081526020016000209050600081600201549050600081116106e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106df90613895565b60405180910390fd5b8160030160009054906101000a900460ff16801561070a575060008260040154115b156107555761075261074383600501546107358560040154866000015461241290919063ffffffff16565b61242890919063ffffffff16565b8261243e90919063ffffffff16565b90505b6000606c8054905090506000610789606461077b606b548661242890919063ffffffff16565b61245490919063ffffffff16565b90506000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340ee7ce26040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d919061325c565b9050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd61087561246a565b30876040518463ffffffff1660e01b8152600401610895939291906136c8565b602060405180830381600087803b1580156108af57600080fd5b505af11580156108c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190613085565b50606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379cc67903061093a858861247290919063ffffffff16565b6040518363ffffffff1660e01b815260040161095792919061372f565b600060405180830381600087803b15801561097157600080fd5b505af1158015610985573d6000803e3d6000fd5b50505050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610a1d6064610a0f876064610a009190613c3e565b8961242890919063ffffffff16565b61245490919063ffffffff16565b6040518463ffffffff1660e01b8152600401610a3b939291906136c8565b602060405180830381600087803b158015610a5557600080fd5b505af1158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d9190613085565b50606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638b6e15e56040518163ffffffff1660e01b815260040160206040518083038186803b158015610b3557600080fd5b505afa158015610b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6d9190612f82565b610b936064610b85878961242890919063ffffffff16565b61245490919063ffffffff16565b6040518463ffffffff1660e01b8152600401610bb1939291906136c8565b602060405180830381600087803b158015610bcb57600080fd5b505af1158015610bdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c039190613085565b506000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19610c4c61246a565b896040518363ffffffff1660e01b8152600401610c6a92919061372f565b602060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbc919061325c565b90506000606d6000898152602001908152602001600020600101549050604051806080016040528060006002811115610cf857610cf7613ec4565b5b8152602001898152602001878152602001828152506070600084815260200190815260200160002060008201518160000160006101000a81548160ff02191690836002811115610d4b57610d4a613ec4565b5b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d60008a81526020019081526020016000206002016000828254610d989190613b5d565b925050819055506001876000016000828254610db49190613b5d565b92505081905550610df5610de46064610dd6848a61242890919063ffffffff16565b61245490919063ffffffff16565b606a5461243e90919063ffffffff16565b606a819055506000610e2f6064610e21866064610e129190613c3e565b8861242890919063ffffffff16565b61245490919063ffffffff16565b90506000861115610f07576000610e6687610e5864e8d4a510008561242890919063ffffffff16565b61245490919063ffffffff16565b905060005b87811015610f04576000606c8281548110610e8957610e88613f22565b5b90600052602060002001549050600060716000838152602001908152602001600020549050610ed881610eca64e8d4a510008761245490919063ffffffff16565b61243e90919063ffffffff16565b607160008481526020019081526020016000208190555050508080610efc90613dac565b915050610e6b565b50505b606c83908060018154018082558091505060019003906000526020600020016000909190919091505582995050505050505050505090565b610f4761246a565b73ffffffffffffffffffffffffffffffffffffffff16610f65611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614610fbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb2906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561102b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102290613815565b60405180910390fd5b80606960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600183600281111561110f5761110e613ec4565b5b6111199190613b5d565b82600281111561112c5761112b613ec4565b5b1461116c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611163906138b5565b60405180910390fd5b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f69b8626111b261246a565b866040518363ffffffff1660e01b81526004016111d09291906136ff565b60206040518083038186803b1580156111e857600080fd5b505afa1580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112209190613085565b61125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125690613955565b60405180910390fd5b60008061126d858588612488565b9150915060008214156112b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ac906137f5565b60405180910390fd5b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b1d73026876040518263ffffffff1660e01b81526004016113109190613758565b600060405180830381600087803b15801561132a57600080fd5b505af115801561133e573d6000803e3d6000fd5b505050506000805b87518110156114d45760005b606c805490508110156114c05788828151811061137257611371613f22565b5b6020026020010151606c828154811061138e5761138d613f22565b5b906000526020600020015414156114ad57607160008a84815181106113b6576113b5613f22565b5b6020026020010151815260200190815260200160002054836113d89190613b5d565b92506000606c6001606c805490506113f09190613c3e565b8154811061140157611400613f22565b5b90600052602060002001549050606c828154811061142257611421613f22565b5b9060005260206000200154606c6001606c805490506114419190613c3e565b8154811061145257611451613f22565b5b906000526020600020018190555080606c838154811061147557611474613f22565b5b9060005260206000200181905550606c80548061149557611494613ef3565b5b60019003818190600052602060002001600090559055505b80806114b890613dac565b915050611352565b5080806114cc90613dac565b915050611346565b508651606f60008860028111156114ee576114ed613ec4565b5b6002811115611500576114ff613ec4565b5b815260200190815260200160002060010160008282546115209190613b5d565b925050819055506000606e60008760028111156115405761153f613ec4565b5b600281111561155257611551613ec4565b5b8152602001908152602001600020611569876120af565b8154811061157a57611579613f22565b5b906000526020600020015490506000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f196115cf61246a565b846040518363ffffffff1660e01b81526004016115ed92919061372f565b602060405180830381600087803b15801561160757600080fd5b505af115801561161b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163f919061325c565b9050600061167f6064611671606d6000878152602001908152602001600020600101548861242890919063ffffffff16565b61245490919063ffffffff16565b9050604051806080016040528089600281111561169f5761169e613ec4565b5b8152602001848152602001878152602001828152506070600084815260200190815260200160002060008201518160000160006101000a81548160ff021916908360028111156116f2576116f1613ec4565b5b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d6000858152602001908152602001600020600201600082825461173f9190613b5d565b925050819055506001606f60008a600281111561175f5761175e613ec4565b5b600281111561177157611770613ec4565b5b815260200190815260200160002060000160008282546117919190613b5d565b925050819055506117d26117c160646117b3848a61242890919063ffffffff16565b61245490919063ffffffff16565b606a5461243e90919063ffffffff16565b606a81905550836071600084815260200190815260200160002081905550606c8290806001815401808255809150506001900390600052602060002001600090919091909150558196505050505050509392505050565b8060716000848152602001908152602001600020819055505050565b606d6020528060005260406000206000915090508060000154908060010154908060020154905083565b61187761246a565b73ffffffffffffffffffffffffffffffffffffffff16611895611cf7565b73ffffffffffffffffffffffffffffffffffffffff16146118eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e2906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561195b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195290613815565b60405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6119a761246a565b73ffffffffffffffffffffffffffffffffffffffff166119c5611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611a1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a12906138f5565b60405180910390fd5b6000606d60008681526020019081526020016000209050838160000181905550828160010181905550606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adc84d2e86846040518363ffffffff1660e01b8152600401611aa19291906139b0565b600060405180830381600087803b158015611abb57600080fd5b505af1158015611acf573d6000803e3d6000fd5b505050505050505050565b611ae261246a565b73ffffffffffffffffffffffffffffffffffffffff16611b00611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4d906138f5565b60405180910390fd5b6000606f6000886002811115611b6f57611b6e613ec4565b5b6002811115611b8157611b80613ec4565b5b81526020019081526020016000209050858160020181905550848160030160006101000a81548160ff021916908315150217905550838160040181905550828160050181905550818160060160006101000a81548160ff02191690831515021790555050505050505050565b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611c1b61246a565b73ffffffffffffffffffffffffffffffffffffffff16611c39611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c86906138f5565b60405180910390fd5b611c99600061287c565b565b606f6020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900460ff16908060040154908060050154908060060160009054906101000a900460ff16905087565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60706020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154908060030154905084565b611d6661246a565b73ffffffffffffffffffffffffffffffffffffffff16611d84611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611dda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd1906138f5565b60405180910390fd5b611de46065612942565b6000611df06065612958565b905060405180606001604052808581526020018481526020016000815250606d6000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050606e6000866002811115611e5957611e58613ec4565b5b6002811115611e6b57611e6a613ec4565b5b8152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190915055606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adc84d2e82846040518363ffffffff1660e01b8152600401611efd9291906139b0565b600060405180830381600087803b158015611f1757600080fd5b505af1158015611f2b573d6000803e3d6000fd5b505050505050505050565b606a5481565b611f4461246a565b73ffffffffffffffffffffffffffffffffffffffff16611f62611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614611fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faf906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612028576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201f90613815565b60405180910390fd5b80606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060716000838152602001908152602001600020549050919050565b600080606e60008460028111156120c9576120c8613ec4565b5b60028111156120db576120da613ec4565b5b815260200190815260200160002090506000818054905011612132576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212990613875565b60405180910390fd5b60005b818054905041334260405160200161214f93929190613670565b6040516020818303038152906040528051906020012060001c6121729190613e35565b9050606d600083838154811061218b5761218a613f22565b5b9060005260206000200154815260200190815260200160002060020154606d60008484815481106121bf576121be613f22565b5b906000526020600020015481526020019081526020016000206000015411156121e7576121ee565b6001612135575b8092505050919050565b600060019054906101000a900460ff166122205760008054906101000a900460ff1615612229565b612228612966565b5b612268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225f906138d5565b60405180910390fd5b60008060019054906101000a900460ff1615905080156122b8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6122c485858585612977565b80156122e55760008060016101000a81548160ff0219169083151502179055505b5050505050565b6000606c828154811061230257612301613f22565b5b90600052602060002001549050919050565b606b5481565b61232261246a565b73ffffffffffffffffffffffffffffffffffffffff16612340611cf7565b73ffffffffffffffffffffffffffffffffffffffff1614612396576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238d906138f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612406576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fd90613835565b60405180910390fd5b61240f8161287c565b50565b600081836124209190613e35565b905092915050565b600081836124369190613be4565b905092915050565b6000818361244c9190613b5d565b905092915050565b600081836124629190613bb3565b905092915050565b600033905090565b600081836124809190613c3e565b905092915050565b6000806000606f60008660028111156124a4576124a3613ec4565b5b60028111156124b6576124b5613ec4565b5b81526020019081526020016000206040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900460ff1615151515815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff161515151581525050905060008160400151905081606001518015612557575060008260800151115b156125a15761259f6125908360a001516125828560800151866000015161245490919063ffffffff16565b61242890919063ffffffff16565b8261243e90919063ffffffff16565b505b808551146125e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125db90613975565b60405180910390fd5b6000806000875167ffffffffffffffff81111561260457612603613f51565b5b6040519080825280602002602001820160405280156126325781602001602082028036833780820191505090505b50905060005b8851811015612855578a600281111561265457612653613ec4565b5b607060008b848151811061266b5761266a613f22565b5b6020026020010151815260200190815260200160002060000160009054906101000a900460ff1660028111156126a4576126a3613ec4565b5b146126e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126db90613855565b60405180910390fd5b612727607060008b84815181106126fe576126fd613f22565b5b60200260200101518152602001908152602001600020600201548461243e90919063ffffffff16565b925061276c607060008b848151811061274357612742613f22565b5b60200260200101518152602001908152602001600020600301548561243e90919063ffffffff16565b93508560c001516127f2576127b182607060008c858151811061279257612791613f22565b5b6020026020010151815260200190815260200160002060010154612a7b565b156127f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127e890613915565b60405180910390fd5b5b607060008a838151811061280957612808613f22565b5b602002602001015181526020019081526020016000206001015482828151811061283657612835613f22565b5b602002602001018181525050808061284d90613dac565b915050612638565b508161286b89518561245490919063ffffffff16565b965096505050505050935093915050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001816000016000828254019250508190555050565b600081600001549050919050565b600061297130612ada565b15905090565b600060019054906101000a900460ff1661299f5760008054906101000a900460ff16156129a8565b6129a7612966565b5b6129e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129de906138d5565b60405180910390fd5b60008060019054906101000a900460ff161590508015612a37576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612a3f612aed565b612a47612b3e565b612a5385858585612b9f565b8015612a745760008060016101000a81548160ff0219169083151502179055505b5050505050565b6000808351905060005b81811015612acd5783858281518110612aa157612aa0613f22565b5b60200260200101511415612aba57600192505050612ad4565b8080612ac590613dac565b915050612a85565b5060009150505b92915050565b600080823b905060008111915050919050565b600060019054906101000a900460ff16612b3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3390613935565b60405180910390fd5b565b600060019054906101000a900460ff16612b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8490613935565b60405180910390fd5b612b9d612b9861246a565b61287c565b565b600060019054906101000a900460ff16612bc75760008054906101000a900460ff1615612bd0565b612bcf612966565b5b612c0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c06906138d5565b60405180910390fd5b60008060019054906101000a900460ff161590508015612c5f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b84606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606b819055508015612dad5760008060016101000a81548160ff0219169083151502179055505b5050505050565b6000612dc7612dc284613aab565b613a86565b90508083825260208201905082856020860282011115612dea57612de9613f85565b5b60005b85811015612e1a5781612e008882612f2b565b845260208401935060208301925050600181019050612ded565b5050509392505050565b6000612e37612e3284613ad7565b613a86565b905082815260208101848484011115612e5357612e52613f8a565b5b612e5e848285613d39565b509392505050565b600081359050612e7581614252565b92915050565b600081519050612e8a81614252565b92915050565b600082601f830112612ea557612ea4613f80565b5b8135612eb5848260208601612db4565b91505092915050565b600081359050612ecd81614269565b92915050565b600081519050612ee281614269565b92915050565b600081359050612ef781614280565b92915050565b600082601f830112612f1257612f11613f80565b5b8135612f22848260208601612e24565b91505092915050565b600081359050612f3a81614290565b92915050565b600081519050612f4f81614290565b92915050565b600060208284031215612f6b57612f6a613f94565b5b6000612f7984828501612e66565b91505092915050565b600060208284031215612f9857612f97613f94565b5b6000612fa684828501612e7b565b91505092915050565b60008060008060808587031215612fc957612fc8613f94565b5b6000612fd787828801612e66565b9450506020612fe887828801612e66565b9350506040612ff987828801612e66565b925050606061300a87828801612f2b565b91505092959194509250565b60008060006060848603121561302f5761302e613f94565b5b600084013567ffffffffffffffff81111561304d5761304c613f8f565b5b61305986828701612e90565b935050602061306a86828701612ee8565b925050604061307b86828701612ee8565b9150509250925092565b60006020828403121561309b5761309a613f94565b5b60006130a984828501612ed3565b91505092915050565b6000602082840312156130c8576130c7613f94565b5b60006130d684828501612ee8565b91505092915050565b600080604083850312156130f6576130f5613f94565b5b600061310485828601612ee8565b925050602061311585828601612f2b565b9150509250929050565b60008060008060008060c0878903121561313c5761313b613f94565b5b600061314a89828a01612ee8565b965050602061315b89828a01612f2b565b955050604061316c89828a01612ebe565b945050606061317d89828a01612f2b565b935050608061318e89828a01612f2b565b92505060a061319f89828a01612ebe565b9150509295509295509295565b600080600080608085870312156131c6576131c5613f94565b5b60006131d487828801612ee8565b94505060206131e587828801612f2b565b93505060406131f687828801612f2b565b925050606085013567ffffffffffffffff81111561321757613216613f8f565b5b61322387828801612efd565b91505092959194509250565b60006020828403121561324557613244613f94565b5b600061325384828501612f2b565b91505092915050565b60006020828403121561327257613271613f94565b5b600061328084828501612f40565b91505092915050565b600080604083850312156132a05761329f613f94565b5b60006132ae85828601612f2b565b92505060206132bf85828601612f2b565b9150509250929050565b600080600080608085870312156132e3576132e2613f94565b5b60006132f187828801612f2b565b945050602061330287828801612f2b565b935050604061331387828801612f2b565b925050606085013567ffffffffffffffff81111561333457613333613f8f565b5b61334087828801612efd565b91505092959194509250565b6000613358838361363b565b60208301905092915050565b61337561337082613c84565b613e07565b82525050565b61338481613c72565b82525050565b61339b61339682613c72565b613df5565b82525050565b60006133ac82613b18565b6133b68185613b3b565b93506133c183613b08565b8060005b838110156133f25781516133d9888261334c565b97506133e483613b2e565b9250506001810190506133c5565b5085935050505092915050565b61340881613c96565b82525050565b61341781613cdf565b82525050565b61342681613cf1565b82525050565b61343581613d03565b82525050565b600061344682613b23565b6134508185613b4c565b9350613460818560208601613d48565b61346981613f99565b840191505092915050565b6000613481600b83613b4c565b915061348c82613fb7565b602082019050919050565b60006134a4600d83613b4c565b91506134af82613fe0565b602082019050919050565b60006134c7602683613b4c565b91506134d282614009565b604082019050919050565b60006134ea600b83613b4c565b91506134f582614058565b602082019050919050565b600061350d600783613b4c565b915061351882614081565b602082019050919050565b6000613530601183613b4c565b915061353b826140aa565b602082019050919050565b6000613553601083613b4c565b915061355e826140d3565b602082019050919050565b6000613576602e83613b4c565b9150613581826140fc565b604082019050919050565b6000613599602083613b4c565b91506135a48261414b565b602082019050919050565b60006135bc601383613b4c565b91506135c782614174565b602082019050919050565b60006135df602b83613b4c565b91506135ea8261419d565b604082019050919050565b6000613602600f83613b4c565b915061360d826141ec565b602082019050919050565b6000613625601283613b4c565b915061363082614215565b602082019050919050565b61364481613cd5565b82525050565b61365381613cd5565b82525050565b61366a61366582613cd5565b613e2b565b82525050565b600061367c8286613364565b60148201915061368c828561338a565b60148201915061369c8284613659565b602082019150819050949350505050565b60006020820190506136c2600083018461337b565b92915050565b60006060820190506136dd600083018661337b565b6136ea602083018561337b565b6136f7604083018461364a565b949350505050565b6000604082019050613714600083018561337b565b818103602083015261372681846133a1565b90509392505050565b6000604082019050613744600083018561337b565b613751602083018461364a565b9392505050565b6000602082019050818103600083015261377281846133a1565b905092915050565b600060208201905061378f600083018461340e565b92915050565b60006020820190506137aa600083018461341d565b92915050565b60006080820190506137c5600083018761342c565b6137d2602083018661364a565b6137df604083018561364a565b6137ec606083018461364a565b95945050505050565b6000602082019050818103600083015261380e81613474565b9050919050565b6000602082019050818103600083015261382e81613497565b9050919050565b6000602082019050818103600083015261384e816134ba565b9050919050565b6000602082019050818103600083015261386e816134dd565b9050919050565b6000602082019050818103600083015261388e81613500565b9050919050565b600060208201905081810360008301526138ae81613523565b9050919050565b600060208201905081810360008301526138ce81613546565b9050919050565b600060208201905081810360008301526138ee81613569565b9050919050565b6000602082019050818103600083015261390e8161358c565b9050919050565b6000602082019050818103600083015261392e816135af565b9050919050565b6000602082019050818103600083015261394e816135d2565b9050919050565b6000602082019050818103600083015261396e816135f5565b9050919050565b6000602082019050818103600083015261398e81613618565b9050919050565b60006020820190506139aa600083018461364a565b92915050565b60006040820190506139c5600083018561364a565b81810360208301526139d7818461343b565b90509392505050565b60006060820190506139f5600083018661364a565b613a02602083018561364a565b613a0f604083018461364a565b949350505050565b600060e082019050613a2c600083018a61364a565b613a39602083018961364a565b613a46604083018861364a565b613a5360608301876133ff565b613a60608083018661364a565b613a6d60a083018561364a565b613a7a60c08301846133ff565b98975050505050505050565b6000613a90613aa1565b9050613a9c8282613d7b565b919050565b6000604051905090565b600067ffffffffffffffff821115613ac657613ac5613f51565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613af257613af1613f51565b5b613afb82613f99565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613b6882613cd5565b9150613b7383613cd5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ba857613ba7613e66565b5b828201905092915050565b6000613bbe82613cd5565b9150613bc983613cd5565b925082613bd957613bd8613e95565b5b828204905092915050565b6000613bef82613cd5565b9150613bfa83613cd5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613c3357613c32613e66565b5b828202905092915050565b6000613c4982613cd5565b9150613c5483613cd5565b925082821015613c6757613c66613e66565b5b828203905092915050565b6000613c7d82613cb5565b9050919050565b6000613c8f82613cb5565b9050919050565b60008115159050919050565b6000819050613cb08261423e565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613cea82613d15565b9050919050565b6000613cfc82613d15565b9050919050565b6000613d0e82613ca2565b9050919050565b6000613d2082613d27565b9050919050565b6000613d3282613cb5565b9050919050565b82818337600083830152505050565b60005b83811015613d66578082015181840152602081019050613d4b565b83811115613d75576000848401525b50505050565b613d8482613f99565b810181811067ffffffffffffffff82111715613da357613da2613f51565b5b80604052505050565b6000613db782613cd5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613dea57613de9613e66565b5b600182019050919050565b6000613e0082613e19565b9050919050565b6000613e1282613e19565b9050919050565b6000613e2482613faa565b9050919050565b6000819050919050565b6000613e4082613cd5565b9150613e4b83613cd5565b925082613e5b57613e5a613e95565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f746f6b656e206572726f72000000000000000000000000000000000000000000600082015250565b7f61646472657373206572726f7200000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f6572726f72206c6576656c000000000000000000000000000000000000000000600082015250565b7f6e6f206361746500000000000000000000000000000000000000000000000000600082015250565b7f6c6576656c207072696365206572726f72000000000000000000000000000000600082015250565b7f6d656c74206c6576656c206572726f7200000000000000000000000000000000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6d75737420626520756e69717565206361746500000000000000000000000000600082015250565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b7f6e6f7420796f757220746f6b656e730000000000000000000000000000000000600082015250565b7f746f6b656e20616d6f756e74206572726f720000000000000000000000000000600082015250565b6003811061424f5761424e613ec4565b5b50565b61425b81613c72565b811461426657600080fd5b50565b61427281613c96565b811461427d57600080fd5b50565b6003811061428d57600080fd5b50565b61429981613cd5565b81146142a457600080fd5b5056fea2646970667358221220da608beb8c999accd819c7e2f6d3c55a38b69451b1fef49dc90aab8a8ddb0c9864736f6c63430008070033