-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.txt
32 lines (27 loc) · 1.89 KB
/
test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export FABRIC_CFG_PATH=./peercfg
export CHANNEL_NAME=autochannel
export CORE_PEER_LOCALMSPID=ManufacturerMSP
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/manufacturer.auto.com/peers/peer0.manufacturer.auto.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/manufacturer.auto.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:7071
export ORDERER_CA=${PWD}/organizations/ordererOrganizations/auto.com/orderers/orderer.auto.com/msp/tlscacerts/tlsca.auto.com-cert.pem
export MANUFACTURER_PEER_TLSROOTCERT=${PWD}/organizations/peerOrganizations/manufacturer.auto.com/peers/peer0.manufacturer.auto.com/tls/ca.crt
export DEALER_PEER_TLSROOTCERT=${PWD}/organizations/peerOrganizations/dealer.auto.com/peers/peer0.dealer.auto.com/tls/ca.crt
export MVD_PEER_TLSROOTCERT=${PWD}/organizations/peerOrganizations/mvd.auto.com/peers/peer0.mvd.auto.com/tls/ca.crt
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.auto.com --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n sample-chaincode --peerAddresses localhost:7071 --tlsRootCertFiles $MANUFACTURER_PEER_TLSROOTCERT --peerAddresses localhost:7051 --tlsRootCertFiles $DEALER_PEER_TLSROOTCERT --peerAddresses localhost:7091 --tlsRootCertFiles $MVD_PEER_TLSROOTCERT -c '{"function":"CreateCar","Args":["Car-11", "Tata", "Nexon", "White", "Factory-1", "22/07/2023"]}'
peer chaincode query -C $CHANNEL_NAME -n sample-chaincode -c '{"Args":["GetAllCars"]}'
[
{
"name": "OrderCollection",
"policy": "OR('ManufacturerMSP.member', 'DealerMSP.member')",
"requiredPeerCount": 1,
"maxPeerCount": 2,
"blockToLive": 300,
"memberOnlyRead": true,
"memberOnlyWrite": true,
"endorsementPolicy": {
"signaturePolicy": "OR('ManufacturerMSP.member','DealerMSP.member')"
}
}
]