Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aditya-alchemist/gfgkiit-cryptoma-hyperthon
ποΈ NFT Event Tickets DApp NFT Event Tickets is a decentralized application (DApp) that allows users to mint NFT-based tickets for events. The app is built with React and powered by Ethereum smart contracts. It offers a seamless way for users to buy tickets, and event organizers can manage funds with ease.
https://github.com/aditya-alchemist/gfgkiit-cryptoma-hyperthon
css daap ethersjs html ipfs metamask openzeppelin-contracts openzeppelin-solidity pinata-ipfs react remix-ide solidity web3
Last synced: 2 days ago
JSON representation
ποΈ NFT Event Tickets DApp NFT Event Tickets is a decentralized application (DApp) that allows users to mint NFT-based tickets for events. The app is built with React and powered by Ethereum smart contracts. It offers a seamless way for users to buy tickets, and event organizers can manage funds with ease.
- Host: GitHub
- URL: https://github.com/aditya-alchemist/gfgkiit-cryptoma-hyperthon
- Owner: Aditya-alchemist
- Created: 2025-01-19T05:34:02.000Z (11 days ago)
- Default Branch: main
- Last Pushed: 2025-01-19T08:44:49.000Z (11 days ago)
- Last Synced: 2025-01-27T21:22:24.518Z (2 days ago)
- Topics: css, daap, ethersjs, html, ipfs, metamask, openzeppelin-contracts, openzeppelin-solidity, pinata-ipfs, react, remix-ide, solidity, web3
- Language: JavaScript
- Homepage: https://gfgkiit-cryptoma-hyperthon.vercel.app
- Size: 541 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ποΈ NFT-Based Event Ticketing System
This repository contains a smart contract and supporting details for an **NFT-based event ticketing system**. The project leverages **non-tradable NFTs** to create a secure, immutable, and transparent system for managing event tickets.
---
## π Project Overview
This system implements the following key features:
- **Non-Tradable Tickets:** Each ticket is minted as a unique NFT that cannot be transferred or traded, ensuring authenticity and preventing ticket scalping.
- **Immutable Metadata:** Each ticket is associated with metadata (e.g., event details) stored on IPFS.
- **Minting Fee:** Users pay a fixed fee (`0.001 Ether`) to mint tickets.
- **Limited Supply:** A maximum of 50 tickets are available for minting.
- **Secure Withdrawals:** The contract owner can withdraw funds collected from ticket sales.The deployed smart contract is available at:
**Contract Address:** `0xcc953a40dfeb38d145710c43c1a9daec39dfa413`---
## π Setup Instructions
### Prerequisites
Before you begin, ensure you have the following:
1. **Ethereum Wallet:** Install [MetaMask](https://metamask.io/).
2. **Node.js & npm:** Install from [Node.js official site](https://nodejs.org/).
3. **Ethereum Testnet Access:** Use Sepolia or Goerli test networks.### Steps to Deploy and Use the Smart Contract
1. **Clone the Repository:**
```bash
git clone https://github.com/yourusername/TicketNFT.git
cd TicketNFT
npm install## π Features
- **Non-Tradable NFTs:**
Tickets are linked to the buyerβs wallet and cannot be resold or transferred, ensuring secure and fair distribution.- **Fixed Minting Fee:**
Users pay `0.001 Ether` per ticket, making the system predictable and affordable.- **Supply Limit:**
A maximum of 50 tickets ensures exclusivity.- **Metadata Integration:**
Ticket details (e.g., event name, date, and seat number) are stored as metadata, uploaded to IPFS for decentralization.- **Secure Withdrawals:**
Only the contract owner can withdraw funds from the contract.## π οΈ Tech Stack
### Blockchain
- **Solidity:** Programming language for smart contracts.
- **Ethereum:** Blockchain platform for deployment.
- **OpenZeppelin:** Libraries for ERC721 implementation.### Frontend
- **React.js:** Framework for building the user interface.
- **ethers.js:** Library for blockchain interactions.### Decentralized Storage
- **IPFS/Pinata:** For storing ticket metadata and ensuring decentralization.---
## π§ Contract Functions
### Public Functions:
- **mintTicket(string memory uri):**
Allows users to mint a ticket by paying 0.001 Ether.
`uri` contains metadata stored on IPFS.- **getCurrentTicketCount():**
Returns the total number of tickets minted.- **getLastBuyerInfo():**
Returns the last buyer's address and the last minted token ID.- **tokenURI(uint256 tokenId):**
Retrieves the metadata URI for the given token ID.### Owner-Only Functions:
- **withdraw():**
Allows the contract owner to withdraw funds from the contract balance.- **getOwner():**
Returns the owner's wallet address.### Non-Transferable Override:
- **Internal _update Function:**
Prevents the transfer of tickets to ensure they remain non-tradable.---
## π‘ Advantages of Non-Tradable NFTs Over QR Codes
- **Security:**
NFTs are tied to a wallet address and cannot be duplicated, unlike QR codes which can be easily forged or shared.- **Prevent Scalping:**
By making NFTs non-transferable, it ensures tickets cannot be resold at inflated prices.- **Transparency:**
All transactions are recorded on the blockchain, ensuring traceability and preventing fraud.- **Immutable Metadata:**
Event details stored in the NFT metadata are tamper-proof when hosted on decentralized storage (e.g., IPFS).- **Reusable Identity:**
The same NFT-based system can be extended to include user privileges, loyalty programs, and access control.---
## π Example Usage
### Minting a Ticket
1. Connect your wallet using MetaMask.
2. Call the `mintTicket` function, passing the metadata URI as input.
3. Pay 0.001 Ether as the minting fee.
4. The minted ticket NFT will appear in your wallet.### Withdrawing Funds
1. The owner calls the `withdraw` function to transfer all collected funds to their wallet.### Viewing Ticket Metadata
1. Call the `tokenURI` function with a token ID to retrieve the metadata URL.---
## π€ Contributors
- **Aditya:**
Smart Contract Development, Frontend Integration and Documentation.-**Aryan Kumar**:
Smart Contract Development, Frontend Integration and Documentation
## Working video
https://github.com/user-attachments/assets/344ba586-6121-4b24-b389-d2a32e197c55
## π Features of Video
- **Owner-Only Fund Withdrawal:**
Only the contract owner can withdraw funds from the contract balance, ensuring control over the funds.- **Limited Supply of Tickets:**
A maximum of 50 tickets can be minted, ensuring exclusivity for the event.- **Soulbound Tickets:**
Each ticket is **soulbound**, meaning it is **untradable and unsellable**, ensuring that tickets cannot be resold or transferred.- **Decentralized Storage:**
Ticket metadata is stored on a **decentralized database** using **Pinata-IPFS**, ensuring data immutability and censorship resistance.## Upcomming updates
-**Sending function**
users can send nft to selected networks which will be implemented on hyperledger