Crates.io | eigenlayer-contract-deployer |
lib.rs | eigenlayer-contract-deployer |
version | 0.2.0 |
created_at | 2025-04-08 15:30:50.446742+00 |
updated_at | 2025-05-01 19:02:01.265876+00 |
description | A library that contains Rust bindings for contracts and tools for deploying contracts |
homepage | https://tangle.tools |
repository | https://github.com/tangle-network/eigenlayer-contract-deployer |
max_upload_size | |
id | 1625633 |
size | 12,402,663 |
A Rust library for generating bindings and deploying smart contracts for Eigenlayer AVSs.
The Eigenlayer Contract Deployer is a Rust library that provides bindings for smart contracts commonly used in blueprints created with the Blueprint SDK. It focuses on EigenLayer/EVM blueprints and includes tools for deploying contracts and setting up environments for blueprints.
The library contains:
Currently, the library includes specific support for the EigenLayer Incredible Squaring blueprint, with plans to make it more general-purpose for any AVS.
Add the library to your Cargo.toml:
[dependencies]
eigenlayer-contract-deployer = { git = "https://github.com/tangle-network/eigenlayer-contract-deployer" }
use eigenlayer_contract_deployer::deploy::deploy_avs_contracts;
use eigenlayer_contract_deployer::core::deploy_core_contracts;
use alloy_primitives::Address;
async fn deploy_my_avs() -> Result<(), Box<dyn std::error::Error>> {
// Deploy core contracts first
let core_contracts = deploy_core_contracts(
"http://localhost:8545",
"private_key",
deployer_address,
config_data,
None,
None,
).await?;
// Deploy AVS contracts
let avs_contracts = deploy_avs_contracts(
"http://localhost:8545",
"private_key",
deployer_address,
1, // num_quorums
core_contracts.permission_controller,
core_contracts.allocation_manager,
core_contracts.avs_directory,
core_contracts.delegation_manager,
core_contracts.pauser_registry,
core_contracts.rewards_coordinator,
core_contracts.strategy_factory,
task_generator_addr,
aggregator_addr,
100, // task_response_window_block
).await?;
// Setup permissions
setup_avs_permissions(
&core_contracts,
&avs_contracts,
&wallet,
deployer_address,
"metadata_uri".to_string(),
).await?;
Ok(())
}
The library is structured as follows:
Licensed under either of
at your discretion.