mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-23 06:38:09 +00:00
Improved dev experience
This commit is contained in:
parent
fa3eeabd4d
commit
49617ae10e
21
README.md
21
README.md
@ -38,6 +38,15 @@ Web3j [2.3.0](https://github.com/web3j/web3j/releases/tag/v2.3.0) is required an
|
||||
|
||||
## Running
|
||||
|
||||
Make sure `env/dev/resources/config.edn` is correctly populated.
|
||||
|
||||
Lauch 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.or"" --unlock""YOUR_ADDR"" --password <(echo""YOUR_PASSWD"")
|
||||
```
|
||||
|
||||
Launch following commands each in its own shell:
|
||||
|
||||
```
|
||||
@ -46,6 +55,18 @@ lein figwheel
|
||||
lein less auto
|
||||
```
|
||||
|
||||
_NOTE_
|
||||
|
||||
Due to a current limitation you will have to do the following to have `lein run` work:
|
||||
|
||||
```
|
||||
lein build-contracts
|
||||
lein jar
|
||||
lein repl # this will fail
|
||||
cp -r target/classes/commiteth target/base+system+user+dev/classes
|
||||
lein run
|
||||
```
|
||||
|
||||
## Uberjar build
|
||||
|
||||
To create a standalone uberjar:
|
||||
|
30
env/dev/resources/config.edn
vendored
30
env/dev/resources/config.edn
vendored
@ -1,6 +1,26 @@
|
||||
{:dev true
|
||||
:port 3000
|
||||
{:dev true
|
||||
:port 3000
|
||||
;; when :nrepl-port is set the application starts the nREPL server on load
|
||||
:nrepl-port 7000
|
||||
:jdbc-database-url "jdbc:postgresql://localhost/commiteth?user=commiteth&password=commiteth"
|
||||
:server-address "http://localhost:3000"}
|
||||
:nrepl-port 7000
|
||||
:jdbc-database-url "jdbc:postgresql://localhost/commiteth?user=commiteth&password=commiteth"
|
||||
;; this needs to resolve to your local machine from the public internet
|
||||
:server-address "http://PUBLIC-DNS:3000"
|
||||
|
||||
;; eth address of bot account
|
||||
:eth-account "0x.."
|
||||
:eth-password "XXX"
|
||||
|
||||
;; RPC URL to ethereum node to be used
|
||||
:eth-rpc-url "http://localhost:8547"
|
||||
:eth-wallet-file "/some/location"
|
||||
|
||||
;; commiteth-test-tpatja
|
||||
:github-client-id "CLIENT ID"
|
||||
:github-client-secret "CLIENT SECRET"
|
||||
|
||||
;; github username + password for bot account
|
||||
:github-user "commiteth"
|
||||
:github-password "XXX"
|
||||
:on-testnet true}
|
||||
|
||||
|
||||
|
@ -15,9 +15,14 @@
|
||||
(env :eth-password))
|
||||
|
||||
(defn creds []
|
||||
(WalletUtils/loadCredentials
|
||||
(wallet-password)
|
||||
(wallet-file-path)))
|
||||
(let [password (wallet-password)
|
||||
file-path (wallet-file-path)]
|
||||
(if (and password file-path)
|
||||
(WalletUtils/loadCredentials
|
||||
password
|
||||
file-path)
|
||||
(throw (ex-info "Make sure you provided proper credentials in appropriate resources/config.edn"
|
||||
{:password password :file-path file-path})))))
|
||||
|
||||
(defn create-web3j []
|
||||
(Web3j/build (HttpService. (eth/eth-rpc-url))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user