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,370 points
1,525 views

1 answer to this question.

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
• 26,740 points

Related Questions In Blockchain

+15 votes
5 answers
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
• 17,100 points
3,002 views
0 votes
1 answer
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,470 views
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
• 26,740 points
1,037 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
• 26,740 points
822 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP