Skip to content

Echo-Merlini/Gen-Plasma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gen-Plasma NFT Platform

A comprehensive NFT deployment and management platform on the Plasma blockchain. Create, deploy, and manage your own NFT collections with advanced features like Merkle tree whitelisting, time-based scheduling, custom mint pages, and more.

🌐 Live Platform

Website: https://gen-plasma.com

🎯 Platform Overview

Gen-Plasma is a full-featured NFT platform that allows artists and creators to:

  • Deploy their own ERC-721 NFT collections without coding
  • Customize mint pages with banners, descriptions, and settings
  • Manage whitelist groups with Merkle tree verification
  • Schedule time-based mint windows for exclusive drops
  • Explore all collections deployed through the platform
  • View owned NFTs across all collections in one wallet

πŸš€ Features

🎨 Collection Deployment

The platform supports three collection types, each with different feature sets and pricing:

Basic Collection ($0 USD)

  • βœ… Custom mint page with collection branding
  • βœ… Up to 10,000 NFTs per collection
  • βœ… Configurable mint price
  • βœ… ERC-721 standard compliance
  • βœ… Metadata storage with IPFS support
  • βœ… Automatic contract deployment
  • βœ… Ownership and access controls

Editions Collection ($3 USD)

All Basic features, plus:

  • βœ… Merkle tree whitelist system with on-chain verification
  • βœ… Time-based mint scheduling (start/end times per whitelist group)
  • βœ… Multiple whitelist groups with independent settings
  • βœ… Public minting after whitelist periods end
  • βœ… Multi-edition support for limited releases

Pro Collection ($5 USD)

All Editions features, plus:

  • βœ… Royalty management with configurable percentages
  • βœ… Advanced metadata controls
  • βœ… Custom tokenURI functionality
  • βœ… Extended admin controls
  • βœ… Priority support and updates

Special Offer: Gen-Plasma NFT holders get 50% off all deployments!


πŸ› οΈ Collection Builder

Interactive visual builder for creating collections:

  1. Contract Configuration

    • Collection name and symbol
    • Total supply (up to 10,000 NFTs)
    • Mint price in XPL
    • Contract type selection
  2. Artwork Upload

    • Bulk image upload (PNG, JPG, WEBP, SVG)
    • Automatic metadata generation
    • IPFS integration for decentralized storage
    • Preview before deployment
  3. Payment & Deployment

    • Secure payment verification on-chain
    • Automatic contract compilation
    • Contract deployment to Plasma mainnet
    • Etherscan verification
  4. Post-Deployment

    • Automatic mint page creation
    • Admin access for collection management
    • Whitelist setup (Editions/Pro only)
    • Custom page settings

🎫 Whitelist Management (Editions & Pro)

Advanced whitelist system with cryptographic verification:

Merkle Tree Whitelisting

  • On-chain verification using Merkle proofs
  • Gas-efficient - stores only root hash on-chain
  • Secure - cryptographically proven whitelist membership
  • Flexible - update whitelist without new deployment

Time-Based Scheduling

  • Per-group scheduling - each whitelist group has independent mint times
  • Timezone support - schedule mints in any timezone
  • Automatic activation - mint opens/closes automatically
  • Public minting - automatically enables after all groups close

Whitelist Groups

  • Create unlimited whitelist groups
  • Import addresses from CSV/text
  • Set mint times per group
  • Activate on-chain with one click
  • Update Merkle roots as needed

Admin Workflow

  1. Create whitelist group with name
  2. Import wallet addresses
  3. Set mint start/end times (optional)
  4. Generate Merkle root (off-chain)
  5. Activate on-chain (stores root hash)
  6. Users can mint with proof verification

🌟 Custom Mint Pages

Every collection gets a fully customizable mint page:

Customization Options

  • Banner Image - Upload custom header image (1200x300px recommended)
  • Background Theme - Choose from 13+ gradient presets
  • Collection Description - Rich text description with formatting
  • Social Links - X (Twitter), Discord, website links
  • Minting Controls - Enable/disable minting, set pricing

