Skip to content

Smart Contracts Overview#

Introduction#

The Eden smart contract ecosystem provides a comprehensive infrastructure for AI agent management, NFT collections, auctions, and decentralized governance. Built on Ethereum and Base networks, these contracts enable secure, transparent, and efficient operations for the Eden platform.

Contract Categories#

🤖 Agent & AI Systems#

The core AI agent infrastructure enabling registration, management, and monetization of AI services.

Contract Purpose Status
AgentRegistry AI agent registration and metadata management ✅ Production

🎨 NFT Collections#

Limited edition and auction-based NFT systems for digital art and collectibles.

Contract Purpose Status
AbrahamEarlyWorks Limited edition NFT collection ✅ Production
FixedPriceSale Fixed-price NFT minting system ✅ Production
ThirteenYearAuction Long-term auction mechanism ✅ Production

🏛️ Governance & DAO#

Decentralized governance system for platform decision making.

Contract Purpose Status
Governor DAO governance and proposal system 🔄 Development
GovToken Governance token for voting 🔄 Development
Timelock Delayed execution of governance decisions 🔄 Development

💰 Token Economics#

Revenue distribution and token streaming mechanisms.

Contract Purpose Status
Spirit Main platform governance token 🔄 Development
Distributor Revenue distribution system 🔄 Development
PureSuperToken SuperFluid-based streaming token 🔄 Development

System Architecture#

graph TB
    subgraph "User Interface Layer"
        A[Eden Platform]
        B[Mobile Apps]
        C[Third-party dApps]
    end

    subgraph "Smart Contract Layer"
        D[AgentRegistry]
        E[NFT Collections]
        F[Auction Systems]
        G[Governance]
        H[Token Economics]
    end

    subgraph "Infrastructure Layer"
        J[IPFS Storage]
        K[Event Indexing]
        L[Cache Layer]
    end

    A --> D
    B --> E
    C --> F

    D --> J
    E --> K
    F --> L

    D -.-> E
    E -.-> F
    F -.-> G
    G -.-> H

Key Features#

🔐 Security First#

All contracts implement comprehensive security measures:

  • Access Control: Role-based permissions and ownership controls
  • Reentrancy Protection: Guards against reentrancy attacks
  • Input Validation: Thorough parameter validation
  • Emergency Controls: Pause/resume functionality where needed
  • Upgrade Safety: Immutable core logic with controlled upgrades

⛽ Gas Optimization#

Contracts are optimized for minimal gas consumption:

  • Efficient Storage: Packed data structures and optimized layouts
  • Batch Operations: Multiple operations in single transactions
  • Event-Based Architecture: Off-chain indexing for complex queries
  • Minimal State Changes: Reduced on-chain storage operations

🔗 Interoperability#

The system is designed for seamless integration:

  • Standard Interfaces: ERC-721, ERC-20, and other standard compliance
  • Composable Architecture: Contracts work together seamlessly
  • External Integration: Easy integration with wallets and dApps
  • Cross-Chain Ready: Architecture supports multi-chain deployment

📡 Real-Time Updates#

Event-driven architecture enables real-time functionality:

  • Comprehensive Events: All state changes emit detailed events
  • Cache Integration: Automatic cache updates via event listening
  • WebSocket Support: Real-time updates for frontend applications
  • Indexing Ready: Events optimized for blockchain indexers

Network Deployment#

Production Networks#

Network Chain ID Status Explorer
Ethereum Mainnet 1 🔜 Planned Etherscan

Testnet Networks#

Network Chain ID Status Explorer
Sepolia 11155111 ✅ Active Sepolia Etherscan
Base Sepolia 84532 ✅ Active Base Sepolia Scan

Current Deployments#

See Contract Addresses for complete deployment information including: - Latest contract addresses on each network - Block explorer links for verification - ABI files and integration examples

Development Workflow#

Testing & Deployment#

The contract development follows a rigorous process:

  1. Unit Testing: Comprehensive test coverage for all functions
  2. Integration Testing: Cross-contract interaction testing
  3. Testnet Deployment: Deploy and test on Sepolia/Base Sepolia
  4. Security Audit: Professional security review (for mainnet)
  5. Mainnet Deployment: Production deployment with monitoring

