daml/daml-script
Andreas Herrmann eb80e7b32e
Improve syntax for selecting contract ids from a transaction tree (#9216)
* Daml.Script fromTree, created(N), exercised(N)

Implements more readable transaction tree accessors. E.g.

```
let contract_1_0 = fromTree tree $
      exercised @Module.Template "Choice" $
      created @Module.Template
```

instead of

```
let contract_1_0 = createdCid @Module.Template [0, 0]
```

changelog_begin
changelog_end

* Use fromTree in daml script dump

changelog_begin
changelog_end

* Update tests

* Remove now unused createdCid

* Avoid zip of layer selectors and events

Addresses https://github.com/digital-asset/daml/pull/9216#discussion_r600243370

The zip approach would be misaligned if an event has `Kind.Empty`. This
circumvents the issue by only iterating over non-empty events.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-03-24 12:30:27 +00:00
..
converter Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00
daml Improve syntax for selecting contract ids from a transaction tree (#9216) 2021-03-24 12:30:27 +00:00
dump Improve syntax for selecting contract ids from a transaction tree (#9216) 2021-03-24 12:30:27 +00:00
runner Remove contract arguments from localContracts (#9207) 2021-03-23 09:49:53 +00:00
test Integrate non-repudiation into HTTP JSON API (#9180) 2021-03-18 15:15:52 +00:00