@lidofinance/lsv-cli 1.0.0 → 1.1.0

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.
Files changed (278) hide show
  1. package/dist/abi/AccessControlConfirmable.d.ts +3 -2
  2. package/dist/abi/AccessControlConfirmable.js +3 -1
  3. package/dist/abi/AccessControlConfirmable.js.map +1 -1
  4. package/dist/abi/Dashboard.d.ts +64 -27
  5. package/dist/abi/Dashboard.js +38 -29
  6. package/dist/abi/Dashboard.js.map +1 -1
  7. package/dist/abi/LazyOracle.d.ts +44 -3
  8. package/dist/abi/LazyOracle.js +57 -3
  9. package/dist/abi/LazyOracle.js.map +1 -1
  10. package/dist/abi/OperatorGrid.d.ts +28 -0
  11. package/dist/abi/PredepositGuarantee.d.ts +28 -0
  12. package/dist/abi/StakingVault.d.ts +56 -0
  13. package/dist/abi/StakingVault.js +2 -0
  14. package/dist/abi/StakingVault.js.map +1 -1
  15. package/dist/abi/VaultFactory.d.ts +32 -4
  16. package/dist/abi/VaultHub.d.ts +38 -0
  17. package/dist/abi/VaultHub.js +13 -0
  18. package/dist/abi/VaultHub.js.map +1 -1
  19. package/dist/abi/VaultViewer.d.ts +144 -196
  20. package/dist/abi/VaultViewer.js +188 -257
  21. package/dist/abi/VaultViewer.js.map +1 -1
  22. package/dist/abi/defi-wrapper/Distributor.d.ts +448 -0
  23. package/dist/abi/defi-wrapper/Distributor.js +583 -0
  24. package/dist/abi/defi-wrapper/Distributor.js.map +1 -0
  25. package/dist/abi/defi-wrapper/Factory.d.ts +761 -0
  26. package/dist/abi/defi-wrapper/Factory.js +975 -0
  27. package/dist/abi/defi-wrapper/Factory.js.map +1 -0
  28. package/dist/abi/defi-wrapper/StvPool.d.ts +1283 -0
  29. package/dist/abi/defi-wrapper/StvPool.js +1680 -0
  30. package/dist/abi/defi-wrapper/StvPool.js.map +1 -0
  31. package/dist/abi/defi-wrapper/StvStETHPool.d.ts +1755 -0
  32. package/dist/abi/defi-wrapper/StvStETHPool.js +2301 -0
  33. package/dist/abi/defi-wrapper/StvStETHPool.js.map +1 -0
  34. package/dist/abi/defi-wrapper/StvStrategyPool.d.ts +1769 -0
  35. package/dist/abi/defi-wrapper/StvStrategyPool.js +2319 -0
  36. package/dist/abi/defi-wrapper/StvStrategyPool.js.map +1 -0
  37. package/dist/abi/defi-wrapper/WithdrawalQueue.d.ts +1131 -0
  38. package/dist/abi/defi-wrapper/WithdrawalQueue.js +1472 -0
  39. package/dist/abi/defi-wrapper/WithdrawalQueue.js.map +1 -0
  40. package/dist/abi/defi-wrapper/index.d.ts +6 -0
  41. package/dist/abi/defi-wrapper/index.js +7 -0
  42. package/dist/abi/defi-wrapper/index.js.map +1 -0
  43. package/dist/configs/utils.d.ts +1 -0
  44. package/dist/configs/utils.js +4 -0
  45. package/dist/configs/utils.js.map +1 -1
  46. package/dist/contracts/dashboard-impl.d.ts +4 -0
  47. package/dist/contracts/dashboard-impl.js +16 -0
  48. package/dist/contracts/dashboard-impl.js.map +1 -0
  49. package/dist/contracts/defi-wrapper/distributor.d.ts +4 -0
  50. package/dist/contracts/defi-wrapper/distributor.js +11 -0
  51. package/dist/contracts/defi-wrapper/distributor.js.map +1 -0
  52. package/dist/contracts/defi-wrapper/factory.d.ts +4 -0
  53. package/dist/contracts/defi-wrapper/factory.js +11 -0
  54. package/dist/contracts/defi-wrapper/factory.js.map +1 -0
  55. package/dist/contracts/defi-wrapper/index.d.ts +6 -0
  56. package/dist/contracts/defi-wrapper/index.js +7 -0
  57. package/dist/contracts/defi-wrapper/index.js.map +1 -0
  58. package/dist/contracts/defi-wrapper/stv-pool.d.ts +4 -0
  59. package/dist/contracts/defi-wrapper/stv-pool.js +11 -0
  60. package/dist/contracts/defi-wrapper/stv-pool.js.map +1 -0
  61. package/dist/contracts/defi-wrapper/stv-steth-pool.d.ts +4 -0
  62. package/dist/contracts/defi-wrapper/stv-steth-pool.js +11 -0
  63. package/dist/contracts/defi-wrapper/stv-steth-pool.js.map +1 -0
  64. package/dist/contracts/defi-wrapper/stv-strategy-pool.d.ts +4 -0
  65. package/dist/contracts/defi-wrapper/stv-strategy-pool.js +11 -0
  66. package/dist/contracts/defi-wrapper/stv-strategy-pool.js.map +1 -0
  67. package/dist/contracts/defi-wrapper/withdrawal-queue.d.ts +4 -0
  68. package/dist/contracts/defi-wrapper/withdrawal-queue.js +11 -0
  69. package/dist/contracts/defi-wrapper/withdrawal-queue.js.map +1 -0
  70. package/dist/contracts/index.d.ts +1 -0
  71. package/dist/contracts/index.js +1 -0
  72. package/dist/contracts/index.js.map +1 -1
  73. package/dist/contracts/vault-factory.d.ts +774 -102
  74. package/dist/contracts/vault-viewer.d.ts +2765 -4893
  75. package/dist/contracts/vault-viewer.js +1 -1
  76. package/dist/features/defi-wrapper-factory.d.ts +18 -0
  77. package/dist/features/defi-wrapper-factory.js +28 -0
  78. package/dist/features/defi-wrapper-factory.js.map +1 -0
  79. package/dist/features/deposits/check-bls-deposits.d.ts +2 -1
  80. package/dist/features/deposits/check-bls-deposits.js +10 -1
  81. package/dist/features/deposits/check-bls-deposits.js.map +1 -1
  82. package/dist/features/deposits/make-pdg-proof.d.ts +8 -0
  83. package/dist/features/deposits/make-pdg-proof.js +17 -1
  84. package/dist/features/deposits/make-pdg-proof.js.map +1 -1
  85. package/dist/features/index.d.ts +1 -0
  86. package/dist/features/index.js +1 -0
  87. package/dist/features/index.js.map +1 -1
  88. package/dist/features/mint-burn/allowance.js +1 -1
  89. package/dist/features/mint-burn/allowance.js.map +1 -1
  90. package/dist/features/pdg.d.ts +7 -0
  91. package/dist/features/pdg.js +5 -5
  92. package/dist/features/pdg.js.map +1 -1
  93. package/dist/features/utils/quarantine.d.ts +2 -0
  94. package/dist/features/utils/report-fresh.js +17 -0
  95. package/dist/features/utils/report-fresh.js.map +1 -1
  96. package/dist/features/vault-factory.d.ts +2 -2
  97. package/dist/features/vault-factory.js +6 -1
  98. package/dist/features/vault-factory.js.map +1 -1
  99. package/dist/features/vault-operations/create-vault.js +2 -2
  100. package/dist/features/vault-operations/create-vault.js.map +1 -1
  101. package/dist/features/vault-operations/vault-info.js +1 -1
  102. package/dist/features/vault-operations/vault-info.js.map +1 -1
  103. package/dist/features/vault-operations/vault-overview.js +9 -11
  104. package/dist/features/vault-operations/vault-overview.js.map +1 -1
  105. package/dist/features/vault-operations/vault-roles.d.ts +2 -1
  106. package/dist/features/vault-operations/vault-roles.js +22 -23
  107. package/dist/features/vault-operations/vault-roles.js.map +1 -1
  108. package/dist/features/vault-operations/vaults-by-role.d.ts +5 -0
  109. package/dist/features/vault-operations/vaults-by-role.js +103 -35
  110. package/dist/features/vault-operations/vaults-by-role.js.map +1 -1
  111. package/dist/index.js +6 -2
  112. package/dist/index.js.map +1 -1
  113. package/dist/programs/contracts/dashboard/config.js +4 -0
  114. package/dist/programs/contracts/dashboard/config.js.map +1 -1
  115. package/dist/programs/contracts/dashboard/write.js +45 -21
  116. package/dist/programs/contracts/dashboard/write.js.map +1 -1
  117. package/dist/programs/contracts/lazy-oracle/config.js +33 -0
  118. package/dist/programs/contracts/lazy-oracle/config.js.map +1 -1
  119. package/dist/programs/contracts/operator-grid/write.js +2 -75
  120. package/dist/programs/contracts/operator-grid/write.js.map +1 -1
  121. package/dist/programs/contracts/pdg/read.js +2 -5
  122. package/dist/programs/contracts/pdg/read.js.map +1 -1
  123. package/dist/programs/contracts/pdg/write.js +39 -7
  124. package/dist/programs/contracts/pdg/write.js.map +1 -1
  125. package/dist/programs/contracts/vault/write.js +18 -7
  126. package/dist/programs/contracts/vault/write.js.map +1 -1
  127. package/dist/programs/contracts/vault-factory/write.js +25 -15
  128. package/dist/programs/contracts/vault-factory/write.js.map +1 -1
  129. package/dist/programs/contracts/vault-viewer/config.js +102 -59
  130. package/dist/programs/contracts/vault-viewer/config.js.map +1 -1
  131. package/dist/programs/contracts/vault-viewer/read.js +22 -76
  132. package/dist/programs/contracts/vault-viewer/read.js.map +1 -1
  133. package/dist/programs/defi-wrapper/contracts/distributor/config.d.ts +3 -0
  134. package/dist/programs/defi-wrapper/contracts/distributor/config.js +44 -0
  135. package/dist/programs/defi-wrapper/contracts/distributor/config.js.map +1 -0
  136. package/dist/programs/defi-wrapper/contracts/distributor/index.d.ts +3 -0
  137. package/dist/programs/defi-wrapper/contracts/distributor/index.js +4 -0
  138. package/dist/programs/defi-wrapper/contracts/distributor/index.js.map +1 -0
  139. package/dist/programs/defi-wrapper/contracts/distributor/main.d.ts +1 -0
  140. package/dist/programs/defi-wrapper/contracts/distributor/main.js +5 -0
  141. package/dist/programs/defi-wrapper/contracts/distributor/main.js.map +1 -0
  142. package/dist/programs/defi-wrapper/contracts/distributor/read.d.ts +1 -0
  143. package/dist/programs/defi-wrapper/contracts/distributor/read.js +40 -0
  144. package/dist/programs/defi-wrapper/contracts/distributor/read.js.map +1 -0
  145. package/dist/programs/defi-wrapper/contracts/distributor/write.d.ts +1 -0
  146. package/dist/programs/defi-wrapper/contracts/distributor/write.js +70 -0
  147. package/dist/programs/defi-wrapper/contracts/distributor/write.js.map +1 -0
  148. package/dist/programs/defi-wrapper/contracts/factory/config.d.ts +3 -0
  149. package/dist/programs/defi-wrapper/contracts/factory/config.js +2 -0
  150. package/dist/programs/defi-wrapper/contracts/factory/config.js.map +1 -0
  151. package/dist/programs/defi-wrapper/contracts/factory/index.d.ts +3 -0
  152. package/dist/programs/defi-wrapper/contracts/factory/index.js +4 -0
  153. package/dist/programs/defi-wrapper/contracts/factory/index.js.map +1 -0
  154. package/dist/programs/defi-wrapper/contracts/factory/main.d.ts +1 -0
  155. package/dist/programs/defi-wrapper/contracts/factory/main.js +6 -0
  156. package/dist/programs/defi-wrapper/contracts/factory/main.js.map +1 -0
  157. package/dist/programs/defi-wrapper/contracts/factory/read.d.ts +1 -0
  158. package/dist/programs/defi-wrapper/contracts/factory/read.js +56 -0
  159. package/dist/programs/defi-wrapper/contracts/factory/read.js.map +1 -0
  160. package/dist/programs/defi-wrapper/contracts/factory/write.d.ts +1 -0
  161. package/dist/programs/defi-wrapper/contracts/factory/write.js +327 -0
  162. package/dist/programs/defi-wrapper/contracts/factory/write.js.map +1 -0
  163. package/dist/programs/defi-wrapper/contracts/index.d.ts +7 -0
  164. package/dist/programs/defi-wrapper/contracts/index.js +8 -0
  165. package/dist/programs/defi-wrapper/contracts/index.js.map +1 -0
  166. package/dist/programs/defi-wrapper/contracts/main.d.ts +1 -0
  167. package/dist/programs/defi-wrapper/contracts/main.js +6 -0
  168. package/dist/programs/defi-wrapper/contracts/main.js.map +1 -0
  169. package/dist/programs/defi-wrapper/contracts/stv-pool/config.d.ts +3 -0
  170. package/dist/programs/defi-wrapper/contracts/stv-pool/config.js +83 -0
  171. package/dist/programs/defi-wrapper/contracts/stv-pool/config.js.map +1 -0
  172. package/dist/programs/defi-wrapper/contracts/stv-pool/index.d.ts +3 -0
  173. package/dist/programs/defi-wrapper/contracts/stv-pool/index.js +4 -0
  174. package/dist/programs/defi-wrapper/contracts/stv-pool/index.js.map +1 -0
  175. package/dist/programs/defi-wrapper/contracts/stv-pool/main.d.ts +1 -0
  176. package/dist/programs/defi-wrapper/contracts/stv-pool/main.js +6 -0
  177. package/dist/programs/defi-wrapper/contracts/stv-pool/main.js.map +1 -0
  178. package/dist/programs/defi-wrapper/contracts/stv-pool/read.d.ts +1 -0
  179. package/dist/programs/defi-wrapper/contracts/stv-pool/read.js +77 -0
  180. package/dist/programs/defi-wrapper/contracts/stv-pool/read.js.map +1 -0
  181. package/dist/programs/defi-wrapper/contracts/stv-pool/write.d.ts +1 -0
  182. package/dist/programs/defi-wrapper/contracts/stv-pool/write.js +287 -0
  183. package/dist/programs/defi-wrapper/contracts/stv-pool/write.js.map +1 -0
  184. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.d.ts +3 -0
  185. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js +210 -0
  186. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js.map +1 -0
  187. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.d.ts +3 -0
  188. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.js +4 -0
  189. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.js.map +1 -0
  190. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.d.ts +1 -0
  191. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.js +6 -0
  192. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.js.map +1 -0
  193. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.d.ts +1 -0
  194. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js +77 -0
  195. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js.map +1 -0
  196. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.d.ts +1 -0
  197. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js +370 -0
  198. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js.map +1 -0
  199. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.d.ts +3 -0
  200. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.js +214 -0
  201. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.js.map +1 -0
  202. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.d.ts +3 -0
  203. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.js +4 -0
  204. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.js.map +1 -0
  205. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.d.ts +1 -0
  206. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.js +6 -0
  207. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.js.map +1 -0
  208. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.d.ts +1 -0
  209. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.js +77 -0
  210. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.js.map +1 -0
  211. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.d.ts +1 -0
  212. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.js +370 -0
  213. package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.js.map +1 -0
  214. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.d.ts +3 -0
  215. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js +156 -0
  216. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js.map +1 -0
  217. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.d.ts +3 -0
  218. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.js +4 -0
  219. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.js.map +1 -0
  220. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.d.ts +1 -0
  221. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.js +6 -0
  222. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.js.map +1 -0
  223. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.d.ts +1 -0
  224. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js +84 -0
  225. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js.map +1 -0
  226. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.d.ts +1 -0
  227. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js +140 -0
  228. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js.map +1 -0
  229. package/dist/programs/defi-wrapper/index.d.ts +2 -0
  230. package/dist/programs/defi-wrapper/index.js +3 -0
  231. package/dist/programs/defi-wrapper/index.js.map +1 -0
  232. package/dist/programs/defi-wrapper/main.d.ts +1 -0
  233. package/dist/programs/defi-wrapper/main.js +6 -0
  234. package/dist/programs/defi-wrapper/main.js.map +1 -0
  235. package/dist/programs/index.d.ts +1 -0
  236. package/dist/programs/index.js +1 -0
  237. package/dist/programs/index.js.map +1 -1
  238. package/dist/programs/pdg-helpers.js +3 -3
  239. package/dist/programs/pdg-helpers.js.map +1 -1
  240. package/dist/programs/use-cases/deposits/read.js +4 -4
  241. package/dist/programs/use-cases/deposits/read.js.map +1 -1
  242. package/dist/programs/use-cases/deposits/write.js +103 -8
  243. package/dist/programs/use-cases/deposits/write.js.map +1 -1
  244. package/dist/programs/use-cases/metrics/read.js +29 -13
  245. package/dist/programs/use-cases/metrics/read.js.map +1 -1
  246. package/dist/programs/use-cases/report/write.js +3 -0
  247. package/dist/programs/use-cases/report/write.js.map +1 -1
  248. package/dist/programs/use-cases/vault-operations/create-vault.js +11 -5
  249. package/dist/programs/use-cases/vault-operations/create-vault.js.map +1 -1
  250. package/dist/providers/wallet.d.ts +2 -7663
  251. package/dist/providers/wallet.js +1 -1
  252. package/dist/providers/wallet.js.map +1 -1
  253. package/dist/utils/arguments.d.ts +4 -0
  254. package/dist/utils/arguments.js +16 -3
  255. package/dist/utils/arguments.js.map +1 -1
  256. package/dist/utils/fetchCL.d.ts +1 -5
  257. package/dist/utils/fetchCL.js +5 -7
  258. package/dist/utils/fetchCL.js.map +1 -1
  259. package/dist/utils/health/health-utils.js +1 -1
  260. package/dist/utils/health/health-utils.js.map +1 -1
  261. package/dist/utils/proof/constants.d.ts +6 -0
  262. package/dist/utils/proof/constants.js +7 -0
  263. package/dist/utils/proof/constants.js.map +1 -0
  264. package/dist/utils/proof/first-validator-gindex.js +0 -4
  265. package/dist/utils/proof/first-validator-gindex.js.map +1 -1
  266. package/dist/utils/proof/proofs.d.ts +7 -8
  267. package/dist/utils/proof/proofs.js +36 -28
  268. package/dist/utils/proof/proofs.js.map +1 -1
  269. package/dist/utils/transactions/tx-private-key.d.ts +2 -2
  270. package/dist/utils/transactions/tx-private-key.js.map +1 -1
  271. package/dist/utils/transactions/tx-wc.d.ts +29 -1
  272. package/dist/utils/transactions/tx-wc.js +41 -24
  273. package/dist/utils/transactions/tx-wc.js.map +1 -1
  274. package/dist/utils/wallet-connect.d.ts +4 -7664
  275. package/dist/utils/wallet-connect.js +14 -2
  276. package/dist/utils/wallet-connect.js.map +1 -1
  277. package/dist/version/index.js +1 -1
  278. package/package.json +4 -5
