Skip to content

chris-nthu/fabric-based-traceability-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fabric-based-traceability-system

An agricultural tracebility system made by hyperledger fabric.

BACKUP

Use collect_files.sh to move the files I want to backup to this directory.

$ sudo ./collect_files.sh

PUSH TO GITHUB

$ git add -A
$ git commit -m "Update message"
$ git push

USAGE

  1. Create our own blockchain system
/home/user/go/src/github.com/hyperledger/fabric-samples/first-network$ sudo ./agriculture.sh

After that, you will enter the cli container.

  1. Set some configuration and install chaincode
opt/gopath/src/github.com/hyperledger/fabric/peer# ./../../../chaincode/agriculture/settings.sh
  1. Set channel name
opt/gopath/src/github.com/hyperledger/fabric/peer# export CHANNEL_NAME=mychannel
  1. (Option) Test submit lots of transaction
opt/gopath/src/github.com/hyperledger/fabric/peer# ./../../../chaincode/agriculture/test/test.sh
  1. Execute eventcilent to fetch transaction and store into PostgreSQL
/home/user/go/src/github.com/hyperledger/fabric/examples/events/eventsclient$ go build

/home/user/go/src/github.com/hyperledger/fabric/examples/events/eventsclient$ sudo FABRIC_CFG_PATH=$GOPATH/src/github.com/hyperledger/fabric-samples/config ./eventsclient

About

An agricultural tracebility system made by hyperledger fabric.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published