This project is a full-stack application for minting NFTs. It consists of a smart contract for NFT minting, a React frontend for user interaction, and a Node.js backend for event tracking.
The NFTMinting.sol
contract allows users to register, mint NFTs, and includes features like blacklisting. It's deployed on the Sepolia testnet at address: 0xb874b8d0165212a840Ac41d92866b1d7a4a50196
.
Key features:
- User registration
- NFT minting
- Blacklist functionality
- Owner-only functions for managing fees and blacklist
The frontend is built with React and TypeScript. It provides a user interface for connecting wallets, registering users, minting NFTs, and viewing NFT collections.
Key components:
- Wallet connection
- User registration
- NFT minting
The backend is a Node.js application that listens to events from the smart contract and stores them in a MongoDB database. It provides an API for querying events related to specific addresses.
Key features:
- Event listening and storage
- API for retrieving events by address
- Clone the repository:
git clone https://github.com/your-username/NFT-Ceres-Task.git
cd NFT-Ceres-Task
- Install dependencies:
Smart Contract
npm install
Frontend
cd frontend
npm install
Backend
cd ../backend
npm install
- Set up environment variables:
- Create a .env file in the contracts directory with your private key and Alchemy project ID:
PRIVATE_KEY=your_private_key
ALCHEMY_API_KEY=your_alchemy_api_key
- Create a
.env
file in the backend directory with the following:
MONGODB_URI=your_mongodb_connection_string
CONTRACT_ADDRESS=contract_address
RPC_URL=your_ethereum_node_url
- Compile, test, and deploy the smart contract:
npx hardhat compile
npx hardhat test
npx hardhat ignition deploy ignition/modules/NFTMinting.ts --network sepolia
- Start the applications:
Frontend
cd frontend
npm start
Backend
cd ../backend
npm start
- Connect your wallet (MetaMask recommended) to the Sepolia testnet.
- Register as a user by paying the registration fee.
- Mint NFTs by paying the minting fee.
- Use the backend API to retrieve event data for specific addresses.
This project is licensed under the MIT License.