New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement "callable updates" as "create and exercise" Ledger API command #382
Comments
@francesco-da: strictly speaking we cannot reuse the We could add a dedicated "application service" request that ultimately will be converted to a
How do you want to handle failure scenarios?
|
Alternatively, we can implement the Edit: it seems like there are quite a few places in the engine that assumes only absolute contract ids, so we either open up relative contract ids again in general, or we go the compound-api-service route. |
Conclusion, similar to |
I'm not sold on the value of this addition. You are saving developers a simple "check for existence and create the Action contract if it doesn't" step in the automation. You still can't get return values from Updates in the application layer and still can't access pure DAML functions. |
you could then execute a pure function (in a slightly round-about way) in terms of a create-and-exercise. |
Yeah, but you get the side-effect of writing a transaction. Would it be so difficult to flip this around and allow evaluation of functions with serializable arguments and return type |
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382.
* Add release notes entry * Add CreateAndExercise command to Java Bindings data layer * Add CreateAndExercise command to DAMLe The CreateAndExerciseCommand allows users to create a contract and exercise a choice on it within the same transaction. Users can use this method to implement "callable update functions" by creating a template that calls the update function in a choice body. Fixes #382. * Add CreateAndExercise command handling to the sandbox * Add CreateAndExercise command to the Ledger API
done, see #563 |
Many people have expressed the desire of being able to define "top level updates" in their .daml files that they can call from their application.
While talking to @martin-drhu-da , it occurred to me that we can implement that easily with the existing infrastructure if we add a "CreateAndExercise" command to the Ledger API, which as the name suggests bundles a
CreateCommand
andExerciseCommand
in one go.Then, the "top level update" can be implemented as a template that has the submitter party as only argument and signatory, and then a choice (or multiple choices) that contain the argument of the top level update.
cc @martin-drhu-da @neil-da @bame-da @andrae-da @filmackay
The text was updated successfully, but these errors were encountered: