# Sandbox-options:--wall-clock-time

**URL:** <https://forum.canton.network/t/sandbox-options-wall-clock-time/5692>\
**Category:** App Development\
**Created:** [November 23, 2022, 2:34pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692 "2022-11-23T14:34:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 2:34pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/1 "2022-11-23T14:34:50Z")

</div>

Hi everyone, I am here again, asking for some help. I am trying to run my first contract in navigator but I get the following error:  
Waiting for canton sandbox to start. Error: Unknown option --wall-clock-time Canton v2.4.0

I don’t understand what I am doing wrong, as I am following a tutorial and I can see that I have the same line of codes, but mine doesn’t work. This is my code in daml.yaml  
`#init-script: Main:setup  
parties:

- Jerry
- Elaine
- Kramer  
dependencies:
- daml-prim
- daml-stdlib
- daml-script  
exposed-modules:
- Main  
sandbox-options:
- –wall-clock-time’

Anyone can help? Sorry to bother you constantly, for me it’s a big learning curve 🙏 🙏 🙏 But I try a lot on my own before asking 🙂 🙂 🙂

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [November 23, 2022, 3:01pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/2 "2022-11-23T15:01:14Z")

</div>

To get around this error, I believe you can safely delete the last two lines from your `daml.yaml` file.

```haskell
sandbox-options:
  - --wall-clock-time

```

I’m thinking it is [this bug](https://github.com/digital-asset/daml/issues/13497).

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:05pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/3 "2022-11-23T16:05:30Z")

</div>

Hi Wallace, thank you for coming back to me again!🙂 🙂

I deleted both lines. Now it opens, but when I play a role (let’s say Jerry), and I want to register the first contract, it seems to work, but the contract is not created. A small “access denied” black symbol is at the top right, close to the date.

Other suggestions? 🙏 🙏

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [November 23, 2022, 4:17pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/4 "2022-11-23T16:17:32Z")

</div>

I don’t remember where the Jerry, Elaine, and Kramer tutorial is. Can point us to the directions you are following?

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:22pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/5 "2022-11-23T16:22:09Z")

</div>

I am folwing this

[Daml 101 Video Series](https://www.youtube.com/playlist?list=PLjLGVUzUMRxUqUXUGltc85HkB7CxsIYR4)

# Daml 101: Let’s write a Daml template from scratch [2022]

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:23pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/6 "2022-11-23T16:23:52Z")

</div>

Also Please, if there are more resources or videos like this, please let me know 🙏 🙏 🙏

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [November 23, 2022, 4:38pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/7 "2022-11-23T16:38:37Z")

</div>

Could you copy-and-paste your code into this thread so that I can try it out myself. Maybe I’ll be able to see what is going on, instead of having to guess. 🙂

Regarding other resources, I suspect you are looking in the right place… [Become a Daml Developer](https://www.digitalasset.com/developers/learn).

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:40pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/8 "2022-11-23T16:40:32Z")

</div>

Great! Sure, thanks a lot.  
This is the Main.daml  
`module Main where

–import Daml.Script

type ItemCustodyId = ContractId ItemCustody

–track chain of property  
template ItemCustody  
with  
owner : Party  
custodian : Party  
neighbour: Party  
itemName: Text  
meterCount: Int --shutter clicks

```
where
    signatory owner
    observer custodian
    observer neighbour

```

– depreacated sinax controller … can  
–controller owner can  
–ReleaseItemTo : ContractID ItemCustody  
–with  
–friend : Party  
–do

```
    choice ReleaseItemTo 
        : ItemCustodyId
        with
            friend : Party
            currentMeterCount : Int
        controller owner
        
        do 
            create this with
                custodian = friend 
                meterCount = currentMeterCount

    choice ReturnItemTo 
        : ItemCustodyId
        with
            rightfulOwner : Party
            currentMeterCount :Int
        controller custodian
        do 
            create this with
                owner = rightfulOwner
                meterCount = currentMeterCount

```

–test  
{-  
setup : Script ItemCustodyId  
setup = script do  
jerry ← allocateParty “Jerry”  
elaine ← allocateParty “Elaine”  
kramer ← allocateParty “Kramer”

```
brandNewCamera <- submit jerry do
    createCmd ItemCustody with
        owner = jerry
        custodian = jerry
        neighbour = kramer
        itemName = "Really Expensive Camera"
        meterCount = 347

elaineHasCamera <- submit jerry do
    exerciseCmd brandNewCamera ReleaseItemTo with friend = elaine, currentMeterCount = 360

submit elaine do
    exerciseCmd elaineHasCamera ReturnItemTo with rightfulOwner = jerry, currentMeterCount = 10004
-}
'

```

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:41pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/9 "2022-11-23T16:41:27Z")

</div>

and this is the daml.yaml  
’ sdk-version: 2.4.0  
name: MyBorrowApp  
source: daml  
version: 1.0.0  
#init-script: Main:setup  
parties:

- Jerry
- Elaine
- Kramer  
dependencies:
- daml-prim
- daml-stdlib
- daml-script  
exposed-modules:
- Main  
#sandbox-options:

# - --wall-clock-time

#navigator-options:

# - --feature-user-management=false

’

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:49pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/10 "2022-11-23T16:49:31Z")

