A decentralized application (dApp) that allows students to receive and manage NFT-based rewards for their professional and academic achievements using blockchain technology. Built with React for the frontend and Solidity for the smart contract
- Award NFTs: Award NFTs to students with descriptions and dates of their achievements.
- View Achievements: Students can view their achievements, including descriptions and dates.
- Delete Achievements: Only the owner of an achievement can delete it.
- Deploy Smart Contracts: Deploy and interact with smart contracts on the Arbitrum Orbit blockchain.
- Frontend: React-based user interface for interacting with the blockchain.
- Node.js: Ensure you have Node.js installed (version 18.x or later recommended).
- Git: Ensure you have Git installed.
-
Clone the Repository
git clone https://github.com/Hrajz/Nft-Student-Reward.git cd Nft-Student-Reward
-
Install Dependencies
Navigate to the project directory and install the dependencies for both the backend and frontend.
# Install dependencies (Smart Contracts) npm install # Install frontend dependencies (React app) cd ../frontend npm install
-
Setup Environment Variables
Frontend
Create a
.env
file in thefrontend
directory for environment variables. Add your required environment variables such as API keys and contract addresses.Example
.env
file for the frontend:REACT_APP_CONTRACT_ADDRESS=0xYourContractAddress
smart contract
.env
file for the smart contract:INFURA_PROJECT_ID=your-infura-project-id INFURA_PROJECT_SECRET=your-infura-project-secret
-
Start the Smart Contracts
Navigate to the
root
directory and deploy the smart contract:npx hardhat run scripts/deploy.js --network <network>
-
Start the Frontend (React App)
Navigate to the
frontend
directory and start the React application:cd ../frontend npm start
The application should now be running on
http://localhost:3000
or another port specified by your configuration.
To interact with the dApp, you need a cryptocurrency wallet. If you don't have one, follow these steps to create and connect it:
a. Install a Wallet Extension
-
MetaMask (recommended) is a popular choice. Download and install the MetaMask extension for your browser (Chrome, Firefox, etc.) from MetaMask’s official website.
-
Other Wallets: If you prefer other wallets like Trust Wallet or Coinbase Wallet, make sure they are compatible with the Ethereum network or the network you are using (Arbitrum Orbit in this case).
b. Create a Wallet (if you don’t have one)
- Open the wallet extension you installed.
- Follow the instructions to create a new wallet:
- Set up a strong password.
- Securely back up your seed phrase (recovery phrase) and store it in a safe place. This is crucial for recovering your wallet.
c. Connect Wallet to the dApp
- Open the NFT Student Rewards site in your browser.
- Click on the “Connect Wallet” button usually found in the top right corner of the site.
- Select your wallet from the list (e.g., MetaMask).
- Authorize the connection if prompted.
Ensure you are connected to the correct blockchain network that your dApp is using.
For MetaMask:
- Click on the MetaMask extension icon.
- In the network dropdown (top center), select the network your dApp is deployed on (e.g., Arbitrum Orbit).
- If the network is not listed, add it manually by entering the network details provided by your dApp or project.
With your wallet connected and the correct network selected, you can now interact with the dApp. Here are some common tasks you might perform:
a. Award NFTs
- Navigate to the appropriate section of the dApp where you can award NFTs.
- Enter the student’s address, description, and date for the achievement.
- Confirm the transaction in your wallet.
b. View Achievements
- Go to the section where you can view achievements.
- The dApp should display a list of achievements associated with your address, including descriptions and dates.
c. Delete Achievements
- If you want to delete an achievement, navigate to the relevant section.
- Select the achievement you wish to delete.
- Confirm the deletion in your wallet if prompted.
a. Wallet Not Connecting
- Ensure that you have the correct network selected in your wallet.
- Refresh the page and try connecting again.
- Check for any browser extensions or settings that might block the connection.
b. Transactions Not Showing
- Ensure that your wallet has enough funds to cover transaction fees (gas fees).
- Check the transaction history in your wallet or the blockchain explorer for the network you are using.
Feel free to contribute to the project by submitting issues or pull requests. For any major changes or new features, please open an issue to discuss them first.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to adjust any specific details, such as URLs or configuration settings, according to your project's requirements.