This project implements an on-chain NFT using Solidity, Hardhat, and OpenZeppelin. The NFT metadata, including an SVG image, is stored entirely on the blockchain.
- On-Chain Metadata: The NFT metadata is stored on-chain, including the SVG image.
- Minting Functionality: Users can mint new NFTs.
- ERC-721 Standard: The contract is based on OpenZeppelin's ERC-721 implementation.
- Hardhat Deployment: The project uses Hardhat for contract compilation, testing, and deployment.
- Base Sepolia Testnet: The contract is deployed on the Base Sepolia testnet.
- Etherscan Verification: Configured for contract verification on BaseScan.
- Automated Deployment & Minting: Deployment, minting, and verification are handled in a single Ignition script.
Before running the project, ensure you have the following installed:
- Node.js (>=16.x)
- Hardhat
- Alchemy or Infura API key
- Base Sepolia testnet account with funds
- Clone the repository:
git clone https://github.com/7maylord/OnchainNFT cd OnChainNFT - Install dependencies:
npm install
- Create a
.envfile and configure it:ALCHEMY_BASE_SEPOLIA_API_KEY_URL=<your-alchemy-url> ACCOUNT_PRIVATE_KEY=<your-wallet-private-key> BASESCAN_API_KEY=<your-basescan-api-key>
Compile the smart contracts:
npx hardhat compileDeployment, minting, and contract verification are handled automatically by the Hardhat Ignition module:
npx hardhat ignition deploy ignition/modules/OnChainNFT.ts --network base_sepolia --verifyRun tests using Hardhat:
npx hardhat testThis project is licensed under the MIT License.
Developed by MayLord. Feel free to contribute and improve the project!
Happy coding! 🚀