Apply for renting a property for a specific term and get rejected or approved by the superintendent.
- A renter creates a RentalApplication contract. Both renter and superintendent are invited as observers, but superintendent, as a controller, is authorized to exercise either Reject or Accept on the RentalApplication.
- Upon the controller exercising Reject, a new contract is created to give the chance to the renter to bump the amount offered increasing the chance in getting accepted.
- Revise choice can be exercised on the newly generated contract from above.
- Accept choice is exercised to finalize the rental application and generate a new RentalAgreement contract.
- There is also a Property contract uniquely identified by an owner and name. The LookupAgreement may be excercised by the superintendent as a shorthand to locate(if any) an active RentalAgreement given a specific term. Also superintendent can ExcerciseAgreement to archive any contracts whose term has already elapsed.
To compile the project
$ daml build
To test all scripts:
Either run the pre-written script in the Test.daml under /daml OR run:
$ daml test
To load the project into the sandbox and start navigator:
$ daml start