allocateParty
creates a new party everytime you run it. So if you run your Daml Script multiple times you get different parties each time which sounds like that’s what’s been happening here: You’ve run it once via initializeUser
and then once via allocateParties
directly. I recommend to have initializeUser
return LedgerParties
and then only run that once. If you run it via daml start
, you can set the --output-file
flag via daml start --script-option --output-file=parties.json
.
For the Alice::…
part, you can allocate such parties via allocatePartyWithHint … (PartyIdHint "Alice")
. The hint will be used as a prefix.