Is the makePartiesFrom
a new addition to the SDK to allocate parties? I’ve not seen this before and can’t find any reference to this in the documentation except for setting up a multiple party agreement.
I used the reference documentation to create the following code
parties@[alice, hakan, martin, rita, john, michael, sam, james] <- makePartiesFrom ["Alice", "Hakan", "Martin", "Rita", "John", "Michael", "Sam", "James"]
But I got a variable not in scope
error? I started my project on v1.09 of the SDK I believe it was so could that be the reason this line of code is not working?
1 Like
It’s part of the example code but hidden from the docs. It is not a standard library function. You can see the definition here if you want to copy it into your own project although it’s probably easier to just inline mapA getParty
or even better mapA allocateParty
for Daml Script instead of scenarios.
2 Likes
I was typing it but @cocreature beat me to the punch, alas here is the equivalent code to that example (which should probably be updated).
makePartiesFrom names = mapA allocateParty names
test = script do
[a, b] <- makePartiesFrom ["a", "b"]
1 Like
Ok, thanks guys @anthony and @cocreature . I’ll try this when I get back to my desk. Little omissions and differences like this can really throw off a beginner coder like me.
There seem to be a number of different ways to do the same thing as well. It would be good to see some standardisation.
1 Like
Would love to see the complete code in it’s entirety in the documentation example
1 Like
100% agree, docs, howtos, and tutorials are something we’re going to focus on a lot in Q2.
1 Like
I couldn’t get it to work, so I just went back to allocating parties the normal way
alice <- allocateParty "Alice"
1 Like