mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jrosendo
7a960f7d00
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
Fun and Profit
The Festival is going well. Attendees are entering by redeeming tickets and enjoying it. It is now time for the organizer to cash out the benefits.
You will use a Smart Contract to send the benefits in ETH to the organizer.
Instructions
- Create a new Smart Contract
FunAndProfit
that implements the functionsbuyTicket()
andticketsOf()
from the prior exercise. - Add a function
redeemTicket()
that allows an attendee to give return one ticket. The function should fail (revert) if the attendee does not own any ticket. - Add a function
getBenefits()
that sends all the benefits from the Festival to the organizer.