Mint Page Features

  • Wallet Connection - RainbowKit integration
  • Network Detection - Auto-detects and switches to Plasma
  • Quantity Selection - Mint multiple NFTs at once
  • Payment Calculation - Real-time price calculations
  • Transaction Tracking - Live mint status updates
  • Collection Stats - Supply, minted count, availability
  • PlasmaExplorer Links - Direct contract verification links

Whitelist Display (Editions/Pro)

  • Shows active whitelist groups
  • Displays mint window times
  • Group-specific mint buttons
  • User whitelist status
  • Public mint availability

πŸ” Explore Page

Discover all collections deployed through the platform:

Collection Cards

  • Collection Name & Type - Basic, Editions, or Pro badge
  • Preview Image - First NFT or banner image
  • Supply Info - Total supply and minted count
  • Mint Price - Displayed in XPL
  • Status Tags:
    • βœ… Certified - Verified collections
    • 🎫 Whitelisted - Has active whitelist groups
  • Quick Access - Direct links to mint pages

Filtering & Sorting

  • Filter by collection type (Basic, Editions, Pro)
  • Sort by date, price, or popularity
  • Search by name or contract address

πŸ’Ό Wallet Page

View all your NFTs across all platform collections:

NFT Display

  • Gen-Plasma Collection - Featured collection with all NFTs
  • Other Collections - Dynamically fetched from all platform contracts
  • IPFS Metadata - Fetches images directly from tokenURI
  • Smart Discovery - Automatically finds owned tokens
  • Image Loading - Converts IPFS URIs to HTTP gateways

Token Discovery Methods

  1. ERC721Enumerable - Fast enumeration (if supported)
  2. ownerOf Scan - Scans token IDs 1-20 for ownership
  3. Metadata Fetching - Gets tokenURI and IPFS metadata
  4. Image Conversion - Handles ipfs:// URIs automatically

Collection Cards

  • Shows collection name and type
  • Displays owned NFTs (up to 6 previewed)
  • "View Mint Page" button for each collection
  • Token count and collection info

πŸ—οΈ Technical Architecture

Frontend Stack

  • Framework: Next.js 14 with TypeScript
  • Styling: Tailwind CSS with custom components
  • Web3: Wagmi v1, Viem, RainbowKit
  • State: React hooks and context
  • API: Next.js API routes

Backend Stack

  • Database: Supabase (PostgreSQL)
  • Storage: Supabase Storage + IPFS
  • Blockchain: Plasma Mainnet (Chain ID: 9745)
  • RPC: https://rpc.plasma.to
  • Explorer: PlasmaExplorer

Smart Contracts

  • Standard: ERC-721 (OpenZeppelin)
  • Extensions:
    • ERC721URIStorage (metadata)
    • Ownable (access control)
    • ReentrancyGuard (security)
    • Pausable (emergency stops)
  • Custom Features:
    • Merkle tree whitelist verification
    • Time-based mint windows
    • Royalty support (ERC-2981)

Security Features

  • Payment Verification: On-chain transaction validation
  • Duplicate Prevention: Payment hash tracking
  • Timestamp Checks: Recent transaction requirements
  • Recipient Verification: Treasury address validation
  • Reentrancy Guards: Prevent double-spend attacks
  • Access Controls: Owner-only functions

πŸ“Š Database Schema

deployed_contracts

Stores all deployed collections:

- contract_address (primary key)
- contract_name, symbol, type
- max_supply, mint_price
- deployer_address
- is_featured, is_active
- social links (x_profile, discord, website)
- timestamps

whitelist_groups

Manages whitelist groups:

- id (UUID)
- contract_address
- group_name
- addresses (array)
- merkle_root
- is_activated_onchain
- mint_start_time, mint_end_time
- timezone, is_time_scheduled
- timestamps

mint_page_settings

Custom mint page configurations:

- contract_address (primary key)
- page_description
- background_theme
- created_at, updated_at

mint_banners

Collection banner images:

- contract_address (primary key)
- banner_url
- uploaded_at

basic_artwork / pro_artwork / editions_artwork

NFT metadata storage:

- id (UUID)
- contract_address
- token_id
- name, description
- image_url
- attributes (JSON)
- created_at

payments

Deployment payment tracking:

