Skip to content
Technical Reference

DYSNOMIA

Hash-verified 0xb89798bc…e46817
Source details
Property Value
Keccak256 Hash 0xb89798bc29755c806444016434774f935310e4bccdc7019797aeed65ffe46817
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/58607494f7741b80525953e4a85bc99e66fd20fc/solidity/dysnomia/01_dysnomia_v2.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 0x49828add53f84ded7b3558fabd6ce4ae8f74deae58fa0aa54d70e3218a9a3280
Compilation Closure Files 19
Hash Generated 2026-09-14T19:33:32Z

DYSNOMIA V2 is an alternate implementation of the base token with minor internal differences. It’s functionally equivalent to DYSNOMIA but used by specific domain contracts.

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

Plain English Summary: DYSNOMIA V2 is essentially the same as DYSNOMIA V1 - it’s the foundation for game tokens. The “V2” just means it’s a slightly newer version used by the domain (game-specific) contracts. For players, there’s no practical difference between tokens using V1 or V2.

Real-World Analogy: Think of V1 and V2 like two editions of the same board game rule book. The rules are the same, but one was printed for the “core” game and one for the “expansion packs” (domain contracts). Your gameplay experience is identical either way.

How It Affects Your Gameplay:

  • No visible difference - V1 and V2 tokens work identically from a player perspective
  • Domain tokens use this - Game-specific tokens like H2O and VITUS are built on V2

The V2 contract has the same public interface as V1 but with internal naming differences:

  • Uses _addMarketRate instead of AddMarketRate for internal market rate setting
  • Used primarily by domain contracts that were developed later in the project
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 virtual onlyOwners

A callable deployment has not been resolved for this reference.

  • Visibility: public
  • Virtual: yes
  • 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
_addLibraryOwnerfunction
function _addLibraryOwner(VOID Void, string memory what) internal
  • Visibility: internal
  • Parameters: VOID Void, string memory what
_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

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)
// V1 pattern (core contracts)
contract MyToken is DYSNOMIA {
constructor() DYSNOMIA("Name", "SYM", mathAddr) {
AddMarketRate(someToken, rate);
}
}
// V2 pattern (domain contracts)
contract MyDomainToken is DYSNOMIA {
constructor() DYSNOMIA("Name", "SYM", mathAddr) {
_addMarketRate(someToken, rate);
}
}

Both versions are functionally interchangeable. The existence of two versions appears to be an artifact of development history rather than a deliberate design decision.






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

A callable deployment has not been resolved for this reference.

DYSNOMIA_V2.Xiao()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA_V2.addOwner(address newOwner)Simulate / call

A callable deployment has not been resolved for this reference.

DYSNOMIA_V2.maxSupply()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA_V2.owner(address cOwner)Read

A callable deployment has not been resolved for this reference.

DYSNOMIA_V2.owner()Read

A callable deployment has not been resolved for this reference.

DYSNOMIA_V2.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"
}
]