> 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-token/administrative-functions.md).

# Administrative Functions

## Technical Reference: Token Administrative Functions

The functions in this section configure the initial token economy, link the decentralized exchange liquidity pool, set tax routing, and manage transaction limits. Invocation of these functions is restricted to the owner account (`onlyOwner`). These functions incorporate specific conditions to manage execution and prevent post-configuration alterations.

### 1. One-Time Tax Treasury Address Configuration (`setTaxWallet`)

Function Signature: `function setTaxWallet(address _taxWallet) external onlyOwner`

#### 💡 Systemic Logic and Application

This function registers the treasury address designated to receive the 5% tax deducted from decentralized exchange transactions. This function can be executed strictly once. Following execution, the tax treasury address is permanently locked. The system automatically exempts this configured address from paying trading taxes.

#### 🧮 System State Change

\[ The `taxWallet` variable updates to the specified address (`_taxWallet`) ] \[ The tax exemption status for this treasury within the `_isExcludedFromFees` mapping updates to `True` ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the contract owner (`onlyOwner`).
* One-Time Lock: The `taxWallet` variable must evaluate to the zero address (`require(taxWallet == address(0), "Tax wallet already set")`).
* Target Address Validation: The specified address must not evaluate to the zero address (`require(_taxWallet != address(0))`).

### 2. Exchange Trading Pair and Pool Creation (`createPair`)

Function Signature: `function createPair(address _router) external onlyOwner`

#### 💡 Systemic Logic and Application

This function registers the official trading pair of the native token against USDT (`SGT`/`USDT`). By submitting the decentralized exchange router address, the contract communicates with the pool creation factory (e.g., Uniswap V2 Factory) to create the trading pool. The pool address is stored in the contract to enable automated tax deductions during buy and sell trades.

#### 🧮 System State Change

\[ Creates the `SGT`/`USDT` trading pool and stores its address in the `pancakePair` variable ] \[ Emits the `PairCreated` event ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the contract owner (`onlyOwner`).

### 3. Official Permanent Trading Enablement (`enableTrading`)

Function Signature: `function enableTrading() external onlyOwner`

#### 💡 Systemic Logic and Application

This function enables public token trading on decentralized exchanges. Once executed, the `tradingEnabled` variable updates to `True`. The contract code contains no function to disable trading; the market remains permanently open post-execution.

#### 🧮 System State Change

\[ The `tradingEnabled` boolean updates from `False` to `True` ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the contract owner (`onlyOwner`).
* Tax Configuration Prerequisite: The tax treasury address must be configured prior to enabling trading (`require(taxWallet != address(0), "Set tax wallet first")`).

### 4. Maximum Transaction Limit Configuration (`setMaxTxAmount`)

Function Signature: `function setMaxTxAmount(uint256 _amount) external onlyOwner`

#### 💡 Systemic Logic and Application

This function adjusts the maximum token limit allowed per transaction (`maxTxAmount`). A hardcoded condition prevents the administrator from reducing this transaction ceiling below the defined minimum allowable threshold (`minTxLimit`, equivalent to 100,000 `SGT` tokens).

#### 🧮 System State Change

\[ The transaction ceiling variable (`maxTxAmount`) updates to the new value (`_amount`) ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the contract owner (`onlyOwner`).
* Minimum Threshold Check: The new limit must be greater than or equal to the fixed `minTxLimit` threshold (`require(_amount >= minTxLimit, "Anti-Honeypot: Limit too low")`).

### 5. Tax Exclusion List Management (`excludeFromFees`)

Function Signature: `function excludeFromFees(address account, bool excluded) external onlyOwner`

#### 💡 Systemic Logic and Application

This function adds or removes addresses from the 5% tax exclusion whitelist. It is utilized for ecosystem contracts (such as the central bank or fee treasury) that require tax-exempt token transfers to execute their operational duties.

#### 🧮 System State Change

\[ The tax exemption status of the target address within the `_isExcludedFromFees` mapping updates to `True` or `False` ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the contract owner (`onlyOwner`).

### 6. Contract Ownership Authority Transfer (`transferOwnership`)

Function Signature: `function transferOwnership(address newOwner) public virtual onlyOwner`

#### 💡 Systemic Logic and Application

Inherited from the standard `Ownable` contract, this function transfers all token administrative authorities to a new address (e.g., a new administrator, a multi-signature wallet, or a DAO contract).

#### 🧮 System State Change

\[ The `_owner` variable updates to the `newOwner` address ] \[ An `OwnershipTransferred` event is emitted ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the current contract owner (`onlyOwner`).
* New Address Validation: The new owner address must not evaluate to the zero address (`require(newOwner != address(0))`).

### 7. Ownership Renunciation (`renounceOwnership`)

Function Signature: `function renounceOwnership() public virtual onlyOwner`

#### 💡 Systemic Logic and Application

This function transfers the contract ownership to the zero address (`address(0)`). Following execution, the contract becomes permanently ownerless, and all administrative functions (such as modifying transaction ceilings or managing tax exemptions) are permanently locked.

#### 🧮 System State Change

\[ The `_owner` variable updates to the zero address (`address(0)`) ] \[ An `OwnershipTransferred` event targeting the zero address is emitted ]

#### 🛡️ Execution Conditions and Restrictions

* Administrative Authentication: The caller must be the contract owner (`onlyOwner`).
