diff --git a/README.md b/README.md index eb2eb30..de11259 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,67 @@ # dao Moonstream DAO +## Deployments + +You can find the addresses for all Moonstream DAO contracts on our [`operations`](./operations/README.md) page. + ## Development environment +### Preparing your development environment + +Moonstream DAO is built with Solidity, Python, and shell scripts. + +We use [`brownie`](https://github.com/eth-brownie/brownie) to build our smart contracts, deploy them, +and perform operations on them. + +We use [`moonworm`](https://github.com/bugout-dev/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: + +```bash +python3 -m venv .dao +``` + +Then make sure that this new environment is active. If you used `venv` as above: + +```bash +source .dao/bin/activate +``` + +Finally, install the dependencies and developer dependencies for `dao`: + +```bash +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: + +```bash +moonworm generate-brownie -p . -o dao -n "" +``` + +For example, if you modify the `TerminusFacet` contract, you would then run this command: + +```bash +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: diff --git a/checklists/README.md b/operations/README.md similarity index 91% rename from checklists/README.md rename to operations/README.md index bf94116..5074d65 100644 --- a/checklists/README.md +++ b/operations/README.md @@ -1,6 +1,6 @@ -# Moonstream DAO checklists +# Moonstream DAO operations -These checklists represent operations performed against live Moonstream DAO contracts on public +These documents and checklists represent operations performed against live Moonstream DAO contracts on public blockchains. Unless otherwise specified, all operations are executed from the `main` branch of this repository. diff --git a/checklists/moonstream-deploy-mumbai-20211218-1633.md b/operations/moonstream-deploy-mumbai-20211218-1633.md similarity index 100% rename from checklists/moonstream-deploy-mumbai-20211218-1633.md rename to operations/moonstream-deploy-mumbai-20211218-1633.md diff --git a/checklists/moonstream-update-mumbai-20211221-1912.md b/operations/moonstream-update-mumbai-20211221-1912.md similarity index 100% rename from checklists/moonstream-update-mumbai-20211221-1912.md rename to operations/moonstream-update-mumbai-20211221-1912.md diff --git a/checklists/templates/diamond-deploy.md b/operations/templates/diamond-deploy.md similarity index 100% rename from checklists/templates/diamond-deploy.md rename to operations/templates/diamond-deploy.md diff --git a/checklists/templates/moonstream-deploy.md b/operations/templates/moonstream-deploy.md similarity index 100% rename from checklists/templates/moonstream-deploy.md rename to operations/templates/moonstream-deploy.md diff --git a/checklists/templates/moonstream-update.md b/operations/templates/moonstream-update.md similarity index 100% rename from checklists/templates/moonstream-update.md rename to operations/templates/moonstream-update.md diff --git a/checklists/templates/terminus-deploy.md b/operations/templates/terminus-deploy.md similarity index 100% rename from checklists/templates/terminus-deploy.md rename to operations/templates/terminus-deploy.md diff --git a/checklists/templates/terminus-setup.md b/operations/templates/terminus-setup.md similarity index 100% rename from checklists/templates/terminus-setup.md rename to operations/templates/terminus-setup.md diff --git a/checklists/terminus-deploy-mumbai-20211222-2028.md b/operations/terminus-deploy-mumbai-20211222-2028.md similarity index 100% rename from checklists/terminus-deploy-mumbai-20211222-2028.md rename to operations/terminus-deploy-mumbai-20211222-2028.md diff --git a/checklists/terminus-setup-20211222-2049.md b/operations/terminus-setup-20211222-2049.md similarity index 100% rename from checklists/terminus-setup-20211222-2049.md rename to operations/terminus-setup-20211222-2049.md