Blockchain-supply-chain

所属分类:企业管理
开发工具:Shell
文件大小:0KB
下载次数:0
上传日期:2019-01-08 13:09:01
上 传 者sh-1993
说明:  基于区块链的供应链实施。使用Go编程语言和Hyperledger Fabric 1.3。存储库包含链码...
(A Blockchain based supplychain implementation. Using Go programming language and Hyperledger Fabric 1.3. The repository contains Chaincode and Fabric setup files)

文件列表:
fabric-samples/ (0, 2019-01-08)
fabric-samples/CODE_OF_CONDUCT.md (597, 2019-01-08)
fabric-samples/CONTRIBUTING.md (961, 2019-01-08)
fabric-samples/Jenkinsfile (4669, 2019-01-08)
fabric-samples/LICENSE (11358, 2019-01-08)
fabric-samples/MAINTAINERS.md (470, 2019-01-08)
fabric-samples/SupplyChain/ (0, 2019-01-08)
fabric-samples/SupplyChain/startFabric.sh (2464, 2019-01-08)
fabric-samples/basic-network/ (0, 2019-01-08)
fabric-samples/basic-network/.env (25, 2019-01-08)
fabric-samples/basic-network/config/ (0, 2019-01-08)
fabric-samples/basic-network/config/channel.tx (368, 2019-01-08)
fabric-samples/basic-network/config/genesis.block (6360, 2019-01-08)
fabric-samples/basic-network/configtx.yaml (4341, 2019-01-08)
fabric-samples/basic-network/crypto-config.yaml (3555, 2019-01-08)
fabric-samples/basic-network/crypto-config/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/ca/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/ca/a0606a4a860a1e31c90a23788da6f3b6b74925ed0d23061af4899409ba46ae6a_sk (241, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem (818, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/admincerts/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem (765, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/cacerts/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem (818, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem (826, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem (765, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem (818, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/ (0, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/4d2f776c0fef8eac3f460a7c3558dc7859c4fe458e262e674a6c23f242ea33d1_sk (241, 2019-01-08)
fabric-samples/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/ (0, 2019-01-08)
... ...

# Supplychain This is a simple Supplychain application to start working with Hyperledger Fabric blockchain. To run this example and invoke the chaincode. Pull this repository to any location you want. Go to the directory fabric-sample/scripts and run ``` $ ./bootstrap.sh ``` this will install Hyperledger Fabric 1.3 for you and all its required files. Now its time to install and invoke your chaincode with Fabric Basic Network. Go to the directory fabric-samples/SupplyChain and run ``` $ ./startFabric.sh ``` This command will install chaincode on the hyperledger fabric and start fabric as well. To insert any data into the blockchain use the following terminal commands. ``` $ docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n supplychain -c '{"Args":["addCustomer","customer_1","data1","data2","data3","data4","data5","data6"]}' ``` Use the command below to query that record. ``` $ docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n supplychain -c '{"Args":["queryCustomer","customer_1"]}' ``` NOTE: To see the chaincode. go to director fabric-samples/chaincodes/supplychain. The chaincode file is there name mycode.go

近期下载者

相关文件


收藏者