BucketList

Contract purpose

This Smart Contract allows someone to create his own bucket list. Every time the owner enters a new new wish to his list, he has to send an amount of ether. When the wish is marked as checked, that amount goes back to his account.

Exposed methods and variables

owner the ethereum address of bucket list owner, given as parameter at contract creation

addWish function called by the owner when he wants to add a new wish to the list. It emits WishAdded event (it contains the id by which the specific entry to the list can be further identified)

parameter nametypedetails
_valueintegerhow much the wish is worth
_deadlineintegerthe date until which the wish can be checked out
_descriptionstringdescription of the wish

checkWish called by the owner when a wish is fulfilled (it has to be before the deadline) and he will receive the tokens back

parameter nametypedetails
_idintegerunique identifier of a list entry

getWishDetails returns the details about a specific wish from the list

parameter nametypedetails
_idintegerunique identifier of the wish to be queried

getTimeLeft returns the time left until the deadline of a particular wish

parameter nametypedetails
_idintegerunique identifier of the wish to be queried

extendDeadline allows the owner to extend the deadline of a wish (can only be extended if the wish is not completed yet)

parameter nametypedetails
_idintegerunique identifier of the wish
_amountintegerthe amount to be added to the deadline

Events

BoatRented

parameter nametypedetails
BoatIDintegerthe id of the rented boat
Clientethereum addressthe address of the client who rented the boat
Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract