A smart contract to handle a lease agreement between two parties.
- Parties can only negotiate the contract before it has been signed
- Rent is paid at the very end of a month.
- Contract closes after last rent payment or upon abort()
- One tenant payable address
- One landlord payable address
- Property struct
- Offer struct
- CounterOffer struct
- mapping balances to keep track of amount due
-
onlyTenant:
- makeCounterOffer()
- sign() - initializes the contract
- paySD()
- payRent()
-
onlyLandlord:
- Constructor()
- setProperty()
- makeOffer()
- abort()
- extendContract()
-
Open:
- view contract attributes with inherent getter functions
- enum State{Unsigned, AwaitingDeposit, Active, Closed}
- State.Unsigned: contract is awaiting an agreement between Offer and CounterOffer
- State.AwaitingDeposit: tenant has signed but has not submitted a deposit
- State.Active: the lease is active, rent is due at the end of every month
- State.Closed: contract term has completed, or contract has been voided by the landlord.
pull requests welcome!