Giter Club home page Giter Club logo

governance's Introduction

Decentraland

# Decentralized Autonomous Organization

The governance hub for Decentraland. Create and vote on proposals that help shape the future of the metaverse.

preview

Setup

Node version

use node 12.22.7

environment setup

create a copy of .env.example and name it as .env.development

  cp .env.example .env.development

to know more about this file see the documentation

if you are running this project locally you only need to check the following environment variables:

  • CONNECTION_STRING: make sure it is point to a valid database
  • COMMITTEE_ADDRESSES: list of eth addresses separated by , that will be able to enact finished proposals
  • GATSBY_SNAPSHOT_SPACE: a snapshot space where the proposal will be published
  • SNAPSHOT_PRIVATE_KEY, GATSBY_SNAPSHOT_ADDRESS: a pair address/key with permissions to publish at that snapshot space
  • DISCOURSE_API_KEY: the api key use to publish the proposals on the forum
  • ALCHEMY_API_KEY: an alchemy api key to check the voting power

setup the required voting power to pass

The minimum amount of voting power require to pass a proposal of each type it's defined in these variables, if they are not defined or are not numbers 0 will be used instead

  GATSBY_VOTING_POWER_TO_PASS_GRANT=0
  GATSBY_VOTING_POWER_TO_PASS_CATALYST=0
  GATSBY_VOTING_POWER_TO_PASS_BAN_NAME=0
  GATSBY_VOTING_POWER_TO_PASS_POI=0
  GATSBY_VOTING_POWER_TO_PASS_POLL=0

database setup

check if you have postgres installed

brew list

if you don't, install it (don't forget to brew update)

brew install postgres

start postgresql

brew services start postgresql

you can run this to check if everything is ok

createdb `whoami` 

inside psql run create database snapshot

user your user:pwd for the connection string, it should look like this:

postgres://usr:pwd@localhost:5432/snapshot

once you have a CONNECTION_STRING you can setup you database tables using the following command

npm run migrate up

if migrations are not running, or get stuck, please check that you are using node v12

Run Tests

to run the tests you can do

npm test

or create a run configuration in your IDE with jest --no-cache --no-watchman --runInBand

Also, you can try adding the --verbose option.

The --runInBand parameter runs the tests in a single thread, which is usually faster, but you can try without it and see what works best for you.

Run

once you setup this project you can start it using the following command

  npm start

Note 1: this project run over https, if it is your first time you might need to run it with sudo

Note 2: you can disabled https removing the --https flag in the develop script of your package.json

the app should be running at https://localhost:8000/

Project's structure

You can find a full documentation about the project's structure in the decentraland-gatsby repository

back and front ends

this project runs gatsby as front-end and a nodejs server as back-end both connected through a proxy

routes

front-end routes are defined using gatsby routes + gatsby-plugin-intl, you can find each page in the src/pages directory

back-end routes are defined using express you can find each route in src/entities/{Entity}/routes.ts and those are imported ar src/server.ts

About proposals statuses

  • Proposals are created in pending, and automatically passed to active
  • After a voting period of 1 week, they are automatically marked as finished, passed, or rejected, depending on the kind of proposal and of the voting results.
  • If proposal is in finished status, a committee user can pass/reject it, with a comment.
  • Once passed, a proposal can be enacted by a committee user, with a comment.

Copyright & License

This repository is protected with a standard Apache 2 license. See the terms and conditions in the LICENSE file.

governance's People

Contributors

2fd avatar nachomazzara avatar yemel avatar 0xgabi avatar eordano avatar fedemolina86 avatar oliviel avatar

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.