Skip to content
Technical Reference

DYSNOMIA

Hash-verified 0xa2f5740e…fee7c6
Source details
Property Value
Keccak256 Hash 0xa2f5740edb50339b5617e2baf5d9f6d45d23e86f9beadd6cae14cf8de7fee7c6
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/58607494f7741b80525953e4a85bc99e66fd20fc/solidity/dysnomia/01_dysnomia.sol
Source Revision 58607494f7741b80525953e4a85bc99e66fd20fc
Source Status Canonical source snapshot; deployed bytecode equivalence is only established where a deployment record says so.
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 0x3d4b521713e7a4c05127698514343d4589a4e642080a29d75e8ca437b446117d
Compilation Closure Files 3
Hash Generated 2026-09-14T19:33:31Z

DYSNOMIA is the abstract base token contract for the entire ecosystem. It implements ERC20-like functionality with multi-owner governance, market rate exchange system, and utility functions for string/hex conversion.

  • Kind: Abstract Contract
  • License: Sharia
  • Solidity: ^0.8.21
  • Source: 01_dysnomia.sol
  1. selfDYSNOMIA
  2. MultiOwnable

Plain English Summary: DYSNOMIA is the “gold coin” that everything in the game is built upon. Every token, currency, and reward in the Dysnomia ecosystem inherits from this base contract. It’s not a token you directly hold - it’s the foundation that makes all other tokens work.

Real-World Analogy: Think of DYSNOMIA like the “rules of money” in a video game. Just like how all currencies in a game (gold, gems, credits) follow the same basic rules for how they’re counted, transferred, and exchanged, DYSNOMIA defines those rules for every token in this ecosystem.

Key Features For Players:

  • Token exchanges built-in - You can swap any DYSNOMIA-based token for another using Purchase/Redeem, without needing an external exchange
  • Random supply - Each token has a randomly-determined maximum supply, making every token unique
  • Multi-owner control - Tokens can have multiple managers, enabling shared control of game resources
Variable Type Visibility Mutability Initial Value NatSpec
_balances mapping(address => uint256) private mutable ``
_allowances mapping(address => mapping(address => uint256)) private mutable ``
_totalSupply uint256 private mutable ``
__name string internal mutable ``
__symbol string internal mutable ``
MotzkinPrime uint64 public constant 953467954114363
Xiao atropaMath public mutable ``
maxSupply uint256 public mutable ``
_marketRates mapping(address => uint256) private mutable ``
Event Parameters Anonymous NatSpec
Transfer address indexed from, address indexed to, uint256 value no
Approval address indexed owner, address indexed spender, uint256 value no
Error Parameters NatSpec
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
constructorconstructor
constructor(string memory name_, string memory symbol_, address mathContract) MultiOwnable(msg.sender)
  • Modifiers: MultiOwnable(msg.sender)
  • Parameters: string memory name_, string memory symbol_, address mathContract
Renamefunction
function Rename(string memory newName, string memory newSymbol) public onlyOwners

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: string memory newName, string memory newSymbol
mintToCapfunction
function mintToCap() public onlyOwners

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Modifiers: onlyOwners
GetMarketRatefunction
function GetMarketRate(address _a) public view returns (uint256)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Parameters: address _a
  • Returns: uint256
Purchasefunction
function Purchase(address _t, uint256 _a) public

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Parameters: address _t, uint256 _a
Redeemfunction
function Redeem(address _t, uint256 _a) public

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Parameters: address _t, uint256 _a
namefunction
function name() public view virtual returns (string memory)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Virtual: yes
  • Returns: string memory
symbolfunction
function symbol() public view virtual returns (string memory)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Virtual: yes
  • Returns: string memory
decimalsfunction
function decimals() public view virtual returns (uint8)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Virtual: yes
  • Returns: uint8
totalSupplyfunction
function totalSupply() public view virtual returns (uint256)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Virtual: yes
  • Returns: uint256
balanceOffunction
function balanceOf(address account) public view virtual returns (uint256)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Virtual: yes
  • Parameters: address account
  • Returns: uint256
transferfunction
function transfer(address to, uint256 value) public virtual returns (bool)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Virtual: yes
  • Parameters: address to, uint256 value
  • Returns: bool
allowancefunction
function allowance(address owner, address spender) public view virtual returns (uint256)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • State Mutability: view
  • Virtual: yes
  • Parameters: address owner, address spender
  • Returns: uint256
approvefunction
function approve(address spender, uint256 value) public virtual returns (bool)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Virtual: yes
  • Parameters: address spender, uint256 value
  • Returns: bool
transferFromfunction
function transferFrom(address from, address to, uint256 value) public virtual returns (bool)

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Virtual: yes
  • Parameters: address from, address to, uint256 value
  • Returns: bool
