Re: smart contract A invoking function from smart contract B #fabric-chaincode

Mark Lewis

There is an invokeChaincode() function available on the chaincode stub that can be used to make chaincode-to-chaincode calls:

But your smart contracts are both within the same chaincode so you don't need to use that. Instead, you might want to define a function that implements the transaction behaviour you want to invoke from both smart contracts, and call that implementation function from both transaction functions. So you would have two separate transaction functions (on separate smart contracts) that share some or all of their implementation.

Join { to automatically receive all group messages.