Skip to content

LAU

Overview

LAU is the user interface layer contract that provides a personal token for each user. It wraps VOID functionality with user-specific context and manages withdrawals, chat, aliases, and area tracking.

  • Inherits: DYSNOMIA
  • License: Sharia
  • Solidity: ^0.8.21

What This Means For Players

Plain English Summary: LAU is YOUR player account - your personal wallet, identity, and interface to the entire Dysnomia game. When you join Dysnomia, you create a LAU token that represents you. Through your LAU, you can chat, withdraw earnings, set your username, and interact with the game world.

Real-World Analogy: Think of LAU as your player profile in a video game combined with your crypto wallet. It's like your Steam account, Xbox Gamertag, or Discord profile - but also holds your in-game currencies and lets you interact with other players and venues.

What You Can Do With Your LAU: - Chat - Send messages to venues and other players - Withdraw tokens - Move earnings from your LAU to your wallet - Set your username - Choose how other players see you - Create aliases - Give nicknames to other addresses for easy reference - Track your location - Know which venue (QING) you're currently in - Access your identity - Your Soul ID (unique player number) and Aura (identity fingerprint)

State Variables

Variable Type Visibility Description
Type string public constant "LAU"
Eta VOID public Reference to VOID session manager
Saat uint64[3] public Array of [Pole, Soul, Aura]
On Bao public User's Bao state
CurrentArea address public Current area/location address

Read Functions

Saat

uint64[3] public Saat
- Returns: Array where: - Saat[0] = Pole value - Saat[1] = Soul ID - Saat[2] = Aura value - In Plain English: Your three identity numbers. Soul ID (Saat[1]) is your unique player number. Pole and Aura are cryptographic fingerprints that prove your identity.

On

Bao public On
- Returns: User's Bao state - In Plain English: Your complete operation context - contains your cryptographic keys (SHIO), your address (Phi), and reaction outputs. It's the "ticket" used for all your game interactions.

Username

function Username() public view returns (string memory)
- Returns: User's current username - In Plain English: Get your display name that others see in chat and venues. This is the name you chose when you set up your profile.

Alias (view)

function Alias(address name) public view onlyOwners returns (string memory)
function Alias(Bao memory Theta) public view onlyOwners returns (string memory)
- Access: onlyOwners - Returns: Alias for the given address or Bao - In Plain English: Look up the nickname you gave to an address or player. Aliases are personal labels only you can see - like a contact list.

Write Functions

Withdraw

function Withdraw(address what, uint256 amount) public onlyOwners
- Access: onlyOwners - Parameters: - what (address): Address of the DYSNOMIA-compatible token to withdraw - amount (uint256): Amount of tokens to transfer (in wei/smallest units) - Description: Transfers tokens from the LAU contract to the caller's wallet and logs the action. - Logic Flow: 1. Create reference: withdrawToken = DYSNOMIA(what) 2. Transfer: withdrawToken.transfer(msg.sender, amount) 3. Log: Eta.Log("Withdraw Of {amount} {token.name()} To {msg.sender}") - Side Effects: Transfers tokens; emits log event on SHIO - In Plain English: Takes tokens out of your LAU account and sends them to your wallet. Your LAU can hold multiple token types (earned rewards, game currencies, etc.). Use this to cash out earnings or move tokens for trading elsewhere. The withdrawal is logged for transparency.

Void

function Void(bool really1, bool really2) public onlyOwners
- Access: onlyOwners - Parameters: - really1 (bool): First confirmation flag - really2 (bool): Second confirmation flag - Description: Resets user session state by re-entering VOID (requires both flags true). - Logic Flow: 1. If really1 && really2: call (Saat, On) = Eta.Enter() to refresh session 2. Log: Eta.Log("Reset To Void") 3. Call _mintToCap() - Side Effects: Refreshes Saat and On with new values from VOID; mints tokens - In Plain English: A "factory reset" for your session. This clears your current state and starts fresh with new Saat values. Requires two confirmations (true, true) to prevent accidental resets. Note: This doesn't delete your account - it just refreshes your session data.

Leave

function Leave() public onlyOwners
- Access: onlyOwners - Description: Clears the CurrentArea and logs departure. - Logic Flow: 1. Set CurrentArea = address(0x0) 2. Log: Eta.Log("Left Play") - Side Effects: Clears CurrentArea; emits log event - In Plain English: Exit the venue you're currently in. Sets your location to "nowhere" (address zero). Like walking out of a chatroom or leaving a game lobby. Call this when you want to explicitly leave your current QING.

