EigenLayer is a protocol built on Ethereum that introduces Restaking, a primitive for app and service builders to make verifiable commitments to their users. EigenLayer brings together Restakers, Operators, and Autonomous Verifiable Services (AVSs) to extend Ethereum's cryptoeconomic security. The protocol supports permissionless security: EIGEN, Native ETH, LSTs, and ERC-20s.
# Initial setup (installs pre-commit hook, foundry, abigen)
make deps
# Build contracts
forge b
# Run tests
forge t
# Run unit tests
forge test --no-match-contract Integration
# Run integration tests
forge test --match-contract Integration
# Run fork tests
env FOUNDRY_PROFILE=forktest forge test --match-contract Integration
# Format
make fmt
# Generate Go bindings
make bindingssrc/contracts/- Core Solidity contractscore/- DelegationManager, StrategyManager, AVSDirectory, AllocationManager, RewardsCoordinatorpods/- EigenPodManager, EigenPodstrategies/- StrategyBase, StrategyFactory, EigenStrategytoken/- Eigen, BackingEigen tokenspermissions/- PauserRegistry, PermissionController, KeyRegistrarmultichain/- CrossChainRegistry, OperatorTableUpdater, CertificateVerifiersavs/- TaskMailbox and AVS-related contracts
src/test/- Test filesintegration/- Integration tests for cross-contract interactions
script/- Deployment and utility scriptsdocs/- Technical documentation (detailed contract docs in/docs)pkg/- Go bindings
main- The canonical, most up-to-date branch with work-in-progress for upcoming releasesVx.y.z- Release branches matching EigenLayer releases, cut frommainvia cherry-pickingrelease-dev/xxx- Development branches for large features (merged tomainthen deleted)
- Fork tests require
RPC_MAINNETenvironment variable - See
.env.examplefor environment setup - Use
source source-env.sh [goerli|local]with yq installed for forked environment tests - Check integration tests in
src/test/integration/for examples of user interactions
-
Make Changes
-
Format make fmt
-
Update docs
-
Ensure Tests Pass forge t
-
Commit Changes & Open PR
- All commits MUST follow conventional commit standard
- PRs must be named with (release|feat|fix|chore|docs|refactor|test|style|ci|perf):
- All PRs MUST be formatted per the following formatting:
**Motivation:**
*Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
**Modifications:**
*Describe the modifications you've done.*
**Result:**
*After your change, what will change.*