Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/layr-labs/eigensdk-rs
EigenLayer Rust Developer Tooling
https://github.com/layr-labs/eigensdk-rs
avs eigenlayer ethereum restaking rust sdk verifiable-computing
Last synced: 3 days ago
JSON representation
EigenLayer Rust Developer Tooling
- Host: GitHub
- URL: https://github.com/layr-labs/eigensdk-rs
- Owner: Layr-Labs
- License: other
- Created: 2024-03-11T05:11:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-07T20:58:35.000Z (10 days ago)
- Last Synced: 2025-01-08T11:01:55.883Z (10 days ago)
- Topics: avs, eigenlayer, ethereum, restaking, rust, sdk, verifiable-computing
- Language: Rust
- Homepage:
- Size: 43.5 MB
- Stars: 71
- Watchers: 4
- Forks: 15
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-avs - Rust SDK (official, Alpha)
- awesome-avs - Rust SDK (official, Alpha)
README
# EigenSDK-rs
EigenSDK-rs is an initiative for rust developers to build AVSs on eigenlayer.
## Installation
```bash
cargo add eigensdk --features full
```## Overview
List of crates in the repository :-
- [eigen-client-avsregistry](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/chainio/clients/avsregistry) - Read, Write and subscribe methods for AvsRegistry
- [eigen-client-elcontracts](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/chainio/clients/elcontracts) - Convenience methods to call Eigenlayer contracts
- [eigen-crypto-bls](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/crypto/bls) - New bls key pair, sign message, conversion utilites between alloy and arkworks bn254.
- [eigen-crypto-bn254](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/crypto/bn254) - verify message on G2, map to curve.
- [eigen-metrics](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/metrics) - performance, rpc and economic metrics
- [eigen-services](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/services) - Spawn tokio services for operators info, bls aggregation
- [eigen-types](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/types) - Common types
- [eigen-utils](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/utils) - Publicly exportable `mainnet rewards v0.4.3` compatible alloy bindings.
- [eigen-testing-utils](https://github.com/Layr-Labs/eigensdk-rs/tree/main/testing/testing-utils) - Contains publicly exportable anvil, holesky, mainnet addresses for eigen contracts.
- [eigen-cli](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/eigen-cli) - ECDSA, BLS keystore cli
- [eigen-nodeapi](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/nodeapi) - NodeApi implementation for EigenLayer.
- [eigen-logging](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/logging) - Logging utilities
- [eigen-common](https://github.com/Layr-Labs/eigensdk-rs/tree/main/crates/common) - Common utilities like provider and signer getters.## Examples
You can run any [example](https://github.com/Layr-Labs/eigensdk-rs/tree/main/examples) using the command `cargo run --example `
Example :
```bash
cargo run --example get_quorum_count
```## Contract Bindings
The main branch of this repo is intended to be syncronized with mainnet version of core contracts.
To update the bindings of this repo:
- Inside the `crates/contracts` folder, run:
```bash
forge bind --alloy --bindings-path /crates/utils --overwrite -C src/contracts
```where `path-eigensdk-rs` is the full path to the eigensdk-rs (this) repo.
This command will generate the bindings files in the folder: `/crates/utils`.
⚠️ It rewrites Cargo.toml file, this file must be restored to the current version.
- Fix all compilation warnings.
## Contributor Guidelines
We are actively looking for contributors. Thank you for your interest. We have strict ci checks in place. In case of any questions and support, feel free to raise an issue.
## Branches
- `main` - Points to the latest **mainnet** release of contracts.
- `testnet` - Points to the latest **testnet** release of contracts.
- `dev` - Points to the latest **dev** branch of the contracts.### PR
To test locally :-
You need `foundry` to successfully run it.
```bash
cargo test
```On Mac, you might need to pull the foundry image manually specifying the platform with:
```bash
docker pull --platform amd64 foundry-rs/foundry
```Sometimes the bindings fail due to containing botched doctests.
You can exclude them from the test run with:```bash
cargo test --workspace --exclude eigen-utils
```At least 1 `approving` review is required to merge the PR.
### lint```bash
make lint
```### To run fireblocks tests
Add the following variables to your env
- FIREBLOCKS_API_KEY
- FIREBLOCKS_PRIVATE_KEY_PATH
- FIREBLOCKS_API_URLand then run the following command
```bash
make fireblocks-tests```
### Test Coverage
Test coverage should aim to be around 80%.
Here's how to generate test coverage reports:
Install llvm tools:
```bash
make deps
```Run the tests with coverage instrumentations:
```bash
make coverage
```Open the coverage html report in a web browser:
```sh
open target/llvm-cov/html/index.html
```## Supported Rust Version
Rolling `MSRV` policy of 6 months. The current `MSRV` is 1.79
## Disclaimer
🚧 EigenSDK-rs is under active development and has not been audited. EigenSDK-rs is rapidly being upgraded, features may be added, removed or otherwise improved or modified and interfaces will have breaking changes. EigenSDK-rs should be used only for testing purposes and not in production. EigenSDK-rs is provided "as is" and Eigen Labs, Inc. does not guarantee its functionality or provide support for its use in production. 🚧
## Credits
- [eigensdk-go](https://github.com/Layr-Labs/eigensdk-go/tree/master)
## Security Bugs
Please report security vulnerabilities to . Do NOT report security bugs via Github Issues.
## Support
Join our [telegram](https://t.me/+0_kYjD7TTCRjMjZh) channel .