Skip to content

Instantly share code, notes, and snippets.

@ajuggler
Last active June 12, 2022 05:28
Show Gist options
  • Save ajuggler/64406214d2768aab036a531e2fbc3383 to your computer and use it in GitHub Desktop.
Save ajuggler/64406214d2768aab036a531e2fbc3383 to your computer and use it in GitHub Desktop.
Bank Client (draft)
{"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":[]}
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment