-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: updated avs docs * chore: prettier * fix: update broken context links * fix: update broken context links
- Loading branch information
Showing
14 changed files
with
241 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"overview": "Overview", | ||
"incredible-squaring-avs": "Incredible Squaring AVS", | ||
"bls-template": "Eigenlayer BLS Template", | ||
"ecdsa-template": "Eigenlayer ECDSA Template" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title: Using the EigenLayer BLS Template | ||
--- | ||
|
||
# Building AVS with the EigenLayer BLS Template | ||
|
||
## Introduction | ||
|
||
This will guide you through the process of utilizing our BLS Template for starting your own AVS with BLS-oriented Smart | ||
Contracts. The [Incredible Squaring AVS](/developers/eigenlayer-avs/incredible-squaring-avs) is an example of an AVS | ||
that uses BLS contracts. | ||
|
||
## Generating your project with Cargo Tangle | ||
|
||
### 1. Installation | ||
|
||
If you haven't already, you will need to install cargo-tangle. To install it, run the following command: | ||
|
||
> Supported on Linux, MacOS, and Windows (WSL2) | ||
```shell | ||
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tangle-network/gadget/releases/download/cargo-tangle/v0.1.1-beta.7/cargo-tangle-installer.sh | sh | ||
``` | ||
|
||
Or, if you prefer to install the CLI from source: | ||
|
||
```shell | ||
cargo install cargo-tangle --git https://github.com/tangle-network/gadget --force | ||
``` | ||
|
||
### 2. Generating your Project | ||
|
||
To create a new BLS AVS, use the following command: | ||
|
||
```shell | ||
cargo tangle blueprint create --name <blueprint_name> --eigenlayer | ||
``` | ||
|
||
Just replace `<blueprint_name>` with the desired name for your AVS. Once you run this command, you will be asked a series | ||
of questions regarding the configurations and setup for your project. Simply answer those questions when prompted; if | ||
you aren't sure about a question, you likely just want the default selection that it starts on. | ||
|
||
#### Note | ||
|
||
If you choose to use `foundry.toml` for the Soldeer configuration (the default), you will need to delete the following files from the `contracts` directory: | ||
|
||
- `foundry.toml` | ||
- `remappings.txt` | ||
- `soldeer.lock` | ||
|
||
This will allow the generated project to correct populate the dependencies and build out of the box. This will be fixed in the future so that nothing needs to be deleted. | ||
|
||
### 4. Hello, World! | ||
|
||
Now that you have generated the project, you can test out the simple example by running: | ||
|
||
```shell | ||
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 | ||
|
||
What you do from here is completely up to you, but we have plenty of resources to help you: | ||
|
||
- The contracts generated with this template will be called TangleServiceManager.sol, TangleTaskManager.sol, and | ||
ITangleTaskManager.sol by default. You can use the find-and-replace function to change these to whatever you would like. | ||
- Examples of different types of event listeners can be found [here](/developers/blueprint-event-listeners/introduction). | ||
- A deeper dive into how jobs work can be found in the [jobs section](/developers/blueprint-macros/jobs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: Using the EigenLayer ECDSA Template | ||
--- | ||
|
||
# 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](https://github.com/tangle-network/avs) demonstrates an | ||
implementation of an AVS using ECDSA contracts. | ||
|
||
## Generating your project with Cargo Tangle | ||
|
||
### 1. Installation | ||
|
||
Before proceeding, ensure you have cargo-tangle installed. If not, you can install it using the following command: | ||
|
||
> Supported on Linux, MacOS, and Windows (WSL2) | ||
```shell | ||
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tangle-network/gadget/releases/download/cargo-tangle/v0.1.1-beta.7/cargo-tangle-installer.sh | sh | ||
``` | ||
|
||
Alternatively, if you prefer installing the CLI from source: | ||
|
||
```shell | ||
cargo install cargo-tangle --git https://github.com/tangle-network/gadget --force | ||
``` | ||
|
||
### 2. Generating your Project | ||
|
||
To generate your project, execute the following command: | ||
|
||
```shell | ||
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 you choose to use `foundry.toml` for the Soldeer configuration (the default), you will need to delete the following | ||
files from the `contracts` directory: | ||
|
||
- `foundry.toml` | ||
- `remappings.txt` | ||
- `soldeer.lock` | ||
|
||
This step allows the generated project to correctly populate dependencies and build out of the box. We plan to address | ||
this in future updates to eliminate the need for manual file deletion. | ||
|
||
### 4. Hello, World! | ||
|
||
Now that you have generated the project, you can test out the simple example by running: | ||
|
||
```shell | ||
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](/developers/blueprint-event-listeners/introduction). | ||
- To gain a deeper understanding of how jobs function, consult the [jobs section](/developers/blueprint-macros/jobs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import CardGrid from "../../../components/CardGrid.tsx" | ||
|
||
# Building an EigenLayer AVS | ||
|
||
## Getting Started | ||
|
||
<CardGrid | ||
cards={[ | ||
{ | ||
title: "Incredible Squaring AVS", | ||
description: "Explore the Incredible Squaring AVS example to understand how we implement an AVS.", | ||
link: "/developers/eigenlayer-avs/incredible-squaring-avs" | ||
}, | ||
{ | ||
title: "EigenLayer BLS AVS Template", | ||
description: "Kickstart your AVS development with this BLS template.", | ||
link: "/developers/eigenlayer-avs/bls-template" | ||
}, | ||
{ | ||
title: "EigenLayer ECDSA AVS Template", | ||
description: "Simplify your AVS development process using this ECDSA template.", | ||
link: "/developers/eigenlayer-avs/ecdsa-template" | ||
} | ||
]} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.