For BUS 498 (Directed Topics in Information Systems - Blockchain) by Amy Ru (@ameru), Adam Watson (@apwats), and Shusei Yokoi (@Shusei25)
For our class project, we decided to build a smart contract for Girl Scouts to sell their famous Girl Scout Cookies.
On top of the base trustless sales smart contract, here are the additional features we've implemented:
- An inventory catalog to log unique item descriptors of each cookie box, such as their id tag, name, description, and quantity
- Events which trigger notifications to a Girl Scout or shipment of a box of cookies
- Set the default price of any box of Girl Scout cookies to 0.005 ETH
- Created a cart-like function that keeps track of total number of boxes and price subtotal
- Included time expiry to avoid sending out stale cookies
This is the start screen containing your wallet and contract fields:
Here are the results after the contract is created. This will cost you some ETH.
This is the createCart object where you can create your Cart view:
Here is the status of the contract after you create your cart:
This is the status of the contract when you confirm your purchase:
Perks of being the middleman, and the plight of being a girl scout - it seems as if the full value of the purchase wasn't issued to the cookie seller.
Contract status after confirmation is received:
This is the error you will get when you try to access privileged activity without privileged access:
This is the error you will get when the input for buyer and seller are the same:
This is the error you will get if you try to buy stale cookies: