From 8cbef8458d786ef22cee0d5b3f152e12b3ee335b Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 9 Apr 2019 09:48:00 +0200 Subject: [PATCH 1/3] Rename postinstall script Prevents it being run when contracts are installed as dependency. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 078d906..0358c70 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "test" }, "scripts": { - "postinstall": "./scripts/every-app.sh \"npm install\"", + "install-all": "./scripts/every-app.sh \"npm install\"", "build-json": "npm run compile-contracts && node ./scripts/build-json.js", "repl": "truffle exec scripts/repl.js", "seeds": "truffle exec scripts/seeds.js", From 096a9f3cea3922ee835d422df8bf255937b53cc2 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 9 Apr 2019 12:45:09 +0200 Subject: [PATCH 2/3] Update README for install-all script --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff71ad3..fee7713 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Each of the aragon apps are separate packages: $ cd apps/[app] $ npm install -this will be automatically executed after you run `npm install` through a `postinstall` hook. +You can use `npm run install-all` to install all app dependencies at once. ### Local development chain From f5564fa92328d2430b5b2c6f19ae9e1d1d1aa8ab Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 9 Apr 2019 12:45:20 +0200 Subject: [PATCH 3/3] Formatting, whitespace --- README.md | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index fee7713..b6971b8 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,13 @@ # Kredits Contracts -This repository contains the Solidity smart contracts organized as [Aragon](https://hack.aragon.org/) -apps and JavaScript API wrapper for [Kosmos Kredits](https://wiki.kosmos.org/Kredits). +This repository contains the Solidity smart contracts organized as +[Aragon](https://hack.aragon.org/) apps and JavaScript API wrapper for [Kosmos +Kredits](https://wiki.kosmos.org/Kredits). -It is based on [aragonOS](https://hack.aragon.org/docs/aragonos-intro.html) and -follows the aragonOS conventions. -Aragon itself uses the [Truffle framework](http://truffleframework.com/) for some things. +It is based on [aragonOS](https://hack.aragon.org/docs/aragonos-intro.html) and +follows the aragonOS conventions. Aragon itself uses the [Truffle +framework](http://truffleframework.com/) for some things. ## Development @@ -26,20 +27,20 @@ You can use `npm run install-all` to install all app dependencies at once. ### Local development chain -For local development it is recommended to use -[ganache](http://truffleframework.com/ganache/) to run a local development +For local development it is recommended to use +[ganache](http://truffleframework.com/ganache/) to run a local development chain. Using the ganache simulator no full Ethereum node is required. -We use the default aragon-cli devchain command to confgure and run a local +We use the default aragon-cli devchain command to confgure and run a local development ganache. $ npm run devchain (or aragon devchain --port 7545) -To clear/reset the chain use: +To clear/reset the chain use: $ npm run devchain -- --reset (or aragon devchain --port 7545 --reset) -We default to port 7545 for development to not get in conflict with the default +We default to port 7545 for development to not get in conflict with the default Ethereum RPC port. ### Bootstrap @@ -49,7 +50,6 @@ Ethereum RPC port. $ npm run devchain $ ipfs daemon - 2. Deploy each app to the devchain (make sure you've run `npm install` for every app - see installation) @@ -60,7 +60,7 @@ Ethereum RPC port. $ npm run deploy:kit $ npm run deploy:dao -4. Execute seeds to create demo contributors, contributons, etc. (optional) +4. Execute seeds to create demo contributors, contributons, etc. (optional) $ npm run seeds @@ -73,15 +73,15 @@ If you want to reset your local setup: ## Contract architecture -Contracts are organized in independent apps (see `/apps`) and are developed -and deployed independently. Each app has a version and can be "installed" -on the Kredits DAO independently. +Contracts are organized in independent apps (see `/apps`) and are developed and +deployed independently. Each app has a version and can be "installed" on the +Kredits DAO independently. ![](docs/kredits-diagram.png) -A DAO can be deployed using the `scripts/deploy-kit.js` script or with the -`npm run deploy:dao` command. This deploys a new Kredits DAO, installs -the latest app versions and sets the required permissions. +A DAO can be deployed using the `scripts/deploy-kit.js` script or with the `npm +run deploy:dao` command. This deploys a new Kredits DAO, installs the latest +app versions and sets the required permissions. See each app in `/apps/*` for details. @@ -163,7 +163,7 @@ Creates and configures a new DAO instance. or $ npm run deploy:dao -KreditsKit address is load from `lib/addresses/KreditsKit.json` or can be +KreditsKit address is load from `lib/addresses/KreditsKit.json` or can be configured through the `KREDITS_KIT` environment variable. ### deploy-apps.sh @@ -174,14 +174,12 @@ Runs `npm install` for each app and publishes a new version. or $ npm run deploy:apps - ## ACL / Permissions - ## Upgradeable contracts -We use aragonOS for upgradeablity of the different contracts. -Refer to the [aragonOS upgradeablity documentation](https://hack.aragon.org/docs/upgradeability-intro) +We use aragonOS for upgradeablity of the different contracts. Refer to the +[aragonOS upgradeablity documentation](https://hack.aragon.org/docs/upgradeability-intro) for more details. ### Example