Party allocation in `create-daml-app`

I’m having a look at the create-daml-app example from the getting started guide

Does this example do party allocation from the React code? I can’t see it myself.

  • If it does, would someone point me at the code?
  • If not, where are the parties allocated? Does the Sandbox automatically allocate parties or something?

Thank you!

:penguin:

2 Likes

Sandbox implicitly allocates a party when it is referenced the first time. create-daml-app relies on this behavior so it never explicitly allocates parties. If you run on a ledger that does not allocate parties implicitly, you have to allocate them upfront, e.g., using daml ledger allocate-party or DAML Script.

3 Likes

that explains it, thank you!

1 Like

In particular, note that: sandbox-classic (the pre-1.0 version of sandbox which was not based on the same architecture as other ledgers) always allocates party implicitly, whereas in sandbox, even though implicit party allocation is turned on by default, it can be turned off by passing --implicit-party-allocation=false on the CLI. This can be useful in integration tests to make sure that everything works as expected in a “production-like” environment, where parties are unlikely to be allocated implicitly.

2 Likes

Hey Phoebe! I ran this on a 3rd-party ledger yesterday, and found that using daml deploy will do the party allocation and *.dar upload in a single step.

Based on what you have in your daml.yaml, that is.