@@ -0,0 +1,370 @@
1
+ import { Option } from 'commander';
2
+ import { logInfo, getCommandsJson, stringToAddress, callWriteMethodWithReceipt, etherToWei, confirmOperation, stringToBigInt, stringToBigIntArray, stringToHexArray, } from '../../../../utils/index.js';
3
+ import { getAccount } from '../../../../providers/index.js';
4
+ import { stvStrategyPool } from './main.js';
5
+ import { formatEther } from 'viem';
6
+ import { getStvStrategyPoolContract } from '../../../../contracts/defi-wrapper/index.js';
7
+ const stvStrategyPoolWrite = stvStrategyPool
8
+ .command('write')
9
+ .alias('w')
10
+ .description('write commands');
11
+ stvStrategyPoolWrite.addOption(new Option('-cmd2json'));
12
+ stvStrategyPoolWrite.on('option:-cmd2json', function () {
13
+ logInfo(getCommandsJson(stvStrategyPoolWrite));
14
+ process.exit();
15
+ });
16
+ stvStrategyPoolWrite
17
+ .command('deposit-eth')
18
+ .description('convenience function to deposit ETH to msg.sender')
19
+ .argument('<address>', 'distributor address', stringToAddress)
20
+ .argument('<referral>', 'the address of the referral (if any)', stringToAddress)
21
+ .argument('<receiver>', 'the address to receive the minted shares', stringToAddress)
22
+ .argument('<stethSharesToMint>', 'amount of stETH shares to mint (up to maximum capacity for this deposit). Pass MAX_MINTABLE_AMOUNT to mint maximum available for this deposit', stringToBigInt)
23
+ .action(async (address, referral, receiver, stethSharesToMint) => {
24
+ const contract = getStvStrategyPoolContract(address);
25
+ const confirmationMessage = `Are you sure you want to deposit ETH to the stv pool? (referral: ${referral}, receiver: ${receiver}, stethSharesToMint: ${stethSharesToMint})`;
26
+ const confirm = await confirmOperation(confirmationMessage);
27
+ if (!confirm)
28
+ return;
29
+ await callWriteMethodWithReceipt({
30
+ contract,
31
+ methodName: 'depositETH',
32
+ payload: [referral, receiver, stethSharesToMint],
33
+ });
34
+ });
35
+ stvStrategyPoolWrite
36
+ .command('rebalance-unassigned-liability')
37
+ .description('rebalance unassigned liability by repaying it with assets held by the vault')
38
+ .argument('<address>', 'distributor address', stringToAddress)
39
+ .argument('<stethShares>', 'amount of stETH shares to rebalance (in shares)', stringToBigInt)
40
+ .action(async (address, stethShares) => {
41
+ const contract = getStvStrategyPoolContract(address);
42
+ const confirmationMessage = `Are you sure you want to rebalance unassigned liability with ${stethShares} stETH shares?`;
43
+ const confirm = await confirmOperation(confirmationMessage);
44
+ if (!confirm)
45
+ return;
46
+ await callWriteMethodWithReceipt({
47
+ contract,
48
+ methodName: 'rebalanceUnassignedLiability',
49
+ payload: [stethShares],
50
+ });
51
+ });
52
+ stvStrategyPoolWrite
53
+ .command('rebalance-unassigned-liability-with-ether')
54
+ .description('rebalance unassigned liability by repaying it with external ether')
55
+ .argument('<address>', 'distributor address', stringToAddress)
56
+ .argument('<ether>', 'amount of ether to rebalance (in ETH)', etherToWei)
57
+ .action(async (address, ether) => {
58
+ const contract = getStvStrategyPoolContract(address);
59
+ const confirmationMessage = `Are you sure you want to rebalance unassigned liability with ${formatEther(ether)} ether?`;
60
+ const confirm = await confirmOperation(confirmationMessage);
61
+ if (!confirm)
62
+ return;
63
+ await callWriteMethodWithReceipt({
64
+ contract,
65
+ methodName: 'rebalanceUnassignedLiabilityWithEther',
66
+ payload: [],
67
+ value: ether,
68
+ });
69
+ });
70
+ stvStrategyPoolWrite
71
+ .command('request-withdrawal-eth')
72
+ .description('request a withdrawal by specifying the amount of assets to withdraw')
73
+ .argument('<address>', 'distributor address', stringToAddress)
74
+ .argument('<assetsToWithdraw>', 'the amount of assets to withdraw (18 decimals)', stringToBigInt)
75
+ .action(async (address, assetsToWithdraw) => {
76
+ const contract = getStvStrategyPoolContract(address);
77
+ const confirmationMessage = `Are you sure you want to request a withdrawal of ${assetsToWithdraw} assets?`;
78
+ const confirm = await confirmOperation(confirmationMessage);
79
+ if (!confirm)
80
+ return;
81
+ await callWriteMethodWithReceipt({
82
+ contract,
83
+ methodName: 'requestWithdrawalETH',
84
+ payload: [assetsToWithdraw],
85
+ });
86
+ });
87
+ stvStrategyPoolWrite
88
+ .command('request-withdrawal')
89
+ .description('request a withdrawal by specifying the amount of stv to withdraw')
90
+ .argument('<address>', 'distributor address', stringToAddress)
91
+ .argument('<stvToWithdraw>', 'the amount of stv to withdraw (27 decimals)', stringToBigInt)
92
+ .argument('<stethSharesToBurn>', "the amount of stETH shares to burn to repay user's liabilities (18 decimals)", stringToBigInt)
93
+ .argument('<stethSharesToRebalance>', 'the amount of stETH shares to rebalance (18 decimals)', stringToBigInt)
94
+ .option('-r, --receiver <receiver>', 'the address to receive the claimed ether, or address(0)', stringToAddress)
95
+ .action(async (address, stvToWithdraw, stethSharesToBurn, stethSharesToRebalance, { receiver }) => {
96
+ const contract = getStvStrategyPoolContract(address);
97
+ const account = await getAccount();
98
+ const confirmationMessage = `Are you sure you want to request a withdrawal of ${stvToWithdraw} stv to ${receiver}? (stethSharesToBurn: ${stethSharesToBurn}, stethSharesToRebalance: ${stethSharesToRebalance})`;
99
+ const confirm = await confirmOperation(confirmationMessage);
100
+ if (!confirm)
101
+ return;
102
+ await callWriteMethodWithReceipt({
103
+ contract,
104
+ methodName: 'requestWithdrawal',
105
+ payload: [
106
+ stvToWithdraw,
107
+ stethSharesToBurn,
108
+ stethSharesToRebalance,
109
+ receiver || account.address,
110
+ ],
111
+ });
112
+ });
113
+ stvStrategyPoolWrite
114
+ .command('request-withdrawals')
115
+ .description('request multiple withdrawals by specifying the amounts of stv to withdraw')
116
+ .argument('<address>', 'distributor address', stringToAddress)
117
+ .argument('<stvToWithdraw>', 'the array of amounts of stv to withdraw (27 decimals)', stringToBigIntArray)
118
+ .argument('<stethSharesToBurn>', "the amount of stETH shares to burn to repay user's liabilities (18 decimals)", stringToBigInt)
119
+ .argument('<stethSharesToRebalance>', 'the amount of stETH shares to rebalance (18 decimals)', stringToBigIntArray)
120
+ .option('-r, --receiver <receiver>', 'the address to receive the claimed ether, or address(0)', stringToAddress)
121
+ .action(async (address, stvToWithdraw, stethSharesToBurn, stethSharesToRebalance, { receiver }) => {
122
+ const contract = getStvStrategyPoolContract(address);
123
+ const account = await getAccount();
124
+ const confirmationMessage = `Are you sure you want to request multiple withdrawals of ${stvToWithdraw.join(', ')} stv to ${receiver}? (stethSharesToBurn: ${stethSharesToBurn}, stethSharesToRebalance: ${stethSharesToRebalance.join(', ')})`;
125
+ const confirm = await confirmOperation(confirmationMessage);
126
+ if (!confirm)
127
+ return;
128
+ await callWriteMethodWithReceipt({
129
+ contract,
130
+ methodName: 'requestWithdrawals',
131
+ payload: [
132
+ stvToWithdraw,
133
+ stethSharesToRebalance,
134
+ stethSharesToBurn,
135
+ receiver || account.address,
136
+ ],
137
+ });
138
+ });
139
+ stvStrategyPoolWrite
140
+ .command('claim-withdrawal')
141
+ .description('claim finalized withdrawal request')
142
+ .argument('<address>', 'distributor address', stringToAddress)
143
+ .argument('<requestId>', 'the withdrawal request ID to claim', stringToBigInt)
144
+ .option('-r, --receiver <receiver>', 'the address to receive the claimed ether, or address(0)', stringToAddress)
145
+ .action(async (address, requestId, { receiver }) => {
146
+ const contract = getStvStrategyPoolContract(address);
147
+ const account = await getAccount();
148
+ const confirmationMessage = `Are you sure you want to claim withdrawal request ${requestId} to ${receiver}?`;
149
+ const confirm = await confirmOperation(confirmationMessage);
150
+ if (!confirm)
151
+ return;
152
+ await callWriteMethodWithReceipt({
153
+ contract,
154
+ methodName: 'claimWithdrawal',
155
+ payload: [requestId, receiver || account.address],
156
+ });
157
+ });
158
+ stvStrategyPoolWrite
159
+ .command('claim-withdrawals')
160
+ .description('claim multiple finalized withdrawal requests')
161
+ .argument('<address>', 'distributor address', stringToAddress)
162
+ .argument('<requestIds>', 'the array of withdrawal request IDs to claim', stringToBigIntArray)
163
+ .argument('<hints>', 'the checkpoint hints. Can be found with `WQ.findCheckpointHints(_requestIds, 1, getLastCheckpointIndex())`', stringToBigIntArray)
164
+ .option('-r, --receiver <receiver>', 'the address to receive the claimed ether, or address(0)', stringToAddress)
165
+ .action(async (address, requestIds, hints, { receiver }) => {
166
+ const contract = getStvStrategyPoolContract(address);
167
+ const account = await getAccount();
168
+ const confirmationMessage = `Are you sure you want to claim withdrawal requests ${requestIds.join(', ')} to ${receiver}?`;
169
+ const confirm = await confirmOperation(confirmationMessage);
170
+ if (!confirm)
171
+ return;
172
+ await callWriteMethodWithReceipt({
173
+ contract,
174
+ methodName: 'claimWithdrawals',
175
+ payload: [requestIds, hints, receiver || account.address],
176
+ });
177
+ });
178
+ stvStrategyPoolWrite
179
+ .command('burn-stv-for-withdrawal-queue')
180
+ .description('burn stv from WithdrawalQueue contract when processing withdrawal requests')
181
+ .argument('<address>', 'distributor address', stringToAddress)
182
+ .argument('<stv>', 'amount of stv to burn (27 decimals)', stringToBigInt)
183
+ .action(async (address, stv) => {
184
+ const contract = getStvStrategyPoolContract(address);
185
+ const confirmationMessage = `Are you sure you want to burn ${stv} stv for the withdrawal queue ${address}?`;
186
+ const confirm = await confirmOperation(confirmationMessage);
187
+ if (!confirm)
188
+ return;
189
+ await callWriteMethodWithReceipt({
190
+ contract,
191
+ methodName: 'burnStvForWithdrawalQueue',
192
+ payload: [stv],
193
+ });
194
+ });
195
+ stvStrategyPoolWrite
196
+ .command('disconnect-vault')
197
+ .description('initiates voluntary vault disconnection from VaultHub')
198
+ .argument('<address>', 'distributor address', stringToAddress)
199
+ .action(async (address) => {
200
+ const contract = getStvStrategyPoolContract(address);
201
+ const confirmationMessage = `Are you sure you want to disconnect the vault ${address}?`;
202
+ const confirm = await confirmOperation(confirmationMessage);
203
+ if (!confirm)
204
+ return;
205
+ await callWriteMethodWithReceipt({
206
+ contract,
207
+ methodName: 'disconnectVault',
208
+ payload: [],
209
+ });
210
+ });
211
+ stvStrategyPoolWrite
212
+ .command('claim-connect-deposit')
213
+ .description('claims the connect deposit after vault has been disconnected')
214
+ .argument('<address>', 'distributor address', stringToAddress)
215
+ .option('-r, --receiver <receiver>', 'the address to receive the claimed ether, or address(0)', stringToAddress)
216
+ .action(async (address, { receiver }) => {
217
+ const contract = getStvStrategyPoolContract(address);
218
+ const account = await getAccount();
219
+ const confirmationMessage = `Are you sure you want to claim the connect deposit for the vault ${address} to ${receiver}?`;
220
+ const confirm = await confirmOperation(confirmationMessage);
221
+ if (!confirm)
222
+ return;
223
+ await callWriteMethodWithReceipt({
224
+ contract,
225
+ methodName: 'claimConnectDeposit',
226
+ payload: [receiver || account.address],
227
+ });
228
+ });
229
+ stvStrategyPoolWrite
230
+ .command('trigger-validator-withdrawals')
231
+ .description('triggers validator withdrawals')
232
+ .argument('<address>', 'distributor address', stringToAddress)
233
+ .argument('<pubkeys>', 'validator public keys', stringToHexArray)
234
+ .argument('<amounts>', 'amounts to withdraw (in ETH)', stringToBigIntArray)
235
+ .argument('<refundRecipient>', 'refund recipient address', stringToAddress)
236
+ .action(async (address, pubkeys, amounts, refundRecipient) => {
237
+ const contract = getStvStrategyPoolContract(address);
238
+ const confirmationMessage = `Are you sure you want to trigger validator withdrawals for the vault ${address} with pubkeys ${pubkeys.join(', ')} and amounts ${amounts.map((amount) => formatEther(amount)).join(', ')} to ${refundRecipient}?`;
239
+ const confirm = await confirmOperation(confirmationMessage);
240
+ if (!confirm)
241
+ return;
242
+ await callWriteMethodWithReceipt({
243
+ contract,
244
+ methodName: 'triggerValidatorWithdrawals',
245
+ payload: [pubkeys.join(''), amounts, refundRecipient],
246
+ });
247
+ });
248
+ stvStrategyPoolWrite
249
+ .command('request-validator-exit')
250
+ .description('requests validator exit')
251
+ .argument('<address>', 'distributor address', stringToAddress)
252
+ .argument('<pubkeys>', 'validator public keys', stringToHexArray)
253
+ .action(async (address, pubkeys) => {
254
+ const contract = getStvStrategyPoolContract(address);
255
+ const confirmationMessage = `Are you sure you want to request validator exit for the vault ${address} with pubkeys ${pubkeys.join(', ')}?`;
256
+ const confirm = await confirmOperation(confirmationMessage);
257
+ if (!confirm)
258
+ return;
259
+ await callWriteMethodWithReceipt({
260
+ contract,
261
+ methodName: 'requestValidatorExit',
262
+ payload: [pubkeys.join('')],
263
+ });
264
+ });
265
+ stvStrategyPoolWrite
266
+ .command('add-to-allow-list')
267
+ .description('add an address to the allowlist')
268
+ .argument('<address>', 'distributor address', stringToAddress)
269
+ .argument('<user>', 'address to add to the allowlist', stringToAddress)
270
+ .action(async (address, user) => {
271
+ const contract = getStvStrategyPoolContract(address);
272
+ const confirmationMessage = `Are you sure you want to add ${user} to the allowlist for the vault ${address}?`;
273
+ const confirm = await confirmOperation(confirmationMessage);
274
+ if (!confirm)
275
+ return;
276
+ await callWriteMethodWithReceipt({
277
+ contract,
278
+ methodName: 'addToAllowList',
279
+ payload: [user],
280
+ });
281
+ });
282
+ stvStrategyPoolWrite
283
+ .command('remove-from-allow-list')
284
+ .description('remove an address from the allowlist')
285
+ .argument('<address>', 'distributor address', stringToAddress)
286
+ .argument('<user>', 'address to remove from the allowlist', stringToAddress)
287
+ .action(async (address, user) => {
288
+ const contract = getStvStrategyPoolContract(address);
289
+ const confirmationMessage = `Are you sure you want to remove ${user} from the allowlist for the vault ${address}?`;
290
+ const confirm = await confirmOperation(confirmationMessage);
291
+ if (!confirm)
292
+ return;
293
+ await callWriteMethodWithReceipt({
294
+ contract,
295
+ methodName: 'removeFromAllowList',
296
+ payload: [user],
297
+ });
298
+ });
299
+ stvStrategyPoolWrite
300
+ .command('mint-steth-shares')
301
+ .description("mint stETH shares up to the user's minting capacity")
302
+ .argument('<address>', 'distributor address', stringToAddress)
303
+ .argument('<stethShares>', 'the amount of stETH shares to mint', stringToBigInt)
304
+ .action(async (address, stethShares) => {
305
+ const contract = getStvStrategyPoolContract(address);
306
+ const confirmationMessage = `Are you sure you want to mint stETH shares up to the user's minting capacity for the vault ${address}? (stethShares: ${stethShares})`;
307
+ const confirm = await confirmOperation(confirmationMessage);
308
+ if (!confirm)
309
+ return;
310
+ await callWriteMethodWithReceipt({
311
+ contract,
312
+ methodName: 'mintStethShares',
313
+ payload: [stethShares],
314
+ });
315
+ });
316
+ stvStrategyPoolWrite
317
+ .command('burn-steth-shares')
318
+ .description("burn stETH shares to reduce the user's minted stETH obligation")
319
+ .argument('<address>', 'distributor address', stringToAddress)
320
+ .argument('<stethShares>', 'the amount of stETH shares to burn', stringToBigInt)
321
+ .action(async (address, stethShares) => {
322
+ const contract = getStvStrategyPoolContract(address);
323
+ const confirmationMessage = `Are you sure you want to burn stETH shares to reduce the user's minted stETH obligation for the vault ${address}? (stethShares: ${stethShares})`;
324
+ const confirm = await confirmOperation(confirmationMessage);
325
+ if (!confirm)
326
+ return;
327
+ await callWriteMethodWithReceipt({
328
+ contract,
329
+ methodName: 'burnStethShares',
330
+ payload: [stethShares],
331
+ });
332
+ });
333
+ stvStrategyPoolWrite
334
+ .command('rebalance-minted-steth-shares')
335
+ .description("rebalance the user's minted stETH shares by burning stv")
336
+ .argument('<address>', 'distributor address', stringToAddress)
337
+ .argument('<stethShares>', 'the amount of stETH shares to rebalance', stringToBigInt)
338
+ .argument('<maxStvToBurn>', 'the maximum amount of stv to burn for rebalancing', stringToBigInt)
339
+ .action(async (address, stethShares, maxStvToBurn) => {
340
+ const contract = getStvStrategyPoolContract(address);
341
+ const confirmationMessage = `Are you sure you want to rebalance the user's minted stETH shares by burning stv for the vault ${address}? (stethShares: ${stethShares}, maxStvToBurn: ${maxStvToBurn})`;
342
+ const confirm = await confirmOperation(confirmationMessage);
343
+ if (!confirm)
344
+ return;
345
+ await callWriteMethodWithReceipt({
346
+ contract,
347
+ methodName: 'rebalanceMintedStethShares',
348
+ payload: [stethShares, maxStvToBurn],
349
+ });
350
+ });
351
+ stvStrategyPoolWrite
352
+ .command('transfer-with-liability')
353
+ .description('transfer stETH shares with liability to another address')
354
+ .argument('<address>', 'distributor address', stringToAddress)
355
+ .argument('<to>', 'the address to transfer to', stringToAddress)
356
+ .argument('<stv>', 'the amount of stv to transfer', stringToBigInt)
357
+ .argument('<stethShares>', 'the amount of stETH shares liability to transfer', stringToBigInt)
358
+ .action(async (address, to, stv, stethShares) => {
359
+ const contract = getStvStrategyPoolContract(address);
360
+ const confirmationMessage = `Are you sure you want to transfer ${stv} stv and ${stethShares} stETH shares liability to ${to} for the vault ${address}?`;
361
+ const confirm = await confirmOperation(confirmationMessage);
362
+ if (!confirm)
363
+ return;
364
+ await callWriteMethodWithReceipt({
365
+ contract,
366
+ methodName: 'transferWithLiability',
367
+ payload: [to, stv, stethShares],
368
+ });
369
+ });
370
+ //# sourceMappingURL=write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/stv-strategy-pool/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EACL,OAAO,EACP,eAAe,EACf,eAAe,EACf,0BAA0B,EAC1B,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAW,WAAW,EAAO,MAAM,MAAM,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,oBAAoB,GAAG,eAAe;KACzC,OAAO,CAAC,OAAO,CAAC;KAChB,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAEjC,oBAAoB,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AACxD,oBAAoB,CAAC,EAAE,CAAC,kBAAkB,EAAE;IAC1C,OAAO,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC;AAEH,oBAAoB;KACjB,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,mDAAmD,CAAC;KAChE,QAAQ,CAAC,WAAW,EAAE,qBAAq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ACxE,MAAM,QAAQ,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAErD,MAAM,mBAAmB,GAAG,qCAAqC,GAAG,YAAY,WAAW,8BAA8B,EAAE,kBAAkB,OAAO,GAAG,CAAC;IACxJ,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC5D,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,0BAA0B,CAAC;QAC/B,QAAQ;QACR,UAAU,EAAE,uBAAuB;QACnC,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC;KAChC,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { WithdrawalQueueAbi } from '../../../../abi/defi-wrapper/index.js';
2
+ import { ReadProgramCommandConfig } from '../../../../utils/index.js';
3
+ export declare const readCommandConfig: ReadProgramCommandConfig<typeof WithdrawalQueueAbi>;
@@ -0,0 +1,156 @@
1
+ import { stringToAddress, stringToBigIntArray, } from '../../../../utils/index.js';
2
+ export const readCommandConfig = {
3
+ MAX_ACCEPTABLE_WQ_FINALIZATION_TIME_IN_SECONDS: {
4
+ name: 'MAX_ACCEPTABLE_WQ_FINALIZATION_TIME_IN_SECONDS',
5
+ description: 'get max time for finalization of the withdrawal request',
6
+ },
7
+ MIN_WITHDRAWAL_DELAY_TIME_IN_SECONDS: {
8
+ name: 'MIN_WITHDRAWAL_DELAY_TIME_IN_SECONDS',
9
+ description: 'get min delay between withdrawal request and finalization',
10
+ },
11
+ MAX_WITHDRAWAL_AMOUNT: {
12
+ name: 'MAX_WITHDRAWAL_AMOUNT',
13
+ description: 'get max amount of assets that is possible to withdraw',
14
+ },
15
+ MIN_WITHDRAWAL_AMOUNT: {
16
+ name: 'MIN_WITHDRAWAL_AMOUNT',
17
+ description: 'get min amount of assets that is possible to withdraw',
18
+ },
19
+ calculateCurrentStethShareRate: {
20
+ name: 'calc-steth-share-rate',
21
+ description: 'get calculated current stETH share rate',
22
+ },
23
+ calculateCurrentStvRate: {
24
+ name: 'calc-stv-rate',
25
+ description: 'get calculate current stv rate of the vault',
26
+ },
27
+ getLastCheckpointIndex: {
28
+ name: 'last-checkpoint-index',
29
+ aliases: ['lci'],
30
+ description: 'get the last checkpoint index',
31
+ },
32
+ getLastFinalizedRequestId: {
33
+ name: 'last-finalized-request-id',
34
+ aliases: ['lfri'],
35
+ description: 'get the last finalized request id',
36
+ },
37
+ getLastRequestId: {
38
+ name: 'last-request-id',
39
+ aliases: ['lri'],
40
+ description: 'get the last request id',
41
+ },
42
+ findCheckpointHints: {
43
+ name: 'find-checkpoint-hints',
44
+ aliases: ['fch'],
45
+ description: 'get the list of hints for the given `_requestIds` searching among the checkpoints with indices in the range [ `_firstIndex`, `_lastIndex` ]',
46
+ arguments: {
47
+ _requestIds: {
48
+ name: 'requestIds',
49
+ description: 'request ids',
50
+ modifier: stringToBigIntArray,
51
+ },
52
+ _firstIndex: {
53
+ name: 'firstIndex',
54
+ description: 'first index',
55
+ modifier: (value) => BigInt(value),
56
+ },
57
+ _lastIndex: {
58
+ name: 'lastIndex',
59
+ description: 'last index',
60
+ modifier: (value) => BigInt(value),
61
+ },
62
+ },
63
+ },
64
+ getClaimableEther: {
65
+ name: 'get-claimable-ether',
66
+ description: 'get amount of ether available for claim for each provided request id',
67
+ arguments: {
68
+ _requestIds: {
69
+ name: 'requestIds',
70
+ description: 'request ids',
71
+ modifier: stringToBigIntArray,
72
+ },
73
+ _hints: {
74
+ name: 'hints',
75
+ description: 'hints',
76
+ modifier: stringToBigIntArray,
77
+ },
78
+ },
79
+ },
80
+ getWithdrawalRequests: {
81
+ name: 'get-withdrawal-requests',
82
+ description: 'get all withdrawal requests that belong to the `_owner` address',
83
+ arguments: {
84
+ _owner: {
85
+ name: 'owner',
86
+ description: 'owner',
87
+ modifier: stringToAddress,
88
+ },
89
+ _start: {
90
+ name: 'start',
91
+ description: 'start index',
92
+ modifier: (value) => BigInt(value),
93
+ },
94
+ _end: {
95
+ name: 'end',
96
+ description: 'end index',
97
+ modifier: (value) => BigInt(value),
98
+ },
99
+ },
100
+ },
101
+ getWithdrawalRequestsLength: {
102
+ name: 'get-withdrawal-requests-length',
103
+ aliases: ['gwrl'],
104
+ description: 'get the length of the withdrawal requests that belong to the `_owner` address.',
105
+ arguments: {
106
+ _owner: {
107
+ name: 'owner',
108
+ description: 'owner',
109
+ modifier: stringToAddress,
110
+ },
111
+ },
112
+ },
113
+ getWithdrawalStatus: {
114
+ name: 'w-status',
115
+ description: 'get the status for a single request',
116
+ arguments: {
117
+ _requestId: {
118
+ name: 'requestId',
119
+ description: 'request id',
120
+ modifier: (value) => BigInt(value),
121
+ },
122
+ },
123
+ },
124
+ getWithdrawalsStatus: {
125
+ name: 'w-statuses',
126
+ description: 'get status for requests with provided ids',
127
+ arguments: {
128
+ _requestIds: {
129
+ name: 'requestIds',
130
+ description: 'request ids',
131
+ modifier: stringToBigIntArray,
132
+ },
133
+ },
134
+ },
135
+ isEmergencyExitActivated: {
136
+ name: 'is-ee-activated',
137
+ description: 'get true if Emergency Exit is activated',
138
+ },
139
+ isWithdrawalQueueStuck: {
140
+ name: 'is-stuck',
141
+ description: 'get true if requests have not been finalized for a long time',
142
+ },
143
+ unfinalizedAssets: {
144
+ name: 'unfinal-assets',
145
+ description: 'get the amount of assets in the queue yet to be finalized',
146
+ },
147
+ unfinalizedRequestNumber: {
148
+ name: 'unfinal-request-number',
149
+ description: 'get the number of unfinalized requests in the queue',
150
+ },
151
+ unfinalizedStv: {
152
+ name: 'unfinal-stv',
153
+ description: 'get the amount of stv in the queue yet to be finalized',
154
+ },
155
+ };
156
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/withdrawal-queue/config.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EACf,mBAAmB,GACpB,MAAM,OAAO,CAAC;AAEf,MAAM,CAAC,M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AAE,qCAAqC;QAClD,SAAS,EAAE;YACT,UAAU,EAAE;gBACV,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,YAAY;gBACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;aACnC;SACF;KACF;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,2CAA2C;QACxD,SAAS,EAAE;YACT,WAAW,EAAE;gBACX,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,aAAa;gBAC1B,QAAQ,EAAE,mBAAmB;aAC9B;SACF;KACF;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,yCAAyC;KACvD;IACD,sBAAsB,EAAE;QACtB,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,8DAA8D;KAC5E;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,2DAA2D;KACzE;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,qDAAqD;KACnE;IACD,cAAc,EAAE;QACd,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,wDAAwD;KACtE;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './main.js';
2
+ export * from './read.js';
3
+ export * from './write.js';
@@ -0,0 +1,4 @@
1
+ export * from './main.js';
2
+ export * from './read.js';
3
+ export * from './write.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/withdrawal-queue/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const withdrawalQueue: import("commander").Command;
@@ -0,0 +1,6 @@
1
+ import { defiWrapperContracts } from '../main.js';
2
+ export const withdrawalQueue = defiWrapperContracts
3
+ .command('withdrawal-queue')
4
+ .alias('wq')
5
+ .description('withdrawal queue contract');
6
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/contracts/withdrawal-queue/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB;KAChD,OAAO,CAAC,kBAAkB,CAAC;KAC3B,KAAK,CAAC,IAAI,CAAC;KACX,WAAW,CAAC,2BAA2B,CAAC,CAAC"}