Welcome to bCloudPartners

So what is Hyperledger Fabric Chaincode?

Quite simply, hyperledger chaincode is programmatic business logic written in either Java, Node.js, or Go to manipulate user created business objects. Once the chaincode is completed, tested, and deployed into a hyperledger fabric business network it is available for execution.

Hyperledger Fabric Chaincode Tutorial .

One of the big advantages of using hyperledger composer is that it allows users to represent their business domain objects in a more straight forward manner. Using the built in business modeling tool (hyperledger composer), most business objects can be created with almost no programming skills at all. Below is an example of a valid model.

Example of a Hyperledger Composer business model.

Hyperledger chaincode can be written using Java, Node.js or Go.Below is an example of some chaincode that would be used with the business model object shown above.

Example of some Hyperledger Chaincode.

Advantages of using Hyperledger Fabric Chaincode
  • A javascript syntax like language which will already be familiar to most web developers. Chaincode supports many primate data types, looping control, arrays, mappings, and structures.
  • Using the truffle framework, unit testing is supported using both mocha and chai.
  • Developers have full control over the chaincode regarding which users or groups can execute the code once it is deployed ( ACL lists ).
  • Hyperledger composer is also available in an on-line sandbox, where you can create and test newly created business objects and chaincode. Developers are not required to install any tools on their local machines. Chaincode and business objects can be exported and then imported as needed.
  • Unlike ethereum, executing chain code within a hyperledger blockchain is "free". There is no associated cost, coin or token required, an the chain code can be executed as often as needed.