Username (setter)

function Username(string memory newUsername) public onlyOwners
- Access: onlyOwners - Parameters: - newUsername (string): The new display name to set - Description: Sets the username attribute via VOID. - Logic Flow: 1. Call Eta.SetAttribute("Username", newUsername) 2. Log: Eta.Log("Username set to {newUsername}") 3. Call _mintToCap() - Side Effects: Updates "Username" attribute in libattribute; emits log; mints tokens - In Plain English: Change your display name. This is how you'll appear in chat and to other players. The username is stored as an attribute and formatted into chat messages as <Username>. Pick something memorable!

Chat

function Chat(string memory chatline) public onlyOwners
- Access: onlyOwners - Parameters: - chatline (string): The message content to send - Description: Sends a chat message via VOID's Chat function. - Logic Flow: 1. Call Eta.Chat(chatline) 2. Call _mintToCap() - Computation Details: - VOID formats the message as "<Username> chatline" and routes to ZHOU's channel - Side Effects: Emits LogEvent on ZHOU's SHIO; mints tokens - In Plain English: Sends a message that other players can see. VOID automatically attaches your username in angle brackets (like <Alice> Hello!). Your Soul ID is linked to the message, so everyone knows it's from you. Chat messages are recorded on-chain permanently.

Alias (setters)

function Alias(address name, string memory value) public onlyOwners
function Alias(Bao memory Theta, string memory value) public onlyOwners
- Access: onlyOwners - Parameters: - name (address) or Theta (Bao): Target to create alias for - value (string): Alias string to assign - Description: Creates a personal alias for an address or Bao, with logging. - Logic Flow: 1. Call Eta.Alias(name/Theta, value) 2. Log: Eta.Log("Alias[{address}] set to {value}") 3. Call _mintToCap() - Side Effects: Updates alias in libattribute; emits log; mints tokens - In Plain English: Give a nickname to any address or player's Bao. Useful for remembering who's who - like saving a contact in your phone as "Bob from the DYS venue." Aliases are personal to you; other players can't see them.

Contract Interactions

Depends On

  • DYSNOMIA - Base token functionality
  • VOID - Session management

Created By

Depended On By

  • CHO - User authentication
  • Domain contracts that interact with users

Constructor Logic

constructor(name, symbol, VoidAddress) {
    Eta = VOID(VoidAddress);

    // Enter via VOID (creates user session)
    (Saat, On) = Eta.Enter(name, symbol);

    // Add ownership to the SHIO and Rod
    On.Shio.addOwner(address(this));
    On.Shio.Rho().Rod.addOwner(address(this));
}

Special Mechanisms

User Token Pattern

Each LAU instance represents a single user. The constructor: 1. Calls VOID.Enter() to create a session 2. Receives the Saat array and Bao 3. Adds self as owner of the SHIO and Rod

Soul ID Access

The Soul ID is stored at Saat[1] and used throughout the system to identify the user:

uint64 soul = lau.Saat(1);

Logging Pattern

Most write functions include logging:

Eta.Log(string.concat("Withdraw Of ", amount, " ", token, " To ", address));

Void Reset

The Void function requires two confirmation parameters to prevent accidental resets:

if(really1 && really2) (Saat, On) = Eta.Enter();

Area Tracking

CurrentArea can be set by game contracts to track user location:

CurrentArea = address(someQing);

Usage Pattern

// Deploy via factory
LAU myToken = lauFactory.New("My Token", "MTKN");

// Set username
myToken.Username("Alice");

// Chat
myToken.Chat("Hello!");

// Withdraw tokens
myToken.Withdraw(tokenAddress, amount);

// Leave current area
myToken.Leave();

// Get user info
uint64 soul = myToken.Saat(1);
string memory name = myToken.Username();

Security Considerations

  • Most functions are protected by onlyOwners
  • The LAU owner is the user who created it
  • SHIO and Rod ownership is shared between LAU and user
  • Void reset requires double confirmation

Contract Verification

Property Value
Keccak256 Hash 0x9518e52b7177571e28f0cf0424df4be4f3bf268e80729e79650a3e77a91f5039
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/11_lau.sol
Hash Generated 2026-02-08T00:29:57Z