Skip to content

Instantly share code, notes, and snippets.

@pisacode
Created October 31, 2023 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pisacode/43d9e0dfc83f51296d05ee8c3ade8e24 to your computer and use it in GitHub Desktop.
Save pisacode/43d9e0dfc83f51296d05ee8c3ade8e24 to your computer and use it in GitHub Desktop.
Rent
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
When
[ Case
(Deposit
(Role "Tenant")
(Role "Tenant")
(Token "" "")
(ConstantParam "Collateral amount"))
(When
[ Case
(Deposit
(Role "Landlord")
(Role "Landlord")
(Token "" "")
(ConstantParam "Collateral amount"))
(When
[ Case
(Deposit
(Role "Tenant")
(Role "Landlord")
(Token "" "")
(ConstantParam "Rent"))
(When
[ Case
(Choice
(ChoiceId "PayRentOnTime" (Role "Tenant"))
[Bound 0 0])
Close
,
Case
(Choice
(ChoiceId "LatePayment" (Role "Tenant"))
[Bound 1 1])
(Pay
(Role "Tenant")
(Role "Landlord")
(Token "" "")
(MulValue (ConstantParam "Rent") (Constant 1.05)) -- Increase by 5%
(When
[ Case
(Choice
(ChoiceId "PayRentOnTime" (Role "Tenant"))
[Bound 0 0])
Close
]
(After
(ConstantParam "PaymentDeadline") -- The deadline for the next month's payment
Close)
)
)
]
(After
(ConstantParam "PaymentDeadline") -- Deadline for the first month's payment
Close)
]
(After
(ConstantParam "CollateralDepositDeadline") -- Deadline for the collateral deposit by Tenant
Close)
)
]
(After
(ConstantParam "CollateralDepositDeadline") -- Deadline for the collateral deposit by Landlord
Close)
)
]
(After
(ConstantParam "CollateralDepositDeadline") -- Ensure the contract starts immediately
Close)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment