Address Details
contract
0xE520f3aCdC9863519CC85835Baca6cC58a3Eed8D
- Contract Name
- StarNFTLogic
- Creator
- 0x7d6740–c9cfce at 0x25fb75–1d3ce2
- 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
- Fetching transactions...
- Transfers
- Fetching transfers...
- Gas Used
- Fetching gas used...
- Last Balance Update
- 8961195
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- StarNFTLogic
- Optimization enabled
- true
- Compiler version
- v0.8.10+commit.fc410830
- Optimization runs
- 200
- EVM Version
- london
- Verified at
- 2022-08-19T06:10:34.932644Z
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); } 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); starToken.transferFrom(_msgSender(), address(this), _price); starToken.burnFrom(address(this), _price.sub(_fee)); starToken.transfer(bonusAddr, _fee); 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 lockRatio = Bonus.getlockRatio(); 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); 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)); 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 = _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, 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 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 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.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
/_openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
/_openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
/_openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
/_openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
/_openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
/contracts/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":"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":"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
0x608060405234801561001057600080fd5b506122ef806100206000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c806386628542116100de578063b7ca51e811610097578063cf756fdf11610071578063cf756fdf1461041a578063dd6fd8421461042d578063ddca3f4314610440578063f2fde38b1461044957600080fd5b8063b7ca51e8146103d4578063c9f09b9c146103e7578063ca7c15d41461040757600080fd5b806386628542146102c35780638da5cb5b1461034b578063971276ae1461035c5780639c2fc623146103a5578063ab0d92dd146103b8578063b0bf74e3146103c157600080fd5b80632018ce8b116101305780632018ce8b14610225578063334d491d1461026f5780634d85ca26146102825780636b57d9bd1461029557806370dca974146102a8578063715018a6146102bb57600080fd5b80621917d714610177578063069f2c0d146101aa5780631249c58b146101bd57806313eaabb8146101c55780631d7cf6c6146101f05780631e2f291214610203575b600080fd5b610197610185366004611c22565b60716020526000908152604090205481565b6040519081526020015b60405180910390f35b6101976101b8366004611c4f565b61045c565b61019761048d565b6069546101d8906001600160a01b031681565b6040516001600160a01b0390911681526020016101a1565b6101976101fe366004611cc0565b610a4d565b610223610211366004611d88565b60009182526071602052604090912055565b005b610254610233366004611c22565b606d6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101a1565b61022361027d366004611dc1565b610e9c565b610223610290366004611e4c565b610f2e565b6102236102a3366004611eb4565b610fdc565b6068546101d8906001600160a01b031681565b61022361107e565b6103146102d1366004611f19565b606f60205260009081526040902080546001820154600283015460038401546004850154600586015460069096015494959394929360ff92831693919290911687565b604080519788526020880196909652948601939093529015156060850152608084015260a0830152151560c082015260e0016101a1565b6033546001600160a01b03166101d8565b61039561036a366004611c22565b607060205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6040516101a19493929190611f4a565b6102236103b3366004611f88565b6110b4565b610197606a5481565b6102236103cf366004611dc1565b6111b2565b6066546101d8906001600160a01b031681565b6101976103f5366004611c22565b60009081526071602052604090205490565b610197610415366004611f19565b611244565b610223610428366004611fd1565b611461565b61019761043b366004611c22565b6114dd565b610197606b5481565b610223610457366004611dc1565b611504565b606e602052816000526040600020818154811061047857600080fd5b90600052602060002001600091509150505481565b6000808052606e602052807f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6104c282611244565b815481106104d2576104d261201c565b600091825260208083209190910154918052606f90527fd0170a6220fef73a7dd2c1e9984b0b3831956884ac33b7728dde627780a65be7549091507fd0170a6220fef73a7dd2c1e9984b0b3831956884ac33b7728dde627780a65be590806105755760405162461bcd60e51b81526020600482015260116024820152703632bb32b610383934b1b29032b93937b960791b60448201526064015b60405180910390fd5b600382015460ff16801561058d575060008260040154115b156105c8576105c56105be83600501546105b88560040154866000015461159f90919063ffffffff16565b906115b4565b82906115c0565b90505b606c54606b546000906105e9906064906105e39086906115b4565b906115cc565b6066549091506001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064016020604051808303816000875af1158015610651573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106759190612032565b506066546001600160a01b03166379cc67903061069286856115d8565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156106d857600080fd5b505af11580156106ec573d6000803e3d6000fd5b505060665460695460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018690529116925063a9059cbb91506044016020604051808303816000875af1158015610745573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107699190612032565b506068546000906001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018990526044016020604051808303816000875af11580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f09190612056565b6000878152606d602052604080822060010154815160808101909252929350908190815260208082018a905260408083018990526060909201849052600085815260709091522081518154829060ff1916600183600281111561085557610855611f34565b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d600089815260200190815260200160002060020160008282546108a29190612085565b9091555050855460019087906000906108bc908490612085565b909155506108dd90506108d460646105e388856115b4565b606a54906115c0565b606a55606754604080516320773e7160e11b815290516000926001600160a01b0316916340ee7ce29160048083019260209291908290030181865afa15801561092a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094e9190612056565b9050600061096b60646105e3610964858361209d565b88906115b4565b90508515610a0b576000610988876105e38464e8d4a510006115b4565b905060005b87811015610a08576000606c82815481106109aa576109aa61201c565b600091825260208083209091015480835260719091526040909120549091506109e2816109dc8664e8d4a510006115cc565b906115c0565b600092835260716020526040909220919091555080610a00816120b4565b91505061098d565b50505b5050606c80546001810182556000919091527f2b4a51ab505fc96a0952efda2ba61bcd3078d4c02c39a186ec16f21883fbe01601829055509695505050505050565b6000826002811115610a6157610a61611f34565b610a6c906001612085565b826002811115610a7e57610a7e611f34565b14610abe5760405162461bcd60e51b815260206004820152601060248201526f36b2b63a103632bb32b61032b93937b960811b604482015260640161056c565b6068546001600160a01b0316634f69b86233866040518363ffffffff1660e01b8152600401610aee92919061210a565b602060405180830381865afa158015610b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2f9190612032565b610b6d5760405162461bcd60e51b815260206004820152600f60248201526e6e6f7420796f757220746f6b656e7360881b604482015260640161056c565b600080610b7b8585886115e4565b915091508160001415610bbe5760405162461bcd60e51b815260206004820152600b60248201526a3a37b5b2b71032b93937b960a91b604482015260640161056c565b6068546040516358eb981360e11b81526001600160a01b039091169063b1d7302690610bee908990600401612136565b600060405180830381600087803b158015610c0857600080fd5b505af1158015610c1c573d6000803e3d6000fd5b505050508551606f6000876002811115610c3857610c38611f34565b6002811115610c4957610c49611f34565b81526020019081526020016000206001016000828254610c699190612085565b9091555060009050606e81866002811115610c8657610c86611f34565b6002811115610c9757610c97611f34565b8152602001908152602001600020610cae86611244565b81548110610cbe57610cbe61201c565b60009182526020822001546068549092506001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610d2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4f9190612056565b6000838152606d602052604081206001015491925090610d77906064906105e39087906115b4565b90506040518060800160405280886002811115610d9657610d96611f34565b8152602080820186905260408083018990526060909201849052600085815260709091522081518154829060ff19166001836002811115610dd957610dd9611f34565b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d60008581526020019081526020016000206002016000828254610e269190612085565b9091555060019050606f6000896002811115610e4457610e44611f34565b6002811115610e5557610e55611f34565b81526020019081526020016000206000016000828254610e759190612085565b90915550610e8d90506108d460646105e388856115b4565b606a5550979650505050505050565b6033546001600160a01b03163314610ec65760405162461bcd60e51b815260040161056c90612149565b6001600160a01b038116610f0c5760405162461bcd60e51b815260206004820152600d60248201526c30b2323932b9b99032b93937b960991b604482015260640161056c565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b03163314610f585760405162461bcd60e51b815260040161056c90612149565b6000848152606d6020526040908190208481556001810184905560685491516356e4269760e11b815290916001600160a01b03169063adc84d2e90610fa3908890869060040161217e565b600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b505050505050505050565b6033546001600160a01b031633146110065760405162461bcd60e51b815260040161056c90612149565b6000606f600088600281111561101e5761101e611f34565b600281111561102f5761102f611f34565b8152602081019190915260400160002060028101969096555060038501805494151560ff1995861617905560048501929092556005840155600690920180549215159290911691909117905550565b6033546001600160a01b031633146110a85760405162461bcd60e51b815260040161056c90612149565b6110b26000611980565b565b6033546001600160a01b031633146110de5760405162461bcd60e51b815260040161056c90612149565b6110ec606580546001019055565b60006110f760655490565b6040805160608101825286815260208082018781526000838501818152868252606d9093529384209251835551600183015551600291820155919250606e91879081111561114757611147611f34565b600281111561115857611158611f34565b815260208082019290925260409081016000908120805460018101825590825292902090910182905560685490516356e4269760e11b81526001600160a01b039091169063adc84d2e90610fa3908490869060040161217e565b6033546001600160a01b031633146111dc5760405162461bcd60e51b815260040161056c90612149565b6001600160a01b0381166112225760405162461bcd60e51b815260206004820152600d60248201526c30b2323932b9b99032b93937b960991b604482015260640161056c565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b600080606e600084600281111561125d5761125d611f34565b600281111561126e5761126e611f34565b8152602001908152602001600020905060008180549050116112bc5760405162461bcd60e51b81526020600482015260076024820152666e6f206361746560c81b604482015260640161056c565b60008060005b83546112d09060019061209d565b413383426040516020016112e794939291906121db565b6040516020818303038152906040528051906020012060001c61130a9190612224565b845490935061131b9060019061209d565b4133834260405160200161133294939291906121db565b6040516020818303038152906040528051906020012060001c6113559190612224565b611360906001612085565b9150606d60008584815481106113785761137861201c565b9060005260206000200154815260200190815260200160002060020154606d60008685815481106113ab576113ab61201c565b906000526020600020015481526020019081526020016000206000015411156113d2578192505b606d60008585815481106113e8576113e861201c565b9060005260206000200154815260200190815260200160002060020154606d600086868154811061141b5761141b61201c565b9060005260206000200154815260200190815260200160002060000154111561144357611457565b8061144d816120b4565b91505060016112c2575b5090949350505050565b600054610100900460ff168061147a575060005460ff16155b6114965760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff161580156114b8576000805461ffff19166101011790555b6114c4858585856119d2565b80156114d6576000805461ff00191690555b5050505050565b6000606c82815481106114f2576114f261201c565b90600052602060002001549050919050565b6033546001600160a01b0316331461152e5760405162461bcd60e51b815260040161056c90612149565b6001600160a01b0381166115935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056c565b61159c81611980565b50565b60006115ab8284612224565b90505b92915050565b60006115ab8284612286565b60006115ab8284612085565b60006115ab82846122a5565b60006115ab828461209d565b6000806000606f60008660028111156115ff576115ff611f34565b600281111561161057611610611f34565b81526020808201929092526040908101600020815160e081018352815481526001820154938101939093526002810154918301829052600381015460ff9081161580156060860181905260048401546080870152600584015460a0870152600690930154909116151560c08501529293509091611691575060008260800151115b156116bf576116bc6105be8360a001516105b8856080015186600001516115cc90919063ffffffff16565b90505b808551146117045760405162461bcd60e51b81526020600482015260126024820152713a37b5b2b71030b6b7bab73a1032b93937b960711b604482015260640161056c565b6000806000875167ffffffffffffffff81111561172357611723611c79565b60405190808252806020026020018201604052801561174c578160200160208202803683370190505b50905060005b8851811015611959578a600281111561176d5761176d611f34565b607060008b84815181106117835761178361201c565b60209081029190910181015182528101919091526040016000205460ff1660028111156117b2576117b2611f34565b146117ed5760405162461bcd60e51b815260206004820152600b60248201526a195c9c9bdc881b195d995b60aa1b604482015260640161056c565b61182f607060008b84815181106118065761180661201c565b6020026020010151815260200190815260200160002060020154846115c090919063ffffffff16565b9250611873607060008b848151811061184a5761184a61201c565b6020026020010151815260200190815260200160002060030154856115c090919063ffffffff16565b93508560c001516118fa576118b782607060008c85815181106118985761189861201c565b6020026020010151815260200190815260200160002060010154611a45565b156118fa5760405162461bcd60e51b81526020600482015260136024820152726d75737420626520756e69717565206361746560681b604482015260640161056c565b607060008a83815181106119105761191061201c565b602002602001015181526020019081526020016000206001015482828151811061193c5761193c61201c565b602090810291909101015280611951816120b4565b915050611752565b508161196f8951856115cc90919063ffffffff16565b965096505050505050935093915050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16806119eb575060005460ff16155b611a075760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611a29576000805461ffff19166101011790555b611a31611a9d565b611a39611b08565b6114c485858585611b68565b8151600090815b81811015611a925783858281518110611a6757611a6761201c565b60200260200101511415611a80576001925050506115ae565b80611a8a816120b4565b915050611a4c565b506000949350505050565b600054610100900460ff1680611ab6575060005460ff16155b611ad25760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611af4576000805461ffff19166101011790555b801561159c576000805461ff001916905550565b600054610100900460ff1680611b21575060005460ff16155b611b3d5760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611b5f576000805461ffff19166101011790555b611af433611980565b600054610100900460ff1680611b81575060005460ff16155b611b9d5760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611bbf576000805461ffff19166101011790555b606680546001600160a01b038088166001600160a01b031992831617909255606880548684169083161790556069805492871692821683179055606780549091169091179055606b82905580156114d6576000805461ff00191690555050505050565b600060208284031215611c3457600080fd5b5035919050565b803560038110611c4a57600080fd5b919050565b60008060408385031215611c6257600080fd5b611c6b83611c3b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611cb857611cb8611c79565b604052919050565b600080600060608486031215611cd557600080fd5b833567ffffffffffffffff80821115611ced57600080fd5b818601915086601f830112611d0157600080fd5b8135602082821115611d1557611d15611c79565b8160051b9250611d26818401611c8f565b828152928401810192818101908a851115611d4057600080fd5b948201945b84861015611d5e57853582529482019490820190611d45565b9750611d6d9050888201611c3b565b955050505050611d7f60408501611c3b565b90509250925092565b60008060408385031215611d9b57600080fd5b50508035926020909101359150565b80356001600160a01b0381168114611c4a57600080fd5b600060208284031215611dd357600080fd5b6115ab82611daa565b600082601f830112611ded57600080fd5b813567ffffffffffffffff811115611e0757611e07611c79565b611e1a601f8201601f1916602001611c8f565b818152846020838601011115611e2f57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e6257600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115611e8e57600080fd5b611e9a87828801611ddc565b91505092959194509250565b801515811461159c57600080fd5b60008060008060008060c08789031215611ecd57600080fd5b611ed687611c3b565b9550602087013594506040870135611eed81611ea6565b9350606087013592506080870135915060a0870135611f0b81611ea6565b809150509295509295509295565b600060208284031215611f2b57600080fd5b6115ab82611c3b565b634e487b7160e01b600052602160045260246000fd5b6080810160038610611f6c57634e487b7160e01b600052602160045260246000fd5b9481526020810193909352604083019190915260609091015290565b60008060008060808587031215611f9e57600080fd5b611fa785611c3b565b93506020850135925060408501359150606085013567ffffffffffffffff811115611e8e57600080fd5b60008060008060808587031215611fe757600080fd5b611ff085611daa565b9350611ffe60208601611daa565b925061200c60408601611daa565b9396929550929360600135925050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561204457600080fd5b815161204f81611ea6565b9392505050565b60006020828403121561206857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156120985761209861206f565b500190565b6000828210156120af576120af61206f565b500390565b60006000198214156120c8576120c861206f565b5060010190565b600081518084526020808501945080840160005b838110156120ff578151875295820195908201906001016120e3565b509495945050505050565b6001600160a01b038316815260406020820181905260009061212e908301846120cf565b949350505050565b6020815260006115ab60208301846120cf565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b82815260006020604081840152835180604085015260005b818110156121b257858101830151858201606001528201612196565b818111156121c4576000606083870101525b50601f01601f191692909201606001949350505050565b6bffffffffffffffffffffffff19606095861b811682529390941b90921660148401526028830152604882015260680190565b634e487b7160e01b600052601260045260246000fd5b6000826122335761223361220e565b500690565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008160001904831182151516156122a0576122a061206f565b500290565b6000826122b4576122b461220e565b50049056fea264697066735822122006d4c3c83de443f0de98fbe298a0b335b7ce67bd2bb699fe01851c7061cf55f064736f6c634300080a0033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101725760003560e01c806386628542116100de578063b7ca51e811610097578063cf756fdf11610071578063cf756fdf1461041a578063dd6fd8421461042d578063ddca3f4314610440578063f2fde38b1461044957600080fd5b8063b7ca51e8146103d4578063c9f09b9c146103e7578063ca7c15d41461040757600080fd5b806386628542146102c35780638da5cb5b1461034b578063971276ae1461035c5780639c2fc623146103a5578063ab0d92dd146103b8578063b0bf74e3146103c157600080fd5b80632018ce8b116101305780632018ce8b14610225578063334d491d1461026f5780634d85ca26146102825780636b57d9bd1461029557806370dca974146102a8578063715018a6146102bb57600080fd5b80621917d714610177578063069f2c0d146101aa5780631249c58b146101bd57806313eaabb8146101c55780631d7cf6c6146101f05780631e2f291214610203575b600080fd5b610197610185366004611c22565b60716020526000908152604090205481565b6040519081526020015b60405180910390f35b6101976101b8366004611c4f565b61045c565b61019761048d565b6069546101d8906001600160a01b031681565b6040516001600160a01b0390911681526020016101a1565b6101976101fe366004611cc0565b610a4d565b610223610211366004611d88565b60009182526071602052604090912055565b005b610254610233366004611c22565b606d6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101a1565b61022361027d366004611dc1565b610e9c565b610223610290366004611e4c565b610f2e565b6102236102a3366004611eb4565b610fdc565b6068546101d8906001600160a01b031681565b61022361107e565b6103146102d1366004611f19565b606f60205260009081526040902080546001820154600283015460038401546004850154600586015460069096015494959394929360ff92831693919290911687565b604080519788526020880196909652948601939093529015156060850152608084015260a0830152151560c082015260e0016101a1565b6033546001600160a01b03166101d8565b61039561036a366004611c22565b607060205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6040516101a19493929190611f4a565b6102236103b3366004611f88565b6110b4565b610197606a5481565b6102236103cf366004611dc1565b6111b2565b6066546101d8906001600160a01b031681565b6101976103f5366004611c22565b60009081526071602052604090205490565b610197610415366004611f19565b611244565b610223610428366004611fd1565b611461565b61019761043b366004611c22565b6114dd565b610197606b5481565b610223610457366004611dc1565b611504565b606e602052816000526040600020818154811061047857600080fd5b90600052602060002001600091509150505481565b6000808052606e602052807f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6104c282611244565b815481106104d2576104d261201c565b600091825260208083209190910154918052606f90527fd0170a6220fef73a7dd2c1e9984b0b3831956884ac33b7728dde627780a65be7549091507fd0170a6220fef73a7dd2c1e9984b0b3831956884ac33b7728dde627780a65be590806105755760405162461bcd60e51b81526020600482015260116024820152703632bb32b610383934b1b29032b93937b960791b60448201526064015b60405180910390fd5b600382015460ff16801561058d575060008260040154115b156105c8576105c56105be83600501546105b88560040154866000015461159f90919063ffffffff16565b906115b4565b82906115c0565b90505b606c54606b546000906105e9906064906105e39086906115b4565b906115cc565b6066549091506001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064016020604051808303816000875af1158015610651573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106759190612032565b506066546001600160a01b03166379cc67903061069286856115d8565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156106d857600080fd5b505af11580156106ec573d6000803e3d6000fd5b505060665460695460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018690529116925063a9059cbb91506044016020604051808303816000875af1158015610745573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107699190612032565b506068546000906001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018990526044016020604051808303816000875af11580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f09190612056565b6000878152606d602052604080822060010154815160808101909252929350908190815260208082018a905260408083018990526060909201849052600085815260709091522081518154829060ff1916600183600281111561085557610855611f34565b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d600089815260200190815260200160002060020160008282546108a29190612085565b9091555050855460019087906000906108bc908490612085565b909155506108dd90506108d460646105e388856115b4565b606a54906115c0565b606a55606754604080516320773e7160e11b815290516000926001600160a01b0316916340ee7ce29160048083019260209291908290030181865afa15801561092a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094e9190612056565b9050600061096b60646105e3610964858361209d565b88906115b4565b90508515610a0b576000610988876105e38464e8d4a510006115b4565b905060005b87811015610a08576000606c82815481106109aa576109aa61201c565b600091825260208083209091015480835260719091526040909120549091506109e2816109dc8664e8d4a510006115cc565b906115c0565b600092835260716020526040909220919091555080610a00816120b4565b91505061098d565b50505b5050606c80546001810182556000919091527f2b4a51ab505fc96a0952efda2ba61bcd3078d4c02c39a186ec16f21883fbe01601829055509695505050505050565b6000826002811115610a6157610a61611f34565b610a6c906001612085565b826002811115610a7e57610a7e611f34565b14610abe5760405162461bcd60e51b815260206004820152601060248201526f36b2b63a103632bb32b61032b93937b960811b604482015260640161056c565b6068546001600160a01b0316634f69b86233866040518363ffffffff1660e01b8152600401610aee92919061210a565b602060405180830381865afa158015610b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2f9190612032565b610b6d5760405162461bcd60e51b815260206004820152600f60248201526e6e6f7420796f757220746f6b656e7360881b604482015260640161056c565b600080610b7b8585886115e4565b915091508160001415610bbe5760405162461bcd60e51b815260206004820152600b60248201526a3a37b5b2b71032b93937b960a91b604482015260640161056c565b6068546040516358eb981360e11b81526001600160a01b039091169063b1d7302690610bee908990600401612136565b600060405180830381600087803b158015610c0857600080fd5b505af1158015610c1c573d6000803e3d6000fd5b505050508551606f6000876002811115610c3857610c38611f34565b6002811115610c4957610c49611f34565b81526020019081526020016000206001016000828254610c699190612085565b9091555060009050606e81866002811115610c8657610c86611f34565b6002811115610c9757610c97611f34565b8152602001908152602001600020610cae86611244565b81548110610cbe57610cbe61201c565b60009182526020822001546068549092506001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610d2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4f9190612056565b6000838152606d602052604081206001015491925090610d77906064906105e39087906115b4565b90506040518060800160405280886002811115610d9657610d96611f34565b8152602080820186905260408083018990526060909201849052600085815260709091522081518154829060ff19166001836002811115610dd957610dd9611f34565b02179055506020820151816001015560408201518160020155606082015181600301559050506001606d60008581526020019081526020016000206002016000828254610e269190612085565b9091555060019050606f6000896002811115610e4457610e44611f34565b6002811115610e5557610e55611f34565b81526020019081526020016000206000016000828254610e759190612085565b90915550610e8d90506108d460646105e388856115b4565b606a5550979650505050505050565b6033546001600160a01b03163314610ec65760405162461bcd60e51b815260040161056c90612149565b6001600160a01b038116610f0c5760405162461bcd60e51b815260206004820152600d60248201526c30b2323932b9b99032b93937b960991b604482015260640161056c565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b03163314610f585760405162461bcd60e51b815260040161056c90612149565b6000848152606d6020526040908190208481556001810184905560685491516356e4269760e11b815290916001600160a01b03169063adc84d2e90610fa3908890869060040161217e565b600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b505050505050505050565b6033546001600160a01b031633146110065760405162461bcd60e51b815260040161056c90612149565b6000606f600088600281111561101e5761101e611f34565b600281111561102f5761102f611f34565b8152602081019190915260400160002060028101969096555060038501805494151560ff1995861617905560048501929092556005840155600690920180549215159290911691909117905550565b6033546001600160a01b031633146110a85760405162461bcd60e51b815260040161056c90612149565b6110b26000611980565b565b6033546001600160a01b031633146110de5760405162461bcd60e51b815260040161056c90612149565b6110ec606580546001019055565b60006110f760655490565b6040805160608101825286815260208082018781526000838501818152868252606d9093529384209251835551600183015551600291820155919250606e91879081111561114757611147611f34565b600281111561115857611158611f34565b815260208082019290925260409081016000908120805460018101825590825292902090910182905560685490516356e4269760e11b81526001600160a01b039091169063adc84d2e90610fa3908490869060040161217e565b6033546001600160a01b031633146111dc5760405162461bcd60e51b815260040161056c90612149565b6001600160a01b0381166112225760405162461bcd60e51b815260206004820152600d60248201526c30b2323932b9b99032b93937b960991b604482015260640161056c565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b600080606e600084600281111561125d5761125d611f34565b600281111561126e5761126e611f34565b8152602001908152602001600020905060008180549050116112bc5760405162461bcd60e51b81526020600482015260076024820152666e6f206361746560c81b604482015260640161056c565b60008060005b83546112d09060019061209d565b413383426040516020016112e794939291906121db565b6040516020818303038152906040528051906020012060001c61130a9190612224565b845490935061131b9060019061209d565b4133834260405160200161133294939291906121db565b6040516020818303038152906040528051906020012060001c6113559190612224565b611360906001612085565b9150606d60008584815481106113785761137861201c565b9060005260206000200154815260200190815260200160002060020154606d60008685815481106113ab576113ab61201c565b906000526020600020015481526020019081526020016000206000015411156113d2578192505b606d60008585815481106113e8576113e861201c565b9060005260206000200154815260200190815260200160002060020154606d600086868154811061141b5761141b61201c565b9060005260206000200154815260200190815260200160002060000154111561144357611457565b8061144d816120b4565b91505060016112c2575b5090949350505050565b600054610100900460ff168061147a575060005460ff16155b6114965760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff161580156114b8576000805461ffff19166101011790555b6114c4858585856119d2565b80156114d6576000805461ff00191690555b5050505050565b6000606c82815481106114f2576114f261201c565b90600052602060002001549050919050565b6033546001600160a01b0316331461152e5760405162461bcd60e51b815260040161056c90612149565b6001600160a01b0381166115935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056c565b61159c81611980565b50565b60006115ab8284612224565b90505b92915050565b60006115ab8284612286565b60006115ab8284612085565b60006115ab82846122a5565b60006115ab828461209d565b6000806000606f60008660028111156115ff576115ff611f34565b600281111561161057611610611f34565b81526020808201929092526040908101600020815160e081018352815481526001820154938101939093526002810154918301829052600381015460ff9081161580156060860181905260048401546080870152600584015460a0870152600690930154909116151560c08501529293509091611691575060008260800151115b156116bf576116bc6105be8360a001516105b8856080015186600001516115cc90919063ffffffff16565b90505b808551146117045760405162461bcd60e51b81526020600482015260126024820152713a37b5b2b71030b6b7bab73a1032b93937b960711b604482015260640161056c565b6000806000875167ffffffffffffffff81111561172357611723611c79565b60405190808252806020026020018201604052801561174c578160200160208202803683370190505b50905060005b8851811015611959578a600281111561176d5761176d611f34565b607060008b84815181106117835761178361201c565b60209081029190910181015182528101919091526040016000205460ff1660028111156117b2576117b2611f34565b146117ed5760405162461bcd60e51b815260206004820152600b60248201526a195c9c9bdc881b195d995b60aa1b604482015260640161056c565b61182f607060008b84815181106118065761180661201c565b6020026020010151815260200190815260200160002060020154846115c090919063ffffffff16565b9250611873607060008b848151811061184a5761184a61201c565b6020026020010151815260200190815260200160002060030154856115c090919063ffffffff16565b93508560c001516118fa576118b782607060008c85815181106118985761189861201c565b6020026020010151815260200190815260200160002060010154611a45565b156118fa5760405162461bcd60e51b81526020600482015260136024820152726d75737420626520756e69717565206361746560681b604482015260640161056c565b607060008a83815181106119105761191061201c565b602002602001015181526020019081526020016000206001015482828151811061193c5761193c61201c565b602090810291909101015280611951816120b4565b915050611752565b508161196f8951856115cc90919063ffffffff16565b965096505050505050935093915050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16806119eb575060005460ff16155b611a075760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611a29576000805461ffff19166101011790555b611a31611a9d565b611a39611b08565b6114c485858585611b68565b8151600090815b81811015611a925783858281518110611a6757611a6761201c565b60200260200101511415611a80576001925050506115ae565b80611a8a816120b4565b915050611a4c565b506000949350505050565b600054610100900460ff1680611ab6575060005460ff16155b611ad25760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611af4576000805461ffff19166101011790555b801561159c576000805461ff001916905550565b600054610100900460ff1680611b21575060005460ff16155b611b3d5760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611b5f576000805461ffff19166101011790555b611af433611980565b600054610100900460ff1680611b81575060005460ff16155b611b9d5760405162461bcd60e51b815260040161056c90612238565b600054610100900460ff16158015611bbf576000805461ffff19166101011790555b606680546001600160a01b038088166001600160a01b031992831617909255606880548684169083161790556069805492871692821683179055606780549091169091179055606b82905580156114d6576000805461ff00191690555050505050565b600060208284031215611c3457600080fd5b5035919050565b803560038110611c4a57600080fd5b919050565b60008060408385031215611c6257600080fd5b611c6b83611c3b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611cb857611cb8611c79565b604052919050565b600080600060608486031215611cd557600080fd5b833567ffffffffffffffff80821115611ced57600080fd5b818601915086601f830112611d0157600080fd5b8135602082821115611d1557611d15611c79565b8160051b9250611d26818401611c8f565b828152928401810192818101908a851115611d4057600080fd5b948201945b84861015611d5e57853582529482019490820190611d45565b9750611d6d9050888201611c3b565b955050505050611d7f60408501611c3b565b90509250925092565b60008060408385031215611d9b57600080fd5b50508035926020909101359150565b80356001600160a01b0381168114611c4a57600080fd5b600060208284031215611dd357600080fd5b6115ab82611daa565b600082601f830112611ded57600080fd5b813567ffffffffffffffff811115611e0757611e07611c79565b611e1a601f8201601f1916602001611c8f565b818152846020838601011115611e2f57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e6257600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115611e8e57600080fd5b611e9a87828801611ddc565b91505092959194509250565b801515811461159c57600080fd5b60008060008060008060c08789031215611ecd57600080fd5b611ed687611c3b565b9550602087013594506040870135611eed81611ea6565b9350606087013592506080870135915060a0870135611f0b81611ea6565b809150509295509295509295565b600060208284031215611f2b57600080fd5b6115ab82611c3b565b634e487b7160e01b600052602160045260246000fd5b6080810160038610611f6c57634e487b7160e01b600052602160045260246000fd5b9481526020810193909352604083019190915260609091015290565b60008060008060808587031215611f9e57600080fd5b611fa785611c3b565b93506020850135925060408501359150606085013567ffffffffffffffff811115611e8e57600080fd5b60008060008060808587031215611fe757600080fd5b611ff085611daa565b9350611ffe60208601611daa565b925061200c60408601611daa565b9396929550929360600135925050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561204457600080fd5b815161204f81611ea6565b9392505050565b60006020828403121561206857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156120985761209861206f565b500190565b6000828210156120af576120af61206f565b500390565b60006000198214156120c8576120c861206f565b5060010190565b600081518084526020808501945080840160005b838110156120ff578151875295820195908201906001016120e3565b509495945050505050565b6001600160a01b038316815260406020820181905260009061212e908301846120cf565b949350505050565b6020815260006115ab60208301846120cf565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b82815260006020604081840152835180604085015260005b818110156121b257858101830151858201606001528201612196565b818111156121c4576000606083870101525b50601f01601f191692909201606001949350505050565b6bffffffffffffffffffffffff19606095861b811682529390941b90921660148401526028830152604882015260680190565b634e487b7160e01b600052601260045260246000fd5b6000826122335761223361220e565b500690565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008160001904831182151516156122a0576122a061206f565b500290565b6000826122b4576122b461220e565b50049056fea264697066735822122006d4c3c83de443f0de98fbe298a0b335b7ce67bd2bb699fe01851c7061cf55f064736f6c634300080a0033