Skip to content
Technical Reference

ATTRIBUTE

Contract address0x529e3e15Da19c7c828f9CCE13C53F7031a30ec7c
Hash-verified 0xf999af65…44efa1
Source details
Property Value
Keccak256 Hash 0xf999af65b81710496e2a8c6cfba3d2794539b54bd0fe4481b4b56b5e5a44efa1
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/58607494f7741b80525953e4a85bc99e66fd20fc/solidity/dysnomia/lib/attribute.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 0x522d4908669a2deff9280c1eb135519ef89ebb4115f0902b6a937f4d382e071f
Compilation Closure Files 17
Hash Generated 2026-09-14T19:34:19Z

ATTRIBUTE is the user attribute storage library. It manages key-value attributes for users identified by Soul ID, supporting both generic attributes and address/Bao aliases.

  • Kind: Contract
  • License: Sharia
  • Solidity: ^0.8.21
  • Source: lib/attribute.sol
  1. selfATTRIBUTE
  2. DYSNOMIA
  3. MultiOwnable

Plain English Summary: ATTRIBUTE is your player profile storage - it saves your username, aliases, and other settings. When you set your username or create nicknames for addresses, ATTRIBUTE stores them permanently linked to your Soul ID.

Real-World Analogy: Think of ATTRIBUTE like the settings menu in a video game. You can set your display name, create shortcuts for frequently-used addresses (like saving contacts in your phone), and the game remembers all your preferences.

How It Affects Your Gameplay:

  • Username storage - Your display name is stored here
  • Address aliases - Give nicknames to addresses like “My Wallet” or “Bob’s LAU”
  • Soul-linked - All data is tied to your Soul ID, not your wallet address
  • Length limits - Usernames max 64 chars, aliases max 32 chars
Variable Type Visibility Mutability Initial Value NatSpec
Type string public constant LibAttribute
Void VOID public mutable ``
_attributes mapping(string => uint8) private mutable ``
_userAttributes mapping(uint64 => mapping(string => string)) private mutable ``
_userGrades mapping(uint64 => mapping(address => string)) private mutable ``
Error Parameters NatSpec
MaximumLength string value, uint256 length, uint8 maxLength
AttributeNotFound string name
AliasNotFound address name
constructorconstructor
constructor(address VoidAddress) DYSNOMIA(unicode"CHATLOG LibAttribute", unicode"LibAttribute", address(DYSNOMIA(VoidAddress).Xiao()))
  • Modifiers: DYSNOMIA(unicode"CHATLOG LibAttribute", unicode"LibAttribute", address(DYSNOMIA(VoidAddress).Xiao()))
  • Parameters: address VoidAddress
addAttributefunction
function addAttribute(string memory name, uint8 maxLength) public onlyOwners

Open this function to load its call form.

  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: string memory name, uint8 maxLength
removeAttributefunction
function removeAttribute(string memory name) public onlyOwners

Open this function to load its call form.

  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: string memory name
Setfunction
function Set(uint64 Soul, string memory name, string memory value) public onlyOwners

Open this function to load its call form.

  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 Soul, string memory name, string memory value
Getfunction
function Get(uint64 Soul, string memory name) public view onlyOwners returns (string memory _a)

Open this function to load its call form.

  • Visibility: public
  • State Mutability: view
  • Modifiers: onlyOwners
  • Parameters: uint64 Soul, string memory name
  • Returns: string memory _a
Aliasfunction
function Alias(uint64 Soul, address name, string memory value) public onlyOwners

Open this function to load its call form.

  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 Soul, address name, string memory value
Aliasfunction
function Alias(uint64 Soul, address name) public view onlyOwners returns (string memory _a)

Open this function to load its call form.

  • Visibility: public
  • State Mutability: view
  • Modifiers: onlyOwners
  • Parameters: uint64 Soul, address name
  • Returns: string memory _a
Aliasfunction
function Alias(uint64 Soul, Bao memory entity, string memory value) public onlyOwners

Open this function to load its call form.

  • Visibility: public
  • Modifiers: onlyOwners
  • Parameters: uint64 Soul, Bao memory entity, string memory value
Aliasfunction
function Alias(uint64 Soul, Bao memory entity) public view onlyOwners returns (string memory _a)

Open this function to load its call form.

  • Visibility: public
  • State Mutability: view
  • Modifiers: onlyOwners
  • Parameters: uint64 Soul, Bao memory entity
  • Returns: string memory _a

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
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

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)
  • VOID library registry as “libattribute”
  • VOID - User attribute operations

Only registered attribute names can be used:

if(!_attributes[name]) revert AttributeNotFound(name);
  • Attributes: 64 character maximum
  • Aliases: 32 character maximum
if(bytes(value).length > 64) revert MaximumLength(64, value);
if(bytes(value).length > 32) revert MaximumLength(32, value);

