Skip to content

Commit

Permalink
feat: fix count method, add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DiRaiks committed Nov 1, 2024
1 parent fd37f0c commit dc50e07
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 2 deletions.
86 changes: 85 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,85 @@
# liquid-staking-vault-cli
# Liquid Staking Vault CLI

A command-line interface (CLI) tool for managing liquid staking vaults. Simplify your staking operations with intuitive commands and streamlined workflows.

## Table of Contents

- [Features](#features)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Examples](#examples)
- [License](#license)

## Features

- **Easy Setup**: Quick installation and configuration to get you started.
- **Vault Management**: Create, update, and delete staking vaults with simple commands.
- **Monitoring**: Track vault metrics.

## Prerequisites

- **Node.js**: Ensure you have Node.js (v20 or later) installed.
- **npm**: Node Package Manager is required to install dependencies.

## Installation

Install the Liquid Staking Vault CLI globally using npm:

```bash
npm install -g @lidofinance/lsv-cli
```

Alternatively, you can install it locally in your project:

```bash
npm install @lidofinance/lsv-cli
```

## Configuration

Before using the CLI, configure your environment variables. You can set them in a `.env` file in your project root.

```.env
RPC_URL_17000=
RPC_URL_1=
# Contract addresses
DEPLOYED=deployed-holesky-vaults-devnet-0.json
# Wallet
PRIVATE_KEY_1=0x...
PRIVATE_KEY_17000=0x...
```

## Usage

After installation and configuration, you can start using the CLI to manage your staking vaults.

```bash
lsv-cli [command] [options]
```

```bash
lsv-cli -h
```

### Examples

**VaultHub constants**

```bash
lsv-cli vh constants -c 17000
```

**Count of all vaults**

```bash
lsv-cli vh v-count
```

## License

This project is licensed under the [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion programs/vault-hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ vaultHub
.command("v-count")
.description("get vaults count")
.option("-c, --chainId <chainId>", "chainId")
.action(async (chainId) => {
.action(async ({ chainId }) => {
const contract = getVaultHubContract(chainId);

const vaultsCount = await contract.read.vaultsCount();
Expand Down

0 comments on commit dc50e07

Please sign in to comment.