setEvent is not sending the contect

jay park

Hi Team,

I put event in chaincode but it seems the contents is not coming to the client, only event name is coming.
Could you please let me know how to receive the contents that I set in the chaincode?

I set event in chaincode and use 2.4.2.

In client, code is like below and use fabric network 2.2.15.

try {
      listener = async (error, event) => {
        this.logger.debug("registerEvent 2", transaction.getTransactionId());        const trevent = event.getBlockEvent().getTransactionEvents()
        console.log("getTransactionEvents : ",trevent);
        console.log("getContractEvents : ",trevent[0].getContractEvents()[0].payload );
        console.log("getContractEvents : ",trevent[0].getContractEvents()[0].getTransactionEvent());
      const mspId = network.getGateway().getIdentity().mspId;
      const peers = network.getChannel().getEndorsers(mspId);
    await network.addCommitListener(listener, peers, transaction.getTransactionId());


Join to automatically receive all group messages.