Skip to content

MAP

Overview

MAP is the geographic token registry that maps tokens to coordinates using the Hecke meridian system. It manages QING token creation and provides location-based lookup.

  • Inherits: DYSNOMIA
  • License: Sharia
  • Solidity: ^0.8.21

What This Means For Players

Plain English Summary: MAP is the game world map - it assigns locations to every token/venue in the game. Every QING (venue) has a unique position on the map, like a latitude and longitude. When you explore the game, you're navigating this map to find and visit different locations.

Real-World Analogy: Think of MAP like Google Maps for the Dysnomia game world. Every venue (QING) has a unique address on the map, and you can look up what's at any location. When someone creates a new venue, MAP assigns it a unique spot on the world grid.

How It Affects Your Gameplay: - Find venues - Use MAP to discover QINGs at specific coordinates - Wrap tokens - Any token can become a venue (QING) with a map location - Explore - Navigate the game world by coordinates - Forbidden tokens - Some tokens may be blocked from becoming venues

State Variables

Variable Type Visibility Description
Type string public constant "MAP"
Cho CHOINTERFACE public Reference to CHO login contract
Map HECKE public Reference to Hecke meridian contract
Offset uint256 public Meridian[0] offset value
_qings mapping(address => address) private Asset → QING mapping
_waats mapping(uint256 => QING) private Waat → QING mapping
_forbidden mapping(address => bool) private Forbidden token list
_map mapping(int256 => mapping(int256 => address)) private Lat/Lon → QING

Read Functions

GetMapQing

function GetMapQing(int256 Latitude, int256 Longitude) public view returns (QINGINTERFACE)
- Returns: QING at the specified coordinates - In Plain English: Look up what venue exists at specific map coordinates. Like searching "what's at this location?" on a map.

GetQing

function GetQing(uint256 Waat) public view returns (QING)
- Returns: QING at the specified Waat position - In Plain English: Look up a venue by its position number. Every venue has a unique Waat - this finds the venue at that position.

Forbidden

function Forbidden(address Asset) public view returns (bool)
- Returns: True if asset is forbidden (or if caller holds WITHOUT token) - In Plain English: Check if a token is blocked from becoming a venue. Some tokens may be forbidden by their owners, and WITHOUT token holders are banned from everything.

hasOwner / has

function hasOwner(address _contract) public view returns (bool)
function has(address _contract, string memory what) public view returns (bool)
- Description: Check if contract has owner() or specific function

Write Functions

New

function New(address Integrative) public returns (QING Mu)
- Access: public - Parameters: - Integrative (address): Token contract address to wrap as a QING venue - Returns: - Mu (QING): Newly created QING wrapper contract - Description: Creates a QING wrapper for an existing token, assigns it a unique map position, and registers it in the coordinate system. - Logic Flow: 1. Check not already wrapped: if(_qings[Integrative] != address(0x0)) revert QingAlreadyExists 2. Check not forbidden: if(_forbidden[Integrative]) revert ForbiddenToken 3. Check not already a QING: if(has(Integrative, "Waat()")) revert DerivativeQing 4. Generate unique Luo via CHO: Luo = Cho.Luo() * Offset 5. Deploy QING contract: Mu = new QING(Luo, Integrative, address(Cho)) 6. Copy ownership if exists: if(has(Integrative, "owner()")) Mu.addOwner(Asset.owner()) 7. Copy name if exists: Mu.Rename(Asset.name() + " QING", "q" + Asset.symbol()) 8. Register in mappings: _qings[Integrative] = address(Mu) 9. Register by Waat: _waats[Luo] = Mu 10. Add to coordinate map: addToMap(Luo, address(Mu)) 11. Add market rate and mint to cap - Computation Details: - Luo comes from CHO.Luo() which generates unique identifiers - Final Waat = Luo * Offset where Offset is Meridians[0] - Coordinates derived from Hecke.Compliment(Waat) - Side Effects: Deploys new QING contract; updates _qings, _waats, and _map mappings; triggers CHO.Luo; mints MAP tokens; emits NewQing event - In Plain English: Turn any token into a venue! Creates a QING wrapper with a unique map position derived from CHO's Luo generator. The new venue inherits the token's name (with "QING" suffix) and ownership. Anyone can visit, join, and chat at this venue.

Forbid

function Forbid(address Token, bool Disallow) public
- Access: public (but only token owner can call) - Parameters: - Token (address): Token contract to forbid/allow - Disallow (bool): True to forbid, false to allow - Description: Allows a token owner to prevent their token from being wrapped as a QING. - Logic Flow: 1. Check has owner function: if(!has(Token, "owner()")) 2. Verify caller is owner: if(!DYSNOMIA(Token).owner(msg.sender)) revert NotOwner 3. Set forbidden status: _forbidden[Token] = Disallow - Side Effects: Updates _forbidden mapping - In Plain English: Block or unblock your token from becoming a venue. Only the token owner can do this - set Disallow=true to prevent anyone from creating a QING wrapper, false to re-allow it.

Events

Event Parameters Description
NewQing Qing, Integrative, Waat New QING created

Errors

Error Parameters Description
QingAlreadyExists Token, Qing Token already has QING
DerivativeQing Integrative, Waat Cannot wrap a QING
ForbiddenToken which Token is forbidden
NotOwner what, who Not token owner

Contract Interactions

Depends On

  • DYSNOMIA - Base functionality
  • CHO - Login and Luo generation
  • Hecke - Coordinate system

Depended On By

  • WORLD - World simulation
  • QING - Token wrapper

Special Mechanisms

QING Creation

function New(address Integrative) public returns(QING Mu) {
    // Check not already wrapped
    if(_qings[Integrative] != address(0x0)) revert QingAlreadyExists(...);

    // Check not forbidden
    if(_forbidden[Integrative]) revert ForbiddenToken(Integrative);

    // Check not already a QING
    if(has(Integrative, "Waat()")) revert DerivativeQing(...);

    // Generate unique Waat
    Luo = Cho.Luo() * Offset;

    // Create QING
    Mu = new QING(Luo, Integrative, address(Cho));

    // Copy ownership and name
    if(has(Integrative, "owner()")) Mu.addOwner(Asset.owner());
    if(has(Integrative, "name()") && has(Integrative, "symbol()"))
        Mu.Rename(Asset.name() + " QING", "q" + Asset.symbol());

    // Register
    _qings[Integrative] = address(Mu);
    _waats[Luo] = Mu;
    addToMap(Luo, address(Mu));
}

WITHOUT Token Ban

Holders of the WITHOUT token are automatically forbidden from all operations:

if(DYSNOMIA(WITHOUTContract).balanceOf(tx.origin) > 0) return true;

Geographic Registration

function addToMap(uint256 Waat, address Qing) internal {
    (int256 Longitude, int256 Latitude) = Map.Compliment(Waat);
    assert(_map[Latitude][Longitude] == address(0x0));
    _map[Latitude][Longitude] = Qing;
}

Contract Verification

Property Value
Keccak256 Hash 0x05d26d96111aa3a1eb6ece52243ede25e33939b6cb23cc2d31ab8c8acc0df830
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/domain/map.sol
Hash Generated 2026-02-08T00:29:08Z