Constructor registers:

  • “Username” - User’s display name
  • “TestAttribute” - For testing

All data is indexed by Soul ID (uint64), not by address:

_userAttributes[Soul][name] = value;
_userGrades[Soul][address] = alias;
// Via VOID (user context)
void.SetAttribute("Username", "Alice");
string memory name = void.GetAttribute("Username");
void.Alias(someAddress, "Bob's Wallet");
// Direct (admin context)
attribute.addAttribute("CustomField");
attribute.Set(soul, "CustomField", "CustomValue");
_attributes:
├── "Username" → true
├── "TestAttribute" → true
└── "CustomField" → true
_userAttributes:
├── Soul123:
│ ├── "Username" → "Alice"
│ └── "TestAttribute" → "hello"
└── Soul456:
└── "Username" → "Bob"
_userGrades:
├── Soul123:
│ └── 0x1234... → "My Wallet"
└── Soul456:
└── 0xABCD... → "Treasury"





Inherited functions and getters (23)
ATTRIBUTE.GetMarketRate(address _a)Read

Open this function to load its call form.

ATTRIBUTE.MotzkinPrime()Read

Open this function to load its call form.

ATTRIBUTE.Purchase(address _t, uint256 _a)Simulate / call

Open this function to load its call form.

ATTRIBUTE.Redeem(address _t, uint256 _a)Simulate / call

Open this function to load its call form.

ATTRIBUTE.Rename(string newName, string newSymbol)Simulate / call

Open this function to load its call form.

ATTRIBUTE.Type()Read

Open this function to load its call form.

ATTRIBUTE.Void()Read

Open this function to load its call form.

ATTRIBUTE.Xiao()Read

Open this function to load its call form.

ATTRIBUTE.addOwner(address newOwner)Simulate / call

Open this function to load its call form.

ATTRIBUTE.allowance(address owner, address spender)Read

Open this function to load its call form.

ATTRIBUTE.approve(address spender, uint256 value)Simulate / call

Open this function to load its call form.

ATTRIBUTE.balanceOf(address account)Read

Open this function to load its call form.

ATTRIBUTE.decimals()Read

Open this function to load its call form.

ATTRIBUTE.maxSupply()Read

Open this function to load its call form.

ATTRIBUTE.mintToCap()Simulate / call

Open this function to load its call form.

ATTRIBUTE.name()Read

Open this function to load its call form.

ATTRIBUTE.owner(address cOwner)Read

Open this function to load its call form.

ATTRIBUTE.owner()Read

Open this function to load its call form.

ATTRIBUTE.renounceOwnership(address toRemove)Simulate / call

Open this function to load its call form.

ATTRIBUTE.symbol()Read

Open this function to load its call form.

ATTRIBUTE.totalSupply()Read

Open this function to load its call form.

ATTRIBUTE.transfer(address to, uint256 value)Simulate / call

Open this function to load its call form.

ATTRIBUTE.transferFrom(address from, address to, uint256 value)Simulate / call

Open this function to load its call form.

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": "VoidAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "name",
"type": "address"
}
],
"name": "AliasNotFound",
"type": "error"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
}
],
"name": "AttributeNotFound",
"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": "address",
"name": "asset",
"type": "address"
}
],
"name": "MarketRateNotFound",
"type": "error"
},
{
"inputs": [
{
"internalType": "string",
"name": "value",
"type": "string"
},
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "maxLength",
"type": "uint8"
}
],
"name": "MaximumLength",
"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": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"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": "entity",
"type": "tuple"
}
],
"name": "Alias",
"outputs": [
{
"internalType": "string",
"name": "_a",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"internalType": "address",
"name": "name",
"type": "address"
}
],
"name": "Alias",
"outputs": [
{
"internalType": "string",
"name": "_a",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"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": "entity",
"type": "tuple"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"name": "Alias",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"internalType": "address",
"name": "name",
"type": "address"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"name": "Alias",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"internalType": "string",
"name": "name",
"type": "string"
}
],
"name": "Get",
"outputs": [
{
"internalType": "string",
"name": "_a",
"type": "string"
}
],
"stateMutability": "view",
"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": [
{
"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": "uint64",
"name": "Soul",
"type": "uint64"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"name": "Set",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Type",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "Void",
"outputs": [
{
"internalType": "contract VOID",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "Xiao",
"outputs": [
{
"internalType": "contract atropaMath",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "uint8",
"name": "maxLength",
"type": "uint8"
}
],
"name": "addAttribute",
"outputs": [],
"stateMutability": "nonpayable",
"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": "string",
"name": "name",
"type": "string"
}
],
"name": "removeAttribute",
"outputs": [],
"stateMutability": "nonpayable",
"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"
}
]