# Daml Script allocating parties in Distributed Topologies, and subsequent commands

**URL:** <https://forum.canton.network/t/daml-script-allocating-parties-in-distributed-topologies-and-subsequent-commands/5075>\
**Category:** App Development\
**Tags:** daml-script, canton\
**Created:** [August 12, 2022, 1:38pm UTC](https://forum.canton.network/t/daml-script-allocating-parties-in-distributed-topologies-and-subsequent-commands/5075 "2022-08-12T13:38:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darko](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/darko/32/42_2.png) [@Darko](https://forum.canton.network/u/Darko)\
**Post date:** [August 12, 2022, 1:38pm UTC](https://forum.canton.network/t/daml-script-allocating-parties-in-distributed-topologies-and-subsequent-commands/5075/1 "2022-08-12T13:38:05Z")

</div>

Assuming that there are a couple of Canton Participant nodes and I want to allocate parties on these participants using a single Daml Script.

The `participants.json` contains the config for all participants, and the Script is using the `AllocatePartyOn` command.

What I am interested in is the `party_participants` config. Given that the parties are only allocated during the runtime of the script, I of course can not statically set the partyId in the static config.

Does that mean that  
a) The script runner is smart enough to remember that when you allocate a party on a node, it will send all subsequent commands from that party to the same node.  
b) The script runner tries to fall back to match the display name of the party with the `party_participants` entry.  
c) Something completely different?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [August 12, 2022, 1:39pm UTC](https://forum.canton.network/t/daml-script-allocating-parties-in-distributed-topologies-and-subsequent-commands/5075/2 "2022-08-12T13:39:51Z")

</div>

It’s (a): The script runner automatically adds any newly allocated parties to the `party_participants` mapping and subsequent commands are sent to the corresponding participant.
