|
1 | | -# NOTE |
2 | | -There are multiple releases of the Hyperledger fabric out in the wild that have small differences for how your chaincode must be written. Before proceeding, make sure to select the branch of this tutorial that corresponds to the release of the fabric you are using for your network. You can select the branch using the drop-down menu above. |
| 1 | +# Learn Chaincode |
| 2 | + |
| 3 | +A tutorial to get you started with writing smart contracts for Hyperledger. |
| 4 | + |
| 5 | +# Deployment |
| 6 | + |
| 7 | +In order to support multiple versions of the Hyperledger fabric, this repository uses branches in combination with gopkg.in URLs. What does this mean for beginners? Just pick the branch below and use the instructions for that branch to complete the tutorial |
| 8 | + |
| 9 | +##### Versions and Supported Platforms |
| 10 | + |
| 11 | +- [v1.0](https://github.com/ibm-blockchain/learn-chaincode/tree/v1.0) |
| 12 | + - Hyperledger fabric v0.5-developer-preview |
| 13 | + - IBM Bluemix Blockchain Service v0.4.2 |
| 14 | +- [v2.0](https://github.com/ibm-blockchain/learn-chaincode/tree/v2.0) (Coming Soon) |
| 15 | + - Hyperledger fabric v0.6-developer-preview |
3 | 16 |
|
4 | | - |
| 17 | +If you'd like to just deploy the sample code without completing the tutorial, then use the following URLs for the path parameter when deploying via the fabric REST API. Choose the URL that corresponds to the branch you are using above. |
5 | 18 |
|
6 | | -Not sure which branch you should be using? See which branch describes your situation the best. |
7 | | -- `v1`: The example chaincode is written against the shim interface from the `v0.5-developer-preview` release of the Hyperledger fabric. This is the same release that is used in the blockchain service on Bluemix. |
8 | | -- `v2`: The example chaincode is written against the shim interface from the `v0.6` release of the Hyperledger fabric. |
| 19 | +``` |
| 20 | +http://gopkg.in/ibm-blockchain/learn-chaincode.v1/finished |
| 21 | +OR |
| 22 | +http://gopkg.in/ibm-blockchain/learn-chaincode.v2/finished |
| 23 | +``` |
9 | 24 |
|
10 | 25 | # How to write chaincode |
11 | 26 | This tutorial demonstrates the basic building blocks and functionality necessary to build an elementary [Hyperledger fabric](https://gerrit.hyperledger.org/r/#/admin/projects/fabric) chaincode application. You will be incrementally building up to a working chaincode that will be able to create generic assets. |
@@ -54,6 +69,8 @@ The following tasks take you through the process of building a pipeline that wil |
54 | 69 | git clone https://github.com/<YOUR_GITHUB_ID_HERE>/learn-chaincode.git |
55 | 70 | ``` |
56 | 71 |
|
| 72 | + Next, we wan |
| 73 | + |
57 | 74 | Now, you have a copy of your fork on your machine. You will develop your chaincode by making changes to these local files, pushing them to your fork on GitHub, and then deploying the code onto your blockchain network using the REST API on one of your peers. |
58 | 75 |
|
59 | 76 | 3. Notice that we have provided two different versions of the chaincode used in this tutorial: [Start](start/chaincode_start.go) - the skeleton chaincode from which you will start developing, and [Finished](finished/chaincode_finished.go) - the finished chaincode. |
|
0 commit comments