Smart Contracts
Contract Overview
┌─────────────────────────────────────┐
│ Miko402 Ecosystem │
├─────────────────────────────────────┤
│ User Interface (Next.js App) │
├─────────────────────────────────────┤
│ AI Agent (Google Gemini) │
├─────────────────────────────────────┤
│ Smart Contracts │
│ ┌───────────────────────────────┐ │
│ │ PaymentGateway.sol │ │
│ │ - Payment processing │ │
│ │ - Escrow & release │ │
│ └───────────────────────────────┘ │
│ ┌───────────────────────────────┐ │
│ │ SpendingLimits.sol │ │
│ │ - Limit enforcement │ │
│ │ - Spending tracking │ │
│ └───────────────────────────────┘ │
│ ┌───────────────────────────────┐ │
│ │ X402Registry.sol │ │
│ │ - Service discovery │ │
│ │ - Provider registry │ │
│ └───────────────────────────────┘ │
├─────────────────────────────────────┤
│ Blockchain (Solana / EVM chains) │
└─────────────────────────────────────┘1. PaymentGateway.sol
Purpose
Key Features
Core Functions
Data Structures
Events
2. SpendingLimits.sol
Purpose
Key Features
Core Functions
Data Structures
Events
3. X402Registry.sol
Purpose
Key Features
Core Functions
Data Structures
Contract Interactions
Payment Flow
Limit Enforcement Flow
Security Features
Access Control
Input Validation
Gas Optimization
Upgradeability
Testing
Deployment
Supported Networks
Deployment Process
Contract Addresses
Audits
Source Code
Related Documentation
Last updated
