InsomniaNFT v1.0.0
Highlights
-
Multi-Utility NFT Contract
- Phased Minting (Merkle proofs for whitelisting and discount phases).
- Signature-based Discount Validation in Phase 2.
- Linear Vesting Integration with Sablier for mint fees.
-
ERC20 Payment Token
- An ERC20 token used for minting fees.
-
Robust Test Suite
- Over 80% coverage with Foundry (tests cover phased minting, vesting, edge cases).
New Features
-
Merkle-Based Whitelist (Phase 1 & 2)
- Free mint for Phase 1.
- Discounted mint for Phase 2 with valid proofs.
-
Discount Signatures
- Owner-signed messages required for discount eligibility in Phase 2.
-
Open Mint (Phase 3)
- Public mint with a full price in the ERC20 token.
-
Sablier Vesting
- Fees locked in a one-year linear streaming schedule.
- Owner can withdraw vested tokens mid-stream or allow them to fully vest.
Security
- Using
OpenZeppelin
libraries for access control, ERC standards, and Merkle proofs. - Checks for valid proofs, valid signatures, and typical reentrancy protections.
Testing & Validation
- Foundry Tests for:
- Merkle root validations (Phase 1 & 2).
- Signature checks for discount.
- Vesting logic integration (mocked or actual Sablier).
- Comprehensive coverage on key functionalities.
How to Use
- Install Dependencies
forge install
- Build & Test
forge build forge test
- Deploy
forge script script/Deploy.s.sol --broadcast --rpc-url <YOUR_RPC_URL>
Full Changelog: [GitHub Commits](https://github.com/jio-gl/insomnia-nft/commits/v1.0.0)