Rent Record

Under Review

UTILITYDOCUMENTSFINANCIAL

Contract purpose

The home owner creates the contract and feeds it the rent, the client address and the starting rent period. The client has to send the rent before the start date in order to receive the key. Also, the key has to be sent before the starting date too. Once the money is sent and the door code received, the owner can transfer the balance from the contract to his own account.

Contract parameters

rent : the sum the renter needs to pay

renter : address of the renter

startDate : the date when the rent period starts (unix time)

Exposed methods and variables

payRent : allows the renter to send the money in order to receive the door code and emits the renterPaid event

sendKey : called by the owner, after the payment was made, to send the coord code to the contract and emits the keySent event

parameter nametypedetails
_keyintegerthe apartment door code

getKey : called by the renter in order to receive the sent key, emits the keyReceived event

getMoney : once the paid is done and the key received, the owner can transfer the money to his account

Reviewed by Modex
Buy

Copyright © Modex Marketplace