SHIO
Every LAU created also creates a new SHIO
Address
0xEEbFCdFD97Ac6F0f86DC724e774760c73C498f3dCode
[
{
"inputs": [
{
"internalType": "address",
"name": "RodAddress",
"type": "address"
},
{
"internalType": "address",
"name": "ConeAddress",
"type": "address"
},
{
"internalType": "address",
"name": "MathLib",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Barn",
"type": "uint64"
}
],
"name": "BarnInequality",
"type": "error"
},
{
"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": "uint64",
"name": "Manifold",
"type": "uint64"
}
],
"name": "ManifoldInequality",
"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": "ReactionInequalityError",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Eta",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Kappa",
"type": "uint64"
}
],
"name": "ReactionZeroError",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Ring",
"type": "uint64"
}
],
"name": "RingInequality",
"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": false,
"internalType": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"indexed": false,
"internalType": "uint64",
"name": "Aura",
"type": "uint64"
},
{
"indexed": false,
"internalType": "string",
"name": "LogLine",
"type": "string"
}
],
"name": "LogEvent",
"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": [],
"name": "Cone",
"outputs": [
{
"internalType": "contract SHA",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Xi",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Alpha",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Beta",
"type": "uint64"
}
],
"name": "Generate",
"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": "Isolate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Isomerize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Aura",
"type": "uint64"
},
{
"internalType": "string",
"name": "LogLine",
"type": "string"
}
],
"name": "Log",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Magnetize",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Manifold",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "Monopole",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"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": "uint64",
"name": "Pi",
"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": [],
"name": "Rho",
"outputs": [
{
"internalType": "contract SHA",
"name": "Rod",
"type": "address"
},
{
"internalType": "contract SHA",
"name": "Cone",
"type": "address"
},
{
"internalType": "uint64",
"name": "Barn",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "Rod",
"outputs": [
{
"internalType": "contract SHA",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "Type",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"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 "./interfaces/02b_shainterface.sol";
struct Shao {
SHA Rod;
SHA Cone;
uint64 Barn;
}
contract SHIO is DYSNOMIA {
string public constant Type = "SHIO";
Shao public Rho;
uint64 public Manifold;
uint64 public Monopole;
event LogEvent(uint64 Soul, uint64 Aura, string LogLine);
constructor(address RodAddress, address ConeAddress, address MathLib) DYSNOMIA(unicode"CHATLOG Shio", unicode"SHIO", MathLib) {
Rho.Rod = SHA(RodAddress);
Rho.Cone = SHA(ConeAddress);
Augment();
}
function Augment() internal {
_mintToCap();
}
function Log(uint64 Soul, uint64 Aura, string memory LogLine) public onlyOwners {
emit LogEvent(Soul, Aura, LogLine);
}
function Rod() public view returns(SHA) {
return Rho.Rod;
}
function Cone() public view returns(SHA) {
return Rho.Cone;
}
function ConductorGenerate(uint64 Xi) private {
Rho.Rod.Avail(Xi);
Rho.Cone.Avail(Xi);
Rho.Rod.Form(Rho.Cone.View().Contour);
Rho.Cone.Form(Rho.Rod.View().Contour);
Rho.Rod.Polarize();
Rho.Cone.Polarize();
_mintToCap();
}
function Generate(uint64 Xi, uint64 Alpha, uint64 Beta) public onlyOwners {
ConductorGenerate(Xi);
Rho.Rod.Conjugate(Rho.Cone.View().Pole);
Rho.Cone.Conjugate(Rho.Rod.View().Pole);
Rho.Cone.Conify(Alpha);
Rho.Rod.Saturate(Alpha, Rho.Cone.View().Foundation, Rho.Cone.View().Channel);
Rho.Cone.Saturate(Beta, Rho.Rod.View().Foundation, Rho.Rod.View().Channel);
_mintToCap();
}
function Isomerize() public onlyOwners {
Rho.Rod.Bond();
_mintToCap();
}
function Isolate() public onlyOwners {
Rho.Cone.Bond();
_mintToCap();
}
error ManifoldInequality(uint64 Manifold);
error RingInequality(uint64 Ring);
error BarnInequality(uint64 Barn);
function Magnetize() public onlyOwners returns(uint64) {
Manifold = Rho.Rod.Adduct(Rho.Cone.Dynamo());
if(Manifold != Rho.Cone.Adduct(Rho.Rod.Dynamo())) revert ManifoldInequality(Manifold);
uint64 Ring = Xiao.modExp64(Rho.Rod.View().Coordinate, Manifold, Rho.Rod.View().Element);
if(Ring != Xiao.modExp64(Rho.Cone.View().Coordinate, Manifold, Rho.Cone.View().Element)) revert RingInequality(Ring);
Rho.Barn = Xiao.modExp64(Ring, Manifold, Rho.Rod.View().Element);
if(Rho.Barn != Xiao.modExp64(Ring, Manifold, Rho.Cone.View().Element)) revert BarnInequality(Rho.Barn);
Monopole = Xiao.modExp64(Rho.Rod.View().Chin, Rho.Cone.View().Chin, MotzkinPrime);
_mintToCap();
Rho.Rod.mintToCap();
Rho.Cone.mintToCap();
return Ring;
}
error ReactionZeroError(uint64 Eta, uint64 Kappa);
error ReactionInequalityError(uint64 Eta, uint64 Kappa);
function React(uint64 Pi) public returns(uint64, uint64) {
Pi = Pi ^ Monopole;
(uint64 Eta, uint64 Kappa) = Rho.Rod.React(Pi, Rho.Cone.View().Channel);
(uint64 Omicron, uint64 Omega) = Rho.Cone.React(Pi, Rho.Rod.View().Channel);
if((Omicron != Kappa || Omega != Eta)) revert ReactionInequalityError(Eta, Kappa);
if(Omega == 0 || Omicron == 0) revert ReactionZeroError(Eta, Kappa);
mintToCap();
return(Omicron, Omega);
}
}Last updated