Weeding Dress Renting

Contract purpose

This smart contract manages the wedding dress renting process for a website or store that provides this kind of service

Exposed methods and variables

manager address of the store manager

list returns the details about a specific weeding dress identified by its unique store number.

addDress called by the manager when he wants to add a new wedding dress to the list

parameter nametypedetails
_numberstringunique identifier of the dress
_sizestringthe size of the dress
_pricePerDayintegerthe amount the client needs to pay to book the dress for a day
_pricePerWeekintegerthe amount the client needs to pay to book the dress for a week

rentDress payable function called by the client when she wants to rent a specific dress

parameter nametypedetails
_numberstringunique identifier of the dress

dressAvailable allows the manager to mark as available a previously booked dress

parameter nametypedetails
_numberstringunique identifier of the dress

transferMoney allows the manager to transfer money from the contract's balance to his own account

parameter nametypedetails
amountintegerthe sum the manager wants to transfer

getBalance returns the balance of the contract when called by the manager

Events

DressBooked

parameter nametypedetails
nrstringunique identifier of the booked dress
moneyPaidintegerthe amount the client paid for renting the dress
clientethereum addressthe address of the client who booked the dress
Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract