How to generate events in Hyperledger Fabric?

0 votes
I am new to Hyperledger Fabric and I was reading the docs and saw that Hyperledger Fabric has events. But I am not understanding how to generate events of my own. Can somebody help me?
Jul 26, 2018 in Blockchain by slayer
• 29,040 points
206 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can generate events using a method from shim.ChaincodeStubInterface API named

SetEvent(name string, payload []byte) error

The method description is as follows

//SetEvent allows the chaincode to set an event on the response to the
// proposal to be included as part of a transaction. The event will be
// available within the transaction in the committed block regardless of the
// validity of the transaction.
answered Jul 26, 2018 by digger
• 27,620 points

Related Questions In Blockchain

0 votes
1 answer
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 16,450 points
633 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
51 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

How to control visibility of assets in Hyperledger Fabric?

you can use proof of Authority consensus ...READ MORE

answered Jul 10, 2018 in Blockchain by digger
• 27,620 points
72 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.