Search code examples
javahyperledger-fabrichyperledger-chaincode

Invoking java chaincode from another java chaincode


Is there a function that enables me to invoke or query another chaincode in Java. The Go equivalent for what I am looking: func (stub *ChaincodeStub) InvokeChaincode.


Solution

  • Looks like java has an equivalent. Can't find any published docs but here is a link to the source file for the stub interface. https://github.com/hyperledger/fabric-chaincode-java/blob/8cca4bb4a90806bb6d3877dffb812643b6cebc19/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java#L116