Skip to content

pynchmeister/0xmons-contracts-new

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0xmons Smart Contracts

NOW:

This repository is used as a monorepo for all smart contracts developed by me (0xmons). It previously only housed contracts used for the initial 0xmons NFT ecosystem, which is detailed below.

PREVIOUSLY:

Architecture

The main contract is MonMinter.sol, which is the actual ERC-721 implementation. Using AccessControl, we can assign different contracts to be monster minters.

IMonMinter.sol is the minter interface, which is exposed to contracts with minting privileges, allowing them to mint and modify the on-chain data of monsters.

The default Mon struct is in UsesMon.sol. Contracts which want to access on-chain information about a monster inherit from this contract to use the struct.

MonCreatorInstance is a parent class that abstracts out some similarities among contracts which want to mint monsters.

MonStaker.sol is the main staking contract. Users can add and remove their staked XMON to generate Doom, which is then used to redeem monsters.

MonSpawner.sol is the spawning contract, which takes in two monsters and spawns a new monster.

The underlying token is XMON.sol, a token with a fee on transfer, settable from 1 to 10%.

Tests

There is a comprehensive set of tests in test/tests.js. Test coverage is close to 100%, and the comments explain the cases being tested for. See coverage/.

About

Smart contracts for 0xmons.xyz

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 38.8%
  • Solidity 30.3%
  • JavaScript 28.9%
  • CSS 2.0%