SHA
Address
Code
[
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "MathLib",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"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"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Eta",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Kappa",
"type": "uint64"
}
],
"name": "ReactionZeroError",
"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": "uint64",
"name": "_Phi",
"type": "uint64"
}
],
"name": "Adduct",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Xi",
"type": "uint64"
}
],
"name": "Avail",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Bond",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "_Beta",
"type": "uint64"
}
],
"name": "Conify",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Chi",
"type": "uint64"
}
],
"name": "Conjugate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Dynamo",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Chi",
"type": "uint64"
}
],
"name": "Form",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "_rho",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Upsilon",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Ohm",
"type": "uint64"
}
],
"name": "Fuse",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"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": [],
"name": "Polarize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_t",
"type": "address"
},
{
"internalType": "uint256",
"name": "_a",
"type": "uint256"
}
],
"name": "Purchase",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Pi",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Theta",
"type": "uint64"
}
],
"name": "React",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"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": [
{
"internalType": "uint64",
"name": "_Beta",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Epsilon",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Theta",
"type": "uint64"
}
],
"name": "Saturate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Type",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "View",
"outputs": [
{
"components": [
{
"internalType": "uint64",
"name": "Base",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Secret",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Signal",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Channel",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Contour",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Pole",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Identity",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Foundation",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Element",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Coordinate",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Charge",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Chin",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Monopole",
"type": "uint64"
}
],
"internalType": "struct Fa",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"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"
}
]// SPDX-License-Identifier: Sharia
pragma solidity ^0.8.21;
import "./01_dysnomia.sol";
import "./include/fa.sol";
contract SHA is DYSNOMIA {
string public constant Type = "SHA";
Fa private Mu;
uint64 public Dynamo;
constructor(string memory name, string memory symbol, address MathLib) DYSNOMIA(name, symbol, MathLib) {
Seed();
Tune();
Augment();
}
function Augment() internal {
mintToCap();
}
function View() public view returns(Fa memory) {
return Mu;
}
function Seed() private {
Mu.Base = Xiao.Random();
Mu.Secret = Xiao.Random();
Mu.Signal = Xiao.Random();
_mintToCap();
}
function Tune() private {
Mu.Channel = Xiao.modExp64(Mu.Base, Mu.Signal, MotzkinPrime);
_mintToCap();
}
function Fuse(uint64 _rho, uint64 Upsilon, uint64 Ohm) public onlyOwners {
Mu.Base = Upsilon;
Mu.Secret = Ohm;
Mu.Signal = _rho;
_mintToCap();
}
function Avail(uint64 Xi) public onlyOwners {
Mu.Contour = Xiao.modExp64(Xi, Mu.Secret, MotzkinPrime);
_mintToCap();
}
function Form(uint64 Chi) public onlyOwners {
Mu.Base = Xiao.modExp64(Chi, Mu.Secret, MotzkinPrime);
Tune();
_mintToCap();
}
function Polarize() public onlyOwners {
Mu.Pole = Xiao.modExp64(Mu.Base, Mu.Secret, MotzkinPrime);
_mintToCap();
}
function Conjugate(uint64 Chi) public onlyOwners {
Mu.Coordinate = Xiao.modExp64(Chi, Mu.Secret, MotzkinPrime);
_mintToCap();
}
function Conify(uint64 _Beta) public onlyOwners {
Mu.Identity = _Beta;
Mu.Foundation = Xiao.modExp64(Mu.Base, Mu.Identity, MotzkinPrime);
_mintToCap();
}
function Saturate(uint64 _Beta, uint64 Epsilon, uint64 Theta) public onlyOwners {
if(Mu.Identity == 0) {
Mu.Identity = _Beta;
Mu.Foundation = Xiao.modExp64(Mu.Base, Mu.Identity, MotzkinPrime);
_mintToCap();
}
uint64 Beta = Xiao.modExp64(Epsilon, Mu.Identity, MotzkinPrime);
uint64 Rho = Xiao.modExp64(Theta, Mu.Identity, MotzkinPrime);
uint64 Eta = Xiao.modExp64(Epsilon, Mu.Signal, MotzkinPrime);
Mu.Charge = Rho + Eta;
Mu.Chin = Beta + Eta;
Mu.Element = Beta + Mu.Charge;
Dynamo = Xiao.modExp64(Theta, Mu.Signal, MotzkinPrime);
Mu.Monopole = Xiao.modExp64(Mu.Chin, Mu.Identity, MotzkinPrime);
_mintToCap();
}
function Bond() public onlyOwners {
Dynamo = Xiao.modExp64(Mu.Base, Mu.Signal, Mu.Element);
Mu.Pole = 0;
_mintToCap();
}
function Adduct(uint64 _Phi) public returns(uint64) {
_mintToCap();
return Xiao.modExp64(_Phi, Mu.Signal, Mu.Element);
}
error ReactionZeroError(uint64 Eta, uint64 Kappa);
function React(uint64 Pi, uint64 Theta) public returns(uint64, uint64) {
uint64 Eta = Xiao.modExp64(Pi, Mu.Channel, Theta);
uint64 Kappa = Xiao.modExp64(Pi, Theta, Mu.Channel);
if(Eta == 0 || Kappa == 0) revert ReactionZeroError(Eta, Kappa);
_mintToCap();
return(Eta, Kappa);
}
}Last updated