Skip to content

Commit

Permalink
feat: add install script (#192)
Browse files Browse the repository at this point in the history
Closes #112

This PR adds an install script adapted from `eigenlayer-cli`. It's still
a work-in-progress, and could be improved by:

- installing in a place already in the `PATH` (like `/usr/local/bin`) or
automatically adding the install directory to the `PATH`
- adding an alternative install method for unreleased versions (like a
branch or commit), that uses `go install`
- adding a version manager similar to `foundryup`
  • Loading branch information
MegaRedHand authored Jan 30, 2025
1 parent c55220f commit a139090
Show file tree
Hide file tree
Showing 2 changed files with 453 additions and 4 deletions.
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,57 @@ The library, on the other hand, is commonly used in place of mocks for automated
## Dependencies

### Kurtosis

Since the Devnet is implemented as a Kurtosis package, we require Kurtosis to be installed.
For how to install it, you can check [here](https://docs.kurtosis.com/install/).
As part of that, you'll also need to install Docker.
And since it uses Docker, you'll also need to install it.

You can find how to install it in the Kurtosis documentation:
<https://docs.kurtosis.com/install>

### Foundry

For deploying local contracts, [foundry needs to be installed](https://book.getfoundry.sh/getting-started/installation).
For deploying local contracts, foundry needs to be installed.
Also, only contracts inside foundry projects are supported as of now.

For development, we require [the `go` toolchain to be installed](https://go.dev/doc/install).
You can find how to install it in the Foundry documentation:
<https://book.getfoundry.sh/getting-started/installation>

### Development dependencies

For development, we use the `go` toolchain.

To install it, check the official installation guide:
<https://go.dev/doc/install>

## How to install

### Using the install script

To download a binary for the latest release, run:

```sh
curl -sSfL https://raw.githubusercontent.com/Layr-Labs/avs-devnet/main/install.sh | sh -s
```

This command downloads and executes [our `main` branch install script](./install.sh), installing the latest binary release of the devnet.
It will be installed inside the `~/bin` directory by default.
You'll need to have this directory in your `PATH` to be able to call it by name (i.e. `avs-devnet` instead of `~/bin/avs-devnet`).
This can be done by running:

```sh
export PATH=$PATH:~/bin
```

To persist this change, you'll need to add it to your `~/.bashrc` file (or other, depending on your chosen shell).

> [!TIP]
> Alternatively, you can specify the install path with `-b <path>`, like so:
>
> ```sh
> curl -sSfL https://raw.githubusercontent.com/Layr-Labs/avs-devnet/main/install.sh | sh -s -- -b /usr/local/bin
> ```
### Using `go` toolchain
To install the devnet using the `go` toolchain:
Expand Down
Loading

0 comments on commit a139090

Please sign in to comment.