Skip to main content

Command Palette

Search for a command to run...

Chaincode Series

Updated
•1 min read•View as Markdown
Chaincode Series
A

Golang Developer and Blockchain certified professional

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

More from this blog

Ashok V

37 posts

Go beyond limits with our Golang blog with Tips, Tricks, and Insights