NFTicketize is DApp for create events (Concerts, Conferences, Festivals, Seminars, Sports, etc), create ticket categories for that events, buy tickets that are created as NFT's, and trade that tickets for cryptocurrency, for some other ticket, or for some other NFT.
NFTicketize is app where users could create events, for that events create ticket categories with maximum tickets number, ticket price, royalty (how much percent for every resell for tickets in that ticket category will event creator get), while on the other hand, other users (non event creator) could buy tickets from event categories, where one ticket is one NFT, and after that, trade with that tickets on different ways.
Main entity on this app is event. For event, users could provide next informations:
For every event, event owner could create unlimited ticket categories with next informations:
After creating event and event categories, some other user, could buy tickets (mint tokens, because, on this app, it's same - one ticket is one token). When user buy ticket, that ticket also appears on Rarible platform as NFT, where image for that NFT is generated image with informations - Event name, Ticket category name and Ticket ID. Also, when user buy ticket, he could do different actions with that ticket:
For detail information about this app, with images which better describes app, you can go on github link for this project https://github.com/StefanVitor/NFTicketize
For this project, they are used technologies and tools from four different sponsors for this hackathon:
Rarible (Rarible Protocol)
The Graph (Subgraph project and query the graph)
Consensys (Metamask)
Protocol Labs (IPFS and Pinata)
Rarible
From this sponsor, I used API from https://api-reference.rarible.com/ , and also smart contract "NFTicketize.sol" is designed that support this API. Functions that I used:
19
Create a sell order
Accepting order
Create a bid order
Prepare TX for order
Different types of GET call from API (getOrderByHash, getSellOrdersByItem, getSellOrdersByCollection, getBidsByItem, getItemsByCreator, getItemsByCollection...)
The Graph
For this sponsor, I create separate project NFTicketizeTheGraph to define subgraph. This project has three entities (Events, TicketCategories and Tickets), which I query in main project.
In main project, all forms in some way (or in multiple ways) used graph queries.
Consensys
MetaMask is core of this application, so by changing account, the data and app design are automatically adjusted to the new account.
Of atypical functions, they are integration in some basic way with Firebase Functions, so token authorization for Firebase depends from MetaMask address.
From typical functions, it has been used different interactions with smart contract and signatures.
Basic smart function call
Function call with sent value (sending transactions)
Signing data with "eth_signTypedData_v4"
Protocol Labs
For this sponsor, they are used two products:
"js-ipfs" as "decentralized database", where are stored additional informations about "Event", "Ticket Category" and "Ticket"
Pinata, whose role is integration with Rarible, so IPFS data such as NFT (ticket) image and NFT basic could display on Rarible portal. For this purpose, they are used next:
Dynamically image generation that depends from token, and upload that image with pinFileToIPFS
Upload additional informations about token with pinJSONToIPFS