Skip to content

euler-xyz/euler-verifier

Repository files navigation

Euler Contract Verifier

Verifies that deployed Euler protocol contracts match their source code by finding exact deployment commits.

Quick Start

# Install dependencies
uv sync

# Set your Etherscan API key
export ETHERSCAN_API_KEY=your_key_here

# Verify a single network
uv run python verify.py mainnet

# Verify all production networks
uv run python verify.py --all

# List available networks
uv run python verify.py --list

Verification Reports

Reports are generated in results/. Each report shows which commit was used to deploy each contract.

Production Networks

Network Chain ID Status Report
Mainnet 1 ✅ 26/26 mainnet.md
BSC 56 ✅ 26/26 bsc.md
Unichain 130 ✅ 26/26 unichain.md
Monad 143 ✅ 21/21 monad.md
Sonic 146 ✅ 26/26 sonic.md
TAC 239 ✅ 26/26 tac.md
Swell 1923 ✅ 26/26 swell.md
Base 8453 ✅ 26/26 base.md
Plasma 9745 ⚠️ 7/26 plasma.md
Arbitrum 42161 ✅ 26/26 arbitrum.md
Avalanche 43114 ✅ 26/26 avalanche.md
Linea 59144 ⚠️ 25/26 linea.md
BOB 60808 ✅ 26/26 bob.md
Berachain 80094 ✅ 26/26 berachain.md

CLI Options

uv run python verify.py <network>     # Verify single network
uv run python verify.py --all         # Verify all production networks
uv run python verify.py --exhaustive  # Deep search through git history
uv run python verify.py --list        # List available networks

How It Works

  1. Loads contract addresses from euler-interfaces/addresses/{chainId}/
  2. Fetches verified source from block explorer (Etherscan or Blockscout)
  3. Searches git history in source repositories to find exact deployment commit
  4. Generates report showing which commit matches each contract

Project Structure

euler-verifier/
├── verify.py              # Unified verification script
├── networks.json          # Network and explorer configuration
├── verifier_lib/          # Core library
│   ├── config.py          # Network config loading
│   ├── addresses.py       # Contract address loading
│   ├── fetchers/          # Etherscan/Blockscout API
│   ├── comparator.py      # Source code comparison
│   ├── cache.py           # Verification caching
│   ├── commits.py         # Known deployment commits
│   └── report.py          # Markdown report generation
├── results/               # Verification reports
├── standalone/            # Per-network verification scripts
├── repos/                 # Cloned source repositories
├── euler-interfaces/      # Contract addresses (submodule)
├── cache/                 # API response cache
└── .github/workflows/     # CI automation

Source Repositories

Contracts are deployed from these repositories:

Requirements

  • Python 3.10+
  • uv package manager
  • Etherscan API key (set ETHERSCAN_API_KEY env var)

About

A comprehensive verification suite for all Euler protocol contracts deployed across multiple networks. This tool verifies deployed bytecode against source code in Euler's repositories, identifies the exact git commit used for each deployment, and generates detailed reports with any differences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages