VOID¶
Overview¶
VOID is the user session and chat management contract. It handles user registration, authentication, chat logging, and attribute storage. It serves as the primary entry point for user interactions with the Dysnomia ecosystem.
- Kind: Contract
- License: Sharia
- Solidity: ^0.8.21
- Source:
10_void.sol
Inheritance Chain (C3 Linearized)¶
- self — VOID
- DYSNOMIA
- MultiOwnable
Immediate Parents¶
What This Means For Players¶
Plain English Summary: VOID is the login system - it manages who you are and your chat sessions. When you first join Dysnomia, you "Enter" through VOID to create your account. VOID remembers your Soul ID, handles your chat messages, and stores your personal settings like your username.
Real-World Analogy: VOID is like the front desk of a members-only club. When you first visit, the front desk creates your membership card (your LAU token) and assigns you a member number (Soul ID). Every time you return, they recognize you and let you in. They also handle the intercom system (chat) and keep track of your preferences.
How It Affects Your Gameplay: - Account creation - VOID creates your player session when you first "Enter" - Chat routing - All your messages go through VOID to reach the right channels - Attribute storage - Your username, aliases, and other settings are managed here - Session persistence - VOID remembers you between visits so you don't have to re-register
State Variables¶
| Variable | Type | Visibility | Mutability | Initial Value | NatSpec |
|---|---|---|---|---|---|
Type |
string |
public | constant | VOID |
|
Nu |
SIU |
public | mutable | `` | |
_activeUsers |
mapping(address => uint64) |
private | mutable | `` | |
_kecNames |
mapping(string => bytes32) |
private | mutable | `` | |
_libraries |
mapping(string => address) |
private | mutable | `` |
Errors¶
| Error | Parameters | NatSpec |
|---|---|---|
InvalidLogXi |
string Xi | |
NoUserEntry |
address User | |
NoUserName |
address User | |
NotShioOwner |
address Shio, address Requestor | |
UserAlreadyCreated |
address User |
Constructor¶
constructor¶
constructor(address SiuAddress) DYSNOMIA(unicode"CHATLOG Void", unicode"VOID", address(DYSNOMIA(SiuAddress).Xiao()))
- Modifiers:
DYSNOMIA(unicode"CHATLOG Void", unicode"VOID", address(DYSNOMIA(SiuAddress).Xiao())) - Parameters: address SiuAddress
Functions¶
External & Public¶
GetLibraryAddress¶
- Visibility: public
- State Mutability: view
- Parameters: string memory name
- Returns: address
AddLibrary¶
- Visibility: public
- Modifiers:
onlyOwners - Parameters: string memory name, address _a
Log¶
- Visibility: public
- Parameters: string memory LogLine
Log¶
- Visibility: public
- Modifiers:
onlyOwners - Parameters: uint64 Sigma, string memory LogLine
Log¶
- Visibility: public
- Modifiers:
onlyOwners - Parameters: address Sigma, string memory LogLine
Chat¶
- Visibility: public
- Parameters: string memory chatline
SetAttribute¶
- Visibility: public
- Parameters: string memory name, string memory value
GetAttribute¶
- Visibility: public
- State Mutability: view
- Parameters: string memory name
- Returns: string memory
Alias¶
- Visibility: public
- Parameters: address name, string memory value
Alias¶
- Visibility: public
- State Mutability: view
- Parameters: address name
- Returns: string memory
Alias¶
- Visibility: public
- Parameters: Bao memory Theta, string memory value
Alias¶
- Visibility: public
- State Mutability: view
- Parameters: Bao memory Theta
- Returns: string memory
Enter¶
- Visibility: public
- Returns: uint64[3] memory Saat, Bao memory On
Enter¶
function Enter(string memory name, string memory symbol) public returns (uint64[3] memory Saat, Bao memory On)
- Visibility: public
- Parameters: string memory name, string memory symbol
- Returns: uint64[3] memory Saat, Bao memory On
Internal¶
Augment¶
- Visibility: internal
Log¶
- Visibility: internal
- Parameters: string memory Xi, string memory LogLine
GetBySoul¶
- Visibility: internal
- Parameters: uint64 Sigma
- Returns: Bao memory On
Inherited Members¶
This contract inherits the members below from its parents. See each parent's dedicated MD for full signatures, NatSpec, and semantics.
From DYSNOMIA¶
External & Public Functions
| Function | Signature | State Mutability |
|---|---|---|
Rename |
function Rename(string memory newName, string memory newSymbol) public onlyOwners |
nonpayable |
mintToCap |
function mintToCap() public onlyOwners |
nonpayable |
GetMarketRate |
function GetMarketRate(address _a) public view returns (uint256) |
view |
Purchase |
function Purchase(address _t, uint256 _a) public |
nonpayable |
Redeem |
function Redeem(address _t, uint256 _a) public |
nonpayable |
name |
function name() public view virtual returns (string memory) |
view |
symbol |
function symbol() public view virtual returns (string memory) |
view |
decimals |
function decimals() public view virtual returns (uint8) |
view |
totalSupply |
function totalSupply() public view virtual returns (uint256) |
view |
balanceOf |
function balanceOf(address account) public view virtual returns (uint256) |
view |
transfer |
function transfer(address to, uint256 value) public virtual returns (bool) |
nonpayable |
allowance |
function allowance(address owner, address spender) public view virtual returns (uint256) |
view |
approve |
function approve(address spender, uint256 value) public virtual returns (bool) |
nonpayable |
transferFrom |
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) |
nonpayable |
Internal Functions
| Function | Signature |
|---|---|
_mintToCap |
function _mintToCap() internal |
AddMarketRate |
function AddMarketRate(address _a, uint256 _r) internal |
_transfer |
function _transfer(address from, address to, uint256 value) internal |
_update |
function _update(address from, address to, uint256 value) internal virtual |
_mint |
function _mint(address account, uint256 value) internal |
_approve |
function _approve(address owner, address spender, uint256 value) internal |
_spendAllowance |
function _spendAllowance(address owner, address spender, uint256 value) internal virtual |
log10 |
function log10(uint256 value) internal pure returns (uint256) |
String |
function String(uint256 value) internal pure returns (string memory buffer) |
Hex |
function Hex(address account) internal pure returns (string memory) |
Events
| Event | Parameters |
|---|---|
Transfer |
address indexed from, address indexed to, uint256 value |
Approval |
address indexed owner, address indexed spender, uint256 value |
Errors
| Error | Parameters |
|---|---|
MarketRateNotFound |
address asset |
DysnomiaInsufficientBalance |
address origin, address sender, address from, address to, address what, uint256 balance, uint256 needed |
DysnomiaInsufficientAllowance |
address origin, address sender, address owner, address spender, address what, uint256 allowance, uint256 needed |
State Variables (private parent storage is not reachable and is omitted)
| Variable | Type | Visibility | Mutability |
|---|---|---|---|
__name |
string |
internal | mutable |
__symbol |
string |
internal | mutable |
MotzkinPrime |
uint64 |
public | constant |
Xiao |
atropaMath |
public | mutable |
maxSupply |
uint256 |
public | mutable |
From MultiOwnable¶
External & Public Functions
| Function | Signature | State Mutability |
|---|---|---|
owner |
function owner() external view virtual returns (address) |
view |
renounceOwnership |
function renounceOwnership(address toRemove) public virtual onlyOwners |
nonpayable |
addOwner |
function addOwner(address newOwner) public virtual onlyOwners |
nonpayable |
Internal Functions
| Function | Signature |
|---|---|
_checkOwner |
function _checkOwner() internal view virtual |
_changeOwnership |
function _changeOwnership(address cOwner, bool cState) internal virtual |
Events
| Event | Parameters |
|---|---|
OwnershipUpdate |
address indexed newOwner, bool indexed state |
Errors
| Error | Parameters |
|---|---|
OwnableUnauthorizedAccount |
address origin, address account, address what |
OwnableInvalidOwner |
address origin, address owner, address what |
Modifiers
| Modifier | Parameters |
|---|---|
onlyOwners |
(none) |
Contract Interactions¶
Depends On¶
- DYSNOMIA - Base token functionality
- SIU - Token generation
- LIBATTRIBUTE - Attribute storage
Depended On By¶
- LAU - User interface layer
- LAUFactory - Creates LAU instances
- All domain contracts that need user sessions
Constructor Logic¶
constructor(SiuAddress) {
Nu = SIU(SiuAddress);
// Add ownership through chain
Nu.addOwner(address(this));
// ... (adds to Psi, Mu, Tau, Upsilon, Eta)
// Add SHIO ownership for specific installations
GetBySoul(ZHOU(...).Xi()).Shio.addOwner(address(this));
GetBySoul(YANG(...).Rho().Lai.Xi).Shio.addOwner(address(this));
// Register channel names
_kecNames["ZHOU"] = keccak256("ZHOU");
_kecNames["YANG"] = keccak256("YANG");
}
Special Mechanisms¶
Soul ID System¶
Each user receives a unique 64-bit Soul ID upon registration. The Soul ID is derived from the Saat array and serves as the primary user identifier.
GetBySoul¶
Internal function that retrieves a user's Bao from ZHENG by their Soul ID:
function GetBySoul(uint64 Sigma) internal returns(Bao memory On) {
return Nu.Psi().Mu().Tau().Upsilon().GetRodByIdx(Sigma);
}
Log Channel Routing¶
The internal Log function with string Xi parameter routes to specific SHIOs: - "ZHOU" → ZHOU's Xi installation - "YANG" → YANG's Lai installation
Library Integration¶
VOID registers and uses library contracts:
- libattribute: User attribute storage
- Additional libraries can be registered via AddLibrary
Chat Format¶
Chat messages are formatted as: <Username> message
Usage Pattern¶
// Register new user
(uint64[3] memory saat, Bao memory on) = void.Enter("My Token", "MTKN");
// Set username
void.SetAttribute("Username", "Alice");
// Send chat
void.Chat("Hello World!");
// Login again later
(saat, on) = void.Enter();
// Set alias for an address
void.Alias(someAddress, "Bob's Wallet");
Contract Verification¶
| Property | Value |
|---|---|
| Keccak256 Hash | 0x7c7f3267344c72f8864ae380047ee3a9797d3209fce4fc9285b09c9cc7edfe3a |
| Source URL | https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/10_void.sol |
| Hash Generated | 2026-04-17T20:48:08Z |