Mosaic is an innovative smart contract development platform specifically designed for the Mantle blockchain ecosystem. It offers two powerful approaches to contract creation: a visual drag-and-drop builder and an AI-powered contract generator. Whether you prefer hands-on composition or AI assistance, Mosaic empowers developers and blockchain enthusiasts to rapidly create and deploy optimized smart contracts.
- Intuitive drag-and-drop interface for composing contracts
- Pre-built, Mantle-optimized contract modules
- Real-time Solidity code generation
- Component-based architecture for maximum reusability
- Powered by Llama 3.2 8B parameter model via Gaia
- Natural language contract generation
- Context-aware code completion
- Mantle-specific optimizations and best practices
Here are some effective prompts to help you get started with the AI generator:
"Create an ERC20 token contract for a community rewards system with:
- Monthly distribution caps
- Vesting schedules for team tokens
- Anti-whale mechanisms limiting large transfers"
"Design a meta-transaction handler for my DeFi protocol that:
- Supports percentage-based gas fee delegation
- Includes signature verification
- Has role-based permissions for gas sponsors"
"Generate a bridge adapter contract that:
- Handles ERC20 token transfers between Ethereum and Mantle
- Includes emergency pause functionality
- Implements a challenge period for withdrawals"
Both the visual builder and AI generator support:
- Meta Transaction Handlers
- ERC20 Token Implementations
- Role-Based Access Control
- Bridge Adapters
- Gas Optimization Utilities
- NFT Contract Templates
- One-click deployment to Mantle Mainnet
- Streamlined testing on Mantle Sepolia Testnet
- Seamless MetaMask integration
- Built-in gas estimation and optimization
- Node.js (v18+ recommended)
- MetaMask Browser Extension
- MNT Tokens for deployment
- Clone the repository
git clone https://github.com/yourusername/mosaic.git
cd mosaic
- Install dependencies
npm install
- Run the development server
npm run dev
Open http://localhost:3000 in your browser
Frontend:
- Next.js 15+
- React with TypeScript
- Tailwind CSS
- Shadcn UI Components
- React DnD (Drag and Drop)
Smart Contract Integration:
- Ethers.js
- Web3Modal
- MetaMask SDK
AI Integration:
- Gaia API Client
- Llama 3.2 8B parameter model
- Stream-based response handling
Meta Transaction
- Enable gasless transactions with advanced Mantle v2 support
- Configurable fee delegation ratios
- Multi-signature validation options
ERC20 Token
- Gas-optimized token implementation for Mantle
- Built-in hooks for extensions
- Comprehensive security features
Access Control
- Role-based permission management
- Time-locked role transitions
- Emergency admin functions
Bridge Adapter
- Seamless L1-L2 token transfers
- State verification and challenge periods
- Configurable bridge parameters
Gas Optimizer
- Dynamic fee adjustment mechanisms
- Batch transaction support
- Priority fee management
The AI Generator leverages the Llama 3.2 8B parameter model to provide:
Code Generation:
- Natural language to Solidity conversion
- Mantle-specific optimizations
- Best practice implementations
Context Awareness:
- Understanding of contract requirements
- Integration with existing code
- Compatibility checking
Learning Resources:
- Example prompt library
- Code explanation generation
- Gas optimization suggestions
Security Measures:
- Pre-audited contract templates
- Automated vulnerability scanning
- Role-based access control
- Mantle architecture compatibility
Best Practices:
- Gas optimization patterns
- Secure coding guidelines
- Transaction safety checks
We welcome contributions! Please see our Contributing Guidelines for details.
How to Contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Upcoming Features:
- Advanced AI prompt templates
- Multi-contract system generation
- Contract verification automation
- Integration testing framework
- Enhanced gas estimation
- AI-powered security analysis
- Custom component creation tools
Built with β€οΈ for Web3 Developers