Mithraeum API Docs
This section explains game structure, existing game assets and contract interactions
Last updated
This section explains game structure, existing game assets and contract interactions
Last updated
Scheme above roughly represents how smart contracts placed in the system.
Contains references to standalone contracts (initialized once when world is deployed) as well as produced eras during gameplay.
Contains game configuration constants related to game balance.
Contains geography information.
Standalone ERC721 & ERC1155Receiver. Used to link settlement with Nft.
Standalone ERC1155. Specifies distribution rules. Each building has own distribution rules.
Contains saved necessary data in between era destruction's.
Contains addresses which represent current game tokens such as resources, units, workers, prosperity; Also contains placed settlements and activated regions in current era.
Custom ERC-20 token, interacts with world when transfer happens related to world assets and gives the world an ability to modify balances whenever necessary (in such events as productions, robbery, interacting with workers or units markets, etc.). Represents FOOD, WOOD, ORE, INGOT tokens.
Custom ERC-20 token, only certain world asset able to have this token, such as 'Settlement', 'Building', 'WorkersPool'. Interacts with world when transfer happens related to world assets and gives the world an ability to modify balances whenever necessary (in such events as set from/to production building, interacting with workers pools, etc.).
Custom ERC-20 token, only certain world asset able to have this token, such as 'Siege', 'Army', 'UnitsPool'. Interacts with world when transfer happens related to world assets and gives the world an ability to modify balances whenever necessary (in such events as minting occultists, interacting with units pools, etc.).
Custom ERC-20 token, only certain world asset able to have this token, such as 'Settlement', 'WorkersPool'. Gives the world an ability to modify balances whenever necessary (in such events as replenishing treasury, interacting with workers pools, etc.). Even though this is ERC-20 token real balance of it can be negative.
Central hub of user assets. Banner id specified in this contract will be considered as settlement owner. Contains settlements' assets, such as buildings, siege, army. Also methods to manage governors and settlement.
Contains settlement market, addresses to related workers and units pools and parameters which are related to these pools. Also contains method to spawn cultists.
Modified settlement entity, which doesn't have an owner. Main purpose of it is containing the army of occultists in each zone.
Contains data about current position, siege, battle, movement and method to manage/interact with current army.
Settlement market related to its zone. Contains parameters and method to provide settlement market capabilities. Bless token is the currency you use in this market.
Workers pool which related to its zone. Contains parameters and method to provide workers pool capabilities. Settlement's prosperity is the currency you use in this pool.
Units pool which related to its zone. Contains parameters and method to provide units pool capabilities. Ingot is the currency you use in this pool.
Abstract entity of production building which contains common production state and logic related to production. Every production building inherits this element.
Contains data about current siege, besieging armies. Also contains method to manage siege, such as stake/unstake units, building robbery, army liquidation, etc.
Contains data about current battle, joined armies. Also contains methods to interact with battle, such as joining, finishing battle, exiting from battle.