Coder Social home page Coder Social logo

effizzieng / eigenlayer-contracts-layer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from layr-labs/eigenlayer-contracts

1.0 0.0 0.0 16.87 MB

This is my fork Eigenlayer

License: Other

Shell 0.76% JavaScript 0.14% Ruby 4.47% TypeScript 0.58% Dockerfile 0.03% Solidity 94.03%

eigenlayer-contracts-layer'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.

The most up to date mainnet and testnet deployment addresses can be found on our docs site.

Getting Started

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

eigenlayer-contracts-layer's People

Contributors

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

Stargazers

 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.