March 2019
Intermediate to advanced
636 pages
27h 50m
English
Let's now set up the chaincode file.
We will work with the folder structure cloned from GitHub. The chaincode files are located in the following folder:
$GOPATH/src/trade-finance-logistics/chaincode/src/github.com/trade_workflow_v1
You can either follow the steps and inspect the code files in the folder, or you can create a new folder and create the code files as described.
In your favorite editor, create a file, tradeWorkflow.go, and include the following package and import statements:
package mainimport ( "fmt" "errors" "strconv" "strings" "encoding/json" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/core/chaincode/lib/cid"
Read now
Unlock full access