Skip to content

Instantly share code, notes, and snippets.

@johnshearing
Created June 8, 2022 02:37
Show Gist options
  • Save johnshearing/021c38be6998a9ac8e13ffe871d249c7 to your computer and use it in GitHub Desktop.
Save johnshearing/021c38be6998a9ac8e13ffe871d249c7 to your computer and use it in GitHub Desktop.
If
(ValueLE
(ConstantParam "DepositAmount")
(Constant 0)
)
Close
(Let
"Amount"
(ConstantParam "DepositAmount")
(When
[Case
(Deposit
(Role "Giver1")
(Role "Giver1")
(Token "" "")
(UseValue "Amount")
)
(When
[Case
(Choice
(ChoiceId
"Choice"
(Role "Chooser")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Choice"
(Role "Chooser")
))
(Constant 1)
)
(Pay
(Role "Giver1")
(Party (Role "Receiver1"))
(Token "" "")
(UseValue "Amount")
Close
)
(Pay
(Role "Giver1")
(Party (Role "Receiver2"))
(Token "" "")
(UseValue "Amount")
Close
)
)]
(TimeParam "ChoiceDealine")
Close
)]
(TimeParam "DepositDeadline")
Close
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment