Enable communities to distribute funds to push their cause forward. https://openbounty.status.im/
Go to file
Tetiana Churikova 71d6e332af
Merge pull request #317 from ikysylevych/bug/ui-filtering-sorting-win-#262
[FIX #262] fix UI filtering/sorting issues (Windows)
2018-02-23 12:34:38 +02:00
.github Adopt status-react issue template 2017-03-06 20:36:21 +02:00
contracts Revert "Improved Multisig" 2017-11-10 09:46:04 +02:00
doc gpg decision: provide context around Github check 2018-02-21 19:54:13 +01:00
env [Fix #306] Add support for reloading code 2018-02-21 13:25:36 +01:00
externs Fix issues with injected web3 and advanced cljs compilation 2017-02-23 12:26:29 +02:00
macchiato-app fixes #169 remove http endpoints 2017-11-16 21:16:25 +03:00
resources Merge branch 'develop' of https://github.com/status-im/open-bounty into 193-hide-myself 2018-02-09 16:20:13 +03:00
src [FIX #262] fix UI slider (IE11, Edge) 2018-02-22 22:30:25 +02:00
static_langing_page Ensure Google Analytics using correct ID 2018-01-24 23:54:45 -05:00
test Merge pull request #239 from status-im/tests/git-fork-repo 2018-02-07 12:30:48 +02:00
.dockerignore jenkinsfile v1 (#229) 2018-02-06 12:18:31 +02:00
.gitignore 193 gitignore fix 2018-02-06 19:58:48 +03:00
CONTRIBUTING.md Add wiki docs to the repo 2018-02-14 17:28:44 +01:00
Dockerfile jenkinsfile v1 (#229) 2018-02-06 12:18:31 +02:00
Jenkinsfile remove automatic deployment on build (#295) 2018-02-15 21:31:55 +04:00
LICENSE.md Update LICENSE.md 2017-03-09 15:32:03 +01:00
README.md Do not invoke build-contracts when running lein dev profile 2018-02-21 16:32:53 +02:00
build-landing-page.sh Improved welcome page 2017-11-01 23:12:59 -05:00
build_contracts.sh Only run web3j for required contracts 2017-11-10 12:22:58 +02:00
project.clj Do not invoke build-contracts when running lein dev profile 2018-02-21 16:32:53 +02:00

README.md

Status Open Bounty

Allows you to set bounties for Github issues, paid out in Ether or any ERC-20 token.

More information: https://wiki.status.im/Status_Open_Bounty

Live production version: https://openbounty.status.im The master branch is automatically deployed here.

Live testnet (Ropsten) version: https://openbounty.status.im:444 The develop branch is automatically deployed here.

Table of contents

Prerequisites

You will need Leiningen 2.0 or above installed. Also, make sure that you have wkhtmltoimage available in your PATH. On macOS, it can be installed via brew cask install wkhtmltopdf.

PostgreSQL

Make sure you install PostgreSQL and properly set it up:

psql postgres -c "CREATE USER commiteth WITH PASSWORD 'commiteth';"
psql postgres -c "CREATE DATABASE commiteth;"

solc

Solidity compiler 0.4.15 is required and needs to be in $PATH. Detailed installation instructions for various platforms can be found in the official Solidity documentation.

brew install https://raw.githubusercontent.com/ethereum/homebrew-ethereum/de1da16f7972a899fc8dd1f3f04299eced6f4312/solidity.rb
brew pin solidity

web3j

Web3j 2.3.0 is required and the command line tools need to be in $PATH. Installation instructions for the command line tools can be found in the Web3j Command Line Tools documentation.

brew install https://raw.githubusercontent.com/web3j/homebrew-web3j/881cf369b551a5f2557bd8fb02fa8b7b970256ca/web3j.rb
brew pin web3j

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:

Key Description
dev Currently specifies whether Swagger UI endpoints should be added to routes
port HTTP port for the Ring web app
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
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
eth-account Ethereum account ID 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-wallet-file Location of wallet file. If Geth is run with the parameters as given below, it will reside under $HOME/.ropsten/keystore
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-secret Related to OAuth. Copied from GitHub account Settings->Developer settings->OAuth Apps
github-user GitHub username for bot account. It is used for posting bounty comments
github-password GitHub password for bot account
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"}
testnet-token-data Token data map, useful if there are Geth connectivity problems

GitHub integration

Open Bounty uses both OAuth App and GitHub App integration.

OAuth App

Follow the steps here. 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.

GitHub App

Follow the steps here. Be sure to specify :server-address + /webhook-app as "Webhook URL", and :webhook-secret as "Webhook Secret".

Running

Geth

Launch a local geth node with the bot account unlocked:

#!/bin/bash
geth --fast --testnet --cache=1024 --datadir=$HOME/.ropsten --verbosity 4 --port 50100 --ipcpath ~/.ropsten/geth.ipc --rpc --rpcaddr 127.0.0.1 --rpcport 8545 --rpcapi db,eth,net,web3,personal --rpccorsdomain "https://wallet.ethereum.org" --unlock "0xYOUR_ADDR" --password <(echo "YOUR_PASSPHRASE")

CSS auto-compilation

Launch the following command in a separate shell:

lein less auto

Solidity compilation

Invoke build-contracts Leiningen task to compile Solidity files into Java classes:

lein build-contracts

Clojure app without REPL

Launch following commands each in its own shell:

lein run
lein figwheel

Clojure app with REPL

You'll have to start a REPL on the backend and the frontend.

lein repl

Now you can start a CLJS repl with:

(use 'figwheel-sidecar.repl-api)
(start-figwheel!)
(cljs-repl)

(Alternatively, if you use emacs and CIDER, you can run cider-jack-in. Details here)

Next start the application from the clojure REPL with:

(user/start)

Uberjar build

To create a standalone uberjar:

lein uberjar

This creates target/uberjar/commiteth.jar. You can run it with the following command from within project root:

java -Dconf=<path_to_config.edn> -jar target/uberjar/commiteth.jar

Testing

QA

Please refer to doc/testing.md

Clojure tests

lein test

ClojureScript tests

lein with-profile test doo phantom test

Reagent component devcards

lein with-profile test figwheel devcards

Open http://localhost:3449/cards.html

Update landing page

Landing page is static and different CSS and JS due to time constraints.

  • Build CSS with Gulp (see static_landing_page/README.md
  • Make changes and ./build-landing-page.sh

This copies over necessary artifacts to resources dir.

More info

Detailed information on code structure, troubleshooting, etc. can be found here.

License

Licensed under the Affero General Public License v3.0