Technical Reference

Bao

Source updated:
Last updated:
Source Revision 0x257e4a98…5250df
Property Value
Source Revision 0x257e4a9884075b125c407aec08e906b6dfd2339b178bf45d930720bc6c5250df
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/7ba1a60cf6242952cbb0d45f2a4ba18b553f8014/solidity/dysnomia/include/bao.sol
Source commit 7ba1a60cf6242952cbb0d45f2a4ba18b553f8014
Source Status Source snapshot; source hashes do not establish deployed bytecode equivalence.
Compiler solc 0.8.21; optimizer enabled with 200 runs
Compiler Configuration {"evmVersion":"compiler-default","optimizer":{"enabled":true,"runs":200},"version":"0.8.21+commit.d9974bed.Linux.g++"}
Compilation Closure Hash 0xd2d9a9914355cdd476c44b666ff7c4872cf2dfb12947f95ad93ca5f1c793a748
Compilation Closure Files 4
Hash Generated 2026-04-20T02:38:30Z

Bao is the central operation context structure used throughout the Dysnomia ecosystem. It encapsulates a SHIO pair with associated state and reaction outputs.

  • Kind: Type Definitions Module
  • License: Sharia
  • Solidity: ^0.8.21
  • Source: include/bao.sol
Contract addressNot applicable to type definitions

Plain English Summary: Bao is your operation ticket - it carries all your info for transactions. Every time you interact with the game, a Bao is created that contains your identity (Phi), your cryptographic keys (SHIO), and the results of any reactions (Omicron/Omega). It’s like a transaction receipt that also carries the tools to process the next transaction.

Real-World Analogy: Think of Bao like a boarding pass that also contains your passport, wallet, and luggage claim tickets all in one package. When you go through security (perform a game action), the Bao has everything needed to verify who you are and what you’re allowed to do.

How It Affects Your Gameplay:

  • Identity bundle - Your Bao links your address (Phi) to your cryptographic identity (SHIO)
  • Transaction context - Every operation carries a Bao with the current state
  • Reaction results - Omicron and Omega store the outputs of cryptographic reactions
  • Indexing - Xi is used to find your Bao in the system’s registries
struct Bao {
address Phi; // Associated address
SHA Mu; // Rod SHA token reference
uint64 Xi; // Generation/Index value
uint64 Pi; // Pi value (unused in most contexts)
SHIO Shio; // Associated SHIO pair
uint64 Ring; // Ring value from magnetization
uint64 Omicron; // First reaction output
uint64 Omega; // Second reaction output
}
Field Type Purpose
Phi address Owner/reference address (contract, user token, etc.)
Mu SHA The Rod SHA token from the SHIO
Xi uint64 Index for installation or generation seed
Pi uint64 Reserved/auxiliary value
Shio SHIO The full SHIO pair (contains both Rod and Cone)
Ring uint64 Result of SHIO magnetization
Omicron uint64 First output from React operations
Omega uint64 Second output from React operations
1. Create with Phi = owner address
2. Create SHA tokens (Mu = Rod)
3. Create SHIO from Rod + Cone
4. Generate SHIO with Xi
5. Iodize (Isomerize + Isolate)
6. Magnetize to get Ring
7. React to get Omicron/Omega
8. Install at Xi index
Bao memory On;
On.Phi = msg.sender;
On.Mu = someFactory.New("Rod", "ROD", mathLib);
SHA Cone = someFactory.New("Cone", "CONE", mathLib);
On.Shio = shioFactory.New(address(On.Mu), address(Cone), mathLib);
On.Xi = random();
On.Shio.Generate(On.Xi, alpha, beta);
// ... iodize, magnetize
On.Ring = On.Shio.Magnetize();
(On.Omicron, On.Omega) = On.Shio.React(inputValue);
// Store
mapping(uint64 => Bao) storage Sigma;
Sigma[On.Xi] = On;
// Retrieve
Bao memory retrieved = Sigma[someXi];
  • YI - Nu mapping storage
  • ZHENG - Sigma installation registry
  • YANG - Rho.Bang/Lai/Le states
  • LAU - On user state
  • User - User.On field
  • All domain contracts using reaction mechanics

Imports interfaces for:

Bao is typically used as memory for temporary operations and passed between functions. For persistent storage, it’s stored in mappings indexed by Xi or address.

// Memory (temporary)
Bao memory temp = createBao();
temp = processReaction(temp);
// Storage (persistent)
mapping(uint64 => Bao) storage registry;
registry[temp.Xi] = temp;

struct Bao {
address Phi;
SHA Mu;
uint64 Xi;
uint64 Pi;
SHIO Shio;
uint64 Ring;
uint64 Omicron;
uint64 Omega;
}