2017-03-09 14:34:40 +00:00
|
|
|
# Commiteth
|
2016-08-20 21:36:09 +00:00
|
|
|
|
2017-01-23 06:19:16 +00:00
|
|
|
Allows you to set bounties for Github issues, paid out in Ether.
|
|
|
|
|
|
|
|
More information:
|
|
|
|
http://wiki.status.im/proposals/commiteth/
|
|
|
|
|
2017-05-21 08:07:19 +00:00
|
|
|
Live alpha version:
|
2017-01-23 06:19:16 +00:00
|
|
|
https://commiteth.com
|
2017-08-19 09:11:53 +00:00
|
|
|
The `master` branch is automatically deployed here.
|
|
|
|
|
|
|
|
|
2017-09-21 05:48:57 +00:00
|
|
|
Live testnet (Ropsten) version:
|
2017-10-29 08:59:28 +00:00
|
|
|
https://openbounty.status.im:444
|
2017-08-19 09:11:53 +00:00
|
|
|
The `develop` branch is automatically deployed here.
|
2016-08-20 21:36:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
2017-07-26 21:50:08 +00:00
|
|
|
You will need [Leiningen](https://github.com/technomancy/leiningen) 2.0 or above installed.
|
2016-08-20 21:36:09 +00:00
|
|
|
|
2017-07-26 21:50:08 +00:00
|
|
|
### PostgreSQL
|
|
|
|
|
|
|
|
Make sure you install [PostgreSQL](https://www.postgresql.org/) and properly set it up:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo -u postgres psql -c "CREATE USER commiteth WITH PASSWORD 'commiteth';"
|
|
|
|
sudo -u postgres createdb commiteth
|
|
|
|
```
|
2016-08-20 21:36:09 +00:00
|
|
|
|
2017-09-07 08:30:30 +00:00
|
|
|
### solc
|
|
|
|
|
|
|
|
Solidity compiler [0.4.15](https://github.com/ethereum/solidity/releases/tag/v0.4.15) is required and needs to be in $PATH.
|
|
|
|
|
|
|
|
### web3j
|
|
|
|
|
|
|
|
Web3j [2.3.0](https://github.com/web3j/web3j/releases/tag/v2.3.0) is required and the command line tools need to be in $PATH.
|
|
|
|
|
2016-08-20 21:36:09 +00:00
|
|
|
## Running
|
|
|
|
|
2017-10-26 18:51:43 +00:00
|
|
|
Make sure `env/dev/resources/config.edn` is correctly populated.
|
|
|
|
|
|
|
|
Lauch a local geth node with the bot account unlocked:
|
|
|
|
|
|
|
|
```
|
|
|
|
#!/bin/bash
|
2017-10-29 16:30:17 +00:00
|
|
|
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")
|
2017-10-26 18:51:43 +00:00
|
|
|
```
|
|
|
|
|
2017-10-29 16:30:17 +00:00
|
|
|
Launch the following command in a separate shell:
|
2017-07-26 21:50:08 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
lein less auto
|
2017-08-19 09:11:53 +00:00
|
|
|
```
|
|
|
|
|
2017-10-29 16:30:17 +00:00
|
|
|
Next you want to start a REPL on the backend and the frontend.
|
2017-10-26 18:51:43 +00:00
|
|
|
|
2017-10-29 16:30:17 +00:00
|
|
|
```
|
|
|
|
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](https://cider.readthedocs.io/en/latest/up_and_running/))
|
|
|
|
|
|
|
|
Next start the application from the clojure REPL with:
|
|
|
|
|
|
|
|
```
|
|
|
|
(user/start)
|
|
|
|
```
|
|
|
|
|
|
|
|
### Gotchas
|
|
|
|
|
|
|
|
Due to a current limitation you will get the following exception from the clojure compiler with dev builds:
|
|
|
|
|
|
|
|
```
|
|
|
|
Caused by: java.lang.ClassNotFoundException: commiteth.eth.contracts.TokenReg, compiling:(commiteth/eth/token_registry.clj:1:1)
|
|
|
|
```
|
|
|
|
|
|
|
|
The problem is the java classes generated by web3j have not been compiled. It can be worked around by running these commands:
|
2017-10-26 18:51:43 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
lein build-contracts
|
|
|
|
lein jar
|
|
|
|
lein repl # this will fail
|
|
|
|
cp -r target/classes/commiteth target/base+system+user+dev/classes
|
|
|
|
```
|
|
|
|
|
2017-10-29 16:30:17 +00:00
|
|
|
This should be fixed to project.clj ASAP.
|
|
|
|
|
|
|
|
|
2017-08-19 09:11:53 +00:00
|
|
|
## Uberjar build
|
2017-07-26 21:50:08 +00:00
|
|
|
|
2017-08-19 09:11:53 +00:00
|
|
|
To create a standalone uberjar:
|
|
|
|
|
|
|
|
```
|
|
|
|
lein uberjar
|
2017-07-26 21:50:08 +00:00
|
|
|
```
|
2017-02-11 12:33:58 +00:00
|
|
|
|
2017-08-19 09:11:53 +00:00
|
|
|
This creates `target/uberjar/commiteth-<git-sha>.jar`
|
|
|
|
|
|
|
|
|
2017-02-11 12:33:58 +00:00
|
|
|
## Testing
|
|
|
|
|
2017-10-29 16:30:17 +00:00
|
|
|
### QA
|
|
|
|
|
|
|
|
Please refer to [doc/testing.md](https://github.com/status-im/commiteth/blob/develop/doc/testing.md)
|
|
|
|
|
2017-02-11 12:33:58 +00:00
|
|
|
### Clojure tests
|
|
|
|
|
2017-07-26 21:50:08 +00:00
|
|
|
```
|
|
|
|
lein test
|
|
|
|
```
|
2017-02-11 12:33:58 +00:00
|
|
|
|
|
|
|
### ClojureScript tests
|
|
|
|
|
2017-07-26 21:50:08 +00:00
|
|
|
```
|
|
|
|
lein with-profile test doo phantom test
|
|
|
|
```
|
2017-02-11 12:33:58 +00:00
|
|
|
|
|
|
|
### Reagent component devcards
|
|
|
|
|
2017-07-26 21:50:08 +00:00
|
|
|
```
|
|
|
|
lein with-profile test figwheel devcards
|
|
|
|
```
|
2017-02-11 12:33:58 +00:00
|
|
|
|
|
|
|
Open http://localhost:3449/cards.html
|
|
|
|
|
2017-10-30 15:37:13 +00:00
|
|
|
### Update landing page
|
|
|
|
|
2017-10-30 16:10:27 +00:00
|
|
|
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.
|
2016-08-20 21:36:09 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
2017-03-09 14:34:40 +00:00
|
|
|
Licensed under the [Affero General Public License v3.0](https://github.com/status-im/commiteth/blob/master/LICENSE.md)
|