</div>

’ sdk-version: 2.4.0

name: MyBorrowApp

source: daml

version: 1.0.0

#init-script: Main:setup

parties:

- Jerry

- Elaine

- Kramer

dependencies:

- daml-prim

- daml-stdlib

- daml-script

exposed-modules:

- Main

#sandbox-options:

# - --wall-clock-time

#navigator-options:

# - --feature-user-management=false’

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 4:50pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/11 "2022-11-23T16:50:21Z")

</div>

Sorry I don’t know why the daml.yaml get copied in this strange way

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [November 23, 2022, 5:12pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/12 "2022-11-23T17:12:58Z")

</div>

To paste long sections of code into this site, use three tick marks on the line before and the line after your code.

This is without the three tick marks.

```haskell
This is with the three tick marks.

```

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 5:15pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/13 "2022-11-23T17:15:59Z")

</div>

````haskell
name: MyBorrowApp
source: daml
version: 1.0.0
#init-script: Main:setup
parties:
  - Jerry
  - Elaine
  - Kramer
dependencies:
  - daml-prim
  - daml-stdlib
  - daml-script
exposed-modules:
  - Main
#sandbox-options:
# - --wall-clock-time
#navigator-options:
# - --feature-user-management=false```
````

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 5:16pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/14 "2022-11-23T17:16:24Z")

</div>

````nohighlight

--import Daml.Script

type ItemCustodyId = ContractId ItemCustody

--track chain of property
template ItemCustody
    with
        owner : Party
        custodian : Party
        neighbour: Party
        itemName: Text
        meterCount: Int --shutter clicks
         
    where
        signatory owner
        observer custodian
        observer neighbour
        
 -- depreacated sinax controller ... can 
        --controller owner can
            --ReleaseItemTo : ContractID ItemCustody
                --with 
                    --friend : Party
                --do 

        choice ReleaseItemTo 
            : ItemCustodyId
            with
                friend : Party
                currentMeterCount : Int
            controller owner
            
            do 
                create this with
                    custodian = friend 
                    meterCount = currentMeterCount

        choice ReturnItemTo 
            : ItemCustodyId
            with
                rightfulOwner : Party
                currentMeterCount :Int
            controller custodian
            do 
                create this with
                    owner = rightfulOwner
                    meterCount = currentMeterCount

--test
{-
setup : Script ItemCustodyId
setup = script do
    jerry <- allocateParty "Jerry"
    elaine <- allocateParty "Elaine"
    kramer <- allocateParty "Kramer"

    brandNewCamera <- submit jerry do
        createCmd ItemCustody with
            owner = jerry
            custodian = jerry
            neighbour = kramer
            itemName = "Really Expensive Camera"
            meterCount = 347

    elaineHasCamera <- submit jerry do
        exerciseCmd brandNewCamera ReleaseItemTo with friend = elaine, currentMeterCount = 360

    submit elaine do
        exerciseCmd elaineHasCamera ReturnItemTo with rightfulOwner = jerry, currentMeterCount = 10004
    -}```
````

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 5:17pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/15 "2022-11-23T17:17:13Z")

</div>

Thanks! Sorry I put only one ` previously

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [November 23, 2022, 5:51pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/16 "2022-11-23T17:51:19Z")

</div>

Some of the things related to users/parties and how the Navigator loads those have changed since [that video](https://youtu.be/sO6F_CTeOk8?t=235) was recorded.

Here is working code:

> **daml.yaml**
>
> ```haskell
> sdk-version: 2.4.0
> name: MyBorrowApp
> source: daml
> version: 1.0.0
> init-script: Main:setup
> dependencies:
> - daml-prim
> - daml-stdlib
> - daml-script
> exposed-modules:
> - Main
> navigator-options:
> - --feature-user-management=false
> 
> ```

> **Main.daml**
>
> ```haskell
> module Main where
> 
> import Daml.Script
> 
> type ItemCustodyId = ContractId ItemCustody
> 
> --track chain of property
> template ItemCustody
> with
> owner : Party
> custodian : Party
> neighbour: Party
> itemName: Text
> meterCount: Int --shutter clicks
>          
> where
> signatory owner
> observer custodian
> observer neighbour
>         
> choice ReleaseItemTo 
> : ItemCustodyId
> with
> friend : Party
> currentMeterCount : Int
> controller owner
>             
> do 
> create this with
> custodian = friend 
> meterCount = currentMeterCount
> 
> choice ReturnItemTo 
> : ItemCustodyId
> with
> rightfulOwner : Party
> currentMeterCount :Int
> controller custodian
> do 
> create this with
> owner = rightfulOwner
> meterCount = currentMeterCount
> 
> setup : Script ItemCustodyId
> setup = script do
> jerry <- allocateParty "Jerry"
> elaine <- allocateParty "Elaine"
> kramer <- allocateParty "Kramer"
> 
> brandNewCamera <- submit jerry do
> createCmd ItemCustody with
> owner = jerry
> custodian = jerry
> neighbour = kramer
> itemName = "Really Expensive Camera"
> meterCount = 347
> 
> elaineHasCamera <- submit jerry do
> exerciseCmd brandNewCamera ReleaseItemTo with friend = elaine, currentMeterCount = 360
> 
> submit elaine do
> exerciseCmd elaineHasCamera ReturnItemTo with rightfulOwner = jerry, currentMeterCount = 10004
> 
> ```

The things to notice are:

- Instead of listing the Parties in the daml.yaml file, use `--feature-user-management=false` as described at [Navigator — Daml SDK 2.4.0 documentation](https://docs.daml.com/tools/navigator/index.html?#logging-in-as-a-party).

- Define a `setup` script to allocate the parties. Navigator will then use those parties to populate the Navigator login screen.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 5:55pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/17 "2022-11-23T17:55:11Z")

</div>

Thank you ever so much, Wallace! I will study carefully what you just sent and try again. Thank you so so much again. 🙏 🙏 🙏 🙏 🙏 🙏

Will be these videos get updated? I know for others would not matter but for people very very inexperience like me 😊 it means a lot. 🙂

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 6:26pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/18 "2022-11-23T18:26:41Z")

