Last active
December 3, 2022 21:08
-
-
Save mattu08/854fa111c23cc776dbf587b161780bf5 to your computer and use it in GitHub Desktop.
Hotel Room Booking Smart Contract ADA
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":[],"timeParameterDescriptions":[["Booking Date","Booking Date"]],"roleDescriptions":[["Guest","Guest"],["Hotel","Hotel"]],"contractType":"Other","contractShortDescription":"Hotel Booking Smart Contract ADA","contractName":"Hotel Booking Smart Contract ADA","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[["Book Room",{"choiceFormat":{"contents":[0,"Book Room"],"tag":"DecimalFormat"},"choiceDescription":"Option 1. Book standard room. Option 2. Book standard room with breakfast included. Option 3. Book luxury room includes breakfast."}]]} |
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 | |
(Choice | |
(ChoiceId | |
"Book Room" | |
(Role "Guest") | |
) | |
[Bound 1 3] | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"Book Room" | |
(Role "Guest") | |
)) | |
(Constant 1) | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Guest") | |
(Role "Guest") | |
(Token "" "") | |
(Constant 90) | |
) | |
(Pay | |
(Role "Guest") | |
(Party (Role "Hotel")) | |
(Token "" "") | |
(Constant 90) | |
Close | |
)] | |
(TimeParam "Booking Date") | |
Close | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"Book Room" | |
(Role "Guest") | |
)) | |
(Constant 2) | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Guest") | |
(Role "Guest") | |
(Token "" "") | |
(Constant 120) | |
) | |
(Pay | |
(Role "Guest") | |
(Party (Role "Hotel")) | |
(Token "" "") | |
(Constant 120) | |
Close | |
)] | |
(TimeParam "Booking Date") | |
Close | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"Book Room" | |
(Role "Guest") | |
)) | |
(Constant 3) | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Guest") | |
(Role "Guest") | |
(Token "" "") | |
(Constant 150) | |
) | |
(Pay | |
(Role "Guest") | |
(Party (Role "Hotel")) | |
(Token "" "") | |
(Constant 150) | |
Close | |
)] | |
(TimeParam "Booking Date") | |
Close | |
) | |
Close | |
) | |
) | |
)] | |
(TimeParam "Booking Date") | |
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