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