DYSNOMIA
0xb89798bc…e46817Source 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 |
Overview
Section titled “Overview”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
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 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
Differences from V1
Section titled “Differences from V1”The V2 contract has the same public interface as V1 but with internal naming differences:
- Uses
_addMarketRateinstead ofAddMarketRatefor internal market rate setting - Used primarily by domain contracts that were developed later in the project
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 virtual onlyOwnersA callable deployment has not been resolved for this reference.
- Visibility: public
- Virtual: yes
- 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”_addLibraryOwner
Section titled “_addLibraryOwner”_addLibraryOwnerfunction
function _addLibraryOwner(VOID Void, string memory what) internal- Visibility: internal
- Parameters: VOID Void, string memory what
_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
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
Depended On By
Section titled “Depended On By”- Domain contracts in
/domain/ - Library contracts in
/lib/ - Hecke
- STRINGLIB
- COREREACTIONSLIB
Usage Pattern
Section titled “Usage Pattern”// 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.
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" }]