Skip to content

Instantly share code, notes, and snippets.

@arielweinberger
Last active June 5, 2021 16:49
Show Gist options
  • Save arielweinberger/2caa83b923d7229db0b683746471f8e6 to your computer and use it in GitHub Desktop.
Save arielweinberger/2caa83b923d7229db0b683746471f8e6 to your computer and use it in GitHub Desktop.
Test
When
[Case
(Deposit
(Role "serviceProvider")
(Role "customer")
(Token "" "")
(Constant 20)
)
(When
[Case
(Choice
(ChoiceId
"acceptRequest"
(Role "serviceProvider")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"acceptRequest"
(Role "serviceProvider")
))
(Constant 1)
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"cancelRequest"
(Role "customer")
))
(Constant 1)
)
(Pay
(Role "serviceProvider")
(Account (Role "customer"))
(Token "" "")
(Constant 15)
Close
)
Close
)
(Pay
(Role "serviceProvider")
(Account (Role "customer"))
(Token "" "")
(Constant 20)
Close
)
)]
2 Close
)]
1 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