Giter Site home page Giter Site logo

odomartrindade / eigenlayer-contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from layr-labs/eigenlayer-contracts

1.0 0.0 0.0 20.03 MB

License: Other

Shell 0.69% JavaScript 0.12% Ruby 4.08% TypeScript 0.53% Dockerfile 0.02% Solidity 94.55%

eigenlayer-contracts's Introduction

EigenLayer

EigenLayer is a set of smart contracts deployed on Ethereum that enable restaking of assets to secure new services. This repo contains the EigenLayer core contracts, whose currently-supported assets include beacon chain ETH and several liquid staking tokens (LSTs). Users use these contracts to deposit and withdraw these assets, as well as delegate them to operators providing services to AVSs.

Getting Started

Branching

The main branches we use are:

  • dev (default): The most up-to-date branch, containing the work-in-progress code for upcoming releases
  • testnet-holesky: Our current testnet deployment
  • mainnet: Our current mainnet deloyment

Documentation

Basics

To get a basic understanding of EigenLayer, check out You Could've Invented EigenLayer. Note that some of the document's content describes features that do not exist yet (like the Slasher). To understand more about how restakers and operators interact with EigenLayer, check out these guides:

Deep Dive

The most up-to-date and technical documentation can be found in /docs. If you're a shadowy super coder, this is a great place to get an overview of the contracts before diving into the code.

To get an idea of how users interact with these contracts, check out our integration tests: /src/test/integration.

Building and Running Tests

This repository uses Foundry. See the Foundry docs for more info on installation and usage. If you already have foundry, you can build this project and run tests with these commands:

foundryup

forge build
forge test

Running Fork Tests

We have a few fork tests against ETH mainnet. Passing these requires the environment variable RPC_MAINNET to be set. See .env.example for an example. Once you've set up your environment, forge test should show these fork tests passing.

Additionally, to run all tests in a forked environment, install yq. Then, set up your environment using this script to read from config.yml:

source source-env.sh [goerli|local]

Then run the tests:

forge test --fork-url [RPC_URL]

Running Static Analysis

  1. Install solhint, then run:

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

  1. Install slither, then run:

slither .

Generate Inheritance and Control-Flow Graphs

  1. Install surya and graphviz:
npm i -g surya

apt install graphviz
  1. Then, run:
surya inheritance ./src/contracts/**/*.sol | dot -Tpng > InheritanceGraph.png

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

Deployments

Current Mainnet Deployment

The current mainnet deployment is our M1 release, and is from a much older version of this repo. You can view the deployed contract addresses below, or check out the code itself on the mainnet branch.

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]
Strategy: sfrxETH StrategyBaseTVLLimits 0x8CA7...28b6 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: lsETH StrategyBaseTVLLimits 0xAe60...4473 0xdfdA...46d3 Proxy: OpenZeppelin [email protected]
Strategy: mETH StrategyBaseTVLLimits 0x298a...6dd2 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

Current Testnet Deployment

The current testnet deployment is on holesky, and is from our M2 beta release. You can view the deployed contract addresses below, or check out the code itself on the testnet-holesky branch.

Name Solidity Proxy Implementation Notes
StrategyManager StrategyManager 0xdfB5...D5b6 0x59f7...3a18 Proxy: OpenZeppelin [email protected]
Strategy: stETH StrategyBaseTVLLimits 0x7D70...63d3 0xFb83...3305 Proxy: OpenZeppelin [email protected]
Strategy: rETH StrategyBaseTVLLimits 0x3A8f...c4E0 0xFb83...3305 Proxy: OpenZeppelin [email protected]
Strategy: WETH StrategyBaseTVLLimits 0x8052...FaF9 0xFb83...3305 Proxy: OpenZeppelin [email protected]
EigenPodManager EigenPodManager 0x3077...e315 0x5265...4a7B Proxy: OpenZeppelin [email protected]
EigenLayerBeaconOracle succinctlabs/EigenLayerBeaconOracle.sol - 0x4C11...8f25
EigenPod (beacon) EigenPod 0x7261...832D 0xa6AF...bE18 - Beacon: OpenZeppelin [email protected]
- Deployed pods use [email protected]
DelayedWithdrawalRouter DelayedWithdrawalRouter 0x642c...FA32 0xcE8b...3407 Proxy: OpenZeppelin [email protected]
DelegationManager DelegationManager 0xA441...48e7 0x83f8...0D76 Proxy: OpenZeppelin [email protected]
AVSDirectory AVSDirectory 0x0557...FeBf 0xEF5B...3e3a Proxy: OpenZeppelin [email protected]
Slasher Slasher 0xcAe7...6e7C 0x9971...345A Proxy: OpenZeppelin [email protected]
PauserRegistry PauserRegistry - 0x85Ef...2F06
Timelock Compound: Timelock.sol - 0xcF19...0A7D
Proxy Admin OpenZeppelin [email protected] - 0xDB02...A6cf

eigenlayer-contracts's People

Contributors

sidu28 avatar chaoticwalrus avatar gpsanant avatar 8sunyuan avatar wadealexc avatar 0x0aa0 avatar ypatil12 avatar samlaf avatar gajesh2007 avatar omahs avatar stevennevins avatar teryanarmen avatar pandabadger avatar wesfloyd avatar bowenli86 avatar cryptogakusei avatar haythemsellami avatar adlerjohn avatar krauspt avatar mooselumph avatar rsproule avatar daweth avatar tudorpintea999 avatar joaolago1113 avatar xiaolou86 avatar

Stargazers

ODOMAR FERREIRA DA TRINDADE avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.