Moonstream helps you manage all aspects of your decentralized applications, from whitelisting to authorization to monitoring to product analytics.
 
 
 
 
 
Go to file
Neeraj Kashyap 1ff0632c72
Update README.md
2023-08-21 08:54:06 -07:00
.github/workflows
contracts TerminusInitializer "init" method must be called by Diamond owner 2023-02-17 11:03:45 -08:00
dao
docs
operations Added Voucher contract for customer f3bc... 2023-02-23 22:18:14 -08:00
pages/faucet
scripts
whitepapers
.gitattributes
.gitignore
LICENSE
README.md Update README.md 2023-08-21 08:54:06 -07:00
brownie-config.yaml
setup.py
test.sh

README.md

dao

Moonstream DAO

NOTE: All important code in this repository has been moved to https://github.com/moonstream-to/web3

Decentralizing Moonstream

Moonstream makes tools which help people build, manage, and maintain their blockchain economies.

Moonstream's off-chain infrastructure is currently hosted and managed by the team at Moonstream.to (https://moonstream.to). We run our own blockchain nodes (currently Ethereum and Polygon), and perform all Moonstream operations through these nodes.

The coming years will bring an explosion of decentralized applications with a presence on multiple blockchains. We aim to bring the value of Moonstream to every major blockchain, and to do so in a truly decentralized manner. No other approach will scale to tens and eventually hundreds of supported blockchains.

Moonstream DAO represents this decentralization. The DAO will reward participants who contribute:

  1. Blockchain node time
  2. Crawler time
  3. Crawler code
  4. Storage for the Moonstream databases
  5. Publicity for Moonstream
  6. Documentation
  7. Moonstream token liquidity

Rewards will be distributed as a share of revenue, represented in Moonstream platform tokens.

As strong believers in decentralization, all our code is already open source and freely licensed (Apache 2.0 and MIT): https://github.com/bugout-dev.

Architecture and deployments

The Moonstream platform token

This is an ERC20 token that represents the value that Moonstream provides our customers, and the value Moonstream participants provide to the DAO.

Terminus

The Terminus whitepaper

This is a decentralized authorization platform, which we use to manage permissions in the Moonstream DAO and our customers use for a variety of use cases, including whitelisting their token sales and representing in-game achievements for on-chain games.

You can find the addresses for all Moonstream DAO contracts on our operations page.

Development

Preparing your development environment

Moonstream DAO is built with Solidity, Python, and shell scripts.

We use brownie to build our smart contracts, deploy them, and perform operations on them.

We use moonworm to generate Python interfaces to our smart contracts from their ABIs.

To set up an environment in which you can develop on Moonstream DAO, first create a Python3 environment.

Using the built in venv module:

python3 -m venv .dao

Then make sure that this new environment is active. If you used venv as above:

source .dao/bin/activate

Install the Python dependencies and developer dependencies for dao:

pip install -e ".[dev]"

Install the Solidity dependencies for Moonstream DAO smart contracts:

brownie pm install OpenZeppelin/openzeppelin-contracts@4.3.2

Compiling the smart contracts

brownie compile

Generating interfaces to the smart contracts

We use moonworm to generate command-line and Python interfaces to our smart contracts.

Every time you add, remove, or modify an external or public method from a Solidity smart contract in this repository, make sure to regenerate its Python interface.

You can do this by activating your Python development environment and running the following command from the repository root:

moonworm generate-brownie -p . -o dao -n "<name of Solidity contract you modified>"

For example, if you modified the TerminusFacet contract, you would then run this command:

moonworm generate-brownie -p . -o dao -n TerminusFacet

Tests

To run unit tests, run: ./test.sh

Before you do this, you must make sure that a Python environment is available in your shell and that you have installed the development dependencies in this environment.

VSCode setup

If you are using the Solidity extension in VSCode, merge the following snippet into your settings.json:

{
    "solidity.remappings": [
        "@openzeppelin-contracts/=<path to your home directory>/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.3.2"
    ]
}