WaveX is an innovative NFT project designed to provide unique digital assets with special benefits including merchant allowances, yacht event access, and discounts. The project implements a sophisticated benefit management system where merchants can propose benefits for NFT collections, subject to admin approval.
- Smart Contract Deployed on Polygon Amoy Testnet
- Contract Address:
0x9EBCEB56bc3D83c52058d7770A360bA3DBCF3589 - Verified on Polygonscan: View Contract
- Initial NFTs Minted and Testing Complete
- Benefit System: Implemented and Ready for Integration
wavex-nft/
│
├── contracts/
│ └── WaveXNFT.sol # Main smart contract
│
├── scripts/
│ ├── deploy.js # Deployment script
│ ├── verify.js # Contract verification script
│ ├── mint.js # Single NFT minting script
│ ├── batchMint.js # Batch minting script
│ ├── benefits/
│ │ ├── addBenefits.js # Add benefits to tokens
│ │ ├── modifyBenefits.js # Modify existing benefits
│ │ └── getBenefits.js # Query token benefits
│ ├── merchant/
│ │ ├── redeemBenefit.js # Process benefit redemption
│ │ └── verifyBenefit.js # Verify benefit validity
│ ├── metadata/
│ │ ├── updateBaseURI.js # Update metadata base URI
│ │ └── generateMetadata.js # Generate token metadata
│ └── utils/
│ ├── config.js # Configuration helpers
│ └── deployment.js # Deployment helpers
│
├── test/
│ └── WaveXNFT-Suite.test.js # Comprehensive test suite
│
├── deployments/ # Deployment artifacts
├── CONTRIBUTING.md # Contribution guidelines
├── hardhat.config.js # Hardhat configuration
└── .env # Environment variables
- ERC721 NFT Standard with Enhanced Benefits
- Merchant Allowance System with Partial Redemption
- Event Access Management
- Benefit Redemption & Verification System
- Maximum Supply: 10,000 NFTs
- Batch Minting Support (up to 20 NFTs)
- Merchant Authorization System
- Admin Controls for Benefit Management
- Node.js (v18+ recommended)
- Hardhat
- Ethereum Wallet
- Polygon Amoy Testnet MATIC tokens
-
Clone the repository
git clone https://github.com/your-username/wavex-nft cd wavex-nft -
Install dependencies
npm install
-
Create a
.envfile with:ALCHEMY_API_KEY=your_alchemy_api_key PRIVATE_KEY=your_private_key POLYGONSCAN_API_KEY=your_polygonscan_api_key BASE_URI=your_metadata_base_uri INITIAL_MERCHANT=optional_merchant_address
# Deploy contract
npx hardhat run scripts/deploy.js --network polygonAmoy
# Verify contract (after waiting for propagation)
npx hardhat run scripts/verify.js --network polygonAmoy# Single mint
npx hardhat run scripts/mint.js --network polygonAmoy
# Batch mint
npx hardhat run scripts/batchMint.js --network polygonAmoy# Add benefits
npx hardhat run scripts/benefits/addBenefits.js --network polygonAmoy
# Modify benefits
npx hardhat run scripts/benefits/modifyBenefits.js --network polygonAmoy
# Query benefits
npx hardhat run scripts/benefits/getBenefits.js --network polygonAmoy- Smart Contract Development
- Deployment to Polygon Amoy Testnet
- Contract Verification
- Minting System (Single & Batch)
- Basic Benefit Structure
- Benefit Management Scripts
- Merchant Redemption System
- Metadata Management System
- Apple Wallet Integration
- Frontend Development
- Merchant Portal
- Token Metadata & Visuals
- Security Audit
- Performance Optimization
-
Merchant Allowance
- Partial redemption support
- Time-bound validity
- Value tracking system
-
Event Access
- Time-limited passes
- Multi-tier access levels
- Usage tracking
-
Discounts
- Percentage & fixed-amount options
- Merchant-specific redemption
- Validity period management
- Prepaid Visa Card Token Integration
- NFT Card Image Generation
- Apple Wallet Pass Generation
- Transaction History Tracking
- Dynamic Metadata Updates
- Role-based Access Control
- Benefit Expiration Enforcement
- Merchant Authentication
- Redemption Verification
- Supply Limit Enforcement
# Run all tests
npx hardhat test
# Run specific test suite
npx hardhat test test/WaveXNFT-Suite.test.js- NFT-based event access management
- Single entrance booking per transaction
- Cancellation system (48 hours before event)
- Basic check-in validation
- Event creation and management
- Multiple entrance bookings per NFT
- Enhanced cancellation system per entrance
- Ticket transfer functionality
- Automatic event expiration
- Configurable booking windows
- NFT holder can book one entrance per transaction
- Each booking generates a unique entrance number
- Cancellations allowed up to 48 hours before event
- Check-in validates entrance and prevents double usage
- Create events with:
- Name
- Location
- Date
- Maximum capacity
- Monitor bookings and attendance
- Expire events manually when needed
Current testnet deployment focuses on core MVP features:
- Single entrance bookings
- Basic cancellation system
- Check-in validation
MIT License
Project Lead: @aimerdoux
- v0.1.0: Initial deployment on Polygon Amoy Testnet
- v0.1.1: Added minting functionality
- v0.1.2: Implemented verification system
- v0.1.3: Added benefit structure
- v0.1.4: Added batch minting capabilities
- Before starting new work, ensure your local repository is up to date:
git pull origin main- Check the status of your changes:
git statusThis will show:
- Modified files in red (unstaged changes)
- New files that aren't being tracked
- Staged files in green
- Stage new files:
# Add specific files
git add path/to/file
# Examples:
git add scripts/mintNFTs.js
git add scripts/checkNFTs.js
git add scripts/addBenefits.js
# Add all new files in a directory
git add scripts/*.js
# Add all changes
git add .- Stage modified files:
git add hardhat.config.js- Create a commit with a descriptive message:
git commit -m "type: brief description"Follow these types for your commit messages:
feat:- New features (e.g., "feat: add NFT minting functionality")fix:- Bug fixes (e.g., "fix: resolve benefit redemption issue")docs:- Documentation changes (e.g., "docs: update setup instructions")chore:- Maintenance tasks (e.g., "chore: update dependencies")refactor:- Code refactoring (e.g., "refactor: optimize benefit distribution")test:- Adding or modifying tests (e.g., "test: add minting tests")style:- Code style changes (e.g., "style: format contract code")
Examples of good commit messages:
git commit -m "feat: implement NFT minting and benefit management"
git commit -m "fix: resolve gas optimization in batch minting"
git commit -m "docs: add contributing guidelines"- Pull latest changes before pushing:
git pull origin main- Push your changes:
git push origin main- Frequent Commits: Make small, focused commits rather than large ones
- Clear Messages: Write descriptive commit messages
- Pull First: Always pull before starting new work
- Review Changes: Use
git statusandgit diffbefore committing - Branch When Needed: Create feature branches for major changes
If you encounter merge conflicts:
- Identify conflicted files:
git status-
Open each conflicted file and resolve conflicts
- Look for sections marked with
<<<<<<<,=======, and>>>>>>> - Choose which changes to keep
- Remove conflict markers
- Look for sections marked with
-
Stage resolved files:
git add <resolved-file>- Complete the merge:
git commit -m "merge: resolve conflicts in benefit system"Check commit history:
git logView changes in a file:
git diff path/to/fileDiscard changes in a file:
git checkout -- path/to/file- View command help:
git help <command> - Check command options:
git <command> --help - View command summary:
git <command> -h
If you have questions or need help:
- Open an issue on GitHub
- Contact the project maintainer: @aimerdoux
Remember to never commit sensitive information like private keys or API keys!