Skip to content

Instantly share code, notes, and snippets.

@jhotson
Last active May 20, 2021 02:31
Show Gist options
  • Save jhotson/fc35f574c8cd5dfcb6ed34e01971dc05 to your computer and use it in GitHub Desktop.
Save jhotson/fc35f574c8cd5dfcb6ed34e01971dc05 to your computer and use it in GitHub Desktop.
SC v2
When
[Case
(Deposit
(Role "Landlord")
(Role "Tenant")
(Token "" "")
(Constant 100)
)
(When
[Case
(Choice
(ChoiceId
"Accept Tenant"
(Role "Landlord")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Accept Tenant"
(Role "Landlord")
))
(Constant 1)
)
(When
[Case
(Deposit
(Role "Landlord")
(Role "Tenant")
(Token "" "")
(Constant 900)
)
(Let
"Tenancy"
SlotIntervalStart
(When
[Case
(Choice
(ChoiceId
"Break Contract"
(Role "Tenant")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Break Contract"
(Role "Tenant")
))
(Constant 1)
)
(When
[Case
(Choice
(ChoiceId
"Property Inspection"
(Role "Landlord")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Property Inspection"
(Role "Landlord")
))
(Constant 1)
)
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
Close
)]
2
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
)
(Assert
(ValueEQ
(ChoiceValue
(ChoiceId
"Break Contract"
(Role "Tenant")
))
(Constant 2)
)
(Let
"End Tenancy"
SlotIntervalEnd
(When
[Case
(Choice
(ChoiceId
"Property Inspection"
(Role "Landlord")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Property Inspection"
(Role "Landlord")
))
(Constant 1)
)
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
Close
)]
13
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
)
)
)
)]
12
(Let
"End Tenancy"
SlotIntervalEnd
(When
[Case
(Choice
(ChoiceId
"Property Inspection"
(Role "Landlord")
)
[Bound 1 2]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"Property Inspection"
(Role "Landlord")
))
(Constant 1)
)
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
Close
)]
13
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
)
)
)
)]
1 Close
)
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
)]
1
(Pay
(Role "Landlord")
(Party (Role "Tenant"))
(Token "" "")
(Constant 100)
Close
)
)]
1 Close
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment