> 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/fee-contract/view-read-only-functions.md).

# View / Read-Only Functions

## Technical Reference: View / Read-Only Functions

The functions in this section are engineered to establish absolute financial transparency, query liquid balance reserves inside the governance fund, and provide real-time status readings for active proposals and voting counts. Invoking these functions on the blockchain incurs zero gas expenditures, as they purely query existing contract database storage states.

### 1. Liquid Treasury USDT Balance Query (`usdtBalance`)

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

#### 💡 Systemic Logic and Output

This function displays the instantaneous liquid balance of USDT tokens retained inside the fee governance fund. Because this treasury receives the 2% allocation from network distribution processes, governance leaders query this function to verify available budget reserves prior to initiating financial proposals.

#### 🧮 Internal Computational Logic

The raw USDT balance in the contract (utilizing 18 decimal places) is automatically divided by $$ $10^{18}$ $$ to output the clean, human-readable volume in USDT.

### 2. Liquid Treasury Native Token Balance Query (`tokenBalance`)

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

#### 💡 Systemic Logic and Output

This function retrieves the instantaneous balance of native ecosystem tokens (`SGT`) stored inside the treasury fund to determine the token volume available for allocation during Type 1 proposals.

#### 🧮 Safeguard Conditions and Calculations

The function initially verifies whether the native token address is configured; if unlinked (`address(0)`), the function immediately outputs `0`. Upon verified connection, the raw token balance is divided by $$ $10^{18}$ $$ to display the clean liquid volume.

### 3. Comprehensive Active Proposal Status Monitoring (`currentProposalStatus`)

Function Signature: `function currentProposalStatus() external view returns (...)`

#### 💡 Systemic Logic and Outputs

This function represents the primary transparency window for democracy within the governance fund, retrieving and transmitting all statistical details of the active proposal to the user interface (DApp).

Return parameters (Returns):

* `target`: The proposed destination address to receive assets or the new contract address for network upgrades.
* `pType`: Active proposal type (`0` = USDT Transfer, `1` = Native Token Transfer, `2` = Payment Network Address Upgrade).
* `amount`: Requested financial volume in the proposal (if the proposal is financial Type `0` or `1`, the system intelligently divides the raw figure by $$ $10^{18}$ $$ to display the clean, formatted volume; otherwise, the raw submitted integer is returned).
* `votes`: Exact affirmative vote count registered by members of the 300-point club up to the current timestamp.
* `totalEligible`: Total eligible voters locked within the snapshot (`snapshot300`) at the exact moment of proposal initiation.
* `isActive`: Boolean status indicating whether voting is actively running or the system is in an idle state (`True` or `False`).

### 4. USDT Token Contract Address Query (`usdtToken`)

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

#### 💡 Systemic Logic and Output

This automatic getter function returns the official, hardcoded USDT token address configured during contract constructor initiation (`Constructor`), allowing independent verification of USDT transaction authenticity within the fund.

#### 🧮 Output Value

* Official USDT address on the network: `0x55d398326f99059fF775485246999027B3197955`

### 5. Linked Native Token Contract Address Query (`globalToken`)

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

#### 💡 Systemic Logic and Output

This function returns the official address of the native token contract (`SGT`) linked to the treasury, enabling governance leaders and auditors to independently verify token asset connection validity to the fund.

### 6. Linked Payment Gateway Contract Address Query (`globalPayAddress`)

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

#### 💡 Systemic Logic and Output

This function displays the official address of the package sales and binary networking gateway contract (`SmartGlobalPay`) linked to the fee treasury to verify the qualification of 300-point leaders.
