Designating any party in a list of parties as Controller
- ManishGroverOP 2
Hi,
I have a template with a list of parties. How can I allow any one of those parties to be able to exercise a choice, and pass that party to the resulting contract?
Example below:
template MyTemplate with operator: Party contacts : [Party] name: Text where signatory operator observer contacts controller any one of the contacts can DoSomething: ContractId SomeProposal with newName : Text do create SomeProposal with name = newName, operator, (contact who exercised the choice) template SomeProposal with operator: Party name: Text contact : Party where signatory contactIf there is another way to accomplish these things instead, that’s welcome too.
Thanks!
- matt 6
Can you do something like this using the dynamic choice construct?
choice DoSomething : ContractId SomeProposal with contact : Party newName : Text controller contact do assertMsg "is not a contact" $ contact `elem` contacts create SomeProposal with name = newName, operator, contact - cocreature 2
Great answer @matt!
- ManishGrover 1
Thank you Matt! This should work for me.