- id (UUID)
- deployment_id
- user_address
- transaction_hash (unique)
- amount
- verified_at

πŸ” Merkle Tree Implementation

How It Works

  1. Admin creates whitelist group with wallet addresses
  2. Generate Merkle tree from addresses off-chain
  3. Calculate Merkle root (32-byte hash)
  4. Store root on-chain via createWhitelistGroup()
  5. User requests mint with their address
  6. Frontend generates proof from stored tree
  7. Smart contract verifies proof against stored root
  8. Mint succeeds if proof is valid

Benefits

  • βœ… Gas efficient - Only stores root hash on-chain
  • βœ… Scalable - Unlimited addresses without increasing gas
  • βœ… Secure - Cryptographically proven membership
  • βœ… Updatable - Can regenerate and update root
  • βœ… Privacy - Full whitelist not exposed on-chain

Smart Contract Functions

function createWhitelistGroup(
    bytes32 merkleRoot,
    uint256 startTime,
    uint256 endTime
) external onlyOwner

function mint(
    uint256 quantity,
    bytes32[] calldata merkleProof,
    uint256 groupId
) external payable

🎨 Gen-Plasma Collection

The flagship collection features generative plasma art:

Art Generation

  • 7 unique pattern types using plasma physics
  • Deterministic generation from token ID seed
  • SVG vector format for perfect scaling
  • Mathematical simulations of fluid dynamics
  • Golden ratio color distribution
  • 3D depth effects with perspective

Contract Details

  • Address: 0xB10d640B74016ed2b8E1f59CA931467D16534D08
  • Total Supply: 10,000 NFTs
  • Mint Price: 1.0 XPL
  • Status: βœ… Live & Minting Active

Pattern Types

  1. Flowing Particle Streams - Turbulent flow fields
  2. 3D Swirling Vortex - Multi-layered spirals
  3. Particle Field Interactions - N-body physics
  4. Flowing Particle Ribbons - BΓ©zier curves
  5. Radial Particle Burst - Polar distributions
  6. True Fluid Energy Field - Navier-Stokes flow
  7. Volumetric Energy Cloud - 3D volume rendering

Rarity System

  • Legendary (~2%) - Highest complexity
  • Epic (~8%) - Advanced patterns
  • Rare (~20%) - Unique features
  • Uncommon (~30%) - Interesting traits
  • Common (~40%) - Standard generation

πŸ’» Development

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Supabase account
  • Plasma network wallet (MetaMask)

Installation

# Clone repository
git clone https://github.com/yourusername/gen-plasma-nft-collection.git
cd gen-plasma-nft-collection

# Install dependencies
npm install

# Set up environment variables
cp env.example .env.local
# Edit .env.local with your values

Environment Variables

# Frontend
NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_id

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Blockchain
NEXT_PUBLIC_TREASURY_ADDRESS=0xYourTreasuryAddress
NEXT_PUBLIC_GEN_PLASMA_CONTRACT=0xB10d640B74016ed2b8E1f59CA931467D16534D08

# Hardhat (for contract deployment)
PRIVATE_KEY=your_private_key
PLASMASCAN_API_KEY=your_plasmascan_api_key

Run Development Server

npm run dev
# Open http://localhost:3000

Build for Production

npm run build
npm start

Deploy Smart Contract

# Compile contracts
npx hardhat compile

# Deploy to Plasma
npx hardhat run scripts/deploy.js --network plasma

# Verify on PlasmaExplorer
npx hardhat verify --network plasma <CONTRACT_ADDRESS> <CONSTRUCTOR_ARGS>

πŸ“ Project Structure

