Created
October 2, 2020 15:23
-
-
Save krisajenkins/7ca510134910533ceff815cd723438f9 to your computer and use it in GitHub Desktop.
Marlowe Smart Contract
This file contains hidden or 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 | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Role "alice") | |
(Token "" "") | |
(Constant 450) | |
) | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "alice") | |
) | |
[Bound 0 1] | |
) | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "bob") | |
) | |
[Bound 0 1] | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"choice" | |
(Role "alice") | |
)) | |
(ChoiceValue | |
(ChoiceId | |
"choice" | |
(Role "bob") | |
)) | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"choice" | |
(Role "alice") | |
)) | |
(Constant 0) | |
) | |
(Pay | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Party (Role "bob")) | |
(Token "" "") | |
(Constant 450) | |
Close | |
) | |
Close | |
) | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 1 1] | |
) | |
Close , Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 0 0] | |
) | |
(Pay | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Party (Role "bob")) | |
(Token "" "") | |
(Constant 450) | |
Close | |
)] | |
100 Close | |
) | |
)] | |
60 | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 1 1] | |
) | |
Close , Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 0 0] | |
) | |
(Pay | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Party (Role "bob")) | |
(Token "" "") | |
(Constant 450) | |
Close | |
)] | |
100 Close | |
) | |
), Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "bob") | |
) | |
[Bound 0 1] | |
) | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "alice") | |
) | |
[Bound 0 1] | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"choice" | |
(Role "alice") | |
)) | |
(ChoiceValue | |
(ChoiceId | |
"choice" | |
(Role "bob") | |
)) | |
) | |
(If | |
(ValueEQ | |
(ChoiceValue | |
(ChoiceId | |
"choice" | |
(Role "alice") | |
)) | |
(Constant 0) | |
) | |
(Pay | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Party (Role "bob")) | |
(Token "" "") | |
(Constant 450) | |
Close | |
) | |
Close | |
) | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 1 1] | |
) | |
Close , Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 0 0] | |
) | |
(Pay | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Party (Role "bob")) | |
(Token "" "") | |
(Constant 450) | |
Close | |
)] | |
100 Close | |
) | |
)] | |
60 | |
(When | |
[Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 1 1] | |
) | |
Close , Case | |
(Choice | |
(ChoiceId | |
"choice" | |
(Role "carol") | |
) | |
[Bound 0 0] | |
) | |
(Pay | |
(AccountId | |
0 | |
(Role "alice") | |
) | |
(Party (Role "bob")) | |
(Token "" "") | |
(Constant 450) | |
Close | |
)] | |
100 Close | |
) | |
)] | |
40 Close | |
)] | |
10 Close |
This file contains hidden or 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
[{"transactionWarnings":[],"transactionError":null,"state":{"minSlot":0,"choices":[],"boundValues":[],"accounts":[]},"slot":0,"possibleActions":[[{"role_token":"alice"},[[{"contents":[{"account_owner":{"role_token":"alice"},"account_number":0},{"role_token":"alice"},{"token_name":"","currency_symbol":""},450],"tag":"DepositInputId"},{"contents":[{"account_owner":{"role_token":"alice"},"account_number":0},{"role_token":"alice"},{"token_name":"","currency_symbol":""},450],"tag":"DepositInput"}]]],[{"role_token":"marlowe_other_actions"},[[{"tag":"MoveToSlotId"},{"s":1,"e":1,"c":[10],"tag":"MoveToSlot"}]]]],"pendingInputs":[],"moneyInContract":[],"log":[],"holes":[],"editorWarnings":[],"editorErrors":[],"contract":{"when":[{"then":{"when":[{"then":{"when":[{"then":{"then":{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"role_token":"bob"},"then":"close","pay":450,"from_account":{"account_owner":{"role_token":"alice"},"account_number":0}},"if":{"value":{"value_of_choice":{"choice_owner":{"role_token":"alice"},"choice_name":"choice"}},"equal_to":0},"else":"close"},"if":{"value":{"value_of_choice":{"choice_owner":{"role_token":"alice"},"choice_name":"choice"}},"equal_to":{"value_of_choice":{"choice_owner":{"role_token":"bob"},"choice_name":"choice"}}},"else":{"when":[{"then":"close","case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":1,"from":1}]}},{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"role_token":"bob"},"then":"close","pay":450,"from_account":{"account_owner":{"role_token":"alice"},"account_number":0}},"case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":0,"from":0}]}}],"timeout_continuation":"close","timeout":100}},"case":{"for_choice":{"choice_owner":{"role_token":"bob"},"choice_name":"choice"},"choose_between":[{"to":1,"from":0}]}}],"timeout_continuation":{"when":[{"then":"close","case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":1,"from":1}]}},{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"role_token":"bob"},"then":"close","pay":450,"from_account":{"account_owner":{"role_token":"alice"},"account_number":0}},"case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":0,"from":0}]}}],"timeout_continuation":"close","timeout":100},"timeout":60},"case":{"for_choice":{"choice_owner":{"role_token":"alice"},"choice_name":"choice"},"choose_between":[{"to":1,"from":0}]}},{"then":{"when":[{"then":{"then":{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"role_token":"bob"},"then":"close","pay":450,"from_account":{"account_owner":{"role_token":"alice"},"account_number":0}},"if":{"value":{"value_of_choice":{"choice_owner":{"role_token":"alice"},"choice_name":"choice"}},"equal_to":0},"else":"close"},"if":{"value":{"value_of_choice":{"choice_owner":{"role_token":"alice"},"choice_name":"choice"}},"equal_to":{"value_of_choice":{"choice_owner":{"role_token":"bob"},"choice_name":"choice"}}},"else":{"when":[{"then":"close","case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":1,"from":1}]}},{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"role_token":"bob"},"then":"close","pay":450,"from_account":{"account_owner":{"role_token":"alice"},"account_number":0}},"case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":0,"from":0}]}}],"timeout_continuation":"close","timeout":100}},"case":{"for_choice":{"choice_owner":{"role_token":"alice"},"choice_name":"choice"},"choose_between":[{"to":1,"from":0}]}}],"timeout_continuation":{"when":[{"then":"close","case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":1,"from":1}]}},{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"role_token":"bob"},"then":"close","pay":450,"from_account":{"account_owner":{"role_token":"alice"},"account_number":0}},"case":{"for_choice":{"choice_owner":{"role_token":"carol"},"choice_name":"choice"},"choose_between":[{"to":0,"from":0}]}}],"timeout_continuation":"close","timeout":100},"timeout":60},"case":{"for_choice":{"choice_owner":{"role_token":"bob"},"choice_name":"choice"},"choose_between":[{"to":1,"from":0}]}}],"timeout_continuation":"close","timeout":40},"case":{"party":{"role_token":"alice"},"of_token":{"token_name":"","currency_symbol":""},"into_account":{"account_owner":{"role_token":"alice"},"account_number":0},"deposits":450}}],"timeout_continuation":"close","timeout":10}}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment