Moonstream helps you manage all aspects of your decentralized applications, from whitelisting to authorization to monitoring to product analytics.
 
 
 
 
 
Go to file
Neeraj Kashyap 1a22f304bc Updated main README, changed "checklists/" -> "operations/" 2021-12-22 16:25:39 -08:00
.github/workflows test -> lint 2021-12-18 09:03:17 -08:00
contracts Deployed Terminus diamond to Mumbai testnet 2021-12-22 12:39:34 -08:00
dao Added pool authorizations for separate addresses 2021-12-22 12:10:32 -08:00
operations Updated main README, changed "checklists/" -> "operations/" 2021-12-22 16:25:39 -08:00
.gitattributes Initiated brownie project 2021-12-11 18:46:57 -08:00
.gitignore moonworm-generated Python interface for diamond contracts 2021-12-11 18:56:19 -08:00
LICENSE Initial commit 2021-12-11 18:41:34 -08:00
README.md Updated main README, changed "checklists/" -> "operations/" 2021-12-22 16:25:39 -08:00
brownie-config.yaml Updated comments in Diamond contracts code 2021-12-11 18:53:12 -08:00
setup.py Added payment token functionality to TerminusFacet 2021-12-19 04:47:24 -08:00
test.sh Added poolCapacity to Terminus 2021-12-21 11:48:02 -08:00

README.md

dao

Moonstream DAO

Deployments

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

Development environment

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

Finally, install the dependencies and developer dependencies for dao:

pip install -e ".[dev]"

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.

Development workflow

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 modify the TerminusFacet contract, you would then run this command:

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

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"
    ]
}