</div>

Hi Wallace, how can it be then when I open I see already the contracts created and archived? From the tutorial, I understand that I should see the template but not the contracts, as I haven’t done anything yet.  
I should open the template, insert the date and create the contract. Instead it’s all already there so how can I play with the 3 roles?

---

<div class="post-metadata">

**Author:** ![claudia\_giannoni](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/claudia_giannoni/32/5123_2.png) [@claudia\_giannoni](https://forum.canton.network/u/claudia_giannoni)\
**Post date:** [November 23, 2022, 7:05pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/19 "2022-11-23T19:05:25Z")

</div>

Also, when I open the contract, the layout looked very messy, and I think it should not look like that. In signatories, observers and contract details the names are not shown but it appears only the number of the party (partly visible), while the Item name and the meter count are shown respectively with the correct name and number. It doesn’t seem to me that I can create a contract correctly. Here is the link, I hope you can open it.

[http://localhost:7500/contracts/0001fdbdee3293f3a0dc22405cdf229db8777659bd1f79fd2b2e6ec6b7e9ced1bdca001220809e23d7177a4c71c41210699896f38b852a4eb91cb0e2d5665de5bc84d55385//](http://localhost:7500/contracts/0001fdbdee3293f3a0dc22405cdf229db8777659bd1f79fd2b2e6ec6b7e9ced1bdca001220809e23d7177a4c71c41210699896f38b852a4eb91cb0e2d5665de5bc84d55385//)

A bit more help? 🙏 🙏 🙏 🙏 🙏

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [November 23, 2022, 8:20pm UTC](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692/20 "2022-11-23T20:20:54Z")

</div>

> [@claudia\_giannoni](#):
>
> how can it be then when I open I see already the contracts created and archived?

That is because the `setup` script includes three commands (one `createCmd` and two `exerciseCmd`s). If you would like to start _without_ those, you can comment them out of the `setup` script and restart everything. Even if you comment out the commands, you will want to leave in the `allocateParty` lines.

> [@claudia\_giannoni](#):
>
> the layout looked very messy, and I think it should not look like that.

I’m guessing your layout looks something like this, where all the parties include a long unhelpful identifier.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/a/aa389a8b19c6a7c88521cc4d62ae5255a9b78545.jpeg)

Yes, that reflects that the representation of “parties” in Daml has evolved to include a unique identifier. And Navigator is still just naively displaying the full name (with the newly added unique identifier.) The display is _accurate_, but not as _clean_ as we might like when learning. It’s not straightforward to know who party `party-9b6faed2-6bb6-4cd2-bfc0-58ca6f2b024f::1220a220a71c...` is. 🥴

Here is a way to get around this issue. In your setup script, add a “hint” to the party allocation.

```haskell
setup = script do
    -- jerry <- allocateParty "Jerry"
    -- elaine <- allocateParty "Elaine"
    -- kramer <- allocateParty "Kramer"
    jerry <- allocatePartyWithHint "Jerry" (PartyIdHint "Jerry")
    elaine <- allocatePartyWithHint "Elaine" (PartyIdHint "Elaine")
    kramer <- allocatePartyWithHint "Kramer" (PartyIdHint "Kramer")

```

After adding the party id hint, we can at least associate the identifier with the party as we know them. 😀

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/1/1fded3213e65ef737c072dbb0753f6c714a80ac8.jpeg)

Remember, after making changes to your `setup` script, stop the running services and rerun `daml start`.

[Next page](https://forum.canton.network/t/sandbox-options-wall-clock-time/5692.md?page=2)
