How to interact multiple chaincode in go lang for hyperledger fabric how to call one function into another chaincode in hyperledger fabric
Asked
Active
Viewed 114 times
1 Answers
0
Assuming you are using fabric-contract-api-go for your smart contract implementation:
- Get the chaincode stub from the transaction context with GetStub()
- Use the stub to invoke the second chaincode with InvokeChaincode()
If you are using the low-level fabric-chaincode-go for your chaincode implementation then your transactions are invoked with the chaincode stub rather than a transaction context, so you can ignore step one and just call InvokeChaincode() on the stub.

bestbeforetoday
- 1,302
- 1
- 8
- 12