Skip to content

Commit

Permalink
Small syntax changes, keeping up with shell standards. (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Montana committed Nov 7, 2023
1 parent 0da0cd3 commit 5ffaab5
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ export CORE_PEER_ADDRESS=org1-peer1:7051

#uuid=`uuidgen`
item="something.bin"
head -c 1KiB /dev/urandom > ${item}
head -c 1KiB /dev/urandom >${item}

timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)
itemhash=$(sha512sum ${item} | awk '{print $1;}')
itemsize=$(du -b ${item} | awk '{print $1;}')

peer chaincode \
invoke \
-o org0-orderer1:6050 \
--tls --cafile /var/hyperledger/fabric/organizations/ordererOrganizations/org0.example.com/msp/tlscacerts/org0-tls-ca.pem \
-n artifact-metadata \
-C cl \
-c '{"Args":["CreateMetadata","'${timestamp}'","'${itemhash}'","SHA512","'${item}'","'${itemsize}'"]}'
invoke \
-o org0-orderer1:6050 \
--tls --cafile /var/hyperledger/fabric/organizations/ordererOrganizations/org0.example.com/msp/tlscacerts/org0-tls-ca.pem \
-n artifact-metadata \
-C cl \
-c '{"Args":["CreateMetadata","'${timestamp}'","'${itemhash}'","SHA512","'${item}'","'${itemsize}'"]}'

rm ${item}

0 comments on commit 5ffaab5

Please sign in to comment.