Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 16566047 | 591 days ago | IN | 0 ETH | 0.06819109 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Rental
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "erc721a-upgradeable/contracts/IERC721AUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./interface/IRental.sol"; import "./Abstract/ARental.sol"; contract Rental is Initializable, ReentrancyGuardUpgradeable, IRental, ARental { using Strings for uint256; bytes32 public rootOfRewards; uint256 public rewardTime; bool public updatePausable; address public admin; function initialize( address _owner, address _landContract, address _lordContract, bytes32 _rootLand, bytes32 _rootLord, uint256[] calldata _landWeight, uint256[] calldata _lordWeight ) external initializer { owner = _owner; rootLand = _rootLand; rootLord = _rootLord; landContract = _landContract; lordContract = _lordContract; landWeight.push(_landWeight[0]); landWeight.push(_landWeight[1]); landWeight.push(_landWeight[2]); lordWeight.push(_lordWeight[0]); lordWeight.push(_lordWeight[1]); lordWeight.push(_lordWeight[2]); } function blacklistMalicious(address account, bool value) external onlyOwner nonReentrant { isBlacklisted[account] = value; emit Blacklisted(account, value); } function setLandContract(address _landContract) external nonReentrant onlyOwner { address oldContract = landContract; landContract = _landContract; emit UpdateLandContract(_landContract, oldContract); } function setLordContract(address _lordContract) external nonReentrant onlyOwner { address oldContract = lordContract; lordContract = _lordContract; emit UpdateLandContract(_lordContract, oldContract); } function setOwner(address _owner) external nonReentrant onlyOwner { owner = _owner; emit UpdateOwner(msg.sender, owner); } function setRootLand(bytes32 _rootLand) external nonReentrant onlyOwner { rootLand = _rootLand; } function setRootLord(bytes32 _rootLord) external nonReentrant onlyOwner { rootLord = _rootLord; } function pause(bool _state) external nonReentrant onlyOwner { paused = _state; emit Pausable(_state); } function setLandWeight( uint256 _basicLandWeight, uint256 _platniumLandWeight, uint256 _primeLandWeight ) external nonReentrant onlyOwner { landWeight.push(_basicLandWeight); landWeight.push(_platniumLandWeight); landWeight.push(_primeLandWeight); } function setPool( uint256 _poolTimeSlot, uint256 _poolRoyalty, uint256[] calldata _poolTotalWeight, uint256 _poolMonth ) external payable onlyOwner { require(msg.value >= (_poolRoyalty * _poolMonth), "value not send"); availablePoolId += 1; uint256 poolStartTime = availablePoolId == 1 ? block.timestamp : poolInfo[availablePoolId - 1].poolEndTime; uint256 poolEndTime = poolStartTime + _poolTimeSlot * _poolMonth; poolInfo[availablePoolId] = Pool( _poolTimeSlot, _poolRoyalty, _poolTotalWeight, _poolMonth, poolStartTime, poolEndTime ); } function emergencyWithdraw() external nonReentrant { require(owner == msg.sender, "not owner"); _transferETH(address(this).balance); } function depositLandLords( Deposite memory deposite, corrdinate memory cordinate, bytes32[] memory _merkleProofland1, bytes32[] memory _merkleProofland2, bytes32[] memory _merkleProofland3, bytes32[] memory _merkleProoflord ) external nonReentrant isMerkelProofValid( cordinate, deposite._landId, deposite._lordId, deposite._landCatorgy, deposite._lordCatory, _merkleProofland1, _merkleProofland2, _merkleProofland3, _merkleProoflord ) { stacklandlord(deposite); } function withdrawLandLords(uint256 _rewardId) external nonReentrant whenNotPaused //isRewardIdExist(_rewardId) isOwnerOfId(_rewardId) { require(_rewardId != 0, "not zero"); require(landLordsInfo[_rewardId].status, "RewardId unstake"); for (uint256 i = 0; i < landLordsInfo[_rewardId].landId.length; i++) { _transfer( landContract, address(this), msg.sender, landLordsInfo[_rewardId].landId[i] ); } _transferA( lordContract, address(this), msg.sender, landLordsInfo[_rewardId].lordId ); totalLandWeights = totalLandWeights - landLordsInfo[_rewardId].totalLandWeight; landLordsInfo[_rewardId].status = false; uint256 poolId = currentPoolId(); uint256 currentMonth = _currentMonth(poolId); poolInfo[poolId].poolTotalWeight[currentMonth - 1] = totalLandWeights; _withdraw(_rewardId); emit WithdrawLandLord( msg.sender, _rewardId, landLordsInfo[_rewardId].landId, landLordsInfo[_rewardId].lordId ); } function claimRewards( uint256 _rewardId, bytes32[] memory _merkleProof, uint256 _rewards ) external //isRewardIdExist(_rewardId) //isOwnerOfId(_rewardId) { // require(landLordsInfo[_rewardId].status, "RewardId unstake"); // require( // !rewardAccess[_rewardId][msg.sender][rootOfRewards], // "already claim" // ); bytes32 leafToCheck = keccak256( abi.encodePacked(_rewardId.toString(), ",", _rewards.toString()) ); require( MerkleProofUpgradeable.verify( _merkleProof, rootOfRewards, leafToCheck ), "Incorrect land proof" ); //rewardAccess[_rewardId][msg.sender][rootOfRewards] = true; (bool success, ) = msg.sender.call{value: _rewards}(""); require(success, "refund failed"); } function getPoolInfo(uint256 _poolId) external view returns (Pool memory) { return poolInfo[_poolId]; } function getLandLordsInfo(uint256 _rewardId) external view returns (LandLords memory) { return landLordsInfo[_rewardId]; } function getCurrentRewrdId() external view returns (uint256) { return _getCurrentRewrdId(); } function getUserClaim(uint256 _rewardId, uint256 _poolId) external view returns (uint256) { require(!updatePausable, "paused the function"); return userClaimPerPool[_rewardId][_poolId]; } function currrentTime() external view returns (uint256) { return block.timestamp; } function getcalculateRewards(uint256 _rewardId) external view returns ( //isRewardIdExist(_rewardId) uint256, uint256 ) { require(!updatePausable, "paused the function"); require(landLordsInfo[_rewardId].status, "RewardId unstake"); uint256 _currentPoolId = currentPoolId(); uint256 claimAmount; uint256 userclaim = userClaimPerPool[_rewardId][_currentPoolId]; uint256 lastClaimTime = landLordsInfo[_rewardId].lastClaimTime; uint256 userPoolId = landLordsInfo[_rewardId].currentPoolId; bool loop; while (!loop) { if (_currentPoolId == userPoolId) { ( uint256 reward, uint256 time, uint256 claims ) = _rewardForCurrentPool( _currentPoolId, _rewardId, lastClaimTime, userclaim ); claimAmount += reward; userclaim = claims; lastClaimTime = time; loop = true; } else { uint256 poolId = landLordsInfo[_rewardId].currentPoolId; (uint256 reward, uint256 time) = _rewardsForPreviousPool( poolId, _rewardId, lastClaimTime ); claimAmount += reward; userPoolId += 1; lastClaimTime = time; } } return (claimAmount, lastClaimTime); } function getUserRewardId(address _user) external view returns (uint256[] memory) { return rewardIdInfo[_user]; } function onERC721Received( address, address from, uint256, bytes calldata ) external pure returns (bytes4) { return IERC721ReceiverUpgradeable.onERC721Received.selector; } function setAdmin(address _admin) external nonReentrant onlyOwner { admin = _admin; } function setRootRewards(bytes32 _root) external nonReentrant { require(admin == msg.sender, "not admin"); rootOfRewards = _root; } function setRewardTime(uint256 _time) external nonReentrant onlyOwner { rewardTime = _time; } function setPaused(bool _status) external nonReentrant onlyOwner { updatePausable = _status; } function _rewardForPool(uint256 rewardIds) external view returns (uint256) { require(landLordsInfo[rewardIds].status, "RewardId unstake"); uint256 _rewardId = rewardIds; uint256 poolId = currentPoolId(); uint256 currentMonth = _currentMonth(poolId); uint256 weight = _poolWeight(poolId, currentMonth); uint256 rewards = ((poolInfo[poolId].poolRoyalty * rewardTime) / (weight * poolInfo[poolId].poolTimeSlot)) * landLordsInfo[_rewardId].totalLandWeight; return (rewards); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; 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 proxied contracts do not make use of 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * 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 prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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`. * * 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; /** * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProofUpgradeable { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "../interface/IRental.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "erc721a-upgradeable/contracts/IERC721AUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "../interface/IRLand.sol"; abstract contract ARental is IRental { using Strings for uint256; using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter public rewardId; address public owner; address public landContract; address public lordContract; uint256[] public landWeight; uint256[] public lordWeight; uint256 public totalLandWeights; uint256 public availablePoolId; bytes32 public rootLand; bytes32 public rootLord; bool public paused; mapping(address => bool) public isBlacklisted; mapping(uint256 => LandLords) landLordsInfo; mapping(uint256 => Pool) poolInfo; mapping(address => uint256[]) rewardIdInfo; mapping(uint256 => uint256) index; mapping(uint256 => mapping(uint256 => uint256)) userClaimPerPool; mapping(uint256 => mapping(address => mapping(bytes32 => bool))) rewardAccess; modifier isBlacklist(address _user) { require(!isBlacklisted[_user], "Eth amount not enough"); _; } modifier isContractApprove() { require( IERC721Upgradeable(landContract).isApprovedForAll( msg.sender, address(this) ) && IERC721Upgradeable(lordContract).isApprovedForAll( msg.sender, address(this) ), "Nft not approved to contract" ); _; } modifier isCatorgyValid( uint256[] memory _landCatorgy, uint256 _lordCatory ) { require(catorgyValid(_landCatorgy, _lordCatory), "not valid catory"); _; } modifier isNonzero( uint256 _landId, uint256 _landCatorgy, uint256 _lordCatory ) { require( _landId != 0 && _landCatorgy != 0 && _lordCatory != 0, "not null" ); _; } modifier isLandValid(uint256 length, uint256 _lordCatory) { require(lordWeight[_lordCatory - 1] >= length, "length mismatch"); _; } modifier onlyOwner() { require(owner == msg.sender, "not owner"); _; } modifier isOwnerOfId(uint256 _rewardId) { require( msg.sender == landLordsInfo[_rewardId].owner, "not rewardId owner" ); _; } // modifier isRewardIdExist(uint256 _rewardId) { // require( // rewardId.current() >= _rewardId && isRewardId(_rewardId), // "rewardId not exist" // ); // _; // } modifier isMerkelProofValid( corrdinate memory cordinate, uint256[] memory _landId, uint256 _lordId, uint256[] memory _landCatorgy, uint256 _lordCatory, bytes32[] memory _merkleProofland1, bytes32[] memory _merkleProofland2, bytes32[] memory _merkleProofland3, bytes32[] memory _merkleProoflord ) { landProof( cordinate, _landId, _landCatorgy, _merkleProofland1, _merkleProofland2, _merkleProofland3 ); lordProof(_lordId, _lordCatory, _merkleProoflord); checkCoordinate(cordinate, _landId); _; } modifier whenNotPaused() { require(!paused, "contract paused"); _; } function checkCoordinate( corrdinate memory cordinate, uint256[] memory _landId ) internal view { if (_landId.length == 1) { require( IRLand(landContract).getTokenId( cordinate.land1[0], cordinate.land1[1] ) == _landId[0], "not correct tokenId" ); } else if (_landId.length == 2) { require( IRLand(landContract).getTokenId( cordinate.land1[0], cordinate.land1[1] ) == _landId[0], "not correct tokenId" ); require( IRLand(landContract).getTokenId( cordinate.land2[0], cordinate.land2[1] ) == _landId[1], "not correct tokenId" ); } else if (_landId.length == 3) { require( IRLand(landContract).getTokenId( cordinate.land1[0], cordinate.land1[1] ) == _landId[0], "not correct tokenId" ); require( IRLand(landContract).getTokenId( cordinate.land2[0], cordinate.land2[1] ) == _landId[1], "not correct tokenId" ); require( IRLand(landContract).getTokenId( cordinate.land3[0], cordinate.land3[1] ) == _landId[2], "not correct tokenId" ); } } function claminingTime( uint256 preMonth, uint256 currentMonth, uint256 lastClaimTime, uint256 poolId ) internal view returns (uint256 claimableTime, uint256 lastClaim) { uint256 monthLasttime = poolInfo[poolId].poolStartTime + (poolInfo[poolId].poolTimeSlot * (preMonth + 1)); if (currentMonth == (preMonth + 1) && block.timestamp < monthLasttime) { claimableTime = block.timestamp - lastClaimTime; lastClaim = block.timestamp; } else { claimableTime = monthLasttime - lastClaimTime; lastClaim = monthLasttime; } } function _currentMonth(uint256 _poolId) public view returns (uint256) { require(currentPoolId() == _poolId, "pass correct pool id"); uint256 poolTime = poolInfo[_poolId].poolTimeSlot; uint256 poolMonth = poolInfo[_poolId].poolMonth; uint256 leftTime = block.timestamp - poolInfo[_poolId].poolStartTime; //require(leftTime < (poolTime * poolMonth), "Wrong pool id"); if (leftTime > (poolTime * poolMonth)) { return poolMonth; } uint256 currentMonth = leftTime / poolTime; return currentMonth == poolMonth ? poolMonth : currentMonth + 1; } function currentPoolId() public view returns (uint256) { if (availablePoolId > 0) { return _calcuatePoolId(); } else { return 0; } } function _calcuatePoolId() internal view returns (uint256 poolId) { for (uint256 i = 0; i < availablePoolId; i++) { if ( poolInfo[i + 1].poolEndTime > block.timestamp && poolInfo[i + 1].poolStartTime < block.timestamp ) { return i + 1; } else { if (i + 1 == availablePoolId) { return availablePoolId; } } } } function catorgyValid(uint256[] memory _landCatorgy, uint256 _lordCatory) internal pure returns (bool) { for (uint256 i = 0; i < _landCatorgy.length; i++) { if (_landCatorgy[i] >= 4 || _lordCatory >= 4) { return false; } } return true; } function _calculateRewards(uint256 _rewardId) internal returns (uint256) { uint256 _currentPoolId = currentPoolId(); uint256 claimAmount; bool loop; while (!loop) { if (_currentPoolId == landLordsInfo[_rewardId].currentPoolId) { ( uint256 reward, uint256 time, uint256 claims ) = _rewardForCurrentPool( _currentPoolId, _rewardId, landLordsInfo[_rewardId].lastClaimTime, userClaimPerPool[_rewardId][_currentPoolId] ); claimAmount += reward; userClaimPerPool[_rewardId][_currentPoolId] = claims; landLordsInfo[_rewardId].lastClaimTime = time; loop = true; } else { uint256 poolId = landLordsInfo[_rewardId].currentPoolId; (uint256 reward, uint256 time) = _rewardsForPreviousPool( poolId, _rewardId, landLordsInfo[_rewardId].lastClaimTime ); claimAmount += reward; userClaimPerPool[_rewardId][poolId] = poolInfo[poolId] .poolMonth; landLordsInfo[_rewardId].currentPoolId += 1; landLordsInfo[_rewardId].lastClaimTime = time; } } return claimAmount; } function _deposite( uint256[] memory _landId, uint256 _lordId, uint256[] memory _landCatorgy, uint256 _lordCatory, uint256 _currentPoolId ) internal { rewardId.increment(); uint256 totalLandWeight; for (uint256 i = 0; i < _landCatorgy.length; i++) { totalLandWeight += landWeight[_landCatorgy[i] - 1]; } landLordsInfo[rewardId.current()] = LandLords( msg.sender, _landId, _lordId, _landCatorgy, _lordCatory, block.timestamp, _currentPoolId, totalLandWeight, true ); totalLandWeights += totalLandWeight; index[rewardId.current()] = rewardIdInfo[msg.sender].length; rewardIdInfo[msg.sender].push(rewardId.current()); _monthTotalWeight(rewardId.current(), _currentPoolId, totalLandWeights); for (uint256 i = 0; i < _landId.length; i++) { _transfer(landContract, msg.sender, address(this), _landId[i]); } _transferA(lordContract, msg.sender, address(this), _lordId); emit DepositeLandLord( msg.sender, rewardId.current(), _landId, _lordId, _landCatorgy, _lordCatory ); } function _getCurrentRewrdId() internal view returns (uint256) { return rewardId.current(); } function isRewardId(uint256 _rewardId) internal view returns (bool) { for (uint256 i = 0; i < rewardIdInfo[msg.sender].length; i++) { if (rewardIdInfo[msg.sender][i] == _rewardId) { return true; } } return false; } function lordProof( uint256 _lordId, uint256 _lordCatory, bytes32[] memory _merkleProoflord ) internal view { bytes32 leafToCheck = keccak256( abi.encodePacked(_lordId.toString(), ",", _lordCatory.toString()) ); require( MerkleProofUpgradeable.verify( _merkleProoflord, rootLord, leafToCheck ), "Incorrect lord proof" ); } function landProof( corrdinate memory cordinate, uint256[] memory _landId, uint256[] memory _landCatorgy, bytes32[] memory _merkleProofland1, bytes32[] memory _merkleProofland2, bytes32[] memory _merkleProofland3 ) internal view { if (_landId.length == 1) { merkelProof( cordinate.land1[0], cordinate.land1[1], _landCatorgy[0], _merkleProofland1 ); } else if (_landId.length == 2) { merkelProof( cordinate.land1[0], cordinate.land1[1], _landCatorgy[0], _merkleProofland1 ); merkelProof( cordinate.land2[0], cordinate.land2[1], _landCatorgy[1], _merkleProofland2 ); } else if (_landId.length == 3) { merkelProof( cordinate.land1[0], cordinate.land1[1], _landCatorgy[0], _merkleProofland1 ); merkelProof( cordinate.land2[0], cordinate.land2[1], _landCatorgy[1], _merkleProofland2 ); merkelProof( cordinate.land3[0], cordinate.land3[1], _landCatorgy[2], _merkleProofland3 ); } } function _monthTotalWeight( uint256 _rewardId, uint256 _poolId, uint256 _totalLandWeight ) internal { uint256 currentMonth = _currentMonth(_poolId); poolInfo[_poolId].poolTotalWeight[currentMonth - 1] = _totalLandWeight; userClaimPerPool[_rewardId][_poolId] = currentMonth - 1; } function merkelProof( uint256 x, uint256 y, uint256 _landCatorgy, bytes32[] memory _merkleProofland ) internal view { bytes32 leafToCheck = keccak256( abi.encodePacked( x.toString(), ",", y.toString(), ",", _landCatorgy.toString() ) ); require( MerkleProofUpgradeable.verify( _merkleProofland, rootLand, leafToCheck ), "Incorrect land proof" ); } function _poolMonthWeight(uint256 _poolId, uint256 _month) internal view returns (uint256) { uint256 month = _month; if (_poolId == 0) { return totalLandWeights; } else { for (uint256 i = 0; i < _month; i++) { if (poolInfo[_poolId].poolTotalWeight[month - 1] > 0) { return poolInfo[_poolId].poolTotalWeight[month - 1]; } else { month -= 1; } } } return 0; } function _poolWeight(uint256 _poolId, uint256 _month) public view returns (uint256) { uint256 weight; uint256 poolId = _poolId; uint256 month = _month; for (uint256 i = 0; i < availablePoolId; i++) { weight = _poolMonthWeight(poolId, month); if (weight == 0) { poolId -= 1; month = poolInfo[poolId].poolMonth; } else { return weight; } } return totalLandWeights; } function _rewardsForPreviousPool( uint256 _poolId, uint256 _rewardId, uint256 _lastClaimTime ) internal view returns (uint256, uint256) { uint256 lastClaimTime = _lastClaimTime; uint256 totalRewards; uint256 poolId = _poolId; for ( uint256 i = userClaimPerPool[_rewardId][poolId]; i < poolInfo[poolId].poolMonth; i++ ) { uint256 monthTime = poolInfo[poolId].poolStartTime + (poolInfo[poolId].poolTimeSlot * (i + 1)); uint256 claimableTime = monthTime - lastClaimTime; uint256 weight = _poolWeight(poolId, i + 1); uint256 rewards = ((poolInfo[poolId].poolRoyalty * claimableTime) / (weight * poolInfo[poolId].poolTimeSlot)) * landLordsInfo[_rewardId].totalLandWeight; totalRewards += rewards; lastClaimTime = monthTime; } return (totalRewards, lastClaimTime); } function _rewardForCurrentPool( uint256 _poolId, uint256 rewardIds, uint256 _lastClaimTime, uint256 _userClaim ) internal view returns ( uint256, uint256, uint256 ) { uint256 _rewardId = rewardIds; uint256 lastClaimTime = _lastClaimTime; uint256 totalRewards; uint256 currentMonth = _currentMonth(_poolId); uint256 poolId = _poolId; uint256 claiming; uint256 weights; uint256 userClaim = _userClaim == currentMonth ? _userClaim - 1 : _userClaim; if (currentMonth != 0) { for (uint256 i = userClaim; i < currentMonth; i++) { (uint256 claimableTime, uint256 monthTime) = claminingTime( i, currentMonth, lastClaimTime, poolId ); claiming = claimableTime; uint256 weight = _poolWeight(poolId, i + 1); weights = weight; uint256 rewards = ((poolInfo[poolId].poolRoyalty * claimableTime) / (weight * poolInfo[poolId].poolTimeSlot)) * landLordsInfo[_rewardId].totalLandWeight; totalRewards += rewards; lastClaimTime = monthTime; } } return (totalRewards, lastClaimTime, currentMonth); } function stacklandlord(Deposite memory deposite) internal isNonzero( deposite._landId.length, deposite._landCatorgy.length, deposite._lordCatory ) isCatorgyValid(deposite._landCatorgy, deposite._lordCatory) isContractApprove isLandValid(deposite._landId.length, deposite._lordCatory) { uint256 currentPoolIds = currentPoolId(); require(currentPoolIds > 0, "deposite not allowed"); _deposite( deposite._landId, deposite._lordId, deposite._landCatorgy, deposite._lordCatory, currentPoolIds ); } function _transfer( address _contract, address _from, address _to, uint256 _tokenId ) internal { IERC721Upgradeable(_contract).transferFrom(_from, _to, _tokenId); } function _transferA( address _contract, address _from, address _to, uint256 _tokenId ) internal { IERC721AUpgradeable(_contract).safeTransferFrom(_from, _to, _tokenId); } function _transferETH(uint256 _amount) internal { (bool success, ) = msg.sender.call{value: _amount}(""); require(success, "refund failed"); } function _withdraw(uint256 _rewardId) internal { uint256 lastrewardId = rewardIdInfo[msg.sender][ (rewardIdInfo[msg.sender].length - 1) ]; index[lastrewardId] = index[_rewardId]; rewardIdInfo[msg.sender][(index[_rewardId])] = lastrewardId; rewardIdInfo[msg.sender].pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IRental { struct LandLords { address owner; uint256[] landId; uint256 lordId; uint256[] LandCatorgy; uint256 LordCatorgy; uint256 lastClaimTime; uint256 currentPoolId; uint256 totalLandWeight; bool status; } struct Pool { uint256 poolTimeSlot; uint256 poolRoyalty; uint256[] poolTotalWeight; uint256 poolMonth; uint256 poolStartTime; uint256 poolEndTime; } struct Deposite { uint256[] _landId; uint256 _lordId; uint256[] _landCatorgy; uint256 _lordCatory; } struct corrdinate { uint256[] land1; uint256[] land2; uint256[] land3; } event Blacklisted(address account, bool value); event DepositeLandLord( address owner, uint256 _rewardId, uint256[] landId, uint256 lordId, uint256[] landCatorgy, uint256 lordCatory ); event Pausable(bool state); event UpdateOwner(address oldOwner, address newOwner); event UpdateLandContract(address newContract, address oldContract); event UpdateLordContract(address newContract, address oldContract); event WithdrawLandLord( address owner, uint256 _rewardId, uint256[] landId, uint256 lordId ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IRLand { function getTokenId(uint256 x, uint256 y) external view returns (uint256); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721AUpgradeable { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @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, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` 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 payable; /** * @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 payable; /** * @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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_rewardId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"landId","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"lordId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"landCatorgy","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"lordCatory","type":"uint256"}],"name":"DepositeLandLord","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"Pausable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newContract","type":"address"},{"indexed":false,"internalType":"address","name":"oldContract","type":"address"}],"name":"UpdateLandContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newContract","type":"address"},{"indexed":false,"internalType":"address","name":"oldContract","type":"address"}],"name":"UpdateLordContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"UpdateOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_rewardId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"landId","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"lordId","type":"uint256"}],"name":"WithdrawLandLord","type":"event"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"_currentMonth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_month","type":"uint256"}],"name":"_poolWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardIds","type":"uint256"}],"name":"_rewardForPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availablePoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"blacklistMalicious","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardId","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_rewards","type":"uint256"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currrentTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"_landId","type":"uint256[]"},{"internalType":"uint256","name":"_lordId","type":"uint256"},{"internalType":"uint256[]","name":"_landCatorgy","type":"uint256[]"},{"internalType":"uint256","name":"_lordCatory","type":"uint256"}],"internalType":"struct IRental.Deposite","name":"deposite","type":"tuple"},{"components":[{"internalType":"uint256[]","name":"land1","type":"uint256[]"},{"internalType":"uint256[]","name":"land2","type":"uint256[]"},{"internalType":"uint256[]","name":"land3","type":"uint256[]"}],"internalType":"struct IRental.corrdinate","name":"cordinate","type":"tuple"},{"internalType":"bytes32[]","name":"_merkleProofland1","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_merkleProofland2","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_merkleProofland3","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_merkleProoflord","type":"bytes32[]"}],"name":"depositLandLords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentRewrdId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardId","type":"uint256"}],"name":"getLandLordsInfo","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"landId","type":"uint256[]"},{"internalType":"uint256","name":"lordId","type":"uint256"},{"internalType":"uint256[]","name":"LandCatorgy","type":"uint256[]"},{"internalType":"uint256","name":"LordCatorgy","type":"uint256"},{"internalType":"uint256","name":"lastClaimTime","type":"uint256"},{"internalType":"uint256","name":"currentPoolId","type":"uint256"},{"internalType":"uint256","name":"totalLandWeight","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"internalType":"struct IRental.LandLords","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"getPoolInfo","outputs":[{"components":[{"internalType":"uint256","name":"poolTimeSlot","type":"uint256"},{"internalType":"uint256","name":"poolRoyalty","type":"uint256"},{"internalType":"uint256[]","name":"poolTotalWeight","type":"uint256[]"},{"internalType":"uint256","name":"poolMonth","type":"uint256"},{"internalType":"uint256","name":"poolStartTime","type":"uint256"},{"internalType":"uint256","name":"poolEndTime","type":"uint256"}],"internalType":"struct IRental.Pool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardId","type":"uint256"},{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"getUserClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserRewardId","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardId","type":"uint256"}],"name":"getcalculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_landContract","type":"address"},{"internalType":"address","name":"_lordContract","type":"address"},{"internalType":"bytes32","name":"_rootLand","type":"bytes32"},{"internalType":"bytes32","name":"_rootLord","type":"bytes32"},{"internalType":"uint256[]","name":"_landWeight","type":"uint256[]"},{"internalType":"uint256[]","name":"_lordWeight","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"landWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lordContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lordWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardId","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rootLand","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rootLord","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rootOfRewards","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_landContract","type":"address"}],"name":"setLandContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_basicLandWeight","type":"uint256"},{"internalType":"uint256","name":"_platniumLandWeight","type":"uint256"},{"internalType":"uint256","name":"_primeLandWeight","type":"uint256"}],"name":"setLandWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lordContract","type":"address"}],"name":"setLordContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolTimeSlot","type":"uint256"},{"internalType":"uint256","name":"_poolRoyalty","type":"uint256"},{"internalType":"uint256[]","name":"_poolTotalWeight","type":"uint256[]"},{"internalType":"uint256","name":"_poolMonth","type":"uint256"}],"name":"setPool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setRewardTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_rootLand","type":"bytes32"}],"name":"setRootLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_rootLord","type":"bytes32"}],"name":"setRootLord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setRootRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalLandWeights","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updatePausable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardId","type":"uint256"}],"name":"withdrawLandLords","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614579806100206000396000f3fe6080604052600436106102fd5760003560e01c80639781f8d01161018f578063de680dfb116100e1578063f851a4401161008a578063fbaf9e1911610064578063fbaf9e19146108aa578063fbd7e9f3146108ca578063fe575a87146108ea57600080fd5b8063f851a44014610838578063f91daf611461085d578063fa24e1ee1461088a57600080fd5b8063ebc5163b116100bb578063ebc5163b146107e3578063f4c8ad14146107f8578063f6c0f78c1461081857600080fd5b8063de680dfb14610790578063e69f8ac7146107b0578063e86dd092146107c357600080fd5b8063c00b479211610143578063d592bf921161011d578063d592bf921461073b578063d89293421461075b578063db2e21bc1461077b57600080fd5b8063c00b4792146106e5578063ca8957ff14610705578063cd53722b1461072557600080fd5b8063afafa9be11610174578063afafa9be1461068f578063b48641f4146106a5578063bd015b0f146106c557600080fd5b80639781f8d014610647578063a3bf2f541461065a57600080fd5b80634fb5d310116102535780636c7a9e21116101fc578063818fd119116101d6578063818fd119146105f15780638da5cb5b1461061157806391b66fd51461063157600080fd5b80636c7a9e2114610597578063704b6c02146105b157806380e55fe0146105d157600080fd5b80635c975abb1161022d5780635c975abb1461052b5780635cf443bf14610555578063681a96bc1461056a57600080fd5b80634fb5d310146104d457806352690725146104f45780635b402eaf1461051457600080fd5b8063150b7a02116102b55780632215b4dc1161028f5780632215b4dc146104715780632f380b35146104875780633fd1a4a2146104b457600080fd5b8063150b7a02146103bb57806316c38b3c14610431578063177c67cb1461045157600080fd5b80630c266545116102e65780630c2665451461036157806313af40351461038557806313ff842d146103a557600080fd5b806302329a291461030257806303d0734014610324575b600080fd5b34801561030e57600080fd5b5061032261031d366004613f3e565b61091a565b005b34801561033057600080fd5b50603554610344906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561036d57600080fd5b50610377603a5481565b604051908152602001610358565b34801561039157600080fd5b506103226103a0366004613da4565b6109be565b3480156103b157600080fd5b5061037760455481565b3480156103c757600080fd5b506104006103d6366004613e72565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610358565b34801561043d57600080fd5b5061032261044c366004613f3e565b610a61565b34801561045d57600080fd5b5061032261046c366004614094565b610ac4565b34801561047d57600080fd5b50610377603c5481565b34801561049357600080fd5b506104a76104a2366004613f76565b610be9565b60405161035891906143d1565b3480156104c057600080fd5b506103776104cf3660046140e2565b610cbf565b3480156104e057600080fd5b506103776104ef3660046140e2565b610d37565b34801561050057600080fd5b5061032261050f36600461415c565b610dac565b34801561052057600080fd5b506033546103779081565b34801561053757600080fd5b50603d546105459060ff1681565b6040519015158152602001610358565b34801561056157600080fd5b50610377610e57565b34801561057657600080fd5b5061058a610585366004613da4565b610e66565b6040516103589190614313565b3480156105a357600080fd5b506047546105459060ff1681565b3480156105bd57600080fd5b506103226105cc366004613da4565b610ed2565b3480156105dd57600080fd5b506103226105ec366004613f76565b610f5e565b3480156105fd57600080fd5b5061037761060c366004613f76565b610fd3565b34801561061d57600080fd5b50603454610344906001600160a01b031681565b34801561063d57600080fd5b5061037760465481565b610322610655366004614103565b610ff4565b34801561066657600080fd5b5061067a610675366004613f76565b6111bb565b60408051928352602083019190915201610358565b34801561069b57600080fd5b5061037760395481565b3480156106b157600080fd5b506103776106c0366004613f76565b611340565b3480156106d157600080fd5b506103226106e0366004613f76565b61140c565b3480156106f157600080fd5b50610322610700366004613dbe565b611468565b34801561071157600080fd5b50610322610720366004613da4565b61176f565b34801561073157600080fd5b50610377603b5481565b34801561074757600080fd5b50603654610344906001600160a01b031681565b34801561076757600080fd5b50610322610776366004613f08565b611823565b34801561078757600080fd5b506103226118dd565b34801561079c57600080fd5b506103776107ab366004613f76565b61193f565b3480156107bc57600080fd5b5042610377565b3480156107cf57600080fd5b506103226107de366004613da4565b61194f565b3480156107ef57600080fd5b506103776119f5565b34801561080457600080fd5b50610322610813366004613f76565b611a0e565b34801561082457600080fd5b50610322610833366004613f8e565b611a6a565b34801561084457600080fd5b506047546103449061010090046001600160a01b031681565b34801561086957600080fd5b5061087d610878366004613f76565b611ad1565b6040516103589190614326565b34801561089657600080fd5b506103226108a5366004613f76565b611c4a565b3480156108b657600080fd5b506103776108c5366004613f76565b611ca6565b3480156108d657600080fd5b506103226108e5366004613f76565b611d8c565b3480156108f657600080fd5b50610545610905366004613da4565b603e6020526000908152604090205460ff1681565b6109226120a9565b6034546001600160a01b0316331461096d5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b60448201526064015b60405180910390fd5b603d805460ff19168215159081179091556040519081527fd50aa5e7250de744184760fe907adb5d01955537ddb35ac6d3bd5b8c1fffde12906020015b60405180910390a16109bb60018055565b50565b6109c66120a9565b6034546001600160a01b03163314610a0c5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603480546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fe2c7d1c4da37855e682bde14f17826d185497973b73fba7554daa6da467058d991016109aa565b610a696120a9565b6034546001600160a01b03163314610aaf5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b6047805460ff19168215151790556001805550565b6000610acf84612103565b610ad883612103565b604051602001610ae99291906141fa565b604051602081830303815290604052805190602001209050610b0e83604554836121bb565b610b5a5760405162461bcd60e51b815260206004820152601460248201527f496e636f7272656374206c616e642070726f6f660000000000000000000000006044820152606401610964565b604051600090339084908381818185875af1925050503d8060008114610b9c576040519150601f19603f3d011682016040523d82523d6000602084013e610ba1565b606091505b5050905080610be25760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610964565b5050505050565b610c226040518060c001604052806000815260200160008152602001606081526020016000815260200160008152602001600081525090565b60008281526040602081815291819020815160c08101835281548152600182015481850152600282018054845181870281018701865281815292959394860193830182828015610c9157602002820191906000526020600020905b815481526020019060010190808311610c7d575b5050505050815260200160038201548152602001600482015481526020016005820154815250509050919050565b60475460009060ff1615610d155760405162461bcd60e51b815260206004820152601360248201527f706175736564207468652066756e6374696f6e000000000000000000000000006044820152606401610964565b5060008281526043602090815260408083208484529091529020545b92915050565b6000808383825b603a54811015610d9e57610d5283836121d1565b935083610d8057610d646001846144d7565b6000818152604060208190529020600301549093509150610d8c565b83945050505050610d31565b80610d96816144ee565b915050610d3e565b505060395495945050505050565b610db46120a9565b6034546001600160a01b03163314610dfa5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603780546001818101835560008390527f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31ae918201869055825480820184558201859055825490810190925501819055610e5260018055565b505050565b6000610e616122b1565b905090565b6001600160a01b038116600090815260416020908152604091829020805483518184028101840190945280845260609392830182828015610ec657602002820191906000526020600020905b815481526020019060010190808311610eb2575b50505050509050919050565b610eda6120a9565b6034546001600160a01b03163314610f205760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b604780547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038416021790556001805550565b610f666120a9565b60475461010090046001600160a01b03163314610fc55760405162461bcd60e51b815260206004820152600960248201527f6e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610964565b60458190556109bb60018055565b60388181548110610fe357600080fd5b600091825260209091200154905081565b6034546001600160a01b0316331461103a5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b61104481856144b8565b3410156110935760405162461bcd60e51b815260206004820152600e60248201527f76616c7565206e6f742073656e640000000000000000000000000000000000006044820152606401610964565b6001603a60008282546110a69190614480565b9091555050603a546000906001146110e257604060006001603a546110cb91906144d7565b8152602001908152602001600020600501546110e4565b425b905060006110f283886144b8565b6110fc9083614480565b90506040518060c001604052808881526020018781526020018686808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250938552505050602080830187905260408084018790526060909301859052603a54825282815290829020835181558382015160018201559183015180516111919260028501920190613b2d565b50606082015160038201556080820151600482015560a09091015160059091015550505050505050565b604754600090819060ff16156112135760405162461bcd60e51b815260206004820152601360248201527f706175736564207468652066756e6374696f6e000000000000000000000000006044820152606401610964565b6000838152603f602052604090206008015460ff166112675760405162461bcd60e51b815260206004820152601060248201526f526577617264496420756e7374616b6560801b6044820152606401610964565b60006112716119f5565b6000858152604360209081526040808320848452825280832054888452603f909252822060058101546006909101549394509192909190835b8061133257818614156112ea5760008060006112c8898d888a6122bc565b919450925090506112d98389614480565b975095509350600191506112aa9050565b6000898152603f60205260408120600601549080611309838d886123c8565b90925090506113188289614480565b9750611325600186614480565b94508095505050506112aa565b509297909650945050505050565b60008161134b6119f5565b146113985760405162461bcd60e51b815260206004820152601460248201527f7061737320636f727265637420706f6f6c2069640000000000000000000000006044820152606401610964565b6000828152604060208190528120805460038201546004909201549092906113c090426144d7565b90506113cc82846144b8565b8111156113db57509392505050565b60006113e78483614498565b9050828114611400576113fb816001614480565b611402565b825b9695505050505050565b6114146120a9565b6034546001600160a01b0316331461145a5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603c8190556109bb60018055565b600054610100900460ff16158080156114885750600054600160ff909116105b806114a25750303b1580156114a2575060005460ff166001145b6115145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610964565b6000805460ff191660011790558015611537576000805461ff0019166101001790555b603480546001600160a01b03808d166001600160a01b031992831617909255603b899055603c889055603580548c841690831617905560368054928b16929091169190911790556037858560008161159f57634e487b7160e01b600052603260045260246000fd5b835460018082018655600095865260209586902092909502939093013592019190915550603790869086908181106115e757634e487b7160e01b600052603260045260246000fd5b8354600181018555600094855260209485902091909402929092013591909201555060378585600281811061162c57634e487b7160e01b600052603260045260246000fd5b8354600181018555600094855260208086209202939093013592019190915550603890849084908161166e57634e487b7160e01b600052603260045260246000fd5b835460018082018655600095865260209586902092909502939093013592019190915550603890849084908181106116b657634e487b7160e01b600052603260045260246000fd5b835460018101855560009485526020948590209190940292909201359190920155506038838360028181106116fb57634e487b7160e01b600052603260045260246000fd5b835460018101855560009485526020948590209190940292909201359190920155508015611763576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b6117776120a9565b6034546001600160a01b031633146117bd5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603680546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fcc054e44df1e74bd35301d48ba2d2b27b0c2d34877beddd498a4830197bd81f491015b60405180910390a1506109bb60018055565b6034546001600160a01b031633146118695760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b6118716120a9565b6001600160a01b0382166000818152603e6020908152604091829020805460ff19168515159081179091558251938452908301527fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd8910160405180910390a16118d960018055565b5050565b6118e56120a9565b6034546001600160a01b0316331461192b5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b611934476124fd565b61193d60018055565b565b60378181548110610fe357600080fd5b6119576120a9565b6034546001600160a01b0316331461199d5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603580546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fcc054e44df1e74bd35301d48ba2d2b27b0c2d34877beddd498a4830197bd81f49101611811565b603a5460009015611a0857610e61612585565b50600090565b611a166120a9565b6034546001600160a01b03163314611a5c5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b60468190556109bb60018055565b611a726120a9565b84866000015187602001518860400151896060015188888888611a99898988878787612629565b611aa4878683612868565b611aae8989612904565b611ab78f612fb3565b505050505050505050611ac960018055565b505050505050565b611b2b60405180610120016040528060006001600160a01b03168152602001606081526020016000815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6000828152603f602090815260409182902082516101208101845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015611ba157602002820191906000526020600020905b815481526020019060010190808311611b8d575b505050505081526020016002820154815260200160038201805480602002602001604051908101604052809291908181526020018280548015611c0357602002820191906000526020600020905b815481526020019060010190808311611bef575b50505091835250506004820154602082015260058201546040820152600682015460608201526007820154608082015260089091015460ff16151560a09091015292915050565b611c526120a9565b6034546001600160a01b03163314611c985760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603b8190556109bb60018055565b6000818152603f602052604081206008015460ff16611cfa5760405162461bcd60e51b815260206004820152601060248201526f526577617264496420756e7374616b6560801b6044820152606401610964565b816000611d056119f5565b90506000611d1282611340565b90506000611d208383610d37565b6000858152603f6020908152604080832060070154878452918190528220549293509091611d4e90846144b8565b604654600087815260406020819052902060010154611d6d91906144b8565b611d779190614498565b611d8191906144b8565b979650505050505050565b611d946120a9565b603d5460ff1615611de75760405162461bcd60e51b815260206004820152600f60248201527f636f6e74726163742070617573656400000000000000000000000000000000006044820152606401610964565b6000818152603f602052604090205481906001600160a01b03163314611e4f5760405162461bcd60e51b815260206004820152601260248201527f6e6f74207265776172644964206f776e657200000000000000000000000000006044820152606401610964565b81611e9c5760405162461bcd60e51b815260206004820152600860248201527f6e6f74207a65726f0000000000000000000000000000000000000000000000006044820152606401610964565b6000828152603f602052604090206008015460ff16611ef05760405162461bcd60e51b815260206004820152601060248201526f526577617264496420756e7374616b6560801b6044820152606401610964565b60005b6000838152603f6020526040902060010154811015611f75576035546000848152603f602052604090206001018054611f63926001600160a01b031691309133919086908110611f5357634e487b7160e01b600052603260045260246000fd5b90600052602060002001546132ec565b80611f6d816144ee565b915050611ef3565b506036546000838152603f6020526040902060020154611fa2916001600160a01b03169030903390613376565b6000828152603f6020526040902060070154603954611fc191906144d7565b6039556000828152603f60205260408120600801805460ff19169055611fe56119f5565b90506000611ff282611340565b6039546000848152604060208190529020919250906002016120156001846144d7565b8154811061203357634e487b7160e01b600052603260045260246000fd5b600091825260209091200155612048846133cc565b6000848152603f602052604090819020600281015491517f60b9a0acc61a79b572af470a60dbe9aeb530b84888d0fcea2edafc099e07e7b7926120959233928992600190920191906142aa565b60405180910390a15050506109bb60018055565b600260015414156120fc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610964565b6002600155565b60606000612110836134b5565b600101905060008167ffffffffffffffff81111561213e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612168576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846121ae576121b3565b612172565b509392505050565b6000826121c88584613597565b14949350505050565b600081836121e3575050603954610d31565b60005b838110156122a657600085815260406020819052812060020161220a6001856144d7565b8154811061222857634e487b7160e01b600052603260045260246000fd5b906000526020600020015411156122875760008581526040602081905290206002016122556001846144d7565b8154811061227357634e487b7160e01b600052603260045260246000fd5b906000526020600020015492505050610d31565b6122926001836144d7565b91508061229e816144ee565b9150506121e6565b506000949350505050565b6000610e6160335490565b60008080858582806122cd8b611340565b90508a600080808b85146122e1578b6122ec565b6122ec60018d6144d7565b905084156123b257805b858110156123b05760008061230d83898c8a6135ea565b90965086925090506000612326886104ef866001614480565b60008d8152603f60209081526040808320600701548c845291819052822054929850889350909161235790846144b8565b60008b8152604060208190529020600101546123749087906144b8565b61237e9190614498565b61238891906144b8565b9050612394818c614480565b9a50829b505050505080806123a8906144ee565b9150506122f6565b505b50939d949c50919a509298505050505050505050565b600082815260436020908152604080832086845290915281205481908390829087905b6000828152604060208190529020600301548110156124ee576000612411826001614480565b60008481526040602081905290205461242a91906144b8565b6000848152604060208190529020600401546124469190614480565b9050600061245486836144d7565b90506000612467856104ef866001614480565b60008c8152603f602090815260408083206007015489845291819052822054929350909161249590846144b8565b6000888152604060208190529020600101546124b29086906144b8565b6124bc9190614498565b6124c691906144b8565b90506124d28188614480565b96508397505050505080806124e6906144ee565b9150506123eb565b50909791965090945050505050565b604051600090339083908381818185875af1925050503d806000811461253f576040519150601f19603f3d011682016040523d82523d6000602084013e612544565b606091505b50509050806118d95760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610964565b6000805b603a548110156126255742604060006125a3846001614480565b8152602001908152602001600020600501541180156125e1575042604060006125cd846001614480565b815260200190815260200160002060040154105b156125f7576125f1816001614480565b91505090565b603a54612605826001614480565b1415612613575050603a5490565b8061261d816144ee565b915050612589565b5090565b8451600114156126c4576126bf866000015160008151811061265b57634e487b7160e01b600052603260045260246000fd5b6020026020010151876000015160018151811061268857634e487b7160e01b600052603260045260246000fd5b6020026020010151866000815181106126b157634e487b7160e01b600052603260045260246000fd5b60200260200101518661367b565b611ac9565b845160021415612782576126f6866000015160008151811061265b57634e487b7160e01b600052603260045260246000fd5b6126bf866020015160008151811061271e57634e487b7160e01b600052603260045260246000fd5b6020026020010151876020015160018151811061274b57634e487b7160e01b600052603260045260246000fd5b60200260200101518660018151811061277457634e487b7160e01b600052603260045260246000fd5b60200260200101518561367b565b845160031415611ac9576127b4866000015160008151811061265b57634e487b7160e01b600052603260045260246000fd5b6127dc866020015160008151811061271e57634e487b7160e01b600052603260045260246000fd5b611ac9866040015160008151811061280457634e487b7160e01b600052603260045260246000fd5b6020026020010151876040015160018151811061283157634e487b7160e01b600052603260045260246000fd5b60200260200101518660028151811061285a57634e487b7160e01b600052603260045260246000fd5b60200260200101518461367b565b600061287384612103565b61287c84612103565b60405160200161288d9291906141fa565b6040516020818303038152906040528051906020012090506128b282603c54836121bb565b6128fe5760405162461bcd60e51b815260206004820152601460248201527f496e636f7272656374206c6f72642070726f6f660000000000000000000000006044820152606401610964565b50505050565b805160011415612a5f578060008151811061292f57634e487b7160e01b600052603260045260246000fd5b6020908102919091010151603554835180516001600160a01b0390921691633112de9a919060009061297157634e487b7160e01b600052603260045260246000fd5b6020026020010151856000015160018151811061299e57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016129cc929190918252602082015260400190565b60206040518083038186803b1580156129e457600080fd5b505afa1580156129f8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1c919061407c565b146118d95760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b805160021415612c595780600081518110612a8a57634e487b7160e01b600052603260045260246000fd5b6020908102919091010151603554835180516001600160a01b0390921691633112de9a9190600090612acc57634e487b7160e01b600052603260045260246000fd5b60200260200101518560000151600181518110612af957634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612b27929190918252602082015260400190565b60206040518083038186803b158015612b3f57600080fd5b505afa158015612b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b77919061407c565b14612bba5760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b80600181518110612bdb57634e487b7160e01b600052603260045260246000fd5b6020026020010151603560009054906101000a90046001600160a01b03166001600160a01b0316633112de9a8460200151600081518110612c2c57634e487b7160e01b600052603260045260246000fd5b6020026020010151856020015160018151811061299e57634e487b7160e01b600052603260045260246000fd5b8051600314156118d95780600081518110612c8457634e487b7160e01b600052603260045260246000fd5b6020908102919091010151603554835180516001600160a01b0390921691633112de9a9190600090612cc657634e487b7160e01b600052603260045260246000fd5b60200260200101518560000151600181518110612cf357634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612d21929190918252602082015260400190565b60206040518083038186803b158015612d3957600080fd5b505afa158015612d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d71919061407c565b14612db45760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b80600181518110612dd557634e487b7160e01b600052603260045260246000fd5b6020026020010151603560009054906101000a90046001600160a01b03166001600160a01b0316633112de9a8460200151600081518110612e2657634e487b7160e01b600052603260045260246000fd5b60200260200101518560200151600181518110612e5357634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612e81929190918252602082015260400190565b60206040518083038186803b158015612e9957600080fd5b505afa158015612ead573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed1919061407c565b14612f145760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b80600281518110612f3557634e487b7160e01b600052603260045260246000fd5b6020026020010151603560009054906101000a90046001600160a01b03166001600160a01b0316633112de9a8460400151600081518110612f8657634e487b7160e01b600052603260045260246000fd5b6020026020010151856040015160018151811061299e57634e487b7160e01b600052603260045260246000fd5b80515160408201515160608301518215801590612fcf57508115155b8015612fda57508015155b6130265760405162461bcd60e51b815260206004820152600860248201527f6e6f74206e756c6c0000000000000000000000000000000000000000000000006044820152606401610964565b8360400151846060015161303a828261371b565b6130865760405162461bcd60e51b815260206004820152601060248201527f6e6f742076616c6964206361746f7279000000000000000000000000000000006044820152606401610964565b60355460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c59060440160206040518083038186803b1580156130cf57600080fd5b505afa1580156130e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131079190613f5a565b801561318f575060365460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c59060440160206040518083038186803b15801561315757600080fd5b505afa15801561316b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061318f9190613f5a565b6131db5760405162461bcd60e51b815260206004820152601c60248201527f4e6674206e6f7420617070726f76656420746f20636f6e7472616374000000006044820152606401610964565b85515160608701518160386131f16001846144d7565b8154811061320f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015410156132685760405162461bcd60e51b815260206004820152600f60248201527f6c656e677468206d69736d6174636800000000000000000000000000000000006044820152606401610964565b60006132726119f5565b9050600081116132c45760405162461bcd60e51b815260206004820152601460248201527f6465706f73697465206e6f7420616c6c6f7765640000000000000000000000006044820152606401610964565b6132e189600001518a602001518b604001518c606001518561378b565b505050505050505050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906323b872dd906064015b600060405180830381600087803b15801561335857600080fd5b505af115801561336c573d6000803e3d6000fd5b5050505050505050565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e9060640161333e565b33600090815260416020526040812080546133e9906001906144d7565b8154811061340757634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154848352604280835260408085205483865281862081905533865260418552908520948790529252825490935083929190811061346157634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925533815260419091526040902080548061349b57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590555050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106134fe577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061352a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061354857662386f26fc10000830492506010015b6305f5e1008310613560576305f5e100830492506008015b612710831061357457612710830492506004015b60648310613586576064830492506002015b600a8310610d315760010192915050565b600081815b84518110156121b3576135d6828683815181106135c957634e487b7160e01b600052603260045260246000fd5b6020026020010151613a77565b9150806135e2816144ee565b91505061359c565b600080806135f9876001614480565b60008581526040602081905290205461361291906144b8565b60008581526040602081905290206004015461362e9190614480565b905061363b876001614480565b8614801561364857508042105b156136615761365785426144d7565b9250429150613671565b61366b85826144d7565b92508091505b5094509492505050565b600061368685612103565b61368f85612103565b61369885612103565b6040516020016136aa93929190614223565b6040516020818303038152906040528051906020012090506136cf82603b54836121bb565b610be25760405162461bcd60e51b815260206004820152601460248201527f496e636f7272656374206c616e642070726f6f660000000000000000000000006044820152606401610964565b6000805b835181101561378157600484828151811061374a57634e487b7160e01b600052603260045260246000fd5b6020026020010151101580613760575060048310155b1561376f576000915050610d31565b80613779816144ee565b91505061371f565b5060019392505050565b613799603380546001019055565b6000805b845181101561382457603760018683815181106137ca57634e487b7160e01b600052603260045260246000fd5b60200260200101516137dc91906144d7565b815481106137fa57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154826138109190614480565b91508061381c816144ee565b91505061379d565b50604051806101200160405280336001600160a01b0316815260200187815260200186815260200185815260200184815260200142815260200183815260200182815260200160011515815250603f600061387e60335490565b8152602080820192909252604001600020825181546001600160a01b0319166001600160a01b0390911617815582820151805191926138c592600185019290910190613b2d565b5060408201516002820155606082015180516138eb916003840191602090910190613b2d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820155610100909101516008909101805460ff191691151591909117905560398054829190600090613944908490614480565b9091555050336000908152604160205260408120549060429061396660335490565b81526020808201929092526040908101600090812093909355338352604182528220603380548254600181018455928552929093200155546139ab9083603954613aa9565b60005b8651811015613a0d5760355487516139fb916001600160a01b031690339030908b90869081106139ee57634e487b7160e01b600052603260045260246000fd5b60200260200101516132ec565b80613a05816144ee565b9150506139ae565b50603654613a26906001600160a01b0316333088613376565b7f20710c8acac7f8475d8dfcdeb77e60a4457e5ec543f177deda3d7e1f05da638f33613a5160335490565b88888888604051613a6796959493929190614256565b60405180910390a1505050505050565b6000818310613a93576000828152602084905260409020613aa2565b60008381526020839052604090205b9392505050565b6000613ab483611340565b60008481526040602081905290209091508290600201613ad56001846144d7565b81548110613af357634e487b7160e01b600052603260045260246000fd5b600091825260209091200155613b0a6001826144d7565b600094855260436020908152604080872095875294905292909320919091555050565b828054828255906000526020600020908101928215613b68579160200282015b82811115613b68578251825591602001919060010190613b4d565b506126259291505b808211156126255760008155600101613b70565b80356001600160a01b0381168114613b9b57600080fd5b919050565b600082601f830112613bb0578081fd5b81356020613bc5613bc08361445c565b61442b565b80838252828201915082860187848660051b8901011115613be4578586fd5b855b85811015613c0257813584529284019290840190600101613be6565b5090979650505050505050565b60008083601f840112613c20578182fd5b50813567ffffffffffffffff811115613c37578182fd5b6020830191508360208260051b8501011115613c5257600080fd5b9250929050565b600060808284031215613c6a578081fd5b6040516080810167ffffffffffffffff8282108183111715613c8e57613c8e61451f565b816040528293508435915080821115613ca657600080fd5b613cb286838701613ba0565b8352602085013560208401526040850135915080821115613cd257600080fd5b50613cdf85828601613ba0565b604083015250606083013560608201525092915050565b600060608284031215613d07578081fd5b6040516060810167ffffffffffffffff8282108183111715613d2b57613d2b61451f565b816040528293508435915080821115613d4357600080fd5b613d4f86838701613ba0565b83526020850135915080821115613d6557600080fd5b613d7186838701613ba0565b60208401526040850135915080821115613d8a57600080fd5b50613d9785828601613ba0565b6040830152505092915050565b600060208284031215613db5578081fd5b613aa282613b84565b600080600080600080600080600060e08a8c031215613ddb578485fd5b613de48a613b84565b9850613df260208b01613b84565b9750613e0060408b01613b84565b965060608a0135955060808a0135945060a08a013567ffffffffffffffff80821115613e2a578586fd5b613e368d838e01613c0f565b909650945060c08c0135915080821115613e4e578384fd5b50613e5b8c828d01613c0f565b915080935050809150509295985092959850929598565b600080600080600060808688031215613e89578081fd5b613e9286613b84565b9450613ea060208701613b84565b935060408601359250606086013567ffffffffffffffff80821115613ec3578283fd5b818801915088601f830112613ed6578283fd5b813581811115613ee4578384fd5b896020828501011115613ef5578384fd5b9699959850939650602001949392505050565b60008060408385031215613f1a578182fd5b613f2383613b84565b91506020830135613f3381614535565b809150509250929050565b600060208284031215613f4f578081fd5b8135613aa281614535565b600060208284031215613f6b578081fd5b8151613aa281614535565b600060208284031215613f87578081fd5b5035919050565b60008060008060008060c08789031215613fa6578182fd5b863567ffffffffffffffff80821115613fbd578384fd5b613fc98a838b01613c59565b97506020890135915080821115613fde578384fd5b613fea8a838b01613cf6565b96506040890135915080821115613fff578384fd5b61400b8a838b01613ba0565b95506060890135915080821115614020578384fd5b61402c8a838b01613ba0565b94506080890135915080821115614041578384fd5b61404d8a838b01613ba0565b935060a0890135915080821115614062578283fd5b5061406f89828a01613ba0565b9150509295509295509295565b60006020828403121561408d578081fd5b5051919050565b6000806000606084860312156140a8578081fd5b83359250602084013567ffffffffffffffff8111156140c5578182fd5b6140d186828701613ba0565b925050604084013590509250925092565b600080604083850312156140f4578182fd5b50508035926020909101359150565b60008060008060006080868803121561411a578283fd5b8535945060208601359350604086013567ffffffffffffffff81111561413e578384fd5b61414a88828901613c0f565b96999598509660600135949350505050565b600080600060608486031215614170578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b838110156141b65781518752958201959082019060010161419a565b509495945050505050565b60008151815b818110156141e157602081850181015186830152016141c7565b818111156141ef5782828601525b509290920192915050565b600061420682856141c1565b600b60fa1b815261421a60018201856141c1565b95945050505050565b600061422f82866141c1565b600b60fa1b80825261424460018301876141c1565b908152905061140260018201856141c1565b6001600160a01b038716815285602082015260c06040820152600061427e60c0830187614187565b85606084015282810360808401526142968186614187565b9150508260a0830152979650505050505050565b6000608082016001600160a01b0387168352602086818501526080604085015281865480845260a0860191508785528285209350845b818110156142fc578454835260019485019492840192016142e0565b505080935050505082606083015295945050505050565b602081526000613aa26020830184614187565b602081526143406020820183516001600160a01b03169052565b6000602083015161012080604085015261435e610140850183614187565b9150604085015160608501526060850151601f198584030160808601526143858382614187565b925050608085015160a085015260a085015160c085015260c085015160e085015260e08501516101008181870152808701519150506143c78286018215159052565b5090949350505050565b6020815281516020820152602082015160408201526000604083015160c0606084015261440160e0840182614187565b905060608401516080840152608084015160a084015260a084015160c08401528091505092915050565b604051601f8201601f1916810167ffffffffffffffff811182821017156144545761445461451f565b604052919050565b600067ffffffffffffffff8211156144765761447661451f565b5060051b60200190565b6000821982111561449357614493614509565b500190565b6000826144b357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156144d2576144d2614509565b500290565b6000828210156144e9576144e9614509565b500390565b600060001982141561450257614502614509565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146109bb57600080fdfea264697066735822122000e2e333ba54fb1ba3a5d6eca746c589ac76ec5496a61e1aae9fe4cd463f491464736f6c63430008040033
Deployed Bytecode
0x6080604052600436106102fd5760003560e01c80639781f8d01161018f578063de680dfb116100e1578063f851a4401161008a578063fbaf9e1911610064578063fbaf9e19146108aa578063fbd7e9f3146108ca578063fe575a87146108ea57600080fd5b8063f851a44014610838578063f91daf611461085d578063fa24e1ee1461088a57600080fd5b8063ebc5163b116100bb578063ebc5163b146107e3578063f4c8ad14146107f8578063f6c0f78c1461081857600080fd5b8063de680dfb14610790578063e69f8ac7146107b0578063e86dd092146107c357600080fd5b8063c00b479211610143578063d592bf921161011d578063d592bf921461073b578063d89293421461075b578063db2e21bc1461077b57600080fd5b8063c00b4792146106e5578063ca8957ff14610705578063cd53722b1461072557600080fd5b8063afafa9be11610174578063afafa9be1461068f578063b48641f4146106a5578063bd015b0f146106c557600080fd5b80639781f8d014610647578063a3bf2f541461065a57600080fd5b80634fb5d310116102535780636c7a9e21116101fc578063818fd119116101d6578063818fd119146105f15780638da5cb5b1461061157806391b66fd51461063157600080fd5b80636c7a9e2114610597578063704b6c02146105b157806380e55fe0146105d157600080fd5b80635c975abb1161022d5780635c975abb1461052b5780635cf443bf14610555578063681a96bc1461056a57600080fd5b80634fb5d310146104d457806352690725146104f45780635b402eaf1461051457600080fd5b8063150b7a02116102b55780632215b4dc1161028f5780632215b4dc146104715780632f380b35146104875780633fd1a4a2146104b457600080fd5b8063150b7a02146103bb57806316c38b3c14610431578063177c67cb1461045157600080fd5b80630c266545116102e65780630c2665451461036157806313af40351461038557806313ff842d146103a557600080fd5b806302329a291461030257806303d0734014610324575b600080fd5b34801561030e57600080fd5b5061032261031d366004613f3e565b61091a565b005b34801561033057600080fd5b50603554610344906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561036d57600080fd5b50610377603a5481565b604051908152602001610358565b34801561039157600080fd5b506103226103a0366004613da4565b6109be565b3480156103b157600080fd5b5061037760455481565b3480156103c757600080fd5b506104006103d6366004613e72565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610358565b34801561043d57600080fd5b5061032261044c366004613f3e565b610a61565b34801561045d57600080fd5b5061032261046c366004614094565b610ac4565b34801561047d57600080fd5b50610377603c5481565b34801561049357600080fd5b506104a76104a2366004613f76565b610be9565b60405161035891906143d1565b3480156104c057600080fd5b506103776104cf3660046140e2565b610cbf565b3480156104e057600080fd5b506103776104ef3660046140e2565b610d37565b34801561050057600080fd5b5061032261050f36600461415c565b610dac565b34801561052057600080fd5b506033546103779081565b34801561053757600080fd5b50603d546105459060ff1681565b6040519015158152602001610358565b34801561056157600080fd5b50610377610e57565b34801561057657600080fd5b5061058a610585366004613da4565b610e66565b6040516103589190614313565b3480156105a357600080fd5b506047546105459060ff1681565b3480156105bd57600080fd5b506103226105cc366004613da4565b610ed2565b3480156105dd57600080fd5b506103226105ec366004613f76565b610f5e565b3480156105fd57600080fd5b5061037761060c366004613f76565b610fd3565b34801561061d57600080fd5b50603454610344906001600160a01b031681565b34801561063d57600080fd5b5061037760465481565b610322610655366004614103565b610ff4565b34801561066657600080fd5b5061067a610675366004613f76565b6111bb565b60408051928352602083019190915201610358565b34801561069b57600080fd5b5061037760395481565b3480156106b157600080fd5b506103776106c0366004613f76565b611340565b3480156106d157600080fd5b506103226106e0366004613f76565b61140c565b3480156106f157600080fd5b50610322610700366004613dbe565b611468565b34801561071157600080fd5b50610322610720366004613da4565b61176f565b34801561073157600080fd5b50610377603b5481565b34801561074757600080fd5b50603654610344906001600160a01b031681565b34801561076757600080fd5b50610322610776366004613f08565b611823565b34801561078757600080fd5b506103226118dd565b34801561079c57600080fd5b506103776107ab366004613f76565b61193f565b3480156107bc57600080fd5b5042610377565b3480156107cf57600080fd5b506103226107de366004613da4565b61194f565b3480156107ef57600080fd5b506103776119f5565b34801561080457600080fd5b50610322610813366004613f76565b611a0e565b34801561082457600080fd5b50610322610833366004613f8e565b611a6a565b34801561084457600080fd5b506047546103449061010090046001600160a01b031681565b34801561086957600080fd5b5061087d610878366004613f76565b611ad1565b6040516103589190614326565b34801561089657600080fd5b506103226108a5366004613f76565b611c4a565b3480156108b657600080fd5b506103776108c5366004613f76565b611ca6565b3480156108d657600080fd5b506103226108e5366004613f76565b611d8c565b3480156108f657600080fd5b50610545610905366004613da4565b603e6020526000908152604090205460ff1681565b6109226120a9565b6034546001600160a01b0316331461096d5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b60448201526064015b60405180910390fd5b603d805460ff19168215159081179091556040519081527fd50aa5e7250de744184760fe907adb5d01955537ddb35ac6d3bd5b8c1fffde12906020015b60405180910390a16109bb60018055565b50565b6109c66120a9565b6034546001600160a01b03163314610a0c5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603480546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fe2c7d1c4da37855e682bde14f17826d185497973b73fba7554daa6da467058d991016109aa565b610a696120a9565b6034546001600160a01b03163314610aaf5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b6047805460ff19168215151790556001805550565b6000610acf84612103565b610ad883612103565b604051602001610ae99291906141fa565b604051602081830303815290604052805190602001209050610b0e83604554836121bb565b610b5a5760405162461bcd60e51b815260206004820152601460248201527f496e636f7272656374206c616e642070726f6f660000000000000000000000006044820152606401610964565b604051600090339084908381818185875af1925050503d8060008114610b9c576040519150601f19603f3d011682016040523d82523d6000602084013e610ba1565b606091505b5050905080610be25760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610964565b5050505050565b610c226040518060c001604052806000815260200160008152602001606081526020016000815260200160008152602001600081525090565b60008281526040602081815291819020815160c08101835281548152600182015481850152600282018054845181870281018701865281815292959394860193830182828015610c9157602002820191906000526020600020905b815481526020019060010190808311610c7d575b5050505050815260200160038201548152602001600482015481526020016005820154815250509050919050565b60475460009060ff1615610d155760405162461bcd60e51b815260206004820152601360248201527f706175736564207468652066756e6374696f6e000000000000000000000000006044820152606401610964565b5060008281526043602090815260408083208484529091529020545b92915050565b6000808383825b603a54811015610d9e57610d5283836121d1565b935083610d8057610d646001846144d7565b6000818152604060208190529020600301549093509150610d8c565b83945050505050610d31565b80610d96816144ee565b915050610d3e565b505060395495945050505050565b610db46120a9565b6034546001600160a01b03163314610dfa5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603780546001818101835560008390527f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31ae918201869055825480820184558201859055825490810190925501819055610e5260018055565b505050565b6000610e616122b1565b905090565b6001600160a01b038116600090815260416020908152604091829020805483518184028101840190945280845260609392830182828015610ec657602002820191906000526020600020905b815481526020019060010190808311610eb2575b50505050509050919050565b610eda6120a9565b6034546001600160a01b03163314610f205760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b604780547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038416021790556001805550565b610f666120a9565b60475461010090046001600160a01b03163314610fc55760405162461bcd60e51b815260206004820152600960248201527f6e6f742061646d696e00000000000000000000000000000000000000000000006044820152606401610964565b60458190556109bb60018055565b60388181548110610fe357600080fd5b600091825260209091200154905081565b6034546001600160a01b0316331461103a5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b61104481856144b8565b3410156110935760405162461bcd60e51b815260206004820152600e60248201527f76616c7565206e6f742073656e640000000000000000000000000000000000006044820152606401610964565b6001603a60008282546110a69190614480565b9091555050603a546000906001146110e257604060006001603a546110cb91906144d7565b8152602001908152602001600020600501546110e4565b425b905060006110f283886144b8565b6110fc9083614480565b90506040518060c001604052808881526020018781526020018686808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250938552505050602080830187905260408084018790526060909301859052603a54825282815290829020835181558382015160018201559183015180516111919260028501920190613b2d565b50606082015160038201556080820151600482015560a09091015160059091015550505050505050565b604754600090819060ff16156112135760405162461bcd60e51b815260206004820152601360248201527f706175736564207468652066756e6374696f6e000000000000000000000000006044820152606401610964565b6000838152603f602052604090206008015460ff166112675760405162461bcd60e51b815260206004820152601060248201526f526577617264496420756e7374616b6560801b6044820152606401610964565b60006112716119f5565b6000858152604360209081526040808320848452825280832054888452603f909252822060058101546006909101549394509192909190835b8061133257818614156112ea5760008060006112c8898d888a6122bc565b919450925090506112d98389614480565b975095509350600191506112aa9050565b6000898152603f60205260408120600601549080611309838d886123c8565b90925090506113188289614480565b9750611325600186614480565b94508095505050506112aa565b509297909650945050505050565b60008161134b6119f5565b146113985760405162461bcd60e51b815260206004820152601460248201527f7061737320636f727265637420706f6f6c2069640000000000000000000000006044820152606401610964565b6000828152604060208190528120805460038201546004909201549092906113c090426144d7565b90506113cc82846144b8565b8111156113db57509392505050565b60006113e78483614498565b9050828114611400576113fb816001614480565b611402565b825b9695505050505050565b6114146120a9565b6034546001600160a01b0316331461145a5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603c8190556109bb60018055565b600054610100900460ff16158080156114885750600054600160ff909116105b806114a25750303b1580156114a2575060005460ff166001145b6115145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610964565b6000805460ff191660011790558015611537576000805461ff0019166101001790555b603480546001600160a01b03808d166001600160a01b031992831617909255603b899055603c889055603580548c841690831617905560368054928b16929091169190911790556037858560008161159f57634e487b7160e01b600052603260045260246000fd5b835460018082018655600095865260209586902092909502939093013592019190915550603790869086908181106115e757634e487b7160e01b600052603260045260246000fd5b8354600181018555600094855260209485902091909402929092013591909201555060378585600281811061162c57634e487b7160e01b600052603260045260246000fd5b8354600181018555600094855260208086209202939093013592019190915550603890849084908161166e57634e487b7160e01b600052603260045260246000fd5b835460018082018655600095865260209586902092909502939093013592019190915550603890849084908181106116b657634e487b7160e01b600052603260045260246000fd5b835460018101855560009485526020948590209190940292909201359190920155506038838360028181106116fb57634e487b7160e01b600052603260045260246000fd5b835460018101855560009485526020948590209190940292909201359190920155508015611763576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b6117776120a9565b6034546001600160a01b031633146117bd5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603680546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fcc054e44df1e74bd35301d48ba2d2b27b0c2d34877beddd498a4830197bd81f491015b60405180910390a1506109bb60018055565b6034546001600160a01b031633146118695760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b6118716120a9565b6001600160a01b0382166000818152603e6020908152604091829020805460ff19168515159081179091558251938452908301527fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd8910160405180910390a16118d960018055565b5050565b6118e56120a9565b6034546001600160a01b0316331461192b5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b611934476124fd565b61193d60018055565b565b60378181548110610fe357600080fd5b6119576120a9565b6034546001600160a01b0316331461199d5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603580546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052917fcc054e44df1e74bd35301d48ba2d2b27b0c2d34877beddd498a4830197bd81f49101611811565b603a5460009015611a0857610e61612585565b50600090565b611a166120a9565b6034546001600160a01b03163314611a5c5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b60468190556109bb60018055565b611a726120a9565b84866000015187602001518860400151896060015188888888611a99898988878787612629565b611aa4878683612868565b611aae8989612904565b611ab78f612fb3565b505050505050505050611ac960018055565b505050505050565b611b2b60405180610120016040528060006001600160a01b03168152602001606081526020016000815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6000828152603f602090815260409182902082516101208101845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015611ba157602002820191906000526020600020905b815481526020019060010190808311611b8d575b505050505081526020016002820154815260200160038201805480602002602001604051908101604052809291908181526020018280548015611c0357602002820191906000526020600020905b815481526020019060010190808311611bef575b50505091835250506004820154602082015260058201546040820152600682015460608201526007820154608082015260089091015460ff16151560a09091015292915050565b611c526120a9565b6034546001600160a01b03163314611c985760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610964565b603b8190556109bb60018055565b6000818152603f602052604081206008015460ff16611cfa5760405162461bcd60e51b815260206004820152601060248201526f526577617264496420756e7374616b6560801b6044820152606401610964565b816000611d056119f5565b90506000611d1282611340565b90506000611d208383610d37565b6000858152603f6020908152604080832060070154878452918190528220549293509091611d4e90846144b8565b604654600087815260406020819052902060010154611d6d91906144b8565b611d779190614498565b611d8191906144b8565b979650505050505050565b611d946120a9565b603d5460ff1615611de75760405162461bcd60e51b815260206004820152600f60248201527f636f6e74726163742070617573656400000000000000000000000000000000006044820152606401610964565b6000818152603f602052604090205481906001600160a01b03163314611e4f5760405162461bcd60e51b815260206004820152601260248201527f6e6f74207265776172644964206f776e657200000000000000000000000000006044820152606401610964565b81611e9c5760405162461bcd60e51b815260206004820152600860248201527f6e6f74207a65726f0000000000000000000000000000000000000000000000006044820152606401610964565b6000828152603f602052604090206008015460ff16611ef05760405162461bcd60e51b815260206004820152601060248201526f526577617264496420756e7374616b6560801b6044820152606401610964565b60005b6000838152603f6020526040902060010154811015611f75576035546000848152603f602052604090206001018054611f63926001600160a01b031691309133919086908110611f5357634e487b7160e01b600052603260045260246000fd5b90600052602060002001546132ec565b80611f6d816144ee565b915050611ef3565b506036546000838152603f6020526040902060020154611fa2916001600160a01b03169030903390613376565b6000828152603f6020526040902060070154603954611fc191906144d7565b6039556000828152603f60205260408120600801805460ff19169055611fe56119f5565b90506000611ff282611340565b6039546000848152604060208190529020919250906002016120156001846144d7565b8154811061203357634e487b7160e01b600052603260045260246000fd5b600091825260209091200155612048846133cc565b6000848152603f602052604090819020600281015491517f60b9a0acc61a79b572af470a60dbe9aeb530b84888d0fcea2edafc099e07e7b7926120959233928992600190920191906142aa565b60405180910390a15050506109bb60018055565b600260015414156120fc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610964565b6002600155565b60606000612110836134b5565b600101905060008167ffffffffffffffff81111561213e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612168576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846121ae576121b3565b612172565b509392505050565b6000826121c88584613597565b14949350505050565b600081836121e3575050603954610d31565b60005b838110156122a657600085815260406020819052812060020161220a6001856144d7565b8154811061222857634e487b7160e01b600052603260045260246000fd5b906000526020600020015411156122875760008581526040602081905290206002016122556001846144d7565b8154811061227357634e487b7160e01b600052603260045260246000fd5b906000526020600020015492505050610d31565b6122926001836144d7565b91508061229e816144ee565b9150506121e6565b506000949350505050565b6000610e6160335490565b60008080858582806122cd8b611340565b90508a600080808b85146122e1578b6122ec565b6122ec60018d6144d7565b905084156123b257805b858110156123b05760008061230d83898c8a6135ea565b90965086925090506000612326886104ef866001614480565b60008d8152603f60209081526040808320600701548c845291819052822054929850889350909161235790846144b8565b60008b8152604060208190529020600101546123749087906144b8565b61237e9190614498565b61238891906144b8565b9050612394818c614480565b9a50829b505050505080806123a8906144ee565b9150506122f6565b505b50939d949c50919a509298505050505050505050565b600082815260436020908152604080832086845290915281205481908390829087905b6000828152604060208190529020600301548110156124ee576000612411826001614480565b60008481526040602081905290205461242a91906144b8565b6000848152604060208190529020600401546124469190614480565b9050600061245486836144d7565b90506000612467856104ef866001614480565b60008c8152603f602090815260408083206007015489845291819052822054929350909161249590846144b8565b6000888152604060208190529020600101546124b29086906144b8565b6124bc9190614498565b6124c691906144b8565b90506124d28188614480565b96508397505050505080806124e6906144ee565b9150506123eb565b50909791965090945050505050565b604051600090339083908381818185875af1925050503d806000811461253f576040519150601f19603f3d011682016040523d82523d6000602084013e612544565b606091505b50509050806118d95760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610964565b6000805b603a548110156126255742604060006125a3846001614480565b8152602001908152602001600020600501541180156125e1575042604060006125cd846001614480565b815260200190815260200160002060040154105b156125f7576125f1816001614480565b91505090565b603a54612605826001614480565b1415612613575050603a5490565b8061261d816144ee565b915050612589565b5090565b8451600114156126c4576126bf866000015160008151811061265b57634e487b7160e01b600052603260045260246000fd5b6020026020010151876000015160018151811061268857634e487b7160e01b600052603260045260246000fd5b6020026020010151866000815181106126b157634e487b7160e01b600052603260045260246000fd5b60200260200101518661367b565b611ac9565b845160021415612782576126f6866000015160008151811061265b57634e487b7160e01b600052603260045260246000fd5b6126bf866020015160008151811061271e57634e487b7160e01b600052603260045260246000fd5b6020026020010151876020015160018151811061274b57634e487b7160e01b600052603260045260246000fd5b60200260200101518660018151811061277457634e487b7160e01b600052603260045260246000fd5b60200260200101518561367b565b845160031415611ac9576127b4866000015160008151811061265b57634e487b7160e01b600052603260045260246000fd5b6127dc866020015160008151811061271e57634e487b7160e01b600052603260045260246000fd5b611ac9866040015160008151811061280457634e487b7160e01b600052603260045260246000fd5b6020026020010151876040015160018151811061283157634e487b7160e01b600052603260045260246000fd5b60200260200101518660028151811061285a57634e487b7160e01b600052603260045260246000fd5b60200260200101518461367b565b600061287384612103565b61287c84612103565b60405160200161288d9291906141fa565b6040516020818303038152906040528051906020012090506128b282603c54836121bb565b6128fe5760405162461bcd60e51b815260206004820152601460248201527f496e636f7272656374206c6f72642070726f6f660000000000000000000000006044820152606401610964565b50505050565b805160011415612a5f578060008151811061292f57634e487b7160e01b600052603260045260246000fd5b6020908102919091010151603554835180516001600160a01b0390921691633112de9a919060009061297157634e487b7160e01b600052603260045260246000fd5b6020026020010151856000015160018151811061299e57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016129cc929190918252602082015260400190565b60206040518083038186803b1580156129e457600080fd5b505afa1580156129f8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1c919061407c565b146118d95760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b805160021415612c595780600081518110612a8a57634e487b7160e01b600052603260045260246000fd5b6020908102919091010151603554835180516001600160a01b0390921691633112de9a9190600090612acc57634e487b7160e01b600052603260045260246000fd5b60200260200101518560000151600181518110612af957634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612b27929190918252602082015260400190565b60206040518083038186803b158015612b3f57600080fd5b505afa158015612b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b77919061407c565b14612bba5760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b80600181518110612bdb57634e487b7160e01b600052603260045260246000fd5b6020026020010151603560009054906101000a90046001600160a01b03166001600160a01b0316633112de9a8460200151600081518110612c2c57634e487b7160e01b600052603260045260246000fd5b6020026020010151856020015160018151811061299e57634e487b7160e01b600052603260045260246000fd5b8051600314156118d95780600081518110612c8457634e487b7160e01b600052603260045260246000fd5b6020908102919091010151603554835180516001600160a01b0390921691633112de9a9190600090612cc657634e487b7160e01b600052603260045260246000fd5b60200260200101518560000151600181518110612cf357634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612d21929190918252602082015260400190565b60206040518083038186803b158015612d3957600080fd5b505afa158015612d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d71919061407c565b14612db45760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b80600181518110612dd557634e487b7160e01b600052603260045260246000fd5b6020026020010151603560009054906101000a90046001600160a01b03166001600160a01b0316633112de9a8460200151600081518110612e2657634e487b7160e01b600052603260045260246000fd5b60200260200101518560200151600181518110612e5357634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612e81929190918252602082015260400190565b60206040518083038186803b158015612e9957600080fd5b505afa158015612ead573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed1919061407c565b14612f145760405162461bcd60e51b81526020600482015260136024820152721b9bdd0818dbdc9c9958dd081d1bdad95b9259606a1b6044820152606401610964565b80600281518110612f3557634e487b7160e01b600052603260045260246000fd5b6020026020010151603560009054906101000a90046001600160a01b03166001600160a01b0316633112de9a8460400151600081518110612f8657634e487b7160e01b600052603260045260246000fd5b6020026020010151856040015160018151811061299e57634e487b7160e01b600052603260045260246000fd5b80515160408201515160608301518215801590612fcf57508115155b8015612fda57508015155b6130265760405162461bcd60e51b815260206004820152600860248201527f6e6f74206e756c6c0000000000000000000000000000000000000000000000006044820152606401610964565b8360400151846060015161303a828261371b565b6130865760405162461bcd60e51b815260206004820152601060248201527f6e6f742076616c6964206361746f7279000000000000000000000000000000006044820152606401610964565b60355460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c59060440160206040518083038186803b1580156130cf57600080fd5b505afa1580156130e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131079190613f5a565b801561318f575060365460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c59060440160206040518083038186803b15801561315757600080fd5b505afa15801561316b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061318f9190613f5a565b6131db5760405162461bcd60e51b815260206004820152601c60248201527f4e6674206e6f7420617070726f76656420746f20636f6e7472616374000000006044820152606401610964565b85515160608701518160386131f16001846144d7565b8154811061320f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015410156132685760405162461bcd60e51b815260206004820152600f60248201527f6c656e677468206d69736d6174636800000000000000000000000000000000006044820152606401610964565b60006132726119f5565b9050600081116132c45760405162461bcd60e51b815260206004820152601460248201527f6465706f73697465206e6f7420616c6c6f7765640000000000000000000000006044820152606401610964565b6132e189600001518a602001518b604001518c606001518561378b565b505050505050505050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906323b872dd906064015b600060405180830381600087803b15801561335857600080fd5b505af115801561336c573d6000803e3d6000fd5b5050505050505050565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e9060640161333e565b33600090815260416020526040812080546133e9906001906144d7565b8154811061340757634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154848352604280835260408085205483865281862081905533865260418552908520948790529252825490935083929190811061346157634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925533815260419091526040902080548061349b57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590555050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106134fe577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061352a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061354857662386f26fc10000830492506010015b6305f5e1008310613560576305f5e100830492506008015b612710831061357457612710830492506004015b60648310613586576064830492506002015b600a8310610d315760010192915050565b600081815b84518110156121b3576135d6828683815181106135c957634e487b7160e01b600052603260045260246000fd5b6020026020010151613a77565b9150806135e2816144ee565b91505061359c565b600080806135f9876001614480565b60008581526040602081905290205461361291906144b8565b60008581526040602081905290206004015461362e9190614480565b905061363b876001614480565b8614801561364857508042105b156136615761365785426144d7565b9250429150613671565b61366b85826144d7565b92508091505b5094509492505050565b600061368685612103565b61368f85612103565b61369885612103565b6040516020016136aa93929190614223565b6040516020818303038152906040528051906020012090506136cf82603b54836121bb565b610be25760405162461bcd60e51b815260206004820152601460248201527f496e636f7272656374206c616e642070726f6f660000000000000000000000006044820152606401610964565b6000805b835181101561378157600484828151811061374a57634e487b7160e01b600052603260045260246000fd5b6020026020010151101580613760575060048310155b1561376f576000915050610d31565b80613779816144ee565b91505061371f565b5060019392505050565b613799603380546001019055565b6000805b845181101561382457603760018683815181106137ca57634e487b7160e01b600052603260045260246000fd5b60200260200101516137dc91906144d7565b815481106137fa57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154826138109190614480565b91508061381c816144ee565b91505061379d565b50604051806101200160405280336001600160a01b0316815260200187815260200186815260200185815260200184815260200142815260200183815260200182815260200160011515815250603f600061387e60335490565b8152602080820192909252604001600020825181546001600160a01b0319166001600160a01b0390911617815582820151805191926138c592600185019290910190613b2d565b5060408201516002820155606082015180516138eb916003840191602090910190613b2d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820155610100909101516008909101805460ff191691151591909117905560398054829190600090613944908490614480565b9091555050336000908152604160205260408120549060429061396660335490565b81526020808201929092526040908101600090812093909355338352604182528220603380548254600181018455928552929093200155546139ab9083603954613aa9565b60005b8651811015613a0d5760355487516139fb916001600160a01b031690339030908b90869081106139ee57634e487b7160e01b600052603260045260246000fd5b60200260200101516132ec565b80613a05816144ee565b9150506139ae565b50603654613a26906001600160a01b0316333088613376565b7f20710c8acac7f8475d8dfcdeb77e60a4457e5ec543f177deda3d7e1f05da638f33613a5160335490565b88888888604051613a6796959493929190614256565b60405180910390a1505050505050565b6000818310613a93576000828152602084905260409020613aa2565b60008381526020839052604090205b9392505050565b6000613ab483611340565b60008481526040602081905290209091508290600201613ad56001846144d7565b81548110613af357634e487b7160e01b600052603260045260246000fd5b600091825260209091200155613b0a6001826144d7565b600094855260436020908152604080872095875294905292909320919091555050565b828054828255906000526020600020908101928215613b68579160200282015b82811115613b68578251825591602001919060010190613b4d565b506126259291505b808211156126255760008155600101613b70565b80356001600160a01b0381168114613b9b57600080fd5b919050565b600082601f830112613bb0578081fd5b81356020613bc5613bc08361445c565b61442b565b80838252828201915082860187848660051b8901011115613be4578586fd5b855b85811015613c0257813584529284019290840190600101613be6565b5090979650505050505050565b60008083601f840112613c20578182fd5b50813567ffffffffffffffff811115613c37578182fd5b6020830191508360208260051b8501011115613c5257600080fd5b9250929050565b600060808284031215613c6a578081fd5b6040516080810167ffffffffffffffff8282108183111715613c8e57613c8e61451f565b816040528293508435915080821115613ca657600080fd5b613cb286838701613ba0565b8352602085013560208401526040850135915080821115613cd257600080fd5b50613cdf85828601613ba0565b604083015250606083013560608201525092915050565b600060608284031215613d07578081fd5b6040516060810167ffffffffffffffff8282108183111715613d2b57613d2b61451f565b816040528293508435915080821115613d4357600080fd5b613d4f86838701613ba0565b83526020850135915080821115613d6557600080fd5b613d7186838701613ba0565b60208401526040850135915080821115613d8a57600080fd5b50613d9785828601613ba0565b6040830152505092915050565b600060208284031215613db5578081fd5b613aa282613b84565b600080600080600080600080600060e08a8c031215613ddb578485fd5b613de48a613b84565b9850613df260208b01613b84565b9750613e0060408b01613b84565b965060608a0135955060808a0135945060a08a013567ffffffffffffffff80821115613e2a578586fd5b613e368d838e01613c0f565b909650945060c08c0135915080821115613e4e578384fd5b50613e5b8c828d01613c0f565b915080935050809150509295985092959850929598565b600080600080600060808688031215613e89578081fd5b613e9286613b84565b9450613ea060208701613b84565b935060408601359250606086013567ffffffffffffffff80821115613ec3578283fd5b818801915088601f830112613ed6578283fd5b813581811115613ee4578384fd5b896020828501011115613ef5578384fd5b9699959850939650602001949392505050565b60008060408385031215613f1a578182fd5b613f2383613b84565b91506020830135613f3381614535565b809150509250929050565b600060208284031215613f4f578081fd5b8135613aa281614535565b600060208284031215613f6b578081fd5b8151613aa281614535565b600060208284031215613f87578081fd5b5035919050565b60008060008060008060c08789031215613fa6578182fd5b863567ffffffffffffffff80821115613fbd578384fd5b613fc98a838b01613c59565b97506020890135915080821115613fde578384fd5b613fea8a838b01613cf6565b96506040890135915080821115613fff578384fd5b61400b8a838b01613ba0565b95506060890135915080821115614020578384fd5b61402c8a838b01613ba0565b94506080890135915080821115614041578384fd5b61404d8a838b01613ba0565b935060a0890135915080821115614062578283fd5b5061406f89828a01613ba0565b9150509295509295509295565b60006020828403121561408d578081fd5b5051919050565b6000806000606084860312156140a8578081fd5b83359250602084013567ffffffffffffffff8111156140c5578182fd5b6140d186828701613ba0565b925050604084013590509250925092565b600080604083850312156140f4578182fd5b50508035926020909101359150565b60008060008060006080868803121561411a578283fd5b8535945060208601359350604086013567ffffffffffffffff81111561413e578384fd5b61414a88828901613c0f565b96999598509660600135949350505050565b600080600060608486031215614170578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b838110156141b65781518752958201959082019060010161419a565b509495945050505050565b60008151815b818110156141e157602081850181015186830152016141c7565b818111156141ef5782828601525b509290920192915050565b600061420682856141c1565b600b60fa1b815261421a60018201856141c1565b95945050505050565b600061422f82866141c1565b600b60fa1b80825261424460018301876141c1565b908152905061140260018201856141c1565b6001600160a01b038716815285602082015260c06040820152600061427e60c0830187614187565b85606084015282810360808401526142968186614187565b9150508260a0830152979650505050505050565b6000608082016001600160a01b0387168352602086818501526080604085015281865480845260a0860191508785528285209350845b818110156142fc578454835260019485019492840192016142e0565b505080935050505082606083015295945050505050565b602081526000613aa26020830184614187565b602081526143406020820183516001600160a01b03169052565b6000602083015161012080604085015261435e610140850183614187565b9150604085015160608501526060850151601f198584030160808601526143858382614187565b925050608085015160a085015260a085015160c085015260c085015160e085015260e08501516101008181870152808701519150506143c78286018215159052565b5090949350505050565b6020815281516020820152602082015160408201526000604083015160c0606084015261440160e0840182614187565b905060608401516080840152608084015160a084015260a084015160c08401528091505092915050565b604051601f8201601f1916810167ffffffffffffffff811182821017156144545761445461451f565b604052919050565b600067ffffffffffffffff8211156144765761447661451f565b5060051b60200190565b6000821982111561449357614493614509565b500190565b6000826144b357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156144d2576144d2614509565b500290565b6000828210156144e9576144e9614509565b500390565b600060001982141561450257614502614509565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146109bb57600080fdfea264697066735822122000e2e333ba54fb1ba3a5d6eca746c589ac76ec5496a61e1aae9fe4cd463f491464736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.