Tools & Framework#

  • Hardhat: Development environment and testing framework
  • OpenZeppelin: Security-audited contract libraries
  • Hardhat Ignition: Deployment management system
  • TypeScript: Type-safe development and testing
  • Ethers.js: Ethereum interaction library

Integration Guide#

For Developers#

Quick Start#

// Install required dependencies
npm install ethers @openzeppelin/contracts

// Basic contract interaction
import { ethers } from 'ethers';
import AgentRegistryABI from './AgentRegistry.json';

const provider = new ethers.JsonRpcProvider('https://sepolia.base.org');
const agentRegistry = new ethers.Contract(
  '0x3F91E8Ec6d6861309B726AFab8dCD21E83259492',
  AgentRegistryABI,
  provider
);

// Query agent metadata
const tokenURI = await agentRegistry.tokenURI(1);
console.log('Agent metadata:', tokenURI);

Advanced Integration#

// Multi-contract integration example
class EdenContractManager {
  constructor(provider, network) {
    this.provider = provider;
    this.network = network;
    this.contracts = this.loadContracts();
  }

  async registerAgentWithWallet(metadataURI, walletAddress) {
    // Check wallet registration
    const isRegistered = await this.contracts.walletRegistry
      .isWalletRegistered(walletAddress);

    if (!isRegistered) {
      await this.contracts.walletRegistry.registerWallet(walletAddress);
    }

    // Register agent
    return await this.contracts.agentRegistry
      .registerAgent(metadataURI, walletAddress);
  }
}

For Frontend Applications#

React hook example for contract integration:

import { useState, useEffect } from 'react';
import { useContract } from './useContract';

export function useAgentRegistry() {
  const [agents, setAgents] = useState([]);
  const agentRegistry = useContract('AgentRegistry');

  useEffect(() => {
    const loadAgents = async () => {
      const totalSupply = await agentRegistry.totalSupply();
      const agentList = [];

      for (let i = 1; i <= totalSupply; i++) {
        const tokenURI = await agentRegistry.tokenURI(i);
        const owner = await agentRegistry.ownerOf(i);
        agentList.push({ id: i, tokenURI, owner });
      }

      setAgents(agentList);
    };

    if (agentRegistry) {
      loadAgents();
    }
  }, [agentRegistry]);

  return { agents, agentRegistry };
}

Economic Model#

Revenue Streams#

The smart contract ecosystem generates revenue through:

  1. Agent Registration Fees: Small fees for agent registration
  2. Auction Proceeds: Percentage of auction sales
  3. Platform Fees: Transaction fees on various operations
  4. Governance Participation: Token staking rewards

Token Distribution#

pie title Token Distribution Model
    "Community Rewards" : 40
    "Development Team" : 25
    "Treasury/Platform" : 20
    "Early Adopters" : 10
    "Liquidity Provision" : 5

Sustainability#

The economic model ensures long-term sustainability through:

  • Diversified Revenue: Multiple income sources
  • Community Ownership: Token holder governance
  • Treasury Management: Strategic fund allocation
  • Reinvestment: Platform development funding

Roadmap#

Phase 1: Core Infrastructure ✅#

  • Agent registration system
  • NFT collections and sales
  • Multi-wallet management
  • Basic auction mechanisms

Phase 2: Advanced Features 🔄#

  • Governance implementation
  • Token economics launch
  • Advanced auction types
  • Cross-chain expansion

Phase 3: Ecosystem Growth 🔜#

  • Third-party integrations
  • Advanced DeFi features
  • Mobile-first experiences
  • Global accessibility

Phase 4: Decentralization 🔮#

  • Full DAO transition
  • Community-driven development
  • Autonomous operations
  • Self-sustaining ecosystem

Support & Resources#

Documentation#

  • Contract Addresses: Latest deployment addresses
  • Individual Contract Docs: Detailed function documentation
  • Integration Examples: Code samples and tutorials
  • API References: Complete interface documentation

Community#

Support#


Last Updated: September 1, 2025
Ecosystem Status: Active Development
Security Status: Testnet Verified