eigensdk-rs
is a Rust SDK for interacting with Eigenlayer and building AVS tooling. Additionally, it incorporates features for interacting with Tangle and utilizing our gadget, an augmented SDK for building task based AVS. Together, these two offer a comprehensive solution for building applications with both Eigenlayer and Tangle. This SDK is a high-performance, reliable, and efficient library that integrates seamlessly with Eigenlayer's ecosystem while leveraging the many advantages of Rust.
It should be noted that this SDK is still being actively developed and has not undergone a professional audit. Please use at your own risk in production.
- Full Eigenlayer Integration: Provides all the robust functionalities of eigensdk-go, now with the performance benefits of Rust.
- Unlimited Customization: Equipped with all the tools needed to build custom AVSs, including those that leverage our advanced Gadget capabilities.
- High Performance: Developed with Rust to deliver superior efficiency and speed, ensuring your applications run optimally.
- Enhanced Type Safety: Takes advantage of Rust's strong type system to create more reliable and maintainable code.
- Advanced Concurrency: Utilizes Rust's concurrency model to enable safe and efficient multi-threaded operations.
- Go Implementation Compatibility: Achieves full feature parity with the Go version, facilitating straightforward porting of applications from Go to Rust.
- Comprehensive API Access: Provides complete access to all Eigen network functionalities, empowering developers to fully exploit the platform's potential.
Clone the repository:
git clone https://github.com/webb-tools/eigensdk-rs/
cd eigensdk-rs
cargo build --release
or to use EigenSDK-RS in your own Rust project, just add the following dependency to your Cargo.toml
:
[dependencies]
eigensdk-rs = { git = "https://github.com/webb-tools/eigensdk-rs" }
To programmatically start an AVS operator:
- Create a new operator, supplying the necessary inputs (dependent upon the AVS you are running). The following is a general example that a real implementation would closely follow. The config is dependent upon the AVS you are running.
let operator = Operator::new_from_config(
config,
http_provider,
ws_provider,
operator_info_service,
signer,
)
.await?;
- With the operator, simply run the start function:
operator.start().await?;
This repository both contains tests for the included AVSs and provides the tools necessary to test custom AVSs you build with this SDK.
To run the tests from the command line, you can run the following commands in the root directory:
- You can manually build all smart contracts, though there are build scripts to automatically build them.
./test-utils/scripts/build.sh
- Set the environment variables for running the tests.
. ./test-utils/scripts/env_setup.sh
- Run the test for the AVS you would like to test.
Incredible Squaring AVS
cargo test -p test-utils test_incredible_squaring_full
The full test starts a local Anvil testnet, deploys all the required contracts to it, and then starts an operator.
- Build
cargo build --release -p test-utils
- Run
Incredible Squaring AVS's Testnet
./target/release/incredible-squaring
To contribute:
- Fork the repository.
- Create a new branch.
- Make your changes and ensure tests pass.
- Submit a pull request with a detailed description of your changes.
Gadget is licensed under either of the following:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)