#hyperledger-fabric Contract to call a Contract within the same chaincode #hyperledger-fabric


adineshreddy1mt@...
 

Hello ,

I am trying to implement multiple contracts in a single chaincode in Go lang.

Ref:(https://hyperledger-fabric.readthedocs.io/en/release-2.3/smartcontract/smartcontract.html#terminology)
We have a method called `InvokeChaincode(chaincodeName string, args [][]byte, channel string)` where we will  invoke a method ,from one chaincode to another  method of another chaincode.,

Do we have any methods where a contract will call another contract in a same chaincode in Fabric Go-SDK.

Eg:

Vehicle chaincode{
       Car contract{
           create car,
           query car
        }
       boat contract{
           create boat,
           query boat
        }
       person contract{
           updatevehicles vehicles,
           queryvehicles vehicles
        }
}

Call create car(car contract) and create boat(Boat contract) in person contract 
smart.diagram2

Thanks in-advance.

Thanks,
Dinesh. A

Join fabric@lists.hyperledger.org to automatically receive all group messages.