Welcome to Moodie NFTs — a fun, fresh NFT collection that showcases Static and Dynamic NFTs, all living entirely on-chain!
Mint adorable static NFTs 🐶 or dynamic NFTs that change their appearance based on the owner's mood! 🎭
🍡 Inspired by life’s changing moods... and sprinkled with a little samurai madness from Gintoki himself.
"Shinpachi! Life's a mood swing. So why shouldn't NFTs swing with it too?!" - SamuraiGintoki
-
Static NFT (BasicNft)
Mint simple ERC-721 NFTs with unique metadata and images (hosted via IPFS). -
Dynamic NFT (MoodNft)
NFTs with on-chain metadata that dynamically changes based on the owner's mood:- 😄 Happy Mood
- 😢 Sad Mood
-
Full On-Chain SVG Storage
No external dependency for dynamic NFTs! All images are Base64 encoded and stored directly on-chain. -
Permissioned Mood Flipping
Only owners (or approved addresses) can change the mood of their NFT.
- Solidity (Smart Contracts)
- Foundry (Development Framework)
- OpenZeppelin (Security and Token Standards)
- IPFS (for static NFT images)
- Base64 Encoding (for on-chain metadata)
- Hard Samurai Spirit (Optional but highly recommended)
├── scripts
│ ├── DeployBasicNft.s.sol # Deploys Basic NFT contract
│ ├── DeployMoodNfts.s.sol # Deploys Mood NFT contract
│ └── Interactions.s.sol # Interact (Mint) with deployed contracts
│
├── src
│ ├── BasicNft.sol # Static NFT contract (Dogie NFT)
│ └── MoodNft.sol # Dynamic NFT contract (Mood NFT)
│
├── img
│ ├── sad.svg # Sad mood SVG
│ └── happy.svg # Happy mood SVG
│
└── README.md # This beautiful readme
# Clone the repository
git clone https://github.com/mayurrajput04/moodie-nfts.git
# Move into the project directory
cd moodie-nfts
# Install Foundry (if you don't have it yet)
curl -L https://foundry.paradigm.xyz | bash
foundryupforge script scripts/DeployBasicNft.s.sol --broadcast --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY>forge script scripts/DeployMoodNfts.s.sol --broadcast --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY>forge script scripts/Interactions.s.sol --broadcast --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY>Call the flipMood(tokenId) function either through:
- Remix
- Foundry Scripts
"It doesn't matter if you're happy or sad...
What matters is that your NFT wears your heart on its metadata!"
— samuraiGintoki
This project is licensed under the MIT License.