_mintToCapfunction
function _mintToCap() internal
  • Visibility: internal
AddMarketRatefunction
function AddMarketRate(address _a, uint256 _r) internal
  • Visibility: internal
  • Parameters: address _a, uint256 _r
_transferfunction
function _transfer(address from, address to, uint256 value) internal
  • Visibility: internal
  • Parameters: address from, address to, uint256 value
_updatefunction
function _update(address from, address to, uint256 value) internal virtual
  • Visibility: internal
  • Virtual: yes
  • Parameters: address from, address to, uint256 value
_mintfunction
function _mint(address account, uint256 value) internal
  • Visibility: internal
  • Parameters: address account, uint256 value
_approvefunction
function _approve(address owner, address spender, uint256 value) internal
  • Visibility: internal
  • Parameters: address owner, address spender, uint256 value
_approvefunction
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual
  • Visibility: internal
  • Virtual: yes
  • Parameters: address owner, address spender, uint256 value, bool emitEvent
_spendAllowancefunction
function _spendAllowance(address owner, address spender, uint256 value) internal virtual
  • Visibility: internal
  • Virtual: yes
  • Parameters: address owner, address spender, uint256 value
log10function
function log10(uint256 value) internal pure returns (uint256)
  • Visibility: internal
  • State Mutability: pure
  • Parameters: uint256 value
  • Returns: uint256
Stringfunction
function String(uint256 value) internal pure returns (string memory buffer)
  • Visibility: internal
  • State Mutability: pure
  • Parameters: uint256 value
  • Returns: string memory buffer
Hexfunction
function Hex(address account) internal pure returns (string memory)
  • Visibility: internal
  • State Mutability: pure
  • Parameters: address account
  • Returns: string memory
Hexfunction
function Hex(uint256 value) internal pure returns (string memory)
  • Visibility: internal
  • State Mutability: pure
  • Parameters: uint256 value
  • Returns: string memory
Hexfunction
function Hex(bytes32 value) internal pure returns (string memory)
  • Visibility: internal
  • State Mutability: pure
  • Parameters: bytes32 value
  • Returns: string memory
Hexfunction
function Hex(bytes memory data) internal pure returns (string memory)
  • Visibility: internal
  • State Mutability: pure
  • Parameters: bytes memory data
  • Returns: string memory

This contract inherits the members below from its parents. See each parent’s dedicated MD for full signatures, NatSpec, and semantics.

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)
  • MultiOwnable - Access control
  • VMREQ via atropaMath interface - Random number generation
  • All token contracts in the ecosystem inherit from DYSNOMIA

Enables token-to-token exchanges without external AMM. Each contract can set internal exchange rates for other tokens, allowing direct Purchase/Redeem operations.

Constructor uses Xiao.Random() % 111111 to set a randomized maximum supply, with initial mint being 10% of that maximum.

Inherits from MultiOwnable allowing multiple addresses to have administrative privileges.








Inherited functions and getters (7)
DYSNOMIA.MotzkinPrime()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA.Xiao()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA.addOwner(address newOwner)Simulate / call

A callable deployment has not been resolved for this reference.

DYSNOMIA.maxSupply()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA.owner(address cOwner)Read

A callable deployment has not been resolved for this reference.

DYSNOMIA.owner()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA.renounceOwnership(address toRemove)Simulate / call

A callable deployment has not been resolved for this reference.

The compiled ABI below is produced by solc 0.8.21 from the exact source bytes recorded in Source details. Consumers can paste it directly into ethers/web3/viem.

Click to expand JSON ABI
[
{
"inputs": [
{
"internalType": "address",
"name": "origin",
"type": "address"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "address",
"name": "what",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "DysnomiaInsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "origin",
"type": "address"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "address",
"name": "what",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "DysnomiaInsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "MarketRateNotFound",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "origin",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "what",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "origin",
"type": "address"
},
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "address",
"name": "what",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "state",
"type": "bool"
}
],
"name": "OwnershipUpdate",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_a",
"type": "address"
}
],
"name": "GetMarketRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MotzkinPrime",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_t",
"type": "address"
},
{
"internalType": "uint256",
"name": "_a",
"type": "uint256"
}
],
"name": "Purchase",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_t",
"type": "address"
},
{
"internalType": "uint256",
"name": "_a",
"type": "uint256"
}
],
"name": "Redeem",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "newName",
"type": "string"
},
{
"internalType": "string",
"name": "newSymbol",
"type": "string"
}
],
"name": "Rename",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Xiao",
"outputs": [
{
"internalType": "contract atropaMath",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "addOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "mintToCap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "cOwner",
"type": "address"
}
],
"name": "owner",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "toRemove",
"type": "address"
}
],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]