Hello, I am unable to exercise a choice on a contract using grpcurl against a sandbox ledger.
Details are as follows:
Command:
grpcurl -plaintext -d '{
"commands": {
"ledgerId": "sandbox",
"applicationId": "test",
"party": "Alice",
"commands": [
{
"exercise": {
"contractId": "<some-contract-id>",
"choice": "CloseTask",
"choiceArgument": {
"party": "Alice"
},
"templateId": {
"packageId": "<package-id>",
"moduleName": "Main.Main",
"entityName": "Task"
}
}
}
],
"actAs": [
"Alice"
],
"readAs": [
"Alice"
],
"disclosedContracts": [],
"commandId": "test"
}
}' localhost:6865 com.daml.ledger.api.v1.CommandSubmissionService.Submit
Here is the choice that I am trying to exercise:
choice CloseTask: () with
user: Party
controller user
do
return ()
Here is the response from the ledger API:
COMMAND_PREPROCESSING_FAILED(8,8e61f8b9): mismatching type: Main.Main:CloseTask and value: ValueParty(Alice)
Is this an issue passing argument to the choice?