# \#daml-script

**URL:** https://forum.canton.network/tag/daml-script/252.md

[Latest](https://forum.canton.network/latest.md) · [Categories](https://forum.canton.network/categories.md) · [Tags](https://forum.canton.network/tags.md)

---

## [Set logging options for daml script calls?](https://forum.canton.network/t/set-logging-options-for-daml-script-calls/7372)

<div class="topic-metadata">

**Author:** [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Replies:** 2\
**Last updated:** [September 3, 2024, 2:49pm UTC](https://forum.canton.network/t/set-logging-options-for-daml-script-calls/7372 "2024-09-03T14:49:20Z")

</div>

How does one customize the logback options when running daml script?

---

## [Creating contracts via their interface in Daml Script](https://forum.canton.network/t/creating-contracts-via-their-interface-in-daml-script/7197)

<div class="topic-metadata">

**Author:** [@David\_Martins](https://forum.canton.network/u/David_Martins)\
**Replies:** 2\
**Last updated:** [April 9, 2024, 8:31am UTC](https://forum.canton.network/t/creating-contracts-via-their-interface-in-daml-script/7197 "2024-04-09T08:31:09Z")

</div>

Hello, I was building a test on Daml Scripts to create a contract via its interface, much like you can within choices. But then I got an error, because the interface does not extend the HasAgreement type class. My ques…

---

## [What's the motivation for Explicit Contract Disclosure (Experimental) in Canton 2.7?](https://forum.canton.network/t/whats-the-motivation-for-explicit-contract-disclosure-experimental-in-canton-2-7/6682)

<div class="topic-metadata">

**Author:** [@jvelasco.intellecteu](https://forum.canton.network/u/jvelasco.intellecteu)\
**Replies:** 4\
**Last updated:** [June 19, 2023, 7:36am UTC](https://forum.canton.network/t/whats-the-motivation-for-explicit-contract-disclosure-experimental-in-canton-2-7/6682 "2023-06-19T07:36:04Z")

</div>

Hi, I was wondering what’s the motivation for Explicit Contract Disclosure (Experimental) in Canton 2.7. https://docs.daml.com/2.7.0/app-dev/explicit-contract-disclosure.html# Best Jose

---

## [Daml Script Output file JSON Format](https://forum.canton.network/t/daml-script-output-file-json-format/6594)

<div class="topic-metadata">

**Author:** [@huw](https://forum.canton.network/u/huw)\
**Replies:** 1\
**Last updated:** [May 26, 2023, 6:34am UTC](https://forum.canton.network/t/daml-script-output-file-json-format/6594 "2023-05-26T06:34:15Z")

</div>

Daml script has an option to write the output to a file in JSON format, is it possible to modify these options that it uses when generating the file? encodeDecimalAsString: boolean encodeInt64AsString: boolean I’m look…

---

## [LOCAL VERDICT LEDGER TIME OUT OF BOUND Error in Daml Script](https://forum.canton.network/t/local-verdict-ledger-time-out-of-bound-error-in-daml-script/6103)

<div class="topic-metadata">

**Author:** [@Mr\_Mannoroth](https://forum.canton.network/u/Mr_Mannoroth)\
**Replies:** 3\
**Last updated:** [March 3, 2023, 1:04am UTC](https://forum.canton.network/t/local-verdict-ledger-time-out-of-bound-error-in-daml-script/6103 "2023-03-03T01:04:08Z")

</div>

When running a Daml Script, I get the following error consistently at the same Daml create command submission: Exception in thread "main" com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: ABORTED: LOCA…

---

## [My test case still shows "Unhandled exception" even if I try-catch-ed it?](https://forum.canton.network/t/my-test-case-still-shows-unhandled-exception-even-if-i-try-catch-ed-it/6192)

<div class="topic-metadata">

**Author:** [@charlie.ng](https://forum.canton.network/u/charlie.ng)\
**Replies:** 3\
**Last updated:** [March 1, 2023, 8:23am UTC](https://forum.canton.network/t/my-test-case-still-shows-unhandled-exception-even-if-i-try-catch-ed-it/6192 "2023-03-01T08:23:54Z")

</div>

Hi there, Is this a bug when I try to write the test case - testRollback? Because the compiler would still complain that it’s a “Unhandled exception”. And furthermore when I run daml test --show-coverage , it’ll sho…

---

## [Daml Script command line table view](https://forum.canton.network/t/daml-script-command-line-table-view/6094)

<div class="topic-metadata">

**Author:** [@drdo.intellecteu](https://forum.canton.network/u/drdo.intellecteu)\
**Replies:** 9\
**Last updated:** [February 13, 2023, 6:29pm UTC](https://forum.canton.network/t/daml-script-command-line-table-view/6094 "2023-02-13T18:29:31Z")

</div>

Hello! Is there any functionality to display in the command line (e.g. using daml assistant) something similar to table view and/or transaction view from Daml Studio? Thanks, Daniel

---

## [Run script across multiple participant nodes when script is divided into two parts](https://forum.canton.network/t/run-script-across-multiple-participant-nodes-when-script-is-divided-into-two-parts/5698)

<div class="topic-metadata">

**Author:** [@kctam](https://forum.canton.network/u/kctam)\
**Replies:** 4\
**Last updated:** [November 29, 2022, 11:40am UTC](https://forum.canton.network/t/run-script-across-multiple-participant-nodes-when-script-is-divided-into-two-parts/5698 "2022-11-29T11:40:59Z")

</div>

Hi team, I am planning a script which will be used to initialize the ledger in a canton setup (with multiple participant nodes). Based on my previous experience I use allocatePartyWithHintOn plus the participant name, …

---

## [Verbosity of daml scripts](https://forum.canton.network/t/verbosity-of-daml-scripts/5298)

<div class="topic-metadata">

**Author:** [@Darko](https://forum.canton.network/u/Darko)\
**Replies:** 4\
**Last updated:** [September 28, 2022, 8:36pm UTC](https://forum.canton.network/t/verbosity-of-daml-scripts/5298 "2022-09-28T20:36:16Z")

</div>

Hi all, When running a daml script to populate a multi-participant canton network, is there a way to increase the verbosity of the script runner? A user reports that a daml script didn’t finish within a reasonable time…

---

## [Run script across multiple participant nodes](https://forum.canton.network/t/run-script-across-multiple-participant-nodes/5288)

<div class="topic-metadata">

**Author:** [@kctam](https://forum.canton.network/u/kctam)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 2:51pm UTC](https://forum.canton.network/t/run-script-across-multiple-participant-nodes/5288 "2022-09-28T14:51:03Z")

</div>

Hi Team, By using allocatePartyWithHintOn and a proper participant configuration file (specifying the participants and ledger-api host and port) I can successfully run script over a canton setup in 2.0.0. Here is the co…

---

## [allocatePartyWithHintOn and listKnownPartiesOn behaving unexpectedly](https://forum.canton.network/t/allocatepartywithhinton-and-listknownpartieson-behaving-unexpectedly/5187)

<div class="topic-metadata">

**Author:** [@jonas](https://forum.canton.network/u/jonas)\
**Replies:** 4\
**Last updated:** [September 6, 2022, 2:19pm UTC](https://forum.canton.network/t/allocatepartywithhinton-and-listknownpartieson-behaving-unexpectedly/5187 "2022-09-06T14:19:41Z")

</div>

Hey all. I was trying to use Daml script to simulate a multi-party scenario but I am completely unable to make allocatePartyWithHintOn allocate parties on specific participants. In my Canton setup I have two participant…

---

## [Daml Script allocating parties in Distributed Topologies, and subsequent commands](https://forum.canton.network/t/daml-script-allocating-parties-in-distributed-topologies-and-subsequent-commands/5075)

<div class="topic-metadata">

**Author:** [@Darko](https://forum.canton.network/u/Darko)\
**Replies:** 1\
**Last updated:** [August 12, 2022, 1:39pm UTC](https://forum.canton.network/t/daml-script-allocating-parties-in-distributed-topologies-and-subsequent-commands/5075 "2022-08-12T13:39:51Z")

</div>

Assuming that there are a couple of Canton Participant nodes and I want to allocate parties on these participants using a single Daml Script. The participants.json contains the config for all participants, and the Scrip…

---

## [Why is there no \`submitUserMustFail\`?](https://forum.canton.network/t/why-is-there-no-submitusermustfail/4978)

<div class="topic-metadata">

**Author:** [@Darko](https://forum.canton.network/u/Darko)\
**Replies:** 2\
**Last updated:** [July 26, 2022, 1:57pm UTC](https://forum.canton.network/t/why-is-there-no-submitusermustfail/4978 "2022-07-26T13:57:48Z")

</div>

Is there a particular reason why not all party submission functions also exist for users? (For example submitUserMustFail) When it comes to submitMulti I’m assuming that the argument would be to just add the additional…

---

## [Can I run a script on Daml Hub which will act as multiple parties?](https://forum.canton.network/t/can-i-run-a-script-on-daml-hub-which-will-act-as-multiple-parties/4557)

<div class="topic-metadata">

**Author:** [@cohen.avraham](https://forum.canton.network/u/cohen.avraham)\
**Replies:** 5\
**Last updated:** [July 7, 2022, 12:16am UTC](https://forum.canton.network/t/can-i-run-a-script-on-daml-hub-which-will-act-as-multiple-parties/4557 "2022-07-07T00:16:16Z")

</div>

G-d willing Hello, I would like to run a script on Daml-Hub which will create a contract as bob and then create another contract as Alice. How can I do that since the access token file the daml script command accepts …

---

## [Error when executing a script](https://forum.canton.network/t/error-when-executing-a-script/4496)

<div class="topic-metadata">

**Author:** [@cohen.avraham](https://forum.canton.network/u/cohen.avraham)\
**Replies:** 7\
**Last updated:** [May 9, 2022, 8:32pm UTC](https://forum.canton.network/t/error-when-executing-a-script/4496 "2022-05-09T20:32:16Z")

</div>

G-d willing Hello, I am executing a script against the Daml Hub. While the command queryContractId works with no problem. But, when I try to create a contract it fails. Does anyone knows what can it be? Here is the c…

---

## [Host party on multiple nodes using participants.json](https://forum.canton.network/t/host-party-on-multiple-nodes-using-participants-json/4403)

<div class="topic-metadata">

**Author:** [@Turan](https://forum.canton.network/u/Turan)\
**Replies:** 1\
**Last updated:** [April 22, 2022, 4:48pm UTC](https://forum.canton.network/t/host-party-on-multiple-nodes-using-participants-json/4403 "2022-04-22T16:48:16Z")

</div>

For multiple node setups how do we assign a party to multiple nodes via the “–participant-config participants.json” flag in daml script. We will have a “Public” party that lives on every node. Could it also be clarified…

---

## [Is it possible to run a script upon a creation of a contract](https://forum.canton.network/t/is-it-possible-to-run-a-script-upon-a-creation-of-a-contract/4119)

<div class="topic-metadata">

**Author:** [@cohen.avraham](https://forum.canton.network/u/cohen.avraham)\
**Replies:** 2\
**Last updated:** [March 16, 2022, 12:52pm UTC](https://forum.canton.network/t/is-it-possible-to-run-a-script-upon-a-creation-of-a-contract/4119 "2022-03-16T12:52:19Z")

</div>

G-d willing Hello, I have a scenario where a major company has a list of business customers, where every business customer has its own list of private customers. For this example, let’s call the major company A, which…

---

## [Daml start, daml.yaml init script and authorization](https://forum.canton.network/t/daml-start-daml-yaml-init-script-and-authorization/4107)

<div class="topic-metadata">

**Author:** [@Simon\_Alexe](https://forum.canton.network/u/Simon_Alexe)\
**Replies:** 1\
**Last updated:** [March 15, 2022, 8:30am UTC](https://forum.canton.network/t/daml-start-daml-yaml-init-script-and-authorization/4107 "2022-03-15T08:30:33Z")

</div>

Hello Daml Forum, I use “daml start” to start my application. I have a daml.yaml (sdk-version: 1.17.1) with a sandbox auth. option (ex: sandbox-options: - --auth-jwt-hs256-unsafe=…) and an init-script (init-script: ……

---

## [Couldn't match type 'Scenario' with 'Script'](https://forum.canton.network/t/couldnt-match-type-scenario-with-script/4010)

<div class="topic-metadata">

**Author:** [@nemanja](https://forum.canton.network/u/nemanja)\
**Replies:** 1\
**Last updated:** [February 25, 2022, 9:25am UTC](https://forum.canton.network/t/couldnt-match-type-scenario-with-script/4010 "2022-02-25T09:25:57Z")

</div>

Hi Damlers :smiley: I have a very simple Daml script that used to work: test = script do alice \<- allocateParty "Alice" p \<- submit alice $ createCmd $ PersonContract {name = alice, address = Address {street = "Rab…

---

## [How to get the runtime of tests (scripts) one by one](https://forum.canton.network/t/how-to-get-the-runtime-of-tests-scripts-one-by-one/3794)

<div class="topic-metadata">

**Author:** [@gaborh](https://forum.canton.network/u/gaborh)\
**Replies:** 3\
**Last updated:** [January 26, 2022, 2:58pm UTC](https://forum.canton.network/t/how-to-get-the-runtime-of-tests-scripts-one-by-one/3794 "2022-01-26T14:58:00Z")

</div>

I would like to see the runtime for each test, one by one. With daml test and --log-level=DEBUG, I think I am able to see the length of time it took to run all the tests. How is it possible to get results for each test…

---

## [Debug calls in a script - not visible in the logs](https://forum.canton.network/t/debug-calls-in-a-script-not-visible-in-the-logs/3793)

<div class="topic-metadata">

**Author:** [@gaborh](https://forum.canton.network/u/gaborh)\
**Replies:** 1\
**Last updated:** [January 26, 2022, 12:32pm UTC](https://forum.canton.network/t/debug-calls-in-a-script-not-visible-in-the-logs/3793 "2022-01-26T12:32:57Z")

</div>

I have the following code: stuff : Script () stuff = do debug "START" # do things ... debug "END" It prints the debug texts in the “Trace” section in Daml Studio but how is it that I do not see them in …

---

## [Iterating over a list with \`createCmd\` in a script](https://forum.canton.network/t/iterating-over-a-list-with-createcmd-in-a-script/3409)

<div class="topic-metadata">

**Author:** [@georg](https://forum.canton.network/u/georg)\
**Replies:** 2\
**Last updated:** [November 4, 2021, 10:12am UTC](https://forum.canton.network/t/iterating-over-a-list-with-createcmd-in-a-script/3409 "2021-11-04T10:12:36Z")

</div>

I often write the following, intuitively thinking that it should work: forA\_ list $ submit party do createCmd This throws the error: Couldn't match type ‘Commands (ContractId t0)’ with ‘Script b0’ Expected type:…

---

## [Daml Script queyFilter use cases](https://forum.canton.network/t/daml-script-queyfilter-use-cases/3366)

<div class="topic-metadata">

**Author:** [@Leonid\_Rozenberg](https://forum.canton.network/u/Leonid_Rozenberg)\
**Replies:** 2\
**Last updated:** [October 25, 2021, 12:35pm UTC](https://forum.canton.network/t/daml-script-queyfilter-use-cases/3366 "2021-10-25T12:35:10Z")

</div>

Thinking of the Daml.Script queryFilter function, I thought that the intent was to provide a mechanism to get a small subset of contracts and avoid loading the non-matching contracts. But, afaiu, the implementation just …
