Skip to content

CHO

Overview

CHO is the primary login and user authentication contract. It manages user delegation, entropy tracking, and system address registry. CHO serves as the gateway between user tokens (LAU) and the domain contract system.

Inheritance Chain (C3 Linearized)

  1. selfCHO
  2. DYSNOMIA
  3. MultiOwnable

Immediate Parents

What This Means For Players

Plain English Summary: CHO is the login gate - it verifies you are who you say you are. When you want to interact with the game, CHO checks that you own your LAU token and registers you as an active player. It's the bouncer that makes sure only legitimate players get access.

Real-World Analogy: Think of CHO like the login screen of a multiplayer game combined with a passport control checkpoint. You present your credentials (LAU token), CHO verifies them, and then you're allowed into the game world. It also maintains a directory of all registered players.

How It Affects Your Gameplay: - Authentication - CHO verifies you own your LAU before letting you play - User registry - Your Soul ID and wallet address are linked here - WITHOUT ban - Holders of the WITHOUT token are permanently blocked - Entropy tracking - CHO evolves system randomness with each interaction - System addresses - Important game contracts are registered here by name

Constants

Constant Value Description
Gua 1652929763764148448182513644633101239607891671119935657884642 Universe constant for Luo generation

State Variables

Variable Type Visibility Mutability Initial Value NatSpec
Type string public constant CHO
Gua uint256 public constant 1652929763764148448182513644633101239...
Void VOID public mutable ``
Saat uint64[3] public mutable ``
On Bao public mutable ``
Entropy uint64 public mutable ``
Delegates mapping(address => User) private mutable ``
DelegateAddresses mapping(uint64 => address) private mutable ``
Addresses mapping(string => address) public mutable ``
Qu mapping(uint256 => address) public mutable ``
Aliases string[] public mutable ``

Errors

Error Parameters NatSpec
SystemAddress address Address, string Alias
InvalidUserToken address Asset
InvalidOwnership address UserToken, address User
UserNotEntered address User
SoulNotEntered uint64 Soul
InvalidUser (none)

Constructor

constructor

constructor(address VoidAddress) DYSNOMIA("Dysnomia Cho", "CHO", address(DYSNOMIA(VoidAddress).Xiao()))
  • Modifiers: DYSNOMIA("Dysnomia Cho", "CHO", address(DYSNOMIA(VoidAddress).Xiao()))
  • Parameters: address VoidAddress

Functions

External & Public

AddContractOwner

function AddContractOwner(address Contract, address Owner) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: address Contract, address Owner

has

function has(address _contract, string memory what) public view returns (bool does)
  • Visibility: public
  • State Mutability: view
  • Parameters: address _contract, string memory what
  • Returns: bool does

AddSystemAddress

function AddSystemAddress(string memory Alias, address Address) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: string memory Alias, address Address

AddLibraryOwner

function AddLibraryOwner(string memory what) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: string memory what

Reactor

function Reactor() public view returns (LIBCOREREACTIONS)
  • Visibility: public
  • State Mutability: view
  • Returns: LIBCOREREACTIONS

Luo

function Luo() public onlyOwners returns (uint256 De)
  • Visibility: public
  • Modifiers: onlyOwners
  • Returns: uint256 De

VerifyUserTokenPermissions

function VerifyUserTokenPermissions(address UserToken) public
  • Visibility: public
  • Parameters: address UserToken

Enter

function Enter(address UserToken) public returns (User memory)
  • Visibility: public
  • Parameters: address UserToken
  • Returns: User memory

Recall

function Recall(User memory Alpha) public returns (uint64 UserEntropy)
  • Visibility: public
  • Parameters: User memory Alpha
  • Returns: uint64 UserEntropy

GetUser

function GetUser() public returns (User memory Alpha)
  • Visibility: public
  • Returns: User memory Alpha

GetUserSoul

function GetUserSoul() public view returns (uint64)
  • Visibility: public
  • State Mutability: view
  • Returns: uint64

React

function React(uint64 Eta) public returns (uint64, uint64)
  • Visibility: public
  • Parameters: uint64 Eta
  • Returns: uint64, uint64

ReactUser

function ReactUser(uint64 Soul, uint64 Epsilon) public returns (uint64 Omicron)
  • Visibility: public
  • Parameters: uint64 Soul, uint64 Epsilon
  • Returns: uint64 Omicron

GetUserBySoul

function GetUserBySoul(uint64 Soul) public returns (User memory Alpha)
  • Visibility: public
  • Parameters: uint64 Soul
  • Returns: User memory Alpha

GetAddressBySoul

function GetAddressBySoul(uint64 soul) public view returns (address UserAddress)
  • Visibility: public
  • State Mutability: view
  • Parameters: uint64 soul
  • Returns: address UserAddress

GetUserTokenAddress

function GetUserTokenAddress(address wallet) public view returns (address UserToken)
  • Visibility: public
  • State Mutability: view
  • Parameters: address wallet
  • Returns: address UserToken

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 virtual 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
_addLibraryOwner function _addLibraryOwner(VOID Void, string memory what) internal
_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

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

Depended On By

  • MAP - Uses CHO for Luo generation
  • QING - User verification
  • Domain contracts using user authentication

Special Mechanisms

User Authentication

function Enter(address UserToken) public returns(User memory) {
    // Verify WITHOUT token holder is banned
    assert(DYSNOMIA(WITHOUTContract).balanceOf(tx.origin) == 0);

    // Verify LAU permissions
    VerifyUserTokenPermissions(UserToken);

    // Verify caller owns LAU
    if(!UserLau.owner(tx.origin)) revert InvalidOwnership(...);

    // Create user entry
    Alpha.Soul = UserLau.Saat(1);
    Alpha.On = UserLau.On();
    Alpha.Username = LAU(Alpha.On.Phi).Username();

    // Register
    Delegates[tx.origin] = Alpha;
    DelegateAddresses[Alpha.Soul] = tx.origin;
}

Luo Generation

function Luo() public onlyOwners returns (uint256 De) {
    De = 0;
    while(De == 0 || Qu[De] != address(0x0)) {
        React(On.Omicron);
        De = Xiao.modExp(On.Omega, On.Omicron, Gua);
    }
    Qu[De] = msg.sender;
}

Entropy Evolution

Each operation updates the system entropy:

function Recall(User memory Alpha) public returns (uint64) {
    (On.Omicron, On.Omega) = Reactor().ReactToLai(On, Entropy ^ Alpha.On.Omicron, ...);
    Entropy = On.Omega;
    return On.Omicron;
}






Contract Verification

Property Value
Keccak256 Hash 0x5e4ec26fabea5e497326e361cd820037e9b7fbfbd6b272d2dcd83f0ed2d9c4f6
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/domain/dan/01_cho.sol
Hash Generated 2026-04-17T20:48:11Z