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

Moved insert/verify into network5445/.

parent a196694f
No related branches found
No related tags found
No related merge requests found
......@@ -52,10 +52,10 @@ EOT
if [ ` wc -l < out1 ` = 2 -a `tail -1 < out1` = "true" ]
then
addr=` head -1 < out1 `
mkdir -p contracts
mv ${workdir} contracts/${addr}
mkdir network5445/contracts
mv ${workdir} network5445/contracts/${addr}
echo Your new contract can be found in contracts/${addr}
ln -sf ${addr} contracts/${contractname}
ln -sf ${addr} network5445/contracts/${contractname}
else
cat g1.js
echo
......
......@@ -6,10 +6,11 @@ function cleanup
trap "rm -rf ${rmfiles}" EXIT
}
trap "echo Argh;exit 1" ERR
cd $( dirname $0 )
in=$1
test -n "$in" || in="Hello World!"
trap "echo Argh;exit 1" ERR
account=` ls -1dl network5445/node1/keystore/* | head -1 | sed 's/.*--//' `
account=` ls -1dl node1/keystore/* | head -1 | sed 's/.*--//' `
test -n "$account"
contract=$( readlink contracts/TimestampDocument )
abi=$( cat contracts/${contract}/abi )
......@@ -20,7 +21,7 @@ var thecontract = mycontract.at("$contract");
console.log ( thecontract.storeDocument.sendTransaction( "${in}", {from: eth.accounts[0], gas: 1000000} ) )
EOT
cleanup out1
geth --datadir network5445/node1 --exec 'loadScript("g1.js")' attach ipc:network5445/node1/geth.ipc > out1
geth --datadir node1 --exec 'loadScript("g1.js")' attach ipc:node1/geth.ipc > out1
if [ ` wc -l < out1 ` = 2 -a `tail -1 < out1` = "true" ]
then
conf=` head -1 < out1 `
......
......@@ -6,10 +6,11 @@ function cleanup
trap "rm -rf ${rmfiles}" EXIT
}
trap "echo Argh;exit 1" ERR
in=$1
test -n "$in" || in="Hello World!"
trap "echo Argh;exit 1" ERR
account=` ls -1dl network5445/node1/keystore/* | head -1 | sed 's/.*--//' `
cd $( dirname $0 )
account=` ls -1dl node1/keystore/* | head -1 | sed 's/.*--//' `
test -n "$account"
contract=$( readlink contracts/TimestampDocument )
abi=$( cat contracts/${contract}/abi )
......@@ -20,7 +21,7 @@ var thecontract = mycontract.at("$contract");
console.log ( thecontract.checkDocument.call( "${in}" ) )
EOT
cleanup out1
geth --datadir network5445/node1 --exec 'loadScript("g1.js")' attach ipc:network5445/node1/geth.ipc > out1
geth --datadir node1 --exec 'loadScript("g1.js")' attach ipc:node1/geth.ipc > out1
if [ ` wc -l < out1 ` = 2 -a `tail -1 < out1` = "true" ]
then
block=` head -1 < out1 `
......
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