Update README.md

This commit is contained in:
alexm-status 2018-04-26 11:55:34 -07:00 committed by GitHub
parent 2330aa4fd0
commit 6db39af737
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 30 deletions

View File

@ -1,7 +1,7 @@
# Status Open Bounty # Status Open Bounty
[![Riot Chat Badge](https://img.shields.io/badge/join%20%23openbounty-riot-green.svg)](https://chat.status.im/#/room/#openbounty:status.im) [![Riot Chat Badge](https://img.shields.io/badge/join%20%23openbounty-riot-green.svg)](https://chat.status.im/#/room/#openbounty:status.im)
Allows you to set bounties for Github issues, paid out in Ether or any ERC-20 token. Allows you to set bounties for GitHub issues, paid out in Ether or any ERC-20 token.
More information: More information:
https://wiki.status.im/Status_Open_Bounty https://wiki.status.im/Status_Open_Bounty
@ -31,7 +31,7 @@ You will need [Leiningen](https://github.com/technomancy/leiningen) 2.0 or above
### PostgreSQL ### PostgreSQL
Make sure you install [PostgreSQL](https://www.postgresql.org/) and properly set it up: Install [PostgreSQL](https://www.postgresql.org/), and set it up properly:
``` ```
psql postgres -c "CREATE USER commiteth WITH PASSWORD 'commiteth';" psql postgres -c "CREATE USER commiteth WITH PASSWORD 'commiteth';"
@ -40,51 +40,51 @@ psql postgres -c "CREATE DATABASE commiteth;"
## Application config ## Application config
Make sure to create `/config-dev.edn` and populate it correctly, which is based on `env/dev/resources/config.edn`. Description of config fields is given below: Create `/config-dev.edn`, and populate it correctly, according to `env/dev/resources/config.edn`. The config fields are described below:
Key | Description Key | Description
--- | --- --- | ---
dev | Currently specifies whether Swagger UI endpoints should be added to routes dev | Currently specifies whether Swagger UI endpoints should be added to routes
port | HTTP port for the Ring web app port | HTTP port for the Ring web app
dev-login | Local development only. Set it to GitHub name of your dev user in order to login into the system bypassing OAuth. `server-address` has to be then correspondingly set to your localhost address. dev-login | Local development only. Set it to the GitHub name of your dev user in order to log in to the system and to bypass OAuth. Following this, set `server-address` according to your localhost address.
nrepl-port | nREPL port for development nrepl-port | nREPL port for development
jdbc-database-url | PostgreSQL database URL. For instance, URL to local db would be `jdbc:postgresql://localhost/commiteth?user=commiteth&password=commiteth` jdbc-database-url | PostgreSQL database URL; for instance, the URL to the local db would be `jdbc:postgresql://localhost/commiteth?user=commiteth&password=commiteth`
server-address | URL and port of local server that can be resolved from public internet. It will be used as a redirect URI during GitHub OAuth authorization process server-address | The URL and port of the local server that can be resolved from public internet. It will be used as a redirect URI during GitHub OAuth authorization process.
eth-account | Ethereum account ID for the bot eth-account | Ethereum account ID for the bot
eth-password | Ethereum account password for the bot eth-password | Ethereum account password for the bot
eth-rpc-url | RPC URL to Ethereum node, e.g. Geth. Either local or remote eth-rpc-url | RPC URL to the Ethereum node, e.g. Geth. Either local or remote
eth-wallet-file | Location of wallet file. If Geth is run with the parameters as given below, it will reside under `$HOME/.ropsten/keystore` eth-wallet-file | Location of the wallet file. If Geth is run with the parameters specified below, it will reside under `$HOME/.ropsten/keystore`.
offline-signing | Specifies whether to sign transactions locally before sending. Default is true. Set to false when connecting to local Geth node that unlocks accounts offline-signing | Specifies whether to sign transactions locally before sending. Default is true. Set to false when connecting to the local Geth node that unlocks accounts.
tokenreg-base-format | Should be set to `:status` tokenreg-base-format | Should be set to `:status`
github-client-id | Related to OAuth. Copied from GitHub account Settings->Developer settings->OAuth Apps github-client-id | Related to OAuth. Copied from the GitHub account: Settings -> Developer settings -> OAuth Apps
github-client-secret | Related to OAuth. Copied from GitHub account Settings->Developer settings->OAuth Apps github-client-secret | Related to OAuth. Copied from theGitHub account: Settings -> Developer settings -> OAuth Apps
github-user | GitHub username for bot account. It is used for posting bounty comments github-user | GitHub username for a bot account. It is used for posting bounty comments.
github-password | GitHub password for bot account github-password | GitHub password for a bot account.
webhook-secret | Secret string to be used when creating a GitHub App webhook-secret | Secret string to be used when creating a GitHub App
user-whitelist | Set of GitHub user/org IDs to be whitelisted. E.g. `#{"status-im" "your_org"}` user-whitelist | Set of GitHub user/org IDs to be whitelisted. E.g. `#{"status-im" "your_org"}`
testnet-token-data | Token data map, useful if there are Geth connectivity problems testnet-token-data | Token data map; useful if there are Geth connectivity problems
## GitHub integration ## GitHub integration
Open Bounty uses both OAuth App and GitHub App integration. Open Bounty uses both OAuth App and GitHub App integration.
### OAuth App ### OAuth App
Follow the steps [here](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/). Specify the value of `:server-address` as "Homepage URL", and `:server-address` + `/callback` as "Authorization callback URL". Be sure to copy Client ID and Client Secret values in the config file. Follow the steps [here](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/). Specify the value of `:server-address` as "Homepage URL", and `:server-address` + `/callback` as "Authorization callback URL". Be sure to copy the Client ID and Client Secret values in the config file.
### GitHub App ### GitHub App
Follow the steps [here](https://developer.github.com/apps/building-github-apps/creating-a-github-app/). Be sure to specify `:server-address` + `/webhook-app` as "Webhook URL", and `:webhook-secret` as "Webhook Secret". Follow the steps [here](https://developer.github.com/apps/building-github-apps/creating-a-github-app/). Be sure to specify `:server-address` + `/webhook-app` as "Webhook URL", and `:webhook-secret` as "Webhook Secret".
## Contracts ## Contracts
All information related to development of OpenBounty smart contracts can be found in [`contracts/`](/contracts/) All information related to development of OpenBounty smart contracts can be found in [`contracts/`](/contracts/).
## Running ## Running
### Ethereum node ### Ethereum node
There are two options for connecting to an Ethereum node: either run a local node with an unlocked account, or connect to a remote Geth node or Infura. We will be connecting to Ropsten which is a test Ethereum network. There are two options for connecting to an Ethereum node: either run a local node with an unlocked account, or connect to a remote Geth node or Infura. We will be connecting to Ropsten, which is an Ethereum network used for testing.
#### Local #### Local
In order to launch a local geth node with the bot account unlocked issue the following command: To launch a local geth node with the bot account unlocked, issue the following command:
``` ```
#!/bin/bash #!/bin/bash
@ -92,7 +92,7 @@ geth --fast --testnet --cache=1024 --datadir=$HOME/.ropsten --verbosity 4 --port
``` ```
#### Remote #### Remote
Register at [Infura](https://infura.io/signup). You will receive an email with provider URLs. Paste an URL for the Ropsten network into `config.edn` under `:eth-rpc-url` key, and set `:offline-signing` to true. Register at [Infura](https://infura.io/signup). You will receive an email with the provider's URLs. Paste a URL for the Ropsten network into `config.edn` under the `:eth-rpc-url` key, and set `:offline-signing` to true.
### CSS auto-compilation ### CSS auto-compilation
@ -109,7 +109,7 @@ lein build-contracts
``` ```
### Clojure app without REPL ### Clojure app without REPL
Launch following commands each in its own shell: Launch the following commands, each in its own shell:
``` ```
lein run lein run
@ -118,13 +118,13 @@ lein figwheel
### Clojure app with REPL ### Clojure app with REPL
You'll have to start a REPL on the backend and the frontend. You'll have to start a REPL on the backend and frontend.
``` ```
lein repl lein repl
``` ```
Now you can start a CLJS repl with: Now you can start a CLJS REPL:
``` ```
(use 'figwheel-sidecar.repl-api) (use 'figwheel-sidecar.repl-api)
@ -134,7 +134,7 @@ Now you can start a CLJS repl with:
(Alternatively, if you use emacs and CIDER, you can run cider-jack-in. Details [here](https://cider.readthedocs.io/en/latest/up_and_running/)) (Alternatively, if you use emacs and CIDER, you can run cider-jack-in. Details [here](https://cider.readthedocs.io/en/latest/up_and_running/))
Next start the application from the clojure REPL with: Next, start the application from the clojure REPL:
``` ```
(user/start) (user/start)
@ -148,7 +148,7 @@ To create a standalone uberjar:
lein uberjar lein uberjar
``` ```
This creates `target/uberjar/commiteth.jar`. You can run it with the following command from within project root: This creates `target/uberjar/commiteth.jar`. You can run it with the following command from within the project's root:
``` ```
java -Dconf=<path_to_config.edn> -jar target/uberjar/commiteth.jar java -Dconf=<path_to_config.edn> -jar target/uberjar/commiteth.jar
``` ```
@ -158,7 +158,7 @@ java -Dconf=<path_to_config.edn> -jar target/uberjar/commiteth.jar
### QA ### QA
Please refer to [doc/testing.md](https://github.com/status-im/commiteth/blob/develop/doc/testing.md) Please refer to [doc/testing.md](https://github.com/status-im/commiteth/blob/develop/doc/testing.md).
### Clojure tests ### Clojure tests
@ -182,9 +182,9 @@ Open http://localhost:3449/cards.html
### CircleCI ### CircleCI
We use CircleCI to run unit tests. The following env vars need to be set for this to work: We use CircleCI to run unit tests. For this to work, set the following env vars:
> These env vars override configuration parameters that are usually set using the `config.edn` file. > These env vars override the configuration parameters that are usually set using the `config.edn` file.
- `ETH_ACCOUNT` - as in `config.edn` - `ETH_ACCOUNT` - as in `config.edn`
- `ETH_PASSWORD` - as in `config.edn` - `ETH_PASSWORD` - as in `config.edn`
@ -192,7 +192,7 @@ We use CircleCI to run unit tests. The following env vars need to be set for thi
- `ETH_WALLET_FILE` - as in `config.edn` - `ETH_WALLET_FILE` - as in `config.edn`
- `ETH_WALLET_JSON` - contents of this will be written to `ETH_WALLET_FILE` - `ETH_WALLET_JSON` - contents of this will be written to `ETH_WALLET_FILE`
:bulb: Ideally we'd create those parameters in a script. PR welcome. :bulb: Ideally, we'd create those parameters in a script. PR welcome.
## Update landing page ## Update landing page
@ -201,11 +201,11 @@ Landing page is static and different CSS and JS due to time constraints.
- Build CSS with Gulp (see `static_landing_page/README.md` - Build CSS with Gulp (see `static_landing_page/README.md`
- Make changes and `./build-landing-page.sh` - Make changes and `./build-landing-page.sh`
This copies over necessary artifacts to `resources` dir. This copies the necessary artifacts over to the `resources` dir.
## More info ## More info
Detailed information on code structure, troubleshooting, etc. can be found [here](doc/README.md). Detailed information on code structure, troubleshooting, and more can be found [here](doc/README.md).
## License ## License