From 88d516c9d0cdcbb1b89f97cb683a3dc47cb61fbd Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 3 Jun 2018 18:15:16 -0400 Subject: [PATCH] update readme --- README.md | 12 ++++++++++++ shyft-geth.sh | 11 ++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d0d4d35d4..7476466d6d 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,18 @@ Which will start mining blocks and transactions on a single CPU thread, creditin the account specified by `--etherbase`. You can further tune the mining by changing the default gas limit blocks converge to (`--targetgaslimit`) and the price transactions are accepted at (`--gasprice`). +## SHYFT NOTES + +#### CLI +Run `./shyft-geth.sh` with one of the following flags: + +- `--setup` - Setups postgres and the shyft chain db +- `--start` - Starts geth +- `--reset` - Drops postgress and chain db, and reinstantiates both. +- `--js [web3 filename]` - Executes web3 calls with a passed file name example: filename = sendTransactions.js `--js sendTransactions` + +Note: An alias can be set for convenience `alias shyft-geth='/shyft_go-ethereum/shyft-geth.sh'` + ## Contribution Thank you for considering to help out with the source code! We welcome contributions from diff --git a/shyft-geth.sh b/shyft-geth.sh index 5104f01844..f80ee219f7 100755 --- a/shyft-geth.sh +++ b/shyft-geth.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ $# -lt 1 ]]; then + echo Shyft-Geth: No flags detected, refer to readme for available commands. + exit 1 +fi + illegalCommands=() while [[ $# -gt 0 ]] do @@ -15,7 +20,7 @@ case $key in shift # past argument ;; --js) - sh ./shyft-cli/runJs.sh ./shyft-cli/web3/$2 + sh ./shyft-cli/runJs.sh ./shyft-cli/web3/$2.js shift # past argument shift # past argument ;; @@ -30,7 +35,7 @@ case $key in esac done -if [[ "${#illegalCommands[@]}" -gt "0" ]] ; then - echo The following commands are not supported: "${illegalCommands[*]}" +if [[ "${#illegalCommands[@]}" -gt "0" ]]; then + echo Shyft-Geth: The following commands are not supported: "${illegalCommands[*]}" fi