Last active
June 14, 2022 15:53
-
-
Save marco-martins/015eb7be1ff940f0eb32b91311b06ca2 to your computer and use it in GitHub Desktop.
simple-payment-close.js
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":[["Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}]],"timeParameterDescriptions":[],"roleDescriptions":[["Giver1",""]],"contractType":"Other","contractShortDescription":"","contractName":"Double Pay","contractLongDescription":"We couldn't find information about this contract","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
// main function | |
function payment (giver: Party, receiver: Party, amount: Value, deadline: Timeout): Contract { | |
return When([ | |
Case( | |
Deposit(receiver, giver, ada, amount), | |
Close | |
) | |
], deadline, Close) | |
} | |
return payment( | |
Role("Giver"), | |
Role("Receiver"), | |
Constant(100000000), | |
TimeParam("Deadline") | |
) |
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