Skip to content

Instantly share code, notes, and snippets.

@edwint88
Created June 3, 2021 13:17
Show Gist options
  • Save edwint88/4626ccc1e106c3253dcd6ad2e996bb47 to your computer and use it in GitHub Desktop.
Save edwint88/4626ccc1e106c3253dcd6ad2e996bb47 to your computer and use it in GitHub Desktop.
PlayWithMarlowe
When
[Case
(Deposit
(Role "Alice")
(Role "Alice")
(Token "" "")
(Constant 10)
)
(When
[Case
(Deposit
(Role "Bob")
(Role "Bob")
(Token "" "")
(Constant 10)
)
(When
[Case
(Choice
(ChoiceId
"Winner"
(Role "Charles")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Winner"
(Role "Charles")
))
(Constant 1)
)
(Pay
(Role "Bob")
(Account (Role "Alice"))
(Token "" "")
(Constant 10)
Close
)
(Pay
(Role "Alice")
(Account (Role "Bob"))
(Token "" "")
(Constant 10)
Close
)
)]
25 Close
)]
15 Close
)]
5 Close
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment