Skip to content

Commit 7a1f457

Browse files
author
Dale Avery
committed
Added support for v0.6
1 parent bfc1419 commit 7a1f457

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

docs/setup.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ cd $GOAPTH/github.com/hyperledger
6161
git clone -b v0.5-developer-preview https://github.com/hyperledger-archives/fabric.git
6262
```
6363

64+
If you are installing the v0.6 release, use this for your `git clone` command:
65+
66+
```
67+
# The v0.6 release exists as a branch inside the Gerrit fabric repository
68+
git clone -b v0.6 http://gerrit.hyperledger.org/r/fabric
69+
```
70+
6471
If the fabric is not installed properly on your `GOPATH`, you will see errors like the one below when building your chaincode:
6572
```
6673
$ go build .

finished/chaincode_finished.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func main() {
3535
}
3636

3737
// Init resets all the things
38-
func (t *SimpleChaincode) Init(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {
38+
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
3939
if len(args) != 1 {
4040
return nil, errors.New("Incorrect number of arguments. Expecting 1")
4141
}
@@ -49,7 +49,7 @@ func (t *SimpleChaincode) Init(stub *shim.ChaincodeStub, function string, args [
4949
}
5050

5151
// Invoke isur entry point to invoke a chaincode function
52-
func (t *SimpleChaincode) Invoke(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {
52+
func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
5353
fmt.Println("invoke is running " + function)
5454

5555
// Handle different functions
@@ -64,7 +64,7 @@ func (t *SimpleChaincode) Invoke(stub *shim.ChaincodeStub, function string, args
6464
}
6565

6666
// Query is our entry point for queries
67-
func (t *SimpleChaincode) Query(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {
67+
func (t *SimpleChaincode) Query(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
6868
fmt.Println("query is running " + function)
6969

7070
// Handle different functions
@@ -77,7 +77,7 @@ func (t *SimpleChaincode) Query(stub *shim.ChaincodeStub, function string, args
7777
}
7878

7979
// write - invoke function to write key/value pair
80-
func (t *SimpleChaincode) write(stub *shim.ChaincodeStub, args []string) ([]byte, error) {
80+
func (t *SimpleChaincode) write(stub shim.ChaincodeStubInterface, args []string) ([]byte, error) {
8181
var key, value string
8282
var err error
8383
fmt.Println("running write()")
@@ -96,7 +96,7 @@ func (t *SimpleChaincode) write(stub *shim.ChaincodeStub, args []string) ([]byte
9696
}
9797

9898
// read - query function to read key/value pair
99-
func (t *SimpleChaincode) read(stub *shim.ChaincodeStub, args []string) ([]byte, error) {
99+
func (t *SimpleChaincode) read(stub shim.ChaincodeStubInterface, args []string) ([]byte, error) {
100100
var key, jsonResp string
101101
var err error
102102

start/chaincode_start.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func main() {
3838
}
3939

4040
// Init resets all the things
41-
func (t *SimpleChaincode) Init(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {
41+
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
4242
if len(args) != 1 {
4343
return nil, errors.New("Incorrect number of arguments. Expecting 1")
4444
}
@@ -47,7 +47,7 @@ func (t *SimpleChaincode) Init(stub *shim.ChaincodeStub, function string, args [
4747
}
4848

4949
// Invoke is our entry point to invoke a chaincode function
50-
func (t *SimpleChaincode) Invoke(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {
50+
func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
5151
fmt.Println("invoke is running " + function)
5252

5353
// Handle different functions
@@ -60,7 +60,7 @@ func (t *SimpleChaincode) Invoke(stub *shim.ChaincodeStub, function string, args
6060
}
6161

6262
// Query is our entry point for queries
63-
func (t *SimpleChaincode) Query(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {
63+
func (t *SimpleChaincode) Query(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
6464
fmt.Println("query is running " + function)
6565

6666
// Handle different functions

0 commit comments

Comments
 (0)