Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

I am reading about chaincode in hyperledger fabric for my project. I have a doubt on How to invoke chaincode automatically based on events like time. If so, are any working examples available.

Thank you in advance.

1 Answer

0 votes
by (14.4k points)

It is impossible to automatically invoke transactions without a client. Looking at the transaction flow of Hyperledger Fabric, it is clear that the client has a lot of responsibilities. These responsibilities include signing the transactions, collecting endorsements, optionally filtering out the bad proposal responses, and sending the same for ordering. 

Invocations should be done with the help of those clients whose rules you are supposed to define.

Hence, the best way would be to incorporate authorization logic on the chaincode function you want to invoke at regular intervals of time. Use a client and a user's certificate to call the functions on the chaincode using the cron mechanism.

Reference to Authorization in Chaincode:

Summary Video: 

Chaincode Reference:


Browse Categories