ZHOU¶
Overview¶
ZHOU is the market rate orchestrator that initializes a complete token hierarchy during deployment. It creates a primary SHIO pair and installs it as a Rod in ZHENG, establishing the foundational market infrastructure.
- Inherits: DYSNOMIA
- License: Sharia
- Solidity: ^0.8.21
What This Means For Players¶
Plain English Summary: ZHOU is the exchange rate board - it sets how much things are worth. When you want to trade one token for another, ZHOU's infrastructure determines the exchange rate. It's also the main chat channel where global messages are broadcast.
Real-World Analogy: Think of ZHOU as a currency exchange kiosk at an airport. It posts the rates for converting between different currencies and processes your exchanges. In Dysnomia, every token can be traded for any other token, and ZHOU manages those rates.
How It Affects Your Gameplay: - Token trading - The exchange rates you see when buying/selling tokens come from here - Chat channel - ZHOU hosts one of the main message channels in the game - Market foundation - ZHOU establishes the primary trading infrastructure that everything else builds on
State Variables¶
| Variable | Type | Visibility | Description |
|---|---|---|---|
| Type | string | public constant | "ZHOU" |
| Upsilon | ZHENG | public | Reference to ZHENG installation manager |
| Xi | uint64 | public | Installation index for the primary Rod |
| Monopole | uint64 | public | Monopole value from initial reaction |
Read Functions¶
Upsilon¶
- Returns: Reference to the ZHENG contractXi¶
- Returns: The Xi index used for the primary installationMonopole¶
- Returns: The Monopole value from the initial reactionWrite Functions¶
Alpha¶
- Access:onlyOwners
- Parameters:
- Name (string): Token name for the new SHA
- Symbol (string): Token symbol for the new SHA
- Returns:
- Epsilon (SHA): New SHA token with multi-level ownership configured
- Description: Creates a new SHA token via YI.Beta() and sets up hierarchical ownership.
- Logic Flow:
1. Call _mintToCap()
2. Create SHA: Epsilon = Upsilon.Eta().Beta(Name, Symbol)
3. Add caller as owner: Epsilon.addOwner(msg.sender)
4. Add ZHENG as owner: Epsilon.addOwner(address(Upsilon))
5. Add YI as owner: Epsilon.addOwner(address(Upsilon.Eta()))
6. Return Epsilon
- Side Effects: Deploys new SHA contract; sets 3-level ownership; mints tokens
- In Plain English: Create a new cryptographic key with multi-level permissions. The SHA gets owned by the caller, ZHENG, and YI, enabling operations from any level in the contract hierarchy. This is the proper way to create SHAs that can be used throughout the system.
React¶
- Access:public
- Parameters:
- Iota (uint64): Reaction input value to process
- Returns:
- Bao: The primary Rod's Bao after reaction with updated Omicron/Omega
- Description: Retrieves the primary installed Rod by Xi and reacts it via YI.
- Logic Flow:
1. Retrieve primary Rod: Theta = Upsilon.GetRodByIdx(Xi)
2. React via YI: Theta = Upsilon.Eta().React(Theta, Iota)
3. Call _mintToCap()
4. Return updated Theta
- Computation Details:
- Xi is set during construction and points to the primary market installation
- The reaction updates Theta.Omicron and Theta.Omega via SHIO.React
- Side Effects: Updates the Bao's reaction outputs; mints tokens on ZHOU and YI
- In Plain English: Perform a cryptographic calculation using the market's main installation. Pass any input value (Iota) and get back the reacted Bao. This is the entry point for other contracts to trigger reactions against the ZHOU system, generating new entropy values.
Contract Interactions¶
Depends On¶
Depended On By¶
- YAU - Uses ZHOU for protocol coordination
Constructor Logic¶
constructor(ZhengContract) {
Upsilon = ZHENG(ZhengContract);
// Add ownership up the chain
Upsilon.addOwner(address(this));
Upsilon.Eta().addOwner(address(this));
// Create Bao for installation
Bao memory Theta;
Theta.Phi = address(this);
Theta.Mu = Alpha("Zheng Rod", "ZROD");
// Create Cone via YI
SHA Cone = Upsilon.Eta().Beta("Yi Shio Cone", "ZCONE");
Cone.addOwner(address(Upsilon));
// Create SHIO pair
Theta.Shio = Upsilon.Eta().Kappa(Theta.Mu, Cone);
// Configure ownership
Theta.Shio.addOwner(address(Upsilon));
Theta.Shio.addOwner(address(Upsilon.Eta()));
// Generate and ionize
Theta.Xi = Xiao.Random();
Theta.Shio.Generate(Theta.Xi, Xiao.Random(), Xiao.Random());
Upsilon.Iodize(Theta.Shio);
// Magnetize and react
Theta.Ring = Theta.Shio.Magnetize();
Theta = Upsilon.Eta().React(Theta, Theta.Xi);
// Store values and install
Monopole = Theta.Omicron;
Theta = Upsilon.InstallRod(Theta.Xi, Theta, Monopole);
Xi = Theta.Xi;
}
Special Mechanisms¶
Hierarchical Ownership Setup¶
The Alpha function sets up a three-level ownership chain: - msg.sender owns the token - ZHENG (Upsilon) owns the token - YI (Upsilon.Eta()) owns the token
This enables operations from any level in the hierarchy.
Primary Rod Installation¶
During construction, ZHOU creates and installs the first Rod in the system, establishing: - The Xi index for future lookups - The initial Monopole for reactions - Market rates for all created tokens
React Passthrough¶
The React function provides a convenient way to react against the primary Rod without needing to know its exact location - it automatically retrieves the Rod by Xi and reacts via YI.
Usage Pattern¶
// Create new SHA token
SHA token = zhou.Alpha("New Token", "NTK");
// React against the primary installation
Bao memory result = zhou.React(inputValue);
Contract Verification¶
| Property | Value |
|---|---|
| Keccak256 Hash | 0xb80e4856136756c84425a43afdddcfdda898b9b2e2ec32217c1e85bfa6d20d7f |
| Source URL | https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/06_zhou.sol |
| Hash Generated | 2026-02-08T00:29:57Z |