GithubHelp home page GithubHelp logo

contracts's Introduction

Guildly Contracts

An implementation for having guilds for on-chain games on Starknet.

Disclaimer: This code is not intended for production use and has not been audited or tested thoroughly

Description

The purpose of this project is to create a multi owner guild where players can share the game assets between eachother. The guild is token gated, a certificate is minted to identify roles, tokens you own etc.

Instructions

In order to create a guild follow these steps:

  • Deploy a guild contract from the Guild Manager (Factory contract).
  • Initialize permissions of the guild, this is setting some contracts addresses and selectors which the guild can interact with.
  • Add members to your guild, choosing their access roles.
  • Deposit some tokens into the guild.
  • Members of the guild can interact with functions permitted, while also using tokens withiin it.

Testing

Some tests have been created in snforge. You can run scarb test to run them in the main directory.

TODO

  • Add proxy testing
  • Bit mapped roles
  • Reward distribution

contracts's People

Contributors

devpeek avatar starknetdev avatar dependabot[bot] avatar

Stargazers

rati.eth avatar 1ln9 avatar pinokey avatar  avatar nicabar avatar INSOMNIAK avatar Loaf avatar Thomas Marchand avatar

Watchers

James Cloos avatar nicabar avatar  avatar INSOMNIAK avatar

contracts's Issues

Feature: Pay ETH to join guild

This feature request is to add the ability to pay or receive ETH when joining a guild. For example:

(1) Depositor pays ETH to join a guild
I'll pay you to play my NFTs for me

(2) Depositor charges ETH to join a guild
You can use my NFTs if you pay me

If this feature is enabled, Guildly could spawn an ecosystem of people paying (or being paid) for their NFT to join a guild. New business models become possible.

Feature: Timelock deposits

This feature request is to add the ability to lock NFTs into a guild for period of time. Time could be in terms of days/hours/minutes or in terms of blocks (i.e. locked until blockheight X). The Depositor and Recipient agree on the timeframe when setting up the guild, or they can specify 'no timeframe' and the NFT can be withdrawn at any time.

Use case: Our guild agrees to pay a Depositor for use of his weapon NFT for a week. Without a timelock, the Depositor could withdraw from the guild as soon as he receives payment.

Use case: Suppose a player agrees to level-up a Depositor's character NFT in exchange for 50% of gold earned in the game. Gold is paid out only when the character hits level 10. Without a timelock, the Depositor could monitor the character's progress on-chain and withdraw when they observe the player reaches level 9, then do the final level themselves and collect all the gold. The player would've done the work without any reward.

Feature: Role permissions

When forming a Guild, request the ability to set broad permissions for use of deposited NFTs:

  1. Guilds where the depositor gets no control
  2. Guilds where the depositor and Guild can both control

This feature would open up new use cases for forming a Guild.

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.