Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,18 @@
<p align="center"><b><font size="+1">
🚧 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. 🚧
</font></b><p>
EigenLayer (formerly 'EigenLayr') is a set of smart contracts deployed on Ethereum that enable restaking of assets to secure new services.
At present, this repository contains *both* the contracts for EigenLayer *and* a set of general "middleware" contracts, designed to be reusable across different applications built on top of EigenLayer.

Note that the interactions between middleware and EigenLayer are not yet "set in stone", and may change somewhat prior to the platform being fully live on mainnet; in particular, payment architecture is likely to evolve. As such, the "middleware" contracts should not be treated as definitive, but merely as a helpful reference, at least until the architecture is more settled.
EigenLayer is a set of smart contracts deployed on Ethereum that enable restaking of assets to secure new services.

Click the links in the Table of Contents below to access more specific documentation. We recommend starting with the [EigenLayer Technical Specification](docs/EigenLayer-tech-spec.md) to get a better overview before diving into any of the other docs. For contracts addresses deployed on Goerli, click [here](https://github.com/Layr-Labs/eigenlayer-contracts/blob/master/script/output/M1_deployment_goerli_2023_3_23.json).
## Table of Contents
* [Introduction](#introduction)
* [Installation and Running Tests / Analyzers](#installation)
* [EigenLayer Technical Specification](docs/EigenLayer-tech-spec.md)
We recommend starting with the [technical documentation](docs/README.md) to get an overview of the contracts before diving into the code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you prefer not to point to the EIgenLayer-tech-spec in docs/outdated?
Do we have plans to rewrite that at some point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at that file, it's very outdated, so I definitely don't want to point to it for now.

A lot of the content there is now contained in the docs/README, or the top of each docs file.

I think the main content there that it might be nice to have is some of the conceptual concepts presented, but I don't currently have time to bring it up to date and I think the current docs do a good enough job otherwise.


For deployment addresses on both mainnet and Goerli, see [Deployments](#deployments) below.

Design Docs
* [Withdrawals Design Doc](docs/Guaranteed-stake-updates.md)
* [EigenPods Design Doc](docs/EigenPods.md)
## Table of Contents

Flow Docs
* [EigenLayer Withdrawal Flow](docs/EigenLayer-withdrawal-flow.md)
* [EigenLayer Deposit Flow](docs/EigenLayer-deposit-flow.md)
* [EigenLayer Delegation Flow](docs/EigenLayer-delegation-flow.md)
* [Middleware Registration Flow for Operators](docs/Middleware-registration-operator-flow.md)
Comment on lines -14 to -26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we getting rid of all of these? Or we just let them navigate the docs/ folder by themselves?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of those links function anymore.

The README file in the docs folder serves as a good table of contents into the rest of the docs, but the specific files I'm removing here are really out of date. I think the material should be covered by the new docs - do you see gaps anywhere?

* [Installation and Running Tests / Analyzers](#installation-and-running-tests--analyzers)
* [Technical Documentation](docs/README.md)
* [Deployments](#deployments)

<a name="installation"/></a>
## Installation and Running Tests / Analyzers
Expand All @@ -44,7 +36,7 @@ See the [Foundry Docs](https://book.getfoundry.sh/) for more info on installatio

You will notice that we also have hardhat installed in this repo. This is only used to generate natspec [docgen](https://github.com/OpenZeppelin/solidity-docgen). This is our workaround until foundry [finishes implementing](https://github.com/foundry-rs/foundry/issues/1675) the `forge doc` command.

To generate the docs, run `npx hardhat docgen` (you may need to run `npm install` first). The output is located in `docs/docgen`
To generate the docs, run `npx hardhat docgen` (you may need to run `npm install` first).

### Run Tests

Expand All @@ -55,11 +47,12 @@ 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](https://mikefarah.gitbook.io/yq/v/v3.x/). Then set up the environment with this script:

Environment config is contained in config.yml. Before running the following commands, [install yq](https://mikefarah.gitbook.io/yq/v/v3.x/). 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:
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]`

Expand All @@ -71,7 +64,7 @@ for example, on goerli: `source source-env.sh goerli`. Currently options for `[

### Generate Inheritance and Control-Flow Graphs

first [install surya](https://github.com/ConsenSys/surya/)
First [install surya](https://github.com/ConsenSys/surya/)

then run

Expand Down