Last active
June 12, 2022 05:28
-
-
Save ajuggler/64406214d2768aab036a531e2fbc3383 to your computer and use it in GitHub Desktop.
Bank Client (draft)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"valueParameterInfo":[["Amount",{"valueParameterFormat":{"contents":[6,"ada"],"tag":"DecimalFormat"},"valueParameterDescription":"Deposit amount"}]],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Bank conditionally rewards Client for all deposits","contractName":"Bank & Client","contractLongDescription":"Bank conditionally rewards Client for all deposits, penalizes if at least one deposit is missing","choiceInfo":[]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Bank") | |
(Token "" "") | |
(MulValue | |
(Constant 2) | |
(ConstantParam "Amount") | |
) | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Amount") | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Amount") | |
) | |
(Pay | |
(Role "Bank") | |
(Account (Role "Client")) | |
(Token "" "") | |
(AvailableMoney | |
(Role "Bank") | |
(Token "" "") | |
) | |
Close | |
)] | |
(TimeParam "Client Deadline") | |
Close | |
)] | |
(TimeParam "Client Deadline") | |
Close | |
)] | |
(TimeParam "Bank Deadline") | |
Close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment