Building AVS with the EigenLayer ECDSA Template
Introduction
This guide will walk you through the process of utilizing our ECDSA Template to initiate your own AVS with ECDSA-oriented Smart Contracts. For reference, the Tangle AVS (opens in a new tab) demonstrates an implementation of an AVS using ECDSA contracts.
Generating your project with Cargo Tangle
1. Installation
$ cargo install cargo-tangle --git https://github.com/tangle-network/gadget --force
2. Generating your Project
To generate your project, execute the following command:
$ cargo tangle blueprint create --name <blueprint_name> --eigenlayer ecdsa
Replace <blueprint_name>
with your preferred AVS name. Upon running this command, you'll be prompted with a
series of questions regarding your project's configuration and setup. Answer these questions as they appear; if
uncertain, the default selection is generally best.
Note
If Soldeer fails to update/install the necessary dependencies upon generation, you may need to run it manually with the following command:
$ forge soldeer update -d
4. Hello, World!
Now that you have generated the project, you can test out the simple example by running:
$ cargo test
This test just shows that the template generates you a fresh, working AVS structure. All that's left is to add what you want!
5. Customizing your AVS
The next steps depend on your specific requirements, but we offer several resources to assist you:
- By default, the AVS contract generated with this template is named TangleServiceManager.sol (along with related test files TestTangleServiceManager.sol and TangleServiceManager.t.sol). You can use your text editor's find-and-replace function to rename these as desired.
- For various types of event listener examples, refer to this page.
- To gain a deeper understanding of how jobs function, consult the jobs section.