Open danishyasin33 opened 2 years ago
Designs for now: https://xd.adobe.com/view/38b16758-5342-457f-8e4a-0ff2bceb5961-6de2/
Designs for now: https://xd.adobe.com/view/38b16758-5342-457f-8e4a-0ff2bceb5961-6de2/
Dev link for these designs: https://xd.adobe.com/view/1c9a3256-1aeb-4f42-9562-b6a90da8c8d7-49c9/
agoric app
for the ticket store.contract
and apis
.UI
.Changes Required
)Ticket Store UI -V2: https://xd.adobe.com/view/b1539a93-7d2d-4d0a-9019-afb8f1d5c190-e400/
Dev link: https://xd.adobe.com/view/ae434155-b1f7-4426-b504-01a0117d8d7a-fb10/
Added the "Check In" screens to the same link
ui
branchReplace this drag & drop image field with image URL input. Updates on the same links.
checkin
page cards.checkin
page as well.createEvent
page.marketplace
page.createNewEvent
.buyTicket
.checkIn
congratulations
on each pagebranch
.
success
for each pagepinanta
for images. All images are rendered through pinata url.ui hooks
completed and Application context
is being managed for every page.notifier
which will store the events array on the marketplace page. deployment of contract
, the events on the marketplace page can change.buyer
comes an buy certain amount of tickets
from this marketplace, after accepting the offer from his wallet the amount of tickets he bought will be minted to his wallet.NFT
irrespective of the event Name.
contract
and api
directory.contract
and api
deploy script.marketplace
and checkIn
tickets flows.backend branch
.
marketplaceTicketNotifier
to the application context and the frontend for marketplace will show the tickets coming from the contract.buy ticket
and checkIn tickets
. marketPlace cards
context to the notifiers, so now the cards being displayed in marketplace are from the available offers in the contract.marketplace page
.marketplace
and checkin page
wallet
automatically.MarketPlace
contract on which have all the notifiers logic.
makeOfferForTickets()
would have functionality for creating seller seats for all the event tickets that are in marketplace.makePurchaseOffer()
can be called by the buyer to make matching offer to cards put on sale in marketPlace.issues
with contract Currently, need to discuss this laterticket minting
functionality in the deploy script. event tickets
are now being minted
to contract deployer's wallet
.marketplace
are being fetched from the notifier maintained in the contract.Checkin
page tickets are now directly being fetched from the wallet.ticket minting flow
:
agoric start
.backend
branch.
deploy script
so that the ticket minting happens through deposit facet
instead of sending and accepting offer in wallet
. seller wallet
has all the nft's
. A zoe
offer is being sent to the contract
that will then trigger the exchangeOffer()
function in contract.exchangeOffer
handler runs all the sell seats
will be automatically be managed in the BookOrders( notifier ) provided by simple exchange contract by default. issue
in zoe offer generations which I mentioned in the channel
.ui
service for purchasing tickets
which I will be able to check when the zoe offer issue solves.state
in the frontend to convert all the separate tickets
from the sell offers
to array of events which will be displayed in the marketplace
.Updated Flow and structure : https://gist.github.com/dckc/9c393be1bd5a147f72c6b42ca12a1aa2
deploy script
the card are being minted
using an offer
which is sent to seller wallet for accepting minted tickets to their wallet.contract
and apis
.zoe invitation
is also deposited into seller wallet which will help us figure out difference between seller and other users at the frontend.continuing Invitation Pattern
with the invitation
already available in wallet to put the tickets on sale.deploy script
. But had to be shifted to the dapp side
. isSeller
context to detect whether user is seller or not. invitations
in zoe purse
and if it contains a creator invitation
then we set seller as true.invitation
anymore.creator Invitation
in the dapp. To send an offer to the wallet invitation
is required.creator invitation
was deposited
in the wallet
at deployment of api
. But still it was still inaccessible
through the dapp.deposited invitation
, an invitation query
is required in the offer template passed in addoffer()
. The query consist of contract instance
and the invitation description
.create event page
logic can be also implemented easily. But will implement it after selling logic is done.
flow diagram
as well so that it can be shared in the agoric channel
.result
of the previous offer
must return an invitation maker
.continuing offer
the offer Id
of the previous offer
aswell the description
of the invitation that the invitation maker creates.invitation query
thing up and running which allowed the creator
or seller
to make ticket minting offers.Invitation maker
is now working as well so the sell offer are now generated from the frontend and the offers need to be accepted in the wallet.offers
as needed from the dapp.copy bag for this case to send as
minimum offers` as possible to the seller walletoffers
to send.markeplace section
single offer
for each section
in an Event
.adding all the cards
in a section of an event in a copy bag
(or an array
with simple Set value if copy bag doesn't workout) and send in wallet offer.initial stage
but if later seller
wants to create offers
he can do that from create section.I believe this approach is fine if we are just creating offers for all sections in a event. Still a huge improvement from sending offers for each individual ticket.
Context: Why is the offer in pending state?
So the offer is in the pending state since when the seller initiate dapp for the first time. All the minted nfts in his wallet are put onto sale section wise. Since the offer has both want
and give
in the proposal hence the offer will only move to accepted or declined state once the offer completes. Hence to solve this issue we can remove want
from the proposal and handle that manually in offer compare seat function
.
Context: Should it not be that the seller has the event tickets in their wallets and we just show them in the marketplace. Then when a user tries to purchase it, they send an offer for that particular ticket?
No this is not the case. When a buyer comes to the marketplace , he clicks on buy for specific event tickets and a counter offer is created. That offer is compared with all sell offers in the contract. And if it matches or is less that equal to sell offer then the swap takes place. So when we purchase a ticket the selling offer is not generated at that time. Selling offer is already there the buyer can only send offer for tickets whose selling offer is available in the contract.
checkIn
ticket logic. It burns tickets and hence the checkIn ticket removed from user wallet.create event
logic. This will create a new Event and add that event to Sale.loader
where ever required in the modalsMarketplace issue
tried out multiple things:
zcf.reallocate()
which also checks for offer safety internally.stagedAllocations
to currentAllocation
without using reallocate. So as it has internal offer safety checks. Hence offers won't match unless the counteroffer has exact offer with want and give swapped.offer safety checks
in every zoe helper function , I think it is not possible to solve this issue without separate offer for each ticket in some way.marketplace
logic. Tested out for several cases.Checkin
flow is also completed.Create event
logic is still to be completed. Already sorted out how to do it but haven't completed yet.seller
runs deploy scripts. Which also start the contract and passes an array of events into the start instance function which can be stored in a variable in the contract.events array
in the contract is maintained as a reference in contract related to the events put on sale by the seller.market place
page , all the events listed there are actually rendered by getting the events array from the contract through the notifiers
.buyers
can only make offer for tickets
which are allowed on sale.want
are also available in events array maintained in the contract.Create event page
logic completed.request
to wallet is sent using the invitation maker
who's access only seller has.events
on the marketplace page
.Seller context
logic needed to be revamped a bit due to change in whole flow. seller
from normal user what I did is checked for an invitation in zoe purse
which is the seller Access invitation only if it found then the user is assumed to be seller else not.This sounds good. Some points:
@danishyasin33
access invitation
but instead we are just using the access invitation at the start when seller initializes dapp. He receives an empty offer to accept. This actually gives the seller access to invitation maker. Then using continuing offers seller can make unlimited offers for create event. The invitation is created on the go when sending a continuing invitation
Description
Build a contract which allows future instantiators to define their own NFTs for event tickets and sell them. Fork the “Primary Sales” page from dapp-card-store to demonstrate selling the tickets through a front end. Create a “Check In” page which verifies a user’s ticket(s) and shows seat location(s).
Additional Details The contract instantiator must be able to create a unique issuer, brand, and mint for the NFTs on instantiation.
Ticket NFTs should include: Event name Event date and time Price Seat ID
Seat ID should be defined as Seat # Row (Letter or Number) Section # Feel free to use a large real-life venue as an example.
The instantiator of the contract should be able to define ticket prices based on section # on instantiation.
The goal of the Check In UI is to demonstrate how a third party might be able to verify a user’s tickets. Since tickets are transferable, the Check In UI should be able to receive a ticket from the user to hold (i.e., on admission to the event). Any clear demonstration of this capability would meet the criteria.
Context
Event tickets are a commonly requested use case for NFTs, and an example that is easy for a mainstream audience to understand. To help demonstrate possibilities to third party developer teams, we’d like to offer a contract example for defining new tickets and a front end to purchase and use them.
Acceptance Criteria
Approach validated by the Agoric team Criteria ‘Description’ met