DYSNOMIA
0xa2f5740e…fee7c6Source 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 |
Overview
Section titled “Overview”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
Inheritance Chain (C3 Linearized)
Section titled “Inheritance Chain (C3 Linearized)”- self — DYSNOMIA
- MultiOwnable
Immediate Parents
Section titled “Immediate Parents”What This Means For Players
Section titled “What This Means For Players”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
State Variables
Section titled “State Variables”| 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 | `` |
Events
Section titled “Events”| Event | Parameters | Anonymous | NatSpec |
|---|---|---|---|
Transfer |
address indexed from, address indexed to, uint256 value | no | |
Approval |
address indexed owner, address indexed spender, uint256 value | no |
Errors
Section titled “Errors”| 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 |
Constructor
Section titled “Constructor”constructor
Section titled “constructor”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
Functions
Section titled “Functions”External & Public
Section titled “External & Public”Rename
Section titled “Rename”Renamefunction
function Rename(string memory newName, string memory newSymbol) public onlyOwnersA callable deployment has not been resolved for this reference.
- Visibility: public
- Modifiers:
onlyOwners - Parameters: string memory newName, string memory newSymbol
mintToCap
Section titled “mintToCap”mintToCapfunction
function mintToCap() public onlyOwnersA callable deployment has not been resolved for this reference.
- Visibility: public
- Modifiers:
onlyOwners
GetMarketRate
Section titled “GetMarketRate”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
Purchase
Section titled “Purchase”Purchasefunction
function Purchase(address _t, uint256 _a) publicA callable deployment has not been resolved for this reference.
- Visibility: public
- Parameters: address _t, uint256 _a
Redeem
Section titled “Redeem”Redeemfunction
function Redeem(address _t, uint256 _a) publicA 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
symbol
Section titled “symbol”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
decimals
Section titled “decimals”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
totalSupply
Section titled “totalSupply”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
balanceOf
Section titled “balanceOf”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
transfer
Section titled “transfer”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
allowance
Section titled “allowance”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
approve
Section titled “approve”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
transferFrom
Section titled “transferFrom”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
Internal
Section titled “Internal”_mintToCap
Section titled “_mintToCap”_mintToCapfunction
function _mintToCap() internal- Visibility: internal
AddMarketRate
Section titled “AddMarketRate”AddMarketRatefunction
function AddMarketRate(address _a, uint256 _r) internal- Visibility: internal
- Parameters: address _a, uint256 _r
_transfer
Section titled “_transfer”_transferfunction
function _transfer(address from, address to, uint256 value) internal- Visibility: internal
- Parameters: address from, address to, uint256 value
_update
Section titled “_update”_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
_approve
Section titled “_approve”_approvefunction
function _approve(address owner, address spender, uint256 value) internal- Visibility: internal
- Parameters: address owner, address spender, uint256 value
_approve
Section titled “_approve”_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
_spendAllowance
Section titled “_spendAllowance”_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
String
Section titled “String”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
Inherited Members
Section titled “Inherited Members”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) |
Contract Interactions
Section titled “Contract Interactions”Depends On
Section titled “Depends On”- MultiOwnable - Access control
- VMREQ via atropaMath interface - Random number generation
Depended On By
Section titled “Depended On By”- All token contracts in the ecosystem inherit from DYSNOMIA
Special Mechanisms
Section titled “Special Mechanisms”Market Rate System
Section titled “Market Rate System”Enables token-to-token exchanges without external AMM. Each contract can set internal exchange rates for other tokens, allowing direct Purchase/Redeem operations.
Random Max Supply
Section titled “Random Max Supply”Constructor uses Xiao.Random() % 111111 to set a randomized maximum supply, with initial mint being 10% of that maximum.
Multi-Owner Governance
Section titled “Multi-Owner Governance”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.
Compiled ABI
Section titled “Compiled ABI”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" }]