Land Registry using Hyperledger Fabric
Hyperledger-Fabric Golang Node.js Docker
A step by step series of instructions that tell you how to run this in a development env.
Step 1: Clone the repo to a folder in your machine Step 2: Follow the below steps to ensure the required Chaincode dependencies are available
cd chaincode/go mod init landregistry-application-chaincode go get -u github.com/hyperledger/fabric-contract-api-gogo mod tidygo mod vendorStep 3: Build the Chaincode - i.e. compile the Chaincode(Smart Contract) and ensure a successful compilation
go buildStep 4: Deploy the chaincode;
- Change into test-network directory
cd landregistry/test-network- Bring the Network Down
./network.sh down- Bring the network Up
./network.sh up- Create channel using createChannel
./network.sh createChannel- Check docker containers
docker ps -a- Deploy Chaincode
./network.sh deployCC -ccn landreg -ccl go -ccp ../chaincode -cci InitLedger- Prepare to use command line arguments
export PATH=${PWD}/../bin:$PATHexport FABRIC_CFG_PATH=$PWD/../config/- Set the Endorsing peers information
source ./scripts/setPeerConnectionParam.sh 1 2- Set the context for Org1
source ./scripts/setOrgPeerContext.sh 1peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n landreg $PEER_CONN_PARAMS -c '{"function":"QueryProp","Args":["PROP1"]}'
2021-11-22 14:07:46.156 IST [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200 payload:"{\"proptype\":\"Ind House\",\"propcity\":\"Bengaluru\",\"propstate\":\"KA\",\"propsqft\":\"3200\",\"propowner\":\"Abraham\"}"