Full-stack dApp for conditional NFT minting using React, Node.js, and Solidity on Base Testnet.
- Frontend: React + ethers.js
- Backend: Node.js + ethers.js
- Smart Contract: Solidity (Hardhat)
- Blockchain: Base Testnet
- Storage: IPFS via Pinata
frontend/— React app for user interactionbackend/— Node.js server listening to contract events and handling mint/refund logicsmart-contract/— Solidity contracts and Hardhat scripts for deployment and testing
cd backend
npm install
node index.jsThis project includes a basic Hardhat setup with a sample contract, tests, and deployment scripts.
npx hardhat help— show Hardhat commandsnpx hardhat test— run contract testsREPORT_GAS=true npx hardhat test— run tests with gas reportnpx hardhat node— start local Hardhat nodenpx hardhat ignition deploy ./ignition/modules/Lock.js— deploy contract using Hardhat Ignition
- Set up the required environment variables for backend and Hardhat (e.g., API keys,
RPC_URL,PRIVATE_KEY). - In frontend, configure the backend URL using the
BASE_URLvariable.