Hi Damlers
I have a very simple Daml script that used to work:
test = script do
alice <- allocateParty "Alice"
p <- submit alice $ createCmd $ PersonContract {name = alice, address = Address {street = "RabbitStreet", city = "QueenOfHearts", country = "Wonderland"}, age = 7}
submit alice $ do
c <- fetch p
assert $ c.name == alice
Trying to run it now i get the following error:
/root/organizer/daml/AddressBook.daml:32:3: error:
• Couldn't match type 'Scenario' with 'Script'
arising from a functional dependency between:
constraint 'HasSubmit Script Update' arising from a use of 'submit'
instance 'HasSubmit Scenario Update' at <no location info>
• In the expression: submit alice
In a stmt of a 'do' block:
submit alice
$ do c <- fetch p
assert $ (getField @"name" c) == alice
In the first argument of 'script', namely
'do alice <- allocateParty "Alice"
What’s the reason for it?