Skip to content

Instantly share code, notes, and snippets.

@brunjlar
Last active June 14, 2022 14:57
Show Gist options
  • Save brunjlar/c42bb45a4ccdd9f7622542a888c26858 to your computer and use it in GitHub Desktop.
Save brunjlar/c42bb45a4ccdd9f7622542a888c26858 to your computer and use it in GitHub Desktop.
MPP - Homework 1
{"valueParameterInfo":[["Deposit",{"valueParameterFormat":{"contents":[6,"ada"],"tag":"DecimalFormat"},"valueParameterDescription":"Amount that both givers need to deposit."}]],"timeParameterDescriptions":[["Deadline","Time by which both deposits need to be made."]],"roleDescriptions":[["Giver1","The first giver."],["Giver2","The second giver."],["Receiver","The receiver."]],"contractType":"Other","contractShortDescription":"Two givers give to a receiver.","contractName":"MPP - Homework 1","contractLongDescription":"Two givers need to deposit the same amount of money, and the total is then paid to the receiver.","choiceInfo":[]}
When
[Case
(Deposit
(Role "Giver1")
(Role "Giver1")
(Token "" "")
(ConstantParam "Deposit")
)
(When
[Case
(Deposit
(Role "Giver2")
(Role "Giver2")
(Token "" "")
(ConstantParam "Deposit")
)
(Pay
(Role "Giver1")
(Party (Role "Receiver"))
(Token "" "")
(ConstantParam "Deposit")
(Pay
(Role "Giver2")
(Party (Role "Receiver"))
(Token "" "")
(ConstantParam "Deposit")
Close
)
)]
(TimeParam "Deadline")
Close
), Case
(Deposit
(Role "Giver2")
(Role "Giver2")
(Token "" "")
(ConstantParam "Deposit")
)
(When
[Case
(Deposit
(Role "Giver1")
(Role "Giver1")
(Token "" "")
(ConstantParam "Deposit")
)
(Pay
(Role "Giver1")
(Party (Role "Receiver"))
(Token "" "")
(ConstantParam "Deposit")
(Pay
(Role "Giver2")
(Party (Role "Receiver"))
(Token "" "")
(ConstantParam "Deposit")
Close
)
)]
(TimeParam "Deadline")
Close
)]
(TimeParam "Deadline")
Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment