Skip to main content

Chaincode Series

Updated 1 min readMarkdown
Part of seriesHyperLedger Beginner
Chaincode Series

Chaincode Implementation in Go and JavaScript

image.png

Abstore is name of the chaincode Contractapi.contract is the interface for interacting with fabric chaincode

In Javascript

image.png

2nd step :

Declare Asset

image.png

In node.js

image.png

**3rd Step : **

image.png

InitLedger is the first call , created 6 assets like a genisis block

in node.js

image.png

4th step : create

image.png

node.js

image.png

Read Asset

image.png

node.js

image.png

Update Asset

image.png

node.js

image.png

Delete Asset :

image.png

image.png

AssetExists

image.png

image.png

TransferAsset

image.png

image.png

GetAllAssets

image.png

node.js

image.png

Main function

image.png

This is a beginner level information and will expanding this more.

For more interesting articles and and feedback, Please email me : ``` askrv.chn@gmail.com

About the author

  • Golang Developer and Blockchain certified professional

No comments yet. Be the first to comment.

More from this blog