1

I'm trying to catch an event payload from a chaincode A deployed in my infra, when I tried to catch the event payload directly from the chaincode A, it works, but when I try to catch the same event payload when a chaincode A is invoked by another chaincode B, it doesn't work. Any help ?

Oussema
  • 25
  • 5
  • I believe it's not possible for chaincode that is called by other chaincode to emit an event, I thought I had seen someone link in a reference to where this is documented but I can't find the link or the original discussion where I had seen this, sorry – david_k Sep 27 '21 at 14:03
  • Thank you for this quick response, but it would be very helpful, if we have the link of the original discussion – Oussema Sep 28 '21 at 09:10
  • Sorry, I can't find it. There are many different channels for fabric discussion and if it was on rocket chat then that isn't a good place to try to search – david_k Sep 28 '21 at 13:27

1 Answers1

2

In the latest fabric documentation, the limitation is described that only the top level chaincode can call setEvent to register a chaincode event. https://hlf.readthedocs.io/en/latest/developapps/transactioncontext.html#stub

david_k
  • 5,843
  • 2
  • 9
  • 16
  • I also found the information here https://github.com/hyperledger/fabric-chaincode-go/blob/main/shim/interfaces.go – david_k Sep 29 '21 at 09:19