NFTicketize is app 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.
Application Demo
Table of Contents
- Home (all events) - display all events for which users could buy tickets. With button "Detail" user could open form with detail information about that event.
- My tickets - display all tickets that user owns
-
My events - events that logged user created
- Display
- Button "New event" (create new event)
-
Event detail - from event creator view
- Display
- Button "New ticket category"
- Field "Resell fee for event owner" shows how much percent for every resell for tickets in that ticket category will event creator get
-
Event detail - from other users view (buy ticket from event host)
With click on button "Buy" for the selected category, users could buy tickets for that event and in that category
-
Event detail - from others users view - tickets block (set for sell)
With clcik on button "For sell" user set price for how much will sold that ticket
With click on button "Cancel sell" user pulls that ticket from market
-
Event detail - from others users view - tickets block (set for bid and set bid)
With click on button "For bid" user put that ticket on market, so he expect from other users to give it to him different offers
With click on button "Cancel for bid" user pull that ticket from market
Other users could bid for that ticket from view "For bids". Users could bid for currency (WETH for now), or for other tickets that he owns.
When other users offers bids for ticket, user who owns that ticket could accept appropriate bid or decline
-
Event detail - from others views - tickets block ("For sell" view)
In for sell view users could buy tickets for fixed amount
- Ticket market - similar view as "Ticket market" on "Event detail" form, except, this is for all events and all tickets in application
- Account - basic informations about user that are stored on firebase, and connect with MetaMask address
This project is created for ETHGlobal hackathon "HackMoney 2021". 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)
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:
- Lazy mint (with all additions such as IPFS uri, royalties, etc) with generate ID, so ticket (NFT) could see from Rarible portal (with all informations). Also, for image, I generate image with informations about event name, ticket category and ticket id, but in future, this could be some form of electronic ticket
-
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...)
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.
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"
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
This project is built with:
They are two projects on main directory: NFTicketize and NFTicketizeTheGraph.
- NFTticketize is main project with front end and communication with all technologies that are used in this project
- NFTicketizeTheGraph is Subgraph project
-
Clone the repo
git clone https://github.com/StefanVitor/NFTicketize.git
-
Fill informations about keys on NFTicketize\client\src\const.js (for this file, you could contact me, because it contains private API keys)
-
Add truffle-config.js in root directories (root for NFTicketize and NFTicketizeTheGraph) if you want to truffle compile or migrate contracts
-
Go to NFTicketize/client
-
npm start
-
Trade with other NFT's
-
Buy and resell ticket for different token
-
Development of new functionalities, such as electronic tickets as NFT image
-
Application design
-
Deploy on mainnet
-
Test cases
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU General Public License v3.0. See LICENSE
for more information.
Stefan Vitorovic - @StefanVitorovic - vitorovicstefan@gmail.com
Project Link: https://github.com/StefanVitor/NFTicketize