Daml contract developer certification exam example questions

In the Daml contract developer certification syllabus, there are a bunch of example questions with the answers.

Could you help me understand some of the answers? (Correct answers are marked by bold setting.)

Causal Monotonicity

Ledger Time is guaranteed to satisfy causal monotonicity. What does that mean? Select the correct option.

● Archives always come after all other actions on a contract
● All actions on a contract are totally ordered by time
● Actions on a contract are ordered by when they were submitted
● Actions on a contract are ordered by when they were committed
Creates always precede all other actions on a contract

Question: Why is the answer “Archives always come after all other actions on a contract” not correct?

Debug and Trace

Where are messages from the debug and trace functions put out? Select all that apply.

The bottom of the Transaction View for Scenarios/Scripts in the IDE
● The bottom of the Table View for Scenarios/Scripts in the IDE
The console output of Daml REPL
The log output of Daml Script
The log output of Ledger Nodes

Question: How can I see a log output of Daml Script? Something must have escaped my attention, but in the Daml Script section of the docs I cannot see any mention about logging.

Test Tool Architecture

Which of these tools allow you to test/debug a Daml model through the Ledger API, allowing you to perform the same action any other client application could take? Select all that apply.

Navigator
Script
REPL
● Scripts run by the IDE / Studio

Question: Why is the last answer not correct? Maybe the question implies that we are speaking about testing the Daml model through the ledger API of a production ledger, not the Sandbox?

1 Like

The Ledger Time on a Fetch can be after the Ledger Time on the Archive. See Time on Daml Ledgers — Daml SDK 2.7.6 documentation

In the shell that you are running it in. Logging is to stdout.

eg script:

log : Script ()
log = script do
  debug "Hello World"
  return ()

shell:

daml script --dar .Daml/dist/log-0.0.1.dar --script-name Main:log --ledger-host=localhost --ledger-port=6865
[DA.Internal.Prelude:555]: "Hello World"

See Test Daml Contracts — Daml SDK 2.7.6 documentation

The IDE does not use the Sandbox, but a special Script Service. See Test Daml Contracts — Daml SDK 2.7.6 documentation

3 Likes

Thank you!

1 Like