QING¶
Overview¶
QING is the token wrapper contract that creates tradeable representations of any token with geographic positioning, access control, and chat functionality. Each QING has a unique Waat (position) in the Hecke coordinate system.
- Kind: Contract
- License: Sharia
- Solidity: ^0.8.21
- Source:
domain/dan/03_qing.sol
Inheritance Chain (C3 Linearized)¶
- self — QING
- DYSNOMIA
- MultiOwnable
Immediate Parents¶
What This Means For Players¶
Plain English Summary: QING is a venue/location - like a chatroom or marketplace you can join. Every QING wraps an existing token and gives it a physical location on the game map. You can join QINGs to chat, trade, and participate in their community. Some have cover charges, bouncers, and guest lists.
Real-World Analogy: Think of a QING like a nightclub. It has a location (Waat), a cover charge to enter, bouncers who control access, a VIP guest list, and an interior where people can chat. The club is "built on" an existing token - like how a club might be themed around a band or brand.
How It Affects Your Gameplay: - Join venues - Pay the cover charge (if any) and become a member - Chat - Send messages visible to other members - Access control - Meet the requirements: hold enough tokens, be on the guest list, or have CROWS status - Derivative QINGs (GWATs) - Players can create their own personal venues
State Variables¶
| Variable | Type | Visibility | Mutability | Initial Value | NatSpec |
|---|---|---|---|---|---|
Type |
string |
public | constant | QING |
|
Cho |
CHOINTERFACE |
public | mutable | `` | |
Asset |
DYSNOMIA |
public | mutable | `` | |
Map |
MAPINTERFACE |
public | mutable | `` | |
Waat |
uint256 |
public | mutable | `` | |
Entropy |
uint64 |
public | mutable | `` | |
BouncerDivisor |
uint16 |
public | mutable | `` | |
CoverCharge |
uint256 |
public | mutable | `` | |
NoCROWS |
bool |
public | mutable | `` | |
_staff |
mapping(address => bool) |
private | mutable | `` | |
_list |
mapping(address => uint256) |
private | mutable | `` | |
GWAT |
bool |
public | immutable | `` |
Modifiers¶
| Modifier | Parameters | NatSpec |
|---|---|---|
onlyBouncers |
(none) |
Events¶
| Event | Parameters | Anonymous | NatSpec |
|---|---|---|---|
Withdrawal |
uint64 Soul, uint64 Aura, address Token, uint256 amount | no | |
LogEvent |
string Username, uint64 Soul, uint64 Aura, string LogLine | no |
Errors¶
| Error | Parameters | NatSpec |
|---|---|---|
MarketRateCanOnlyBeIncreased |
address Contract, uint256 CurrentRate | |
TokenMaximumRate |
address Contract, uint256 MaximumRate | |
BouncerUnauthorized |
address origin, address account, address what | |
AlreadyJoined |
address UserToken | |
CoverChargeUnauthorized |
address AssetAddress, uint256 Amount | |
PayCover |
address Asset, uint256 CoverCharge | |
Forbidden |
address Asset | |
NotAdmitted |
uint64 Soul |
Constructor¶
constructor¶
constructor(uint256 Luo, address Integrative, address ChoAddress) DYSNOMIA("Mysterious Qing", "q", address(DYSNOMIA(ChoAddress).Xiao()))
- Modifiers:
DYSNOMIA("Mysterious Qing", "q", address(DYSNOMIA(ChoAddress).Xiao())) - Parameters: uint256 Luo, address Integrative, address ChoAddress
Functions¶
External & Public¶
AddMarketRate¶
- Visibility: public
- Modifiers:
onlyOwners - Parameters: address Contract, uint256 Rate
GetQing¶
- Visibility: public
- State Mutability: view
- Parameters: uint256 QingWaat
- Returns: QINGINTERFACE
Withdraw¶
- Visibility: public
- Modifiers:
onlyOwners - Parameters: address what, uint256 amount
AllowCROWS¶
- Visibility: public
- Modifiers:
onlyOwners - Parameters: bool _b
setBouncerDivisor¶
- Visibility: public
- Modifiers:
onlyBouncers - Parameters: uint16 _d
setCoverCharge¶
- Visibility: public
- Modifiers:
onlyBouncers - Parameters: uint256 _c
setStaff¶
- Visibility: public
- Modifiers:
onlyBouncers - Parameters: address _a, bool active
setGuestlist¶
- Visibility: public
- Modifiers:
onlyBouncers - Parameters: address _a
removeGuest¶
- Visibility: public
- Modifiers:
onlyBouncers - Parameters: address _a
bouncer¶
- Visibility: public
- State Mutability: view
- Parameters: address cBouncer
- Returns: bool
Join¶
- Visibility: public
- Parameters: address UserToken
Admitted¶
- Visibility: public
- State Mutability: view
- Parameters: address UserToken
- Returns: bool
Chat¶
- Visibility: public
- Parameters: LAU UserToken, string memory MSG
Internal¶
_checkBouncer¶
- Visibility: internal
- State Mutability: view
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 virtual 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 |
|---|---|
_addLibraryOwner |
function _addLibraryOwner(VOID Void, string memory what) internal |
_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 |
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 V2 - Base functionality
- CHO - User verification
- MAP - Geographic registry
Created By¶
Special Mechanisms¶
GWAT Detection¶
Bouncer Logic¶
function bouncer(address cBouncer) public view returns (bool) {
// Staff always authorized
if(_staff[cBouncer]) return true;
// CROWS holders (25+) if enabled
if(NoCROWS == false && CROWS.balanceOf(cBouncer) >= 25 * 10 ** 18)
return true;
// Large holders of wrapped asset
if(Asset.balanceOf(cBouncer) >= Asset.totalSupply() / BouncerDivisor)
return true;
// Asset owner
if(Map.hasOwner(address(Asset)))
return Asset.owner(cBouncer);
return false;
}
Cover Charge System¶
function Join(address UserToken) public {
if(CoverCharge > 0 && _list[UserToken] < block.timestamp) {
Asset.transferFrom(msg.sender, address(this), CoverCharge);
}
_list[UserToken] = block.timestamp + 1 days;
}
Chat Authorization¶
function Chat(LAU UserToken, string memory MSG) public {
if(Map.Forbidden(address(Asset))) revert Forbidden(address(Asset));
Cho.VerifyUserTokenPermissions(address(UserToken));
if(!Admitted(address(UserToken))) revert NotAdmitted(_soul);
if(CoverCharge != 0 && !(_list[address(UserToken)] > block.timestamp))
revert PayCover(address(Asset), CoverCharge);
emit LogEvent(UserToken.Username(), _soul, aura, MSG);
}
Contract Verification¶
| Property | Value |
|---|---|
| Keccak256 Hash | 0x8baee5f38fe2494460f92c8b085a971c797db64ab4c744b504c37153882d20cc |
| Source URL | https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/domain/dan/03_qing.sol |
| Hash Generated | 2026-04-17T20:48:11Z |