Skip to content

SHA

Overview

SHA is a cryptographic state token that implements modular exponentiation-based transformations. Each SHA instance maintains internal state (Fa) that can be manipulated through various operations to produce deterministic but unpredictable outputs.

  • Kind: Contract
  • License: Sharia
  • Solidity: ^0.8.21
  • Source: 02_sha.sol

Inheritance Chain (C3 Linearized)

  1. selfSHA
  2. DYSNOMIA
  3. MultiOwnable

Immediate Parents

What This Means For Players

Plain English Summary: SHA is your secret key generator. It creates unique cryptographic codes that prove things belong to you. When you join the game, a SHA token is created for you that generates your unique identity fingerprints - no one else can have the same codes as you.

Real-World Analogy: Think of SHA like a personal stamp-making machine. Each stamp you create is unique to you, and when you stamp something, everyone knows it came from you. The machine uses complex math to ensure no one can forge your stamp.

How It Affects Your Gameplay: - Identity proof - Your SHA generates codes that prove actions came from you - Secure pairing - SHA tokens work in pairs (Rod/Cone) to create unbreakable links - Reaction mechanics - When you interact with the game, your SHA "reacts" to produce unique outputs

State Variables

Variable Type Visibility Mutability Initial Value NatSpec
Type string public constant SHA
Mu Fa private mutable ``
Dynamo uint64 public mutable ``

Errors

Error Parameters NatSpec
ReactionZeroError uint64 Eta, uint64 Kappa

Constructor

constructor

constructor(string memory name, string memory symbol, address MathLib) DYSNOMIA(name, symbol, MathLib)
  • Modifiers: DYSNOMIA(name, symbol, MathLib)
  • Parameters: string memory name, string memory symbol, address MathLib

Functions

External & Public

View

function View() public view returns (Fa memory)
  • Visibility: public
  • State Mutability: view
  • Returns: Fa memory

Fuse

function Fuse(uint64 _rho, uint64 Upsilon, uint64 Ohm) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 _rho, uint64 Upsilon, uint64 Ohm

Avail

function Avail(uint64 Xi) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 Xi

Form

function Form(uint64 Chi) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 Chi

Polarize

function Polarize() public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners

Conjugate

function Conjugate(uint64 Chi) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 Chi

Conify

function Conify(uint64 _Beta) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 _Beta

Saturate

function Saturate(uint64 _Beta, uint64 Epsilon, uint64 Theta) public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 _Beta, uint64 Epsilon, uint64 Theta

Bond

function Bond() public onlyOwners
  • Visibility: public
  • Modifiers: onlyOwners

Adduct

function Adduct(uint64 _Phi) public returns (uint64)
  • Visibility: public
  • Parameters: uint64 _Phi
  • Returns: uint64

React

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

Internal

Augment

function Augment() internal
  • Visibility: internal

Private

Seed

function Seed() private
  • Visibility: private

Tune

function Tune() private
  • Visibility: private

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 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
_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
log10 function log10(uint256 value) internal pure returns (uint256)
String function String(uint256 value) internal pure returns (string memory buffer)
Hex function Hex(address account) internal pure returns (string memory)

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

  • DYSNOMIA - Base token functionality
  • VMREQ - Random number generation

Depended On By

Special Mechanisms

Seed/Tune/Augment Pattern

Constructor follows three-phase initialization: 1. Seed: Generate random Base, Secret, Signal 2. Tune: Compute Channel = Base^Signal mod MotzkinPrime 3. Augment: Mint initial tokens

Pairing Protocol

SHA tokens are designed to work in pairs (Rod/Cone in SHIO). The Conjugate, Conify, and Saturate operations exchange state between paired tokens to establish cryptographic binding.

Reaction Mechanism

The React function produces two outputs that should be symmetric when called on paired SHA tokens with cross-referenced Channels, enabling verification of proper pairing.








Contract Verification

Property Value
Keccak256 Hash 0x519c4e414616a2d1eff8a9b74e4d6f60486771223dc0519482f6314ec4d65b15
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/02_sha.sol
Hash Generated 2026-04-17T20:48:07Z