Skip to main content

Introduction to Registry EVVM Contract

The Registry EVVM Contract serves as the central registry system for EVVM deployments across various testnets. This upgradeable contract implements a sophisticated dual-tier registration system with time-delayed governance for security and administrative control.

Core Functionality

Dual-Tier Registration System

Public Registration (IDs 1000+)

  • Open Access: Anyone can register EVVM instances with auto-incrementing IDs starting from 1000
  • Chain Whitelisting: Only whitelisted testnet chain IDs are allowed for registration
  • Automatic ID Assignment: System automatically assigns sequential IDs for community deployments
  • Duplicate Prevention: Prevents registration of the same address on the same chain

Whitelisted Registration (IDs 1-999)

  • SuperUser Only: Reserved for official EVVM deployments managed by superUser
  • Custom ID Assignment: Allows specific ID assignment within the reserved range
  • Official Deployments: Used for vetted and officially supported EVVM instances
  • Enhanced Control: Additional validation and control over reserved ID range

Time-Delayed Governance

The contract implements a 7-day time-delayed governance system for critical operations:

  • SuperUser Changes: Changing the superUser requires a 7-day proposal and acceptance period
  • Contract Upgrades: Implementation upgrades require time-delayed proposals
  • Security Layer: Prevents immediate malicious changes and allows for community review

Chain ID Whitelisting

  • Testnet Focus: Only allows registration on whitelisted testnet chain IDs
  • Mainnet Protection: Prevents accidental or malicious registration on mainnet
  • Flexible Management: SuperUser can add new chain IDs as needed

Key Features

Registration Functions

  • registerEvvm(): Public registration with auto-incrementing IDs
  • sudoRegisterEvvm(): SuperUser registration with custom IDs
  • registerChainId(): Chain ID whitelisting management

Governance Functions

  • proposeSuperUser(): Propose new superUser with time delay
  • acceptSuperUser(): Accept pending superUser proposal
  • proposeUpgrade(): Propose contract upgrade with time delay
  • acceptProposalUpgrade(): Accept pending upgrade proposal

Query Functions

  • getEvvmIdMetadata(): Retrieve EVVM registration metadata
  • getWhiteListedEvvmIdActive(): List all active whitelisted registrations
  • getPublicEvvmIdActive(): List all active public registrations
  • isChainIdRegistered(): Check if chain ID is whitelisted
  • isAddressRegistered(): Check if address is already registered

Security Model

Access Control

  • SuperUser Privileges: Reserved functions for administrative control
  • Public Access: Open registration within defined parameters
  • Time Delays: 7-day waiting period for critical changes

Input Validation

  • Address Validation: Prevents zero addresses in registrations
  • Chain ID Validation: Ensures only valid chain IDs are used
  • Duplicate Prevention: Prevents multiple registrations of same address

Upgrade Safety

  • UUPS Pattern: Implements OpenZeppelin's upgradeable proxy pattern
  • Initialization Protection: Prevents direct initialization of implementation
  • Governance Controls: Time-delayed upgrades with proposal system

Data Structure

Metadata Structure

struct Metadata {
uint256 chainId; // Chain ID where EVVM is deployed
address evvmAddress; // Contract address of the EVVM
}

Governance Proposal Structure

struct AddressTypeProposal {
address current; // Currently active address
address proposal; // Proposed new address
uint256 timeToAccept; // Timestamp when proposal can be accepted
}

Use Cases

For dApp Developers

  • Discover available EVVM instances across different testnets
  • Verify official vs community EVVM deployments
  • Query metadata for specific EVVM instances

For EVVM Operators

  • Register new EVVM deployments for community use
  • Track and manage multiple EVVM instances
  • Participate in decentralized EVVM ecosystem

For Ecosystem Governance

  • Manage official EVVM deployments through reserved IDs
  • Control testnet access through chain ID whitelisting
  • Implement secure governance changes with time delays

This registry system enables a decentralized yet controlled approach to EVVM deployment management, balancing open access with security and quality control.