This subproject demonstrates a non-fungible token (NFT) smart contract using the ERC-721 standard. The contract is deployed on the Polygon Mumbai Testnet (an EVM-compatible network).
- Smart Contract:
MyNFT.sol - Language: Solidity v0.8.25
- Dependencies: OpenZeppelin
- Tools:
- Remix IDE (online editor)
- MetaMask for managing your account and paying gas fees in MATIC
- Polygon Mumbai Testnet
contracts/MyNFT.sol:- Inherits from OpenZeppelin’s
ERC721 - Provides
constructor()to setnameandsymbol - Has a
message()function returning a custom string
- Inherits from OpenZeppelin’s
- Configure MetaMask
- Install the MetaMask browser extension.
- Add Polygon Mumbai network to MetaMask (via Chainlist or manually).
- Obtain test MATIC from a Mumbai Faucet.
- Open Remix
- Go to
Remix IDE. - Import or copy
MyNFT.solinto a new file in Remix.
- Go to
- Compile
- In the Remix
Solidity Compilertab, select 0.8.25. - Click Compile MyNFT.sol.
- In the Remix
- Deploy
- In the
Deploy & Run Transactionstab:- Environment: Injected Web3 (this uses MetaMask).
- Select the contract (MyNFT) and click Deploy.
- Confirm the MetaMask transaction (pay gas in test MATIC).
- After confirmation, a new contract address is shown in Remix.
- In the
- Verification
- Call the
name(),symbol(), ormessage()functions from Remix to ensure they return the correct values. - You can also view the contract in a block explorer like Polygonscan for Mumbai by pasting the contract address.
- Call the
- If your repo requires test scripts, you can create them in a Node/Hardhat environment or simply rely on Remix to call the functions.
- For advanced usage, you might add a
scripts/folder with a Hardhat or Truffle config to deploy.
- Dataset, test cases, etc. provided by Dr. Swathi Punathumkandi from Arizona State University.
This project is released under the MIT License. That means you’re free to use, modify, and distribute the code, but you do so at your own risk.
Author: Varshith Dupati
GitHub: @dvarshith
Email: dvarshith942@gmail.com
Issues: Please open an issue on this repo if you have questions or find bugs.