It’s a bit tricky unfortunately, you are running into two different bugs:
-
[BUG] Cannot set Canton sandbox wrapper options via sandbox-options in daml.yaml · Issue #13497 · digital-asset/daml · GitHub
You can work around that by creating a config file with the following contents and then specify-c=canton.conf
in your sandbox options.
canton.participants.sandbox.testing-time.type = monotonic-time
canton.parameters.clock.type = sim-clock
-
[BUG] Cannot override time mode in script-options · Issue #13499 · digital-asset/daml · GitHub
You can also work around this by removing theinit-script
line from yourdaml.yaml
and instead specifying the script via--on-start
.
daml start --on-start 'daml script --dar=.daml/dist/foobar-0.1.0.dar --ledger-host=localhost --ledger-port=6865 --script-name Init:setup --static-time
Obviously having to work around two separate issues just to change the time mode is not great and hopefully this will be fixed soon. I cannot provide a timeline atm unfortunately.