Skip to content

Instantly share code, notes, and snippets.

@uriee
Last active September 1, 2021 14:14
Show Gist options
  • Save uriee/1f66715ea321e31859b00bdcffd24cd3 to your computer and use it in GitHub Desktop.
Save uriee/1f66715ea321e31859b00bdcffd24cd3 to your computer and use it in GitHub Desktop.
marlow-drain
When
[Case
(Deposit
(Role "donor")
(Role "donor")
(Token "" "")
(Constant 12000)
)
(When
[Case
(Choice
(ChoiceId
"drain"
(Role "recipient")
)
[Bound 0 1]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"drain"
(Role "recipient")
))
(Constant 1)
)
(Pay
(Role "donor")
(Party (Role "recipient"))
(Token "" "")
(AvailableMoney
(Role "donor")
(Token "" "")
)
Close
)
Close
)]
5 Close
)]
10 Close
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
When
[Case
(Choice
(ChoiceId
"amount"
(Role "donor")
)
[Bound 0 12000]
)
(When
[Case
(Deposit
(Role "donor")
(Role "donor")
(Token "" "")
(ChoiceValue
(ChoiceId
"amount"
(Role "donor")
))
)
(When
[Case
(Choice
(ChoiceId
"drain"
(Role "recipient")
)
[Bound 0 1]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"drain"
(Role "recipient")
))
(Constant 1)
)
(Pay
(Role "donor")
(Party (Role "recipient"))
(Token "" "")
(AvailableMoney
(Role "donor")
(Token "" "")
)
Close
)
Close
)]
5 Close
)]
7 Close
)]
10 Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment