@lidofinance/lsv-cli 1.0.0-alpha.7 → 1.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +217 -1
- package/dist/abi/Dashboard.js +1383 -0
- package/dist/abi/Dashboard.js.map +1 -0
- package/dist/abi/Delegation.js +1658 -0
- package/dist/abi/Delegation.js.map +1 -0
- package/dist/abi/LidoLocator.js +388 -0
- package/dist/abi/LidoLocator.js.map +1 -0
- package/dist/abi/StEth.js +496 -0
- package/dist/abi/StEth.js.map +1 -0
- package/dist/abi/StakingVault.js +786 -0
- package/dist/abi/StakingVault.js.map +1 -0
- package/dist/abi/TokenManager.js +759 -0
- package/dist/abi/TokenManager.js.map +1 -0
- package/dist/abi/VaultFactory.js +229 -0
- package/dist/abi/VaultFactory.js.map +1 -0
- package/dist/abi/VaultHub.js +923 -586
- package/dist/abi/VaultHub.js.map +1 -1
- package/dist/abi/Voting.js +887 -0
- package/dist/abi/Voting.js.map +1 -0
- package/dist/abi/index.js +26 -0
- package/dist/abi/index.js.map +1 -0
- package/dist/command/index.js +16 -0
- package/dist/command/index.js.map +1 -1
- package/dist/configs/constants.js +6 -0
- package/dist/configs/constants.js.map +1 -0
- package/dist/configs/deployed.js +118 -24
- package/dist/configs/deployed.js.map +1 -1
- package/dist/configs/envs.js +24 -16
- package/dist/configs/envs.js.map +1 -1
- package/dist/configs/index.js +1 -0
- package/dist/configs/index.js.map +1 -1
- package/dist/configs/utils.js +32 -0
- package/dist/configs/utils.js.map +1 -0
- package/dist/contracts/dashboard.js +19 -0
- package/dist/contracts/dashboard.js.map +1 -0
- package/dist/contracts/delegation.js +19 -0
- package/dist/contracts/delegation.js.map +1 -0
- package/dist/contracts/index.js +8 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/locator.js +20 -0
- package/dist/contracts/locator.js.map +1 -0
- package/dist/contracts/steth.js +19 -0
- package/dist/contracts/steth.js.map +1 -0
- package/dist/contracts/token-manager.js +20 -0
- package/dist/contracts/token-manager.js.map +1 -0
- package/dist/contracts/vault-factory.js +22 -0
- package/dist/contracts/vault-factory.js.map +1 -0
- package/dist/contracts/vault-hub.js +10 -8
- package/dist/contracts/vault-hub.js.map +1 -1
- package/dist/contracts/vault.js +18 -0
- package/dist/contracts/vault.js.map +1 -0
- package/dist/contracts/voting.js +22 -0
- package/dist/contracts/voting.js.map +1 -0
- package/dist/features/advanced-config.js +21 -0
- package/dist/features/advanced-config.js.map +1 -0
- package/dist/features/index.js +20 -0
- package/dist/features/index.js.map +1 -0
- package/dist/features/token-manager.js +6 -0
- package/dist/features/token-manager.js.map +1 -0
- package/dist/features/vault-factory.js +36 -0
- package/dist/features/vault-factory.js.map +1 -0
- package/dist/features/voting.js +136 -0
- package/dist/features/voting.js.map +1 -0
- package/dist/programs/config.js +33 -0
- package/dist/programs/config.js.map +1 -0
- package/dist/programs/dashboard.js +688 -0
- package/dist/programs/dashboard.js.map +1 -0
- package/dist/programs/delegation.js +539 -0
- package/dist/programs/delegation.js.map +1 -0
- package/dist/programs/index.js +5 -0
- package/dist/programs/index.js.map +1 -1
- package/dist/programs/vault-factory.js +84 -0
- package/dist/programs/vault-factory.js.map +1 -0
- package/dist/programs/vault-hub.js +331 -116
- package/dist/programs/vault-hub.js.map +1 -1
- package/dist/programs/vault.js +378 -0
- package/dist/programs/vault.js.map +1 -0
- package/dist/programs/voting.js +53 -0
- package/dist/programs/voting.js.map +1 -0
- package/dist/providers/wallet.js +20 -18
- package/dist/providers/wallet.js.map +1 -1
- package/dist/types/common.js +3 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/config.js +3 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/data-validators.js +51 -0
- package/dist/utils/data-validators.js.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/resolve-path.js +13 -0
- package/dist/utils/resolve-path.js.map +1 -0
- package/dist/utils/sleep.js +8 -0
- package/dist/utils/sleep.js.map +1 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ A command-line interface (CLI) tool for managing liquid staking vaults. Simplify
|
|
|
10
10
|
- [Configuration](#configuration)
|
|
11
11
|
- [Usage](#usage)
|
|
12
12
|
- [Examples](#examples)
|
|
13
|
+
- [Contracts](#contracts)
|
|
13
14
|
- [License](#license)
|
|
14
15
|
|
|
15
16
|
## Features
|
|
@@ -47,12 +48,36 @@ RPC_URL_1=
|
|
|
47
48
|
|
|
48
49
|
# Contract addresses
|
|
49
50
|
DEPLOYED=deployed-holesky-vaults-devnet-0.json
|
|
51
|
+
CONFIG=./config.json
|
|
50
52
|
|
|
51
53
|
# Wallet
|
|
52
54
|
PRIVATE_KEY_1=0x...
|
|
53
55
|
PRIVATE_KEY_17000=0x...
|
|
54
56
|
|
|
55
57
|
```
|
|
58
|
+
Application supported a few ways to adding or combine different settings
|
|
59
|
+
|
|
60
|
+
- #### 1st step
|
|
61
|
+
You can pass link to json file with address of deployed contacts into **DEPLOYED** variable. If you want use
|
|
62
|
+
devnet the all needed addresses of the contracts like VaultHub, VaultFactory etc already passed as example in configs/deployed-holesky-vaults-devnet-1.json.
|
|
63
|
+
Also at near future this feature will be changed to resolving contracts addresses by LIDO locator and link to json
|
|
64
|
+
file will no longer be necessary
|
|
65
|
+
- #### 2nd step
|
|
66
|
+
You need to pass link to json config file into **CONFIG** variable. The structure of a config file has to be like
|
|
67
|
+
```javascript
|
|
68
|
+
{
|
|
69
|
+
"rpcLink": "https://link_to_rpc",
|
|
70
|
+
"privateKey": "some_key",
|
|
71
|
+
"chainId": 1, // or another number of chain id
|
|
72
|
+
"lidoLocator": "LIDO locator address", // take LIDO locator address in paticular chainId
|
|
73
|
+
"accounting": "LIDO accountind address" // take LIDO accounting address in paticular chainId
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
If you plan to manage contracts the **privateKey** is required property for this type of operations.
|
|
77
|
+
For using rpcLink in a right way be attentive to match rpc resolver link and its chain ID.
|
|
78
|
+
Also, You can pass rpc link as env variable into RPC_URL_(chainID)
|
|
79
|
+
where chainID is current chain ID, chainId basically takes from config file, but also you can
|
|
80
|
+
pass it to deployed file and process env CHAIN_ID variable.
|
|
56
81
|
|
|
57
82
|
## Usage
|
|
58
83
|
|
|
@@ -71,7 +96,7 @@ lsv-cli -h
|
|
|
71
96
|
**VaultHub constants**
|
|
72
97
|
|
|
73
98
|
```bash
|
|
74
|
-
lsv-cli vh constants
|
|
99
|
+
lsv-cli vh constants
|
|
75
100
|
```
|
|
76
101
|
|
|
77
102
|
**Count of all vaults**
|
|
@@ -80,6 +105,197 @@ lsv-cli vh constants -c 17000
|
|
|
80
105
|
lsv-cli vh v-count
|
|
81
106
|
```
|
|
82
107
|
|
|
108
|
+
## Contracts
|
|
109
|
+
- [VaultHub](#vaulthub)
|
|
110
|
+
- [VaultFactory](#vaultfactory)
|
|
111
|
+
- [Vault](#vault)
|
|
112
|
+
- [Dashboard](#dashboard)
|
|
113
|
+
- [Delegation](#delegation)
|
|
114
|
+
|
|
115
|
+
### VaultHub
|
|
116
|
+
#### Command
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
lsv-cli vh [arguments] [-options]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### VaultHub commands list
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
lsv-cli vh -h
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### API
|
|
129
|
+
| Command | Description |
|
|
130
|
+
|:---------------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
|
131
|
+
| constants | get vault hub constants |
|
|
132
|
+
| v-count | get connected vaults number |
|
|
133
|
+
| vi \<index> | get vault and vault socket by index |
|
|
134
|
+
| va \<address> | get vault socket by address |
|
|
135
|
+
| v-connect \<address> \<shareLimit> \<reserveRatio> \<reserveRatioThreshold> \<treasuryFeeBP> | connects a vault to the hub (vault master role needed) |
|
|
136
|
+
| v-force-rebalance \<address> | force rebalance of the vault to have sufficient reserve ratio |
|
|
137
|
+
| v-role-admin \<role> | returns the admin role that controls role |
|
|
138
|
+
| v-role-member \<role> \<index> | returns one of the accounts that have role |
|
|
139
|
+
| v-role-member-count \<role> | returns the number of accounts that have role |
|
|
140
|
+
| v-role-has \<role> \<account> | returns true if account has been granted role |
|
|
141
|
+
|
|
142
|
+
### VaultFactory
|
|
143
|
+
|
|
144
|
+
#### Command
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
lsv-cli vf [arguments] [-options]
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### VaultFactory commands list
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
lsv-cli vf -h
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### API
|
|
157
|
+
|
|
158
|
+
| Command | Description |
|
|
159
|
+
|--------------------------------------------------------|-----------------------|
|
|
160
|
+
| create-vault [-option] \<managerFee> \<performanceFee> | create vault contract |
|
|
161
|
+
|
|
162
|
+
**[options]**
|
|
163
|
+
|
|
164
|
+
| Option | State | Description |
|
|
165
|
+
|----------------------------------------------| ------------ | ------------ |
|
|
166
|
+
| -c, --curator \<curator> | required | curator address |
|
|
167
|
+
| -o, --operator \<operator> | required | operator address |
|
|
168
|
+
| -s, --staker \<staker> | required | staker address |
|
|
169
|
+
| -t, --token-master \<tokenMaster> | required | token master address |
|
|
170
|
+
| -d, --claim-operator-due \<claimOperatorDue> | required | operator due address |
|
|
171
|
+
| -q, --quantity \<quantity> | optional | quantity of vaults to create, default 1 |
|
|
172
|
+
|
|
173
|
+
### Vault
|
|
174
|
+
#### Command
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
lsv-cli v [arguments] [-options]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
#### Vault commands list
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
lsv-cli v -h
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### API
|
|
187
|
+
| Command | Description |
|
|
188
|
+
|------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
|
|
189
|
+
| info \<address> | get vault base info |
|
|
190
|
+
| l-report \<address> | get latest vault report |
|
|
191
|
+
| is-balanced \<address> | returns whether vault is balanced, i.e. its valuation is greater than the locked amount |
|
|
192
|
+
| operator \<address> | returns the address of the node operator |
|
|
193
|
+
| valuation \<address> | get vault valuation |
|
|
194
|
+
| unlocked \<address> | get vault unlocked |
|
|
195
|
+
| locked \<address> | get vault locked |
|
|
196
|
+
| withdrawal-c \<address> | get vault withdrawal credentials |
|
|
197
|
+
| fund \<address> \<amount> | fund vault |
|
|
198
|
+
| withdraw \<address> \<recipient> \<amount> | withdraw from vault |
|
|
199
|
+
| rebalance \<address> \<amount> | rebalance vault |
|
|
200
|
+
| no-deposit-beacon \<address> \<numberOfDeposits> \<pubkeys> \<signatures> | deposit to beacon chain |
|
|
201
|
+
| no-val-exit \<address> \<validatorPublicKey> | request to exit validator |
|
|
202
|
+
| delta \<address> | the net difference between deposits and withdrawals |
|
|
203
|
+
|
|
204
|
+
### Dashboard
|
|
205
|
+
#### Command
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
lsv-cli d [arguments] [-options]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
#### Dashboard commands list
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
lsv-cli d -h
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
#### API
|
|
218
|
+
|
|
219
|
+
| Command | Description |
|
|
220
|
+
|----------------------------------------------------|------------------------------------------------------------------------------|
|
|
221
|
+
| info \<address> | get dashboard base info |
|
|
222
|
+
| init \<address> \<vault> | initialize dashboard |
|
|
223
|
+
| vault \<address> | vault info |
|
|
224
|
+
| s-limit \<address> | shares limit |
|
|
225
|
+
| s-minted \<address> | shares minted |
|
|
226
|
+
| reserve-ratio \<address> | vault reserve ratio of the vault |
|
|
227
|
+
| t-reserve-ratio \<address> | threshold reserve ratio of the vault |
|
|
228
|
+
| t-fee \<address> | treasury fee basis points |
|
|
229
|
+
| valuation \<address> | valuation of the vault in ether |
|
|
230
|
+
| t-shares \<address> | total of shares that can be minted on the vault |
|
|
231
|
+
| get-shares \<address> \<ether> | maximum number of shares that can be minted with deposited ether |
|
|
232
|
+
| get-w-eth \<address> | amount of ether that can be withdrawn from the staking vault |
|
|
233
|
+
| ownership \<address> \<newOwner> | transfers ownership of the staking vault to a new owner |
|
|
234
|
+
| disconnect \<address> | disconnects the staking vault from the vault hub |
|
|
235
|
+
| fund \<address> \<ether> | funds the staking vault with ether |
|
|
236
|
+
| fund-weth \<address> \<wethAmount> | funds the staking vault with wrapped ether |
|
|
237
|
+
| withdraw \<address> \<recipient> \<ether> | withdraws ether from the staking vault to a recipient |
|
|
238
|
+
| withdraw-weth \<address> \<recipient> \<ether> | withdraws stETH tokens from the staking vault to wrapped ether |
|
|
239
|
+
| exit \<address> \<validatorPubKey> | requests the exit of a validator from the staking vault |
|
|
240
|
+
| mint \<address> \<recipient> \<amountOfShares> | mints stETH tokens backed by the vault to a recipient |
|
|
241
|
+
| mint-wsteth \<address> \<recipient> \<tokens> | mints wstETH tokens backed by the vault to a recipient |
|
|
242
|
+
| burn \<address> \<amountOfShares> | burn stETH shares from the sender backed by the vault |
|
|
243
|
+
| burn-wsteth \<address> \<tokens> | burn wstETH tokens from the sender backed by the vault |
|
|
244
|
+
| burn-permit \<address> \<tokens> \<permitJSON> | burn stETH tokens from the sender backed by the vault using EIP-2612 Permit |
|
|
245
|
+
| burn-wsteth-permit \<address> \<tokens> \<permitJSON> | burn wstETH tokens from the sender backed by the vault using EIP-2612 Permit |
|
|
246
|
+
| rebalance \<address> \<ether> | rebalance the vault by transferring ether |
|
|
247
|
+
|
|
248
|
+
**\<permitJSON>**
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"value": number as bigint;
|
|
253
|
+
"deadline": number as bigint;
|
|
254
|
+
"v": number;
|
|
255
|
+
"r": string as Address;
|
|
256
|
+
"s": string as Address;
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Delegation
|
|
261
|
+
|
|
262
|
+
#### Command
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
lsv-cli del [arguments] [-options]
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Delegation commands list
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
lsv-cli del -h
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
#### API
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
| Command | Description |
|
|
278
|
+
|-----------------------------------------------|-----------------------------------|
|
|
279
|
+
| info \<address> | get delegation contract base info |
|
|
280
|
+
| voting-info \<address> | get committee votes |
|
|
281
|
+
| init \<address> \<vault> | initializes a contract |
|
|
282
|
+
| cd \<address> | return the accumulated curator due in ether |
|
|
283
|
+
| od \<address> | return the accumulated operator due in ether |
|
|
284
|
+
| unreserved \<address> | returns the unreserved amount of ether |
|
|
285
|
+
| vc \<address> | returns the committee |
|
|
286
|
+
| fund \<address> \<ether> | funds the StakingVault with ether |
|
|
287
|
+
| withdraw \<address> \<recipient> \<ether> | withdraws ether from the StakingVault |
|
|
288
|
+
| mint \<address> \<recipient> \<amountOfShares> | mints shares for a given recipient |
|
|
289
|
+
| burn \<address> \<amountOfShares> | burns shares for a given recipient |
|
|
290
|
+
| rebalance \<address> \<ether> | rebalances the StakingVault with a given amount of ether |
|
|
291
|
+
| vote-lifetime \<address> \<newVoteLifetime> | sets the vote lifetime |
|
|
292
|
+
| curator-fee \<address> \<newCuratorFee> | sets the curator fee |
|
|
293
|
+
| operator-fee \<address> \<newOperatorFee> | sets the operator fee |
|
|
294
|
+
| curator-due \<address> \<curator> | claims the curator due |
|
|
295
|
+
| operator-due \<address> \<operator> | claims the operator due |
|
|
296
|
+
| t-ownership \<address> \<newOwner> | transfers the ownership of the StakingVault |
|
|
297
|
+
| disconnect \<address> | voluntarily disconnects a StakingVault from VaultHub |
|
|
298
|
+
|
|
83
299
|
## License
|
|
84
300
|
|
|
85
301
|
This project is licensed under the [MIT License](LICENSE).
|