A full-stack decentralized NFT Marketplace built with Solidity, Hardhat, and OpenZeppelin. Users can mint, list, and purchase NFTs with built-in marketplace fees and secure smart contract logic.
- Mint NFTs with metadata (IPFS-compatible)
- List NFTs for sale with custom pricing
- Purchase NFTs securely with ETH
- Marketplace fee logic (configurable)
- Reentrancy protection for safe transactions
- Full test suite with Hardhat and Chai
🌐 Frontend : Frontend Docs
- ERC721-compliant token
- URI storage for metadata
- Simple minting function
- Handles listing and purchasing of NFTs
- Transfers ownership securely
- Calculates and distributes marketplace fees
- Emits events for frontend tracking
Run the full test suite:
npx hardhat testIncludes tests for:
Deployment
Minting
Listing
Purchasing
Fee distribution
Edge cases (invalid price, insufficient ETH, double purchase)
Installation Clone the repo:
git clone https://github.com/yourusername/nft-marketplace.git
cd nft-marketplaceInstall dependencies:
npm installCompile contracts:
npx hardhat compileRun tests:
npx hardhat testDevelopment To deploy locally:
npx hardhat node
npx hardhat ignition deploy ignition/modules/DeMarkifyModule.js --network localhost
node scripts/exportAddresses.jsTo deploy to a testnet (e.g. Sepolia):
npx hardhat run scripts/deploy.js --network sepoliaRun the Frontend:
cd frontend
npm install
npm run devMake sure to configure your .env with your private key and RPC URL.
Use Ethers.js to interact with contracts
Listen to Offered and Bought events
Display NFTs using metadata from IPFS
📄 License This project is licensed under the MIT License.
🙌 Acknowledgments OpenZeppelin for secure contract libraries
Hardhat for development and testing
IPFS for decentralized storage using PINATA_API
📬 Contact For questions or collaboration, reach out via GitHub Issues.