Skip to content

alt-research/eigenlayer-contracts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EigenLayer

🚧 The Slasher contract is under active development and its interface expected to change. We recommend writing slashing logic without integrating with the Slasher at this point in time. 🚧

EigenLayer is a set of smart contracts deployed on Ethereum that enable restaking of assets to secure new services.

We recommend starting with the technical documentation to get an overview of the contracts before diving into the code.

For deployment addresses on both mainnet and Goerli, see Deployments below.

Table of Contents

Installation and Running Tests / Analyzers

Installation

foundryup

forge install

This repository uses Foundry as a smart contract development toolchain.

See the Foundry Docs for more info on installation and usage.

Natspec Documentation

You will notice that we also have hardhat installed in this repo. This is only used to generate natspec docgen. This is our workaround until foundry finishes implementing the forge doc command.

To generate the docs, run npx hardhat docgen (you may need to run npm install first).

Run Tests

Prior to running tests, you should set up your environment. At present this repository contains fork tests against ETH mainnet; your environment will use an RPC_MAINNET key to run these tests. See the .env.example file for an example -- two simple options are to copy the LlamaNodes RPC url to your env or use your own infura API key in the provided format. If you don't set the RPC_MAINNET key then the test cases will default to LlamaNodes RPC url when fork testing.

The main command to run tests is:

forge test -vv

Run Tests on a Fork

Environment config is contained in config.yml. Before running the following commands, install yq. Then set up the environment with this script:

source source-env.sh [CHAIN]

For example, on goerli: source source-env.sh goerli. Currently options for [CHAIN] are goerli, local. Then to run the actual tests:

forge test --fork-url [RPC_URL]

Run Static Analysis

solhint 'src/contracts/**/*.sol'

slither .

Generate Inheritance and Control-Flow Graphs

First install surya

then run

surya inheritance ./src/contracts/**/*.sol | dot -Tpng > InheritanceGraph.png

and/or

surya graph ./src/contracts/middleware/*.sol | dot -Tpng > MiddlewareControlFlowGraph.png

and/or

surya mdreport surya_report.md ./src/contracts/**/*.sol

Deployments

M1 (Current Mainnet Deployment)

Name Solidity Proxy Implementation Notes
StrategyManager StrategyManager 0x8586...075A 0x5d25...42Fb Proxy: OpenZeppelin [email protected]
Strategy: cbETH StrategyBaseTVLLimits 0x5494...56bc 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: stETH StrategyBaseTVLLimits 0x93c4...564D 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: rETH StrategyBaseTVLLimits 0x1BeE...dCD2 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: ETHx StrategyBaseTVLLimits 0x9d7e...011d 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: ankrETH StrategyBaseTVLLimits 0x1376...58ff 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: OETH StrategyBaseTVLLimits 0xa4C6...d059 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: osETH StrategyBaseTVLLimits 0x57ba...4c02 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: swETH StrategyBaseTVLLimits 0x0Fe4...96d6 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: wBETH StrategyBaseTVLLimits 0x7CA9...2184 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
EigenPodManager EigenPodManager 0x91E6...A338 0xEB86...e111 Proxy: OpenZeppelin [email protected]
EigenPod (beacon) EigenPod 0x5a2a...9073 0x5c86...9dA7 - Beacon: OpenZeppelin [email protected]
- Deployed pods use [email protected]
DelayedWithdrawalRouter DelayedWithdrawalRouter 0x7Fe7...23D8 0x44Bc...E2AF Proxy: OpenZeppelin [email protected]
DelegationManager DelegationManager 0x3905...f37A 0xf97E...75e4 Proxy: OpenZeppelin [email protected]
Slasher Slasher 0xD921...c3Cd 0xef31...d6d8 Proxy: OpenZeppelin [email protected]
PauserRegistry PauserRegistry - 0x0c43...7060
Pauser Multisig [email protected] 0x5050…2390 0xd9db...9552 Proxy: [email protected]
Community Multisig [email protected] 0xFEA4...c598 0xd9db...9552 Proxy: [email protected]
Executor Multisig [email protected] 0x369e...9111 0xd9db...9552 Proxy: [email protected]
Operations Multisig [email protected] 0xBE16...3e90 0xd9db...9552 Proxy: [email protected]
Timelock Compound: Timelock.sol - 0xA6Db...0EAF
Proxy Admin OpenZeppelin [email protected] - 0x8b95...2444

M1 (Current Goerli Testnet Deployment)

Name Solidity Proxy Implementation Notes
StrategyManager StrategyManager 0x779...8E907 0x8676...0055 Proxy: OpenZeppelin [email protected]
Strategy: stETH StrategyBaseTVLLimits 0xB6...d14da 0x81E9...F8ebA Proxy: OpenZeppelin [email protected]
Strategy: rETH StrategyBaseTVLLimits 0x8799...70b5 0x81E9...F8ebA Proxy: OpenZeppelin [email protected]
EigenPodManager EigenPodManager 0xa286b...df41 0xdD09...901b Proxy: OpenZeppelin [email protected]
EigenPod (beacon) EigenPod 0x3093...C9a5 0x86bf...6CcA - Beacon: OpenZeppelin [email protected]
- Deployed pods use [email protected]
DelayedWithdrawalRouter DelayedWithdrawalRouter 0x895...388f 0x607...7fe Proxy: OpenZeppelin [email protected]
DelegationManager DelegationManager 0x1b7...Eb0a8 0x9b79...A99d Proxy: OpenZeppelin [email protected]
Slasher Slasher 0xD1...0C22 0x3865...8Be6 Proxy: OpenZeppelin [email protected]
PauserRegistry PauserRegistry - 0x81E9...F8ebA
Timelock Compound: Timelock.sol - 0xa7e7...796e
Proxy Admin OpenZeppelin [email protected] - 0x28ce...02e2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 95.1%
  • Ruby 3.6%
  • TypeScript 0.6%
  • Shell 0.6%
  • JavaScript 0.1%
  • Makefile 0.0%