Giter Site home page Giter Site logo

raid-guild / character-sheets-contracts Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 16.92 MB

Contracts for the CharacterSheets suite of contracts by raid guild

Home Page: https://play.raidguild.org/

License: MIT License

Julia 2.28% Solidity 87.61% Makefile 0.42% Shell 7.95% JavaScript 1.74%
erc1155 erc6551 erc721 reputation-system roleplaying-framework

character-sheets-contracts's Introduction

Character Sheets

Author: MrDeadCe11

This is a combination of an ERC721 base contract the Character sheets, and an ERC1155 Experience and items. These allow you to mint a erc721 token that will also deploy an ERC6551 token bound account for that token. This acts as a base profile image that can be assigned any erc1155 token on top of that. the items and experience can be give out by the game master which is assigned upon the creation of the contracts.

You will need a copy of Foundry installed before proceeding. See the installation guide for details.

Setup

git clone https://github.com/MrDeadCe11/character-sheets
cd character-sheets
forge install

Run Tests

forge test

Update Gas Snapshots

forge snapshot

Deployment

make deploy-contracts network=<sepolia/gnosis>

Verify Deployed Contracts

make verify-contracts network=<sepolia/gnosis>

Create new characterSheets and sub contracts

To use the character Sheets factory you will need the following addresses available to input into the script

  • A list of address that you would like to give administrator privileges to.
  • the address of the Moloch Dao who's members will be eligible to use the protocol
  • the base image uri for the character sheets NFT contract
  • the base METADATA uri for the character sheets nft contract
  • the base image URI for the Experience and Items ERC1155 contract
  • the base image URI for the Classes contract

The bash script will ask for this info during the creation of the contracts you can either paste them directly into the CLI or add them to the addresses.json file before running the script.

make create-sheets network=<sepolia/gnosis>

Basic contract interactions

once new contracts are deployed you can...

  • Make a new Class
  • Make a new Item
  • Roll a character sheet
make execute network=<sepolia/gnosis>

Pumpedlunch's Hats Module addresses: from https://github.com/pumpedlunch/HatsEligibilityModules/releases

  • Gnosis
  • AddressHatsEligiblityModule: 0x9AaF0df5657b634131784523F4F5e83459c61986
  • ERC721HatsEligibilityModule: 0x6bAa65D3E024D8ebA717085691dd8A985e9F267E

character-sheets-contracts's People

Contributors

dan13ram avatar devtooligan avatar gakonst avatar mrdeadce11 avatar transmissions11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

arielsugden

character-sheets-contracts's Issues

Add ability for a character from one game to join another game

  • Being added to an additional game requires passing the game's existing eligibility check
  • If they pass, they would receive a player hat, and their character would receive a character hat
  • Note that XP, classes, and items between games will remain separate

Burn XP only for emergencies

  • Remove all burn XP calls, except for functions that are meant to be used as an emergency
  • Emergency class burning should include burning class-XP (Refer #32)

Fix item distribution when used for crafting

if certain items are used for crafting then they are transferred to the items manager.
Then if the player dismantled those crafter items there is a possibility of the user obtaining item that amounts to more than the distribution.

Support class specific XP

  • Add a address => classId => xpBalance mapping to the class contract, so that XP can be associated with a particular class
  • A mintXP function should be added to the class contract, which updates the balance of the class-XP mapping, and also mints the existing ERC-20 XP
  • If class-based XP passes a level threshold, an additional class NFT should be minted (thus leveling up that class)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.