> For the complete documentation index, see [llms.txt](https://smart-global.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smart-global.gitbook.io/docs/smart-contracts/smart-global-pay/view-read-only-functions.md).

# View / Read-Only Functions

## Technical Reference: View / Read-Only Functions

### 1. Comprehensive Owner Node Query (`ownerInfo`)

Function Signature: `function ownerInfo(address owner) external view onlyAllowedViewer returns (uint64 ID, uint32 Total_Left, uint32 Total_Right, uint32 Current_Left, uint32 Current_Right, uint8 Directs_Count, bool Is_Right_Side, address UpLine_Address, address Left_Address, address Right_Address)`

Logic and Output: This function retrieves the data profile of a node within the binary network. Decentralized applications (DApps) utilize this function to render the binary tree and display node status. Returns:

* `ID`: The unique user ID across the system.
* `Total_Left` / `Total_Right`: Total historical volume entries across the left and right legs.
* `Current_Left` / `Current_Right`: Current unmatched equilibrium points in the left and right legs (undistributed volume).
* `Directs_Count`: Number of direct referrers (maximum of 2).
* `Is_Right_Side`: Boolean value indicating if the node is on the right leg (`True`) or left leg (`False`) of its referrer.
* `UpLine_Address`: Wallet address of the direct referrer (upline).
* `Left_Address` / `Right_Address`: Wallet addresses of the direct left and right downlines.

Access Conditions:

* Network Privacy (`onlyAllowedViewer`): Execution is restricted to Externally Owned Accounts (EOA) or authorized contracts (`authorizedContracts`) to protect network data.

### 2. Total Historical Equilibrium Point Query (`ownerAllPoint`)

Function Signature: `function ownerAllPoint(address owner) public view onlyAllowedViewer returns (uint32)`

Logic and Output: This function calculates the historical points of an owner. The output determines qualification for point-based clubs, voting, and daily reward cap upgrades. Calculation: Outputs the smaller integer between total left branch volume (`totalLeft`) and total right branch volume (`totalRight`). Access Conditions: Requires the `onlyAllowedViewer` modifier.

### 3. Binary Structure Linkage Verification (`ownerIsMyLine`)

Function Signature: `function ownerIsMyLine(address Up_Line, address Down_Line) public view onlyAllowedViewer returns (bool)`

Logic and Output: This function verifies if a specific user (`Down_Line`) is positioned within the downline of a specific leader (`Up_Line`). Calculation: Traverses the binary tree upward from the downline node. Returns `True` if the target `Up_Line` address is reached; otherwise, returns `False`. Access Conditions: Requires the `onlyAllowedViewer` modifier.

### 4. Upline Chain Traversal Query (`ownerUplineAllAddress`)

Function Signature: `function ownerUplineAllAddress(address owner) external view onlyAllowedViewer returns (address[] memory)`

Logic and Output: This function traces the binary connections upward from a user's node to the root node, returning an array of all upline wallet addresses. Access Conditions: Requires the `onlyAllowedViewer` modifier.

### 5. Owner Address Query by ID Range (`allOwnerAddress`)

Function Signature: `function allOwnerAddress(uint32 start, uint32 end) public view onlyAllowedViewer returns (address[] memory)`

Logic and Output: Designed for batch processing, this function receives a `start` ID and an `end` ID, extracting and returning the associated node wallet addresses as an array. Access Conditions: Requires the `onlyAllowedViewer` modifier.

### 6. Total Registered Owner Count Query (`allOwnerNumber`)

Function Signature: `function allOwnerNumber() public view onlyAllowedViewer returns (uint64)`

Logic and Output: Returns the integer of the last issued ID (`lastOwnerId`), representing the total number of registered owners in the ecosystem. Access Conditions: Requires the `onlyAllowedViewer` modifier.

### 7. Owner Network Registration Status Query (`ownerStatus`)

Function Signature: `function ownerStatus(address userAddress) external view returns (bool)`

Logic and Output: Returns a boolean (`True` or `False`) indicating whether the queried address holds a registered ID within the network. This function is public and has no access restrictions.

### 8. Time Elapsed Since Last Individual Reward Distribution Query (`lastRewardTimePassed`)

Function Signature: `function lastRewardTimePassed(address owner) public view returns (uint256)`

Logic and Output: Calculates the hours elapsed since the user's last successful execution of the `payReward` function. Calculation: Returns `24` if the user is acting for the first time or if more than 24 hours have elapsed; otherwise, returns the exact number of hours elapsed.

### 9. Last Network Point USD Value Query (`lastValuePoint`)

Function Signature: `function lastValuePoint() public view returns (uint256)`

Logic and Output: Retrieves the USDT value per point calculated during the latest reward distribution cycle. Calculation: Divides the internal stored integer (`lastPointValue`) by `10^18` to return the formatted USDT value.

### 10. Last Reward Distribution Cycle Total Points Query (`lastTotalPoint`)

Function Signature: `function lastTotalPoint() public view returns (uint32)`

Logic and Output: Returns the total matched equilibrium points processed network-wide during the most recent daily reward cycle (`totalDailyPoints`).

### 11. Historical Average Point Value Query (`lastValuePointAverage`)

Function Signature: `function lastValuePointAverage(uint256 count) external view returns (uint256)`

Logic and Output: Calculates the mathematical average of point values over a specified number of historical cycles (`count`). Condition: The `count` parameter must be less than or equal to the total number of historical cycles (`require(count <= rewardCycleCount)`).

### 12. Pure Contract USDT Balance Query (`justContractBalance`)

Function Signature: `function justContractBalance() public view returns (uint256)`

Logic and Output: Retrieves the liquid USDT balance currently held in the payment contract pool. The raw balance is divided by `10^18` for formatted display.

### 13. Unprocessed New Member Count Query (`newOwnerStatus`)

Function Signature: `function newOwnerStatus() public view returns (uint256)`

Logic and Output: Displays the number of new owners registered during the current cycle whose points have not yet been processed upward across the binary tree (`newOwnerIndex`).

### 14. 7-Point Club Member Count Query (`ownerPoint7`)

Function Signature: `function ownerPoint7() external view returns (uint256)`

Logic and Output: Returns the total number of owners who have achieved at least 7 historical equilibrium points (`count_7_Point_Users`).

### 15. 20-Point Club Member Count Query (`ownerPoint20`)

Function Signature: `function ownerPoint20() external view returns (uint256)`

Logic and Output: Returns the total number of owners who have achieved at least 20 historical equilibrium points (`count_20_Point_Users`).

### 16. 100-Point Club Member Count Query (`ownerPoint100`)

Function Signature: `function ownerPoint100() external view returns (uint256)`

Logic and Output: Returns the total number of owners who have accumulated at least 100 historical points (`count_100_Point_Users`). This determines the eligible population for Level 1 governance voting.

### 17. 300-Point Club Member Count Query (`ownerPoint300`)

Function Signature: `function ownerPoint300() external view returns (uint256)`

Logic and Output: Returns the total number of users who have accumulated at least 300 historical points (`count_300_Point_Users`).

### 18. Current Voting Round Affirmative Vote Count Query (`voteStatus`)

Function Signature: `function voteStatus() external view returns (uint32)`

Logic and Output: Returns the total affirmative votes registered (`voteTotal`) during the active governance round to reset the central bank connection.

### 19. User Current Round Voting Status Query (`hasVotedCurrentRound`)

Function Signature: `function hasVotedCurrentRound(address user) external view returns (bool)`

Logic and Output: Returns `True` or `False` indicating whether the specified address has consumed its voting right during the current governance cycle.

### 20. Official Central Bank Contract Address Query (`globalBank`)

Function Signature: `function globalBank() external view returns (address)`

Logic and Output: Returns the official address of the central treasury and bank smart contract (`smartBank`).

### 21. Official Ecosystem NFT Contract Address Query (`globalNft`)

Function Signature: `function globalNft() external view returns (address)`

Logic and Output: Returns the official address of the ecosystem's Non-Fungible Token (NFT) contract (`globalNftAddress`).

### 22. Official Native Ecosystem Token Address Query (`globalToken`)

Function Signature: `function globalToken() external view returns (address)`

Logic and Output: Returns the official address of the native ecosystem token contract (`SmartGlobalToken - SGT`).

### 23. Official Linked USDT Token Address Query (`approveUsdt`)

Function Signature: `function approveUsdt() external view returns (address)`

Logic and Output: Returns the official address of the USDT contract on the BNB Smart Chain utilized by the payment contract.

### 24. Official Operating Agreement Text Query (`agreementText`)

Function Signature: `function agreementText() external view returns (string memory)`

Logic and Output: Retrieves the text string containing the protocol's operating rules and agreement (`agreementTextString`).

### 25. Founder Message Query (`founderMessage`)

Function Signature: `function founderMessage() external view returns (string memory)`

Logic and Output: Returns the string containing the most recent message recorded by the founder (`founderMessageString`).

### 26. Project Roadmap Text Query (`globalRoadmap`)

Function Signature: `function globalRoadmap() external view returns (string memory)`

Logic and Output: Returns the roadmap text and development phases of the ecosystem (`projectRoadmapString`).

### 27. Official Global Project Website URL Query (`globalWebsite`)

Function Signature: `function globalWebsite() external view returns (string memory)`

Logic and Output: Returns the string containing the official website URL of the ecosystem (`globalWebsiteString`).