β”œβ”€β”€ app/                          # Next.js 14 app directory
β”‚   β”œβ”€β”€ create/                   # Deployment pages
β”‚   β”‚   β”œβ”€β”€ builder/             # Visual collection builder
β”‚   β”‚   └── page.tsx             # Deployment options
β”‚   β”œβ”€β”€ mint/[contractAddress]/  # Dynamic mint pages
β”‚   β”œβ”€β”€ explore/                 # Collection discovery
β”‚   β”œβ”€β”€ wallet/                  # NFT wallet viewer
β”‚   └── collection/              # Gen-Plasma collection
β”‚
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ Header.tsx               # Navigation header
β”‚   β”œβ”€β”€ Footer.tsx               # Site footer
β”‚   β”œβ”€β”€ MintCard.tsx            # Mint interface
β”‚   β”œβ”€β”€ PaymentModal.tsx        # Payment verification
β”‚   β”œβ”€β”€ CollectionItem.tsx      # Collection cards
β”‚   └── ...                     # Other components
β”‚
β”œβ”€β”€ pages/api/                   # API routes
β”‚   β”œβ”€β”€ deploy/                 # Contract deployment
β”‚   β”‚   β”œβ”€β”€ deploy-contract-typed.ts
β”‚   β”‚   └── process-payment.ts
β”‚   β”œβ”€β”€ whitelist/              # Whitelist management
β”‚   β”‚   β”œβ”€β”€ save-group.ts
β”‚   β”‚   β”œβ”€β”€ get-groups.ts
β”‚   β”‚   β”œβ”€β”€ generate-merkle-root.ts
β”‚   β”‚   └── get-merkle-proof.ts
β”‚   β”œβ”€β”€ mint-page-settings/     # Page customization
β”‚   β”œβ”€β”€ metadata/               # NFT metadata
β”‚   └── ...                     # Other endpoints
β”‚
β”œβ”€β”€ contracts/                   # Solidity contracts
β”‚   β”œβ”€β”€ PlasmaNFT.sol          # Gen-Plasma collection
β”‚   β”œβ”€β”€ PlasmaNFTBasic.sol     # Basic template
β”‚   β”œβ”€β”€ PlasmaNFTEditions.sol  # Editions template
β”‚   └── PlasmaNFTPro.sol       # Pro template
β”‚
β”œβ”€β”€ lib/                        # Utility libraries
β”‚   β”œβ”€β”€ supabase.ts            # Supabase client
β”‚   β”œβ”€β”€ wagmi.ts               # Web3 configuration
β”‚   β”œβ”€β”€ contract.ts            # Contract utilities
β”‚   └── merkleTree.ts          # Merkle tree functions
β”‚
β”œβ”€β”€ scripts/                    # Deployment scripts
β”‚   β”œβ”€β”€ deploy.js              # Contract deployment
β”‚   └── verify-contract.js     # Verification
β”‚
└── public/                     # Static assets

πŸ”— Useful Links

Platform

Blockchain

Development


πŸ›‘οΈ Security

Smart Contract Security

  • βœ… OpenZeppelin battle-tested contracts
  • βœ… ReentrancyGuard on all payable functions
  • βœ… Owner access controls
  • βœ… Pausable for emergency stops
  • βœ… Comprehensive input validation

Payment Security

  • βœ… On-chain transaction verification
  • βœ… Duplicate transaction prevention
  • βœ… Timestamp validation (24-hour window)
  • βœ… Recipient address verification
  • βœ… Amount verification

API Security

  • βœ… Rate limiting on endpoints
  • βœ… Input sanitization
  • βœ… CORS configuration
  • βœ… Environment variable protection
  • βœ… Supabase RLS policies

πŸ“ˆ Performance

Metrics

  • ⚑ Page Load: < 1s (Vercel Edge)
  • ⚑ NFT Generation: 20-150ms average
  • ⚑ Contract Deployment: ~30 seconds
  • ⚑ Mint Transaction: 1-2 seconds
  • ⚑ API Response: < 200ms average

Optimizations

  • Image optimization with Next.js Image
  • Code splitting and lazy loading
  • Supabase connection pooling
  • IPFS gateway caching
  • Client-side caching strategies

🀝 Contributing

We welcome contributions! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • OpenZeppelin - Smart contract libraries
  • Plasma Network - Blockchain infrastructure
  • RainbowKit - Wallet connection UX
  • Vercel - Hosting and deployment
  • Supabase - Database and storage

πŸ“ž Support

For support, feature requests, or bug reports:


Gen-Plasma Platform - Empowering creators to launch NFT collections on Plasma. ⚑🎨

About

XPL Inscription Service/ 0Code NFT Contract Deployer - Generative Art Project on Plasma Mainnet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors