Skip to content

lispczz/fabric-sdk-go-demo

Repository files navigation

Introduction

Hyperlegder Fabric Golang SDK is notoriously difficult to configure and use. Here is an end to end demo showing how to install and invoke a chaincode on the new "test-network" of Fabric 2.0 using Golang SDK.

How to launch

Setup Environment

First, install dependencies following Fabric Docs.
Then, clone the code and cd into it:

git clone ...
cd fabric-sdk-go-demo

Then, install Fabric:

# run the following cmd in repo root folder
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.0.1 1.4.6 0.4.18
cd fabric-samples
# Disable fabric chaincode lifecycle which in not support in Fabric Golang SDK yet
git apply ../fabric-samples.patch
cd test-network
# Launch Fabric network
./network.sh up createChannel -s couchdb

Test

# return to project folder
cd ../..
go test

About

Demo of Fabric Golang SDK using the new "test-network" of Fabric 2.0

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages