Skip to content

Instantly share code, notes, and snippets.

@jhotson
Last active June 17, 2021 03:43
Show Gist options
  • Save jhotson/3b73d4134ff23be9246ff84ef557b264 to your computer and use it in GitHub Desktop.
Save jhotson/3b73d4134ff23be9246ff84ef557b264 to your computer and use it in GitHub Desktop.
Simple Smart Contract. Just a payment.
When
[Case
(Deposit
(Role "Tenant")
(Role "Tenant")
(Token "" "")
(Constant 2000)
)
(When
[Case
(Choice
(ChoiceId
"AcceptDeny"
(Role "Landlord")
)
[Bound 1 2]
)
(If
?observation
(Pay
(Role "Tenant")
(Party (Role "Landlord"))
(Token "" "")
(Constant 2000)
Close
)
(Pay
(Role "Tenant")
(Party (Role "Tenant"))
(Token "" "")
(Constant 2000)
Close
)
)]
0 ?contract
)]
1 Close
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
When
[Case
(Deposit
(Role "Tenant")
(Role "Tenant")
(Token "" "")
(Constant 2000)
)
(Pay
(Role "Tenant")
(Party (Role "Landlord"))
(Token "" "")
(Constant 2000)
Close
)]
1 Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment