Skip to content

Instantly share code, notes, and snippets.

@llazzaro
Created August 12, 2021 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llazzaro/15031846df264506f79d2385b86aff2d to your computer and use it in GitHub Desktop.
Save llazzaro/15031846df264506f79d2385b86aff2d to your computer and use it in GitHub Desktop.
Test
When
[Case
(Deposit
(PK "be")
(Role "player1")
(Token "" "")
(Constant 15)
)
(When
[Case
(Deposit
(PK "be")
(Role "player2")
(Token "" "")
(Constant 15)
)
(When
[Case
(Choice
(ChoiceId
"outcome"
(Role "player1")
)
[Bound 1 2]
)
(When
[Case
(Choice
(ChoiceId
"outcome"
(Role "player2")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"outcome"
(Role "player1")
))
(ChoiceValue
(ChoiceId
"outcome"
(Role "player2")
))
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"outcome"
(Role "player1")
))
(Constant 1)
)
(Pay
(PK "be")
(Party (Role "player1"))
(Token "" "")
(Constant 30)
Close
)
(Pay
(PK "be")
(Party (Role "player2"))
(Token "" "")
(Constant 30)
Close
)
)
Close
)]
0 ?contract
)]
100 ?contract
)]
30
(Pay
(PK "be")
(Party (Role "player1"))
(Token "" "")
(Constant 15)
Close
)
)]
20 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