I want to send the following CreateCommand using python gRPC using command_submission_service. I have imported commands_pb2 How do i define this command…
message CreateCommand {
// The template of contract the client wants to create.
// Required
Identifier template_id = 1;
// The arguments required for creating a contract from this template.
// Required
Record create_arguments = 2;
}
here is the code am currently using
with grpc.insecure_channel('localhost:6865') as channel:
stub=command_submission_service_pb2_grpc.CommandSubmissionServiceStub(channel)
response=stub.Submit(command_submission_service_pb2.SubmitRequest(test_command))
basically want to know how to construct test_command. If you have some eg. That would be great
FWIW I found it quite useful to turn on payload logging, as described in Monitoring — Daml SDK 2.4.2 documentation, when working with gRPC. You can then compare a request that works (say from Navigator) with yours and get an idea of what you need to fix.