Primodium Source
Primodium contracts will be open-sourced in their entirety once the game design and balancing are finalized. Before then, the source code for Primodium tables and interfaces for systems are available, with their role in developing world extensions described in the following pages.
All Primodium contracts conform to the open MUD standard (opens in a new tab) for large-scale Ethereum applications, details of which can be found in the Primodium contracts guide and the MUD documentation (opens in a new tab).
In our development process, we also added supplements to the standard that improved Primodium's internal design and developer experience. Our commitment to open source means that these improvements will be shared as development progresses, such as Primodium world extensions and prototype generation scripts.
All contract sources are located in the
@primodiumxyz/contracts
(opens in a new tab) package.
Quickstart
Contract Tables:
@primodiumxyz/contracts/src/codegen/tables
(opens in a new tab): Generated Solidity contracts for each table.@primodiumxyz/contracts/mud.config.ts
(opens in a new tab): Configuration file that defines each table compliant with the open MUD standard.
Contract Systems:
@primodiumxyz/contracts/src/codegen/world
(opens in a new tab): Generated Solidity interfaces for each publicly-accessible system.
Contract Prototype Table Data:
@primodiumxyz/contracts/src/codegen/prototypes/AllPrototype.sol
(opens in a new tab): Data populated in prototype tables that store game configuration data such as resource requirements and building costs.
Contract Prototype Generation Scripts:
@primodiumxyz/contracts/src/codegen/scripts/CreateTerrain.sol
(opens in a new tab): Foundry script (opens in a new tab) for populating terrain ore distribution.