Contract Specification - Redoudou/Leaseatblock GitHub Wiki
Stage
HCR
owner = msg.sender
Landlord
struct Landlord {
address landlordAddress,
stage (pending/approve),
}
Landlord[] public Landlords;
House
struct House {
string houseInfo,
belongTo LandLordAddress,
uint RentFee,
uint Rent increment,
stage (pending/approve),
}
House[] public Houses;
Tenant
struct Tenant {
string tenantInfo,
belongTo TenantAddress,
stage (pending/approve),
}
Tenant[] public tenants;
Lease
struct Lease {
address Landlord,
address Tenant,
address House,
date startDate,
date expiringDate,
status (L/O/E),
uint depositAmount,
...
}
Lease[] public leases;
Public Function
Tenant register
This is where the tenant create the account and ask to be connected to a Lease.
Landlord register
The Landlord can create the account and the HCR will validated it.
Get data function
HCR Function
HRC Create Lease
The HCR create an Lease contract with the basic information inside. BIN, number of cosigner, BBL and address.
Accept/Reject Landlord
When Landlord create and account and submit for create the HCR will validate it.
Accept/Reject Tenant
Accept/Reject Landlord's house request
Landlord Function
Edit Lease
The landlord can only edit or modify a lease because the Lease is created by the HCR. The landords can edit all informations besides BIN, number of cosigner and BBL.
Signed/Not signed Lease
House register
Tenant Function
Create/Edit Lease
Accept/Reject Lease
Note
- Lease will change to L stage when both Tenant and LandLord agree
- Lease is on Open when HCR create the Lease
- When there is a
Future improvement
- Import erc721