Skip to content
Snippets Groups Projects
Commit 8638238f authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Fixing insert/very and documentation

parent a8b7cda6
No related branches found
No related tags found
No related merge requests found
...@@ -7,17 +7,15 @@ ...@@ -7,17 +7,15 @@
2. `sudo apt install jq ncurses-bin` 2. `sudo apt install jq ncurses-bin`
3. `mkdir ~/bfa` 3. `mkdir ~/bfa`
4. `PATH=${PATH}:${HOME}/bfa/bin` 4. `PATH=${PATH}:${HOME}/bfa/bin`
5. geth --password /dev/null --datadir $BFANETWORKDIR/node1 account new 5. run `start.sh`
6. geth --datadir $BFANETWORKDIR/node1 init $BFAHOME/src/genesis.json 6. create your contract (there is already one deployed, so do not confuse the two)
7. run `start.sh` 7. `insert.sh "I'm doing great today."`
8. create your contract (there is already one deployed, so do not confuse the two) 8. wait a bit - if you are lucky only 15 seconds
9. `insert.sh "I'm doing great today."` 9. `verify.sh TimestampDocument "Hi there"`
10. wait a bit - if you are lucky 15 seconds only 10. `verify.sh TimestampDocument "I'm doing great today."`
11. `verify.sh "Hi there"` 11. Try the basic `explorer.sh`
12. `verify.sh "I'm doing great today."` 12. consider this crontab: @reboot bfa/network5445/start.sh
13. Try the basic `explorer.sh` 13. Try out walker.pl
14. consider this crontab: @reboot bfa/network5445/start.sh
15. Try out walker.pl
## start.sh ## start.sh
requires: **geth** requires: **geth**
...@@ -32,7 +30,7 @@ Compiles and deploys a contract to the blockchain. A local "node1" must already ...@@ -32,7 +30,7 @@ Compiles and deploys a contract to the blockchain. A local "node1" must already
Argument 1 is the contract to compile. Argument 1 is the contract to compile.
Example: `./create.contract src/contract.TimestampDocument.sol` Example: `create.contract src/contract.TimestampDocument.sol`
## insert.sh ## insert.sh
requires: **geth** requires: **geth**
...@@ -51,7 +49,11 @@ Simple script to look at blocks ...@@ -51,7 +49,11 @@ Simple script to look at blocks
## src/contract.TimestampDocument.sol ## src/contract.TimestampDocument.sol
The initial Timestamp service. Could be made better. The initial Timestamp service.
## src/contract.TimeStampAuthority.sol
Simpler TSA.
## walker.pl ## walker.pl
requires: **geth**, **perl**, __(libjson-perl)__ requires: **geth**, **perl**, __(libjson-perl)__
...@@ -14,16 +14,17 @@ else ...@@ -14,16 +14,17 @@ else
contract="$1" contract="$1"
text="$2" text="$2"
fi fi
if [ ! -e "${contract}" -a -r "${BFANETWORKDIR}/contracts/${contract}" ] prefix="${BFANETWORKDIR}/contracts"
if [ ! -e "${contract}" -a -r "${prefix}/${contract}" ]
then then
contract=${BFANETWORKDIR}/contracts/${contract} contract=${prefix}/${contract}
fi fi
test -L "${contract}" && test -L "${contract}" &&
contract=$( readlink "${contract}" ) contract=$( realpath "${contract}" )
test -n "${contract}" test -n "${contract}"
basecontract=$( basename "${contract}" ) basecontract=$( basename "${contract}" )
test -n "${basecontract}" test -n "${basecontract}"
abi=$( cat ${BFANETWORKDIR}/contracts/${contract}/abi ) abi=$( cat ${contract}/abi )
test -n "${abi}" test -n "${abi}"
test -n "$text" || text="Hello World!" test -n "$text" || text="Hello World!"
js=$( mktemp ) js=$( mktemp )
......
...@@ -15,12 +15,13 @@ else ...@@ -15,12 +15,13 @@ else
contract="$1" contract="$1"
text="$2" text="$2"
fi fi
if [ ! -e "${contract}" -a -r "${BFANETWORKDIR}/contracts/${contract}" ] prefix="${BFANETWORKDIR}/contracts"
if [ ! -e "${contract}" -a -r "${prefix}/${contract}" ]
then then
contract=${BFANETWORKDIR}/contracts/${contract} contract=${prefix}/${contract}
fi fi
test -L "${contract}" && test -L "${contract}" &&
contract=$( readlink "${contract}" ) contract=$( realpath "${contract}" )
test -n "${contract}" test -n "${contract}"
basecontract=$( basename "${contract}" ) basecontract=$( basename "${contract}" )
test -n "${basecontract}" test -n "${basecontract}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment