Mod note: As of SDK 1.5.0 Scenarios have been superseded by the more powerful Daml Script. We now recommend using that for all purposes. For more information, and to learn how to use Script please check out @Andreas’ post on our blog.
I am hitting a snag in the scenario. I hope you can help pinpoint the problem
example = scenario do alice <- getParty "Alice" bob <- getParty "Bob" let citizenkey = CitizenKey with citizen = alice ; id = "1" let citizeninfo = CitizenInfo with citizendetail1 = "Text1" ; citizendetail2 ="Text2" ; citizendetail3 = "Text3" submit alice do create CitizenRegistration with registrationCid = citizenkey; registrationData = citizeninfo let citizenkey = CitizenKey with citizen = bob ; id = "2" let citizeninfo = CitizenInfo with citizendetail1 = "Text1" ; citizendetail2 ="Text2" ; citizendetail3 = "Text3" bobregistration <- submit bob do create CitizenRegistration with registrationCid = citizenkey; registrationData = citizeninfo
I trying to understand the correct format for
bobregistration <- submit bob do create CitizenRegistration with registrationCid = citizenkey; registrationData = citizeninfo
It gives me the following error
error: The last statement in a 'do' block must be an expression bobregistration <- submit bob do create CitizenRegistration {registrationCid = citizenkey, registrationData = citizeninfo}typecheck