CHATLOG Void
Last updated
Last updated
0x965B0d74591bF30327075A247C47dBf487dCff08
[
{
"inputs": [
{
"internalType": "address",
"name": "SiuAddress",
"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": "string",
"name": "Xi",
"type": "string"
}
],
"name": "InvalidLogXi",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "MarketRateNotFound",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "User",
"type": "address"
}
],
"name": "NoUserEntry",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "User",
"type": "address"
}
],
"name": "NoUserName",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "Shio",
"type": "address"
},
{
"internalType": "address",
"name": "Requestor",
"type": "address"
}
],
"name": "NotShioOwner",
"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": "address",
"name": "User",
"type": "address"
}
],
"name": "UserAlreadyCreated",
"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": "string",
"name": "name",
"type": "string"
},
{
"internalType": "address",
"name": "_a",
"type": "address"
}
],
"name": "AddLibrary",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "name",
"type": "address"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"name": "Alias",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "Phi",
"type": "address"
},
{
"internalType": "contract SHA",
"name": "Mu",
"type": "address"
},
{
"internalType": "uint64",
"name": "Xi",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Pi",
"type": "uint64"
},
{
"internalType": "contract SHIO",
"name": "Shio",
"type": "address"
},
{
"internalType": "uint64",
"name": "Ring",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omicron",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omega",
"type": "uint64"
}
],
"internalType": "struct Bao",
"name": "Theta",
"type": "tuple"
}
],
"name": "Alias",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "Phi",
"type": "address"
},
{
"internalType": "contract SHA",
"name": "Mu",
"type": "address"
},
{
"internalType": "uint64",
"name": "Xi",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Pi",
"type": "uint64"
},
{
"internalType": "contract SHIO",
"name": "Shio",
"type": "address"
},
{
"internalType": "uint64",
"name": "Ring",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omicron",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omega",
"type": "uint64"
}
],
"internalType": "struct Bao",
"name": "Theta",
"type": "tuple"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"name": "Alias",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "name",
"type": "address"
}
],
"name": "Alias",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "chatline",
"type": "string"
}
],
"name": "Chat",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Enter",
"outputs": [
{
"internalType": "uint64[3]",
"name": "Saat",
"type": "uint64[3]"
},
{
"components": [
{
"internalType": "address",
"name": "Phi",
"type": "address"
},
{
"internalType": "contract SHA",
"name": "Mu",
"type": "address"
},
{
"internalType": "uint64",
"name": "Xi",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Pi",
"type": "uint64"
},
{
"internalType": "contract SHIO",
"name": "Shio",
"type": "address"
},
{
"internalType": "uint64",
"name": "Ring",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omicron",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omega",
"type": "uint64"
}
],
"internalType": "struct Bao",
"name": "On",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
}
],
"name": "Enter",
"outputs": [
{
"internalType": "uint64[3]",
"name": "Saat",
"type": "uint64[3]"
},
{
"components": [
{
"internalType": "address",
"name": "Phi",
"type": "address"
},
{
"internalType": "contract SHA",
"name": "Mu",
"type": "address"
},
{
"internalType": "uint64",
"name": "Xi",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Pi",
"type": "uint64"
},
{
"internalType": "contract SHIO",
"name": "Shio",
"type": "address"
},
{
"internalType": "uint64",
"name": "Ring",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omicron",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "Omega",
"type": "uint64"
}
],
"internalType": "struct Bao",
"name": "On",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
}
],
"name": "GetAttribute",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
}
],
"name": "GetLibraryAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_a",
"type": "address"
}
],
"name": "GetMarketRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "Sigma",
"type": "address"
},
{
"internalType": "string",
"name": "LogLine",
"type": "string"
}
],
"name": "Log",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "LogLine",
"type": "string"
}
],
"name": "Log",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Sigma",
"type": "uint64"
},
{
"internalType": "string",
"name": "LogLine",
"type": "string"
}
],
"name": "Log",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "MotzkinPrime",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "Nu",
"outputs": [
{
"internalType": "contract SIU",
"name": "",
"type": "address"
}
],
"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": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"name": "SetAttribute",
"outputs": [],
"stateMutability": "nonpayable",
"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": [
{
"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/09b_siuinterface.sol";
import "./interfaces/libattribute.sol";
contract VOID is DYSNOMIA {
string public constant Type = "VOID";
SIU public Nu;
mapping(address => uint64) private _activeUsers;
mapping(string => bytes32) private _kecNames;
mapping(string => address) private _libraries;
constructor(address SiuAddress) DYSNOMIA(unicode"CHATLOG Void", unicode"VOID", address(DYSNOMIA(SiuAddress).Xiao())) {
Nu = SIU(SiuAddress);
Nu.addOwner(address(this));
Nu.Psi().addOwner(address(this));
Nu.Psi().Mu().addOwner(address(this));
Nu.Psi().Mu().Tau().addOwner(address(this));
Nu.Psi().Mu().Tau().Upsilon().addOwner(address(this));
Nu.Psi().Mu().Tau().Upsilon().Eta().addOwner(address(this));
GetBySoul(ZHOU(Nu.Psi().Mu().Tau()).Xi()).Shio.addOwner(address(this));
GetBySoul(YANG(Nu.Psi()).Rho().Lai.Xi).Shio.addOwner(address(this));
_kecNames["ZHOU"] = keccak256("ZHOU");
_kecNames["YANG"] = keccak256("YANG");
Augment();
}
function Augment() internal {
AddMarketRate(address(Nu), 1 * 10 ** decimals());
_mintToCap();
}
function GetLibraryAddress(string memory name) public view returns (address) {
return _libraries[name];
}
function AddLibrary(string memory name, address _a) public onlyOwners {
_libraries[name] = _a;
_mintToCap();
}
function Log(string memory LogLine) public {
uint64 Soul = _activeUsers[msg.sender];
GetBySoul(Soul).Shio.Log(Soul, Nu.Aura(), LogLine);
_mintToCap();
}
function Log(uint64 Sigma, string memory LogLine) public onlyOwners {
GetBySoul(Sigma).Shio.Log(Sigma, Nu.Aura(), LogLine);
_mintToCap();
}
function Log(address Sigma, string memory LogLine) public onlyOwners {
uint64 Soul = _activeUsers[Sigma];
GetBySoul(_activeUsers[Sigma]).Shio.Log(Soul, Nu.Aura(), LogLine);
_mintToCap();
}
error InvalidLogXi(string Xi);
function Log(string memory Xi, string memory LogLine) internal {
uint64 Soul = _activeUsers[msg.sender];
bytes32 XiKec = keccak256(bytes(Xi));
if(XiKec == _kecNames["ZHOU"]) {
GetBySoul(ZHOU(Nu.Psi().Mu().Tau()).Xi()).Shio.Log(Soul, Nu.Aura(), LogLine);
} else if(XiKec == _kecNames["YANG"]) {
GetBySoul(YANG(Nu.Psi()).Rho().Lai.Xi).Shio.Log(Soul, Nu.Aura(), LogLine);
} else revert InvalidLogXi(Xi);
_mintToCap();
}
error NoUserEntry(address User);
error NoUserName(address User);
function Chat(string memory chatline) public {
if(_activeUsers[msg.sender] == 0) revert NoUserEntry(msg.sender);
string memory Username = GetAttribute("Username");
if(bytes(Username).length < 1) revert NoUserName(msg.sender);
Log("ZHOU", string.concat("<", Username, "> ", chatline));
_mintToCap();
}
function SetAttribute(string memory name, string memory value) public {
if(_activeUsers[msg.sender] == 0) revert NoUserEntry(msg.sender);
LIBATTRIBUTE(_libraries["libattribute"]).Set(_activeUsers[msg.sender], name, value);
_mintToCap();
}
function GetAttribute(string memory name) public view returns (string memory) {
return LIBATTRIBUTE(_libraries["libattribute"]).Get(_activeUsers[msg.sender], name);
}
function Alias(address name, string memory value) public {
if(_activeUsers[msg.sender] == 0) revert NoUserEntry(msg.sender);
LIBATTRIBUTE(_libraries["libattribute"]).Alias(_activeUsers[msg.sender], name, value);
_mintToCap();
}
function Alias(address name) public view returns (string memory) {
return LIBATTRIBUTE(_libraries["libattribute"]).Alias(_activeUsers[msg.sender], name);
}
function Alias(Bao memory Theta, string memory value) public {
if(_activeUsers[msg.sender] == 0) revert NoUserEntry(msg.sender);
LIBATTRIBUTE(_libraries["libattribute"]).Alias(_activeUsers[msg.sender], Theta, value);
_mintToCap();
}
function Alias(Bao memory Theta) public view returns (string memory) {
return LIBATTRIBUTE(_libraries["libattribute"]).Alias(_activeUsers[msg.sender], Theta);
}
function GetBySoul(uint64 Sigma) internal returns(Bao memory On) {
return Nu.Psi().Mu().Tau().Upsilon().GetRodByIdx(Sigma);
}
error NotShioOwner(address Shio, address Requestor);
function Enter() public returns(uint64[3] memory Saat, Bao memory On) {
if(_activeUsers[msg.sender] == 0) revert NoUserEntry(msg.sender);
Saat[0] = Nu.Psi().Pole(2);
Saat[1] = _activeUsers[msg.sender];
Saat[2] = Nu.Aura();
On = GetBySoul(Saat[1]);
if(!On.Shio.owner(msg.sender)) revert NotShioOwner(address(On.Shio), msg.sender);
_mintToCap();
}
error UserAlreadyCreated(address User);
function Enter(string memory name, string memory symbol) public returns(uint64[3] memory Saat, Bao memory On) {
if(_activeUsers[msg.sender] != 0) revert UserAlreadyCreated(msg.sender);
(Saat, On) = Nu.Miu(name, symbol);
On.Shio.addOwner(msg.sender);
if(!On.Shio.owner(msg.sender)) revert NotShioOwner(address(On.Shio), msg.sender);
_activeUsers[msg.sender] = Saat[1];
_mintToCap();
}
}
View the source code in Solidity here.