An ERC-721 NFT badge system deployed on Polygon Amoy testnet.
Address: 0xd3DCcCE2eD92Cf9C8062C6dc25532E21cbDA1189
Network: Polygon Amoy
Explorer: View on PolygonScan
- Public Claim: Anyone can claim one free badge per address
- Admin Mint: Contract owner can mint badges for specific addresses
- ERC-721 Standard: Fully compliant NFT contract using OpenZeppelin
- Install dependencies:
npm install- Create
.envfile:
PRIVATE_KEY=your_private_key_here
AMOY_RPC=https://polygon-amoy.g.alchemy.com/v2/your-api-key
- Compile contracts:
npm run compile- Deploy to Polygon Amoy:
npm run deploy:amoyOpen frontend/index.html in your browser to interact with the contract.
Requirements:
- MetaMask wallet
- Connected to Polygon Amoy network
- Some testnet MATIC for gas fees
srm-badge-demo/
├── contracts/
│ └── SRMBadge.sol # Main NFT contract
├── scripts/
│ └── deploy.js # Deployment script
├── frontend/
│ ├── index.html # Frontend UI
│ └── script.js # Wallet interaction
├── hardhat.config.js # Hardhat configuration
└── package.json # Dependencies
npm run compile- Compile Solidity contractsnpm run deploy:amoy- Deploy to Polygon Amoy./deploy-and-update.sh- Deploy and update frontend
MIT