// Init of the chaincode
// This function is called only one when the chaincode is instantiated.
// So the goal is to prepare the ledger to handle future requests.

Init of the chaincode
This function is called only one when the chaincode is instantiated.
So the goal is to prepare the ledger to handle future requests.
// Init of the chaincode // This function is called only one when the chaincode is instantiated . // So the goal is to prepare the ledger to handle future requests .
func (t *HeroesServiceChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
	fmt.Println("########### HeroesServiceChaincode Init ###########")
	function, _ := stub.GetFunctionAndParameters()
	if function != "init" {
		return shim.Error("Unknown function call")
	}
	return shim.Success(nil)
}
func ( t * HeroesServiceChaincode ) Init ( stub shim . ChaincodeStubInterface ) pb . Response { fmt . Println ( " " ) function , _ := stub . GetFunctionAndParameters ( ) if function != " " { return shim . Error ( " " ) } return shim . Success ( nil ) }
Init of the chaincode
This function is called only one when the chaincode is instantiated.
Init of the chaincode This function is called only one when the chaincode is instantiated .
// Get the function and arguments from the request
 // Check if the request is the init function
 //err := stub.PutState("hello", []byte("world"))
 //if err != nil {
 //	return shim.Error(err.Error())
 //}
 // Return a successful message
