Reading participant from script
Suppose a Dar file has multiple Daml files and scripts for it.one of those script have list of participant user.
1.How to execute scripts on canton
2.how to read list of participant
3.how participant.json can be created from canton can you please send the command
how i will use this ‘utils.generate_daml_script_participants_conf’
Why I am getting this error @ daml script --dar epamcoins-0.1.0.dar --script-name Test.Setup:setup --participant-config participant.json
(console):1:33 expected id
daml script --dar epamcoins-0.1.0.dar --script-name Test.Setup:setup --participant-config participant.json
Hello @Joy_K
-
Daml scripts are executed on your terminal, outside of the canton console.
-
What exactly are you trying to list? For parties, you can use the command, “participant1.parties.list()”
Here is a following example of how to add the option for an output file of your script.
daml script --dar .daml/dist/script-example-0.0.1.dar --script-name ScriptExample:allocateParties --ledger-host localhost --ledger-port 6865 --output-file participant.json
Once the results of the given --script-name is written into the output file, you may use the following example to use the output file:
daml script --dar .daml/dist/script-example-0.0.1.dar --script-name ScriptExample:initialize --ledger-host localhost --ledger-port 6865 --input-file participant.json
More information regarding running scripts can be found in the documentation below:
https://docs.daml.com/daml-script/index.html#run-a-script
Hope this helps!
Best Regards,
Solomon
