-
Notifications
You must be signed in to change notification settings - Fork 1
/
commitChaincode.sh
executable file
·15 lines (11 loc) · 1.31 KB
/
commitChaincode.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
while getopts v:s: flag
do
case "${flag}" in
v) version=${OPTARG:-1.0};;
s) sequence=${OPTARG:-1};;
esac
done
export PROJECT_TEST_NETWORK=${PWD}/test-network
peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name basic --version 1.0 --sequence 1 --tls --cafile "${PROJECT_TEST_NETWORK}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" --output json
peer lifecycle chaincode commit -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --channelID mychannel --name basic --version 1.0 --sequence 1 --tls --cafile "${PROJECT_TEST_NETWORK}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" --peerAddresses localhost:7051 --tlsRootCertFiles "${PROJECT_TEST_NETWORK}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PROJECT_TEST_NETWORK}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
peer lifecycle chaincode querycommitted --channelID mychannel --name basic --cafile "${PROJECT_TEST_NETWORK}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"