A blockchain-based renting platform proof-of-concept (PoC) built with Daml. This project demonstrates a decentralized lease management system featuring automated rent payments, maintenance issue reporting, and dispute resolution via arbitrators.
- Lease Agreements: Manage rental contracts between landlords and tenants.
- Time Oracle: Automates time-dependent actions like rent due dates.
- Arbitration: Resolves disputes (e.g., maintenance issues) through designated arbitrators.
- User Interface: Java-based clients for users and arbitrators to interact with the ledger.
Ensure you have the following installed:
- Daml SDK
- Java Development Kit (JDK) (Compatible with your Maven setup)
- Maven
- Python 3 (Used for fetching party IDs in scripts)
The sandbox.sh script automates the build process, generates Java bindings, and starts the Daml Sandbox (Ledger).
./sandbox.shWhat this does:
- Builds the Daml project (
rentingPlatform.dar). - Generates Java code from Daml templates into
Time/,Arbitrators/, andUser/directories. - Starts the Daml Sandbox with the
Test.Main:initializeinit script. - Generates
parties.jsoncontaining the IDs of allocated parties.
Open separate terminal windows to run the different components of the system.
Starts the Time Provider service which handles time-based events on the ledger.
# Run Time Provider 1
./time.sh 1
# Run Time Provider 2
./time.sh 2Runs the client application for tenants and landlords.
# Run as Bob (Tenant)
./user.sh 1
# Run as Alice (Landlord)
./user.sh 2Runs the client application for arbitrators to view and resolve disputes.
# Run as Arbitrator 1
./arbitrator.sh 1
# Run as Arbitrator 2
./arbitrator.sh 2daml/: Contains the Daml source code (Smart Contracts).User.daml: User and Message templates.Test/Main.daml: Initialization script and main test definitions.
Time/: Java application for the Time Oracle.Arbitrators/: Java application for the Arbitrator interface.User/: Java application for the User interface.manifests/: (If applicable) Deployment manifests.scripts:sandbox.sh: Lifecycle management (Build, Codegen, Start).time.sh,user.sh,arbitrator.sh: Launchers for respective Java apps.
- Parties not found: Ensure
parties.jsonexists in the root directory. It is generated whendaml startruns (via./sandbox.sh). - Port conflicts: The scripts assume the ledger runs on
localhost:6865. Ensure this port is free.