With the recent James Bond movie 'No Time to Die' selling limited edition NFT tickets, it provided a strong support to the utility of using NFTs as digital assets. Tulip is based on this fundamental idea of increasing the utility of NFTs. Tulip helps users book movie tickets as NFTs. It provides an easy to use interface for web 2 users and helps them onboard into the world of NFTs. Tulip provides a range of movies to choose from. To book a movie ticket, it only requires the user to be connected to a Metamask wallet. Once the user connects the wallet and books the ticket, the ticket gets minted as a NFT to the connected wallet's address. The user can see all the NFTs minted for booking the tickets through the app. The NFTs can also be checked on Opensea by just clicking on them.

Tulip showcase

How it's made

First step was setting up the repo - Used create-react-app here. Refactored it and connected metamask wallet to frontend. Second step was building the smart contract - Here I used hardhat to create a basic setup, after that wrote the smart contract in Solidity by using ERC721URIStorage class from openzeppelin. Created a public function in the contract which mints the NFT to recipient's address - Updated the networks property in hardhat.config file for deployment. Used the values of alchemy app url and wallet's key. Stored these info in .env file - After deployment checked polygonscan to verify Next step was building the frontend - Used React to create the reusable components - Used IPFS to store JSON data for movies, This data is fetched during initialization of the app - Used Covalent APIs to get NFT metadata for the NFT's minted to an address. Used a combination of two endpoints and filtered the resultant NFT list based on current connected wallet address - When a Ticket is booked, the NFT metadata is first stored in IPFS and a link is generated using a IPFS gateway. After this, the function on the deployed contract is called and this link is passed to that function as metadata for the to be minted ticket NFT Technologies used are following - 1. Solidity - for writing the smart contract 2. Hardhat - for testing the contract locally and deployment of the contract 3. Polygon mumbai testnet - network on which the contract is deployed 4. Alchemy - to connect to the network 5. Metamask - wallet (used during contract deployment and frontend interaction with the smart contract) 6. create-react-app - for initial react setup 7. IPFS - for storing movies JSON data and storing NFT metadata before minting it. 8. React Context - for maintaining the global state of the application 9, React router - for implementing routes on the app. it helps the app to be single page application 10. styled-components - for styling the react components 11. Covalent APIs - for getting the NFT metadata (on polygon mumbai) for a particular wallet address