Smart Contracts

Relics of the Crypt, implemented as the Relic contract is an ERC721 NFT with an attribute system built on top. The supply and attribute distribution is fixed and can be determined from the token number.

The NFT is designed to be composable with all attributes exposed to other contracts and all meta-data generated on-chain so it cannot be tampered with.

The order and place of Provenance are only known at the point of minting and stored on chain at that point. This means minting is handled by a second type of contract: a Relic Minter.

Relic Minter is an interface defined in the Relics of the Crypt smart contract. In order to mint NFTs a contract that implements the interface must be created and deployed. The address of a Relic Minter implementation can then be added as a whitelisted minter in Relic which will allow to mint Relics. The Relic Minter needs to provide Order and Provenance as part of the mint process.

Dungeon is the game smart contract of Chapter 1. The dungeon attributes and scoring mechanics are all handled her, providing visibility to the game logic. It is implemented as a Relic Minter so it can award the Relics with an Order that matches the Dungeon and a Provenance of "Chapter One" .

Last updated