Add interface_id in Ledger API Exercise Command
See original GitHub issueIn case of exercise-interface, we abuse the field templateId
of the Exercise Command to be actually an interfaceId
.
We will add a new file interface_Id
to the exercise command
// Exercise a choice on an existing contract.
message ExerciseCommand {
// The template or the interface where the choice is defined.
// One and only one of template_id interface_id is required.
Identifier template_id = 1;
Identifier interface_id = 5;
// The ID of the contract the client wants to exercise upon.
// Must be a valid LedgerString (as described in ``value.proto``).
// Required
string contract_id = 2;
// The name of the choice the client wants to exercise.
// Must be a valid NameString (as described in ``value.proto``)
// Required
string choice = 3;
// The argument for this choice.
// Required
Value choice_argument = 4;
}
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
pass in interface ID to create-and-exercise, exercise-by-key ...
When #13653 introduces the optional interface ID to these commands, change CreateAnd.java and ByKey.java to pass in the interface ID as ...
Read more >The Ledger API Services — Daml SDK 2.5.0 documentation
Use the command submission service to submit commands to the ledger. Commands either create a new contract, or exercise a choice on an...
Read more >Interface for Exercise by Key command in DAML node js ...
We have exercise command with contractId as one of the field. ContractId can be fetched on listening to transaction events. How can we...
Read more >digital-asset - Bountysource
It is not possible via the command daml ledger navigator (handy for debugging as it ... deprecate hasInterfaceId and getInterfaceId; add a property...
Read more >dazl.ledger
This flag is ignored when connecting to gRPC Ledger API implementations. ... the command submission methods create() , exercise() , submit() are coroutines....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s a smaller change to deal with the naming problem without breaking how commands are built in current codegen and JSON API.
contract_type_id
toExerciseCommand
, or whatever you care to call the union of template IDs and interface IDs (I have generally called it “contract type ID” but have not seen any other opinions on this)template_id
does now; command resolves tocontract_type_id
ortemplate_id
, preferring the formertemplate_id
Then, maybe this should be added to exercise-by-key and create-and-exercise first? At least for those commands, it lets you express something that is impossible, currently. Adding it to by-id will just cause regressions in clients like JSON API.
The current behavior doesn’t seem like “abuse” at all. It is really just a case of a field that is now misnamed; rename it
contract_type_id
and suddenly it isn’t “abuse”.