@lidofinance/lsv-cli 1.1.0 → 1.2.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.
- package/dist/abi/Dashboard.d.ts +23 -3
- package/dist/abi/Dashboard.js +8 -3
- package/dist/abi/Dashboard.js.map +1 -1
- package/dist/abi/LazyOracle.d.ts +364 -0
- package/dist/abi/LazyOracle.js +2 -0
- package/dist/abi/LazyOracle.js.map +1 -1
- package/dist/abi/OperatorGrid.d.ts +24 -0
- package/dist/abi/OperatorGrid.js +16 -0
- package/dist/abi/OperatorGrid.js.map +1 -1
- package/dist/abi/ValidatorConsolidationRequests.d.ts +121 -0
- package/dist/abi/ValidatorConsolidationRequests.js +159 -0
- package/dist/abi/ValidatorConsolidationRequests.js.map +1 -0
- package/dist/abi/VaultFactory.d.ts +16 -0
- package/dist/abi/VaultViewer.d.ts +0 -14
- package/dist/abi/VaultViewer.js +0 -19
- package/dist/abi/VaultViewer.js.map +1 -1
- package/dist/abi/defi-wrapper/Distributor.d.ts +40 -2
- package/dist/abi/defi-wrapper/Distributor.js +52 -2
- package/dist/abi/defi-wrapper/Distributor.js.map +1 -1
- package/dist/abi/defi-wrapper/Factory.d.ts +973 -550
- package/dist/abi/defi-wrapper/Factory.js +720 -763
- package/dist/abi/defi-wrapper/Factory.js.map +1 -1
- package/dist/abi/defi-wrapper/StvPool.d.ts +121 -325
- package/dist/abi/defi-wrapper/StvPool.js +143 -413
- package/dist/abi/defi-wrapper/StvPool.js.map +1 -1
- package/dist/abi/defi-wrapper/StvStETHPool.d.ts +398 -381
- package/dist/abi/defi-wrapper/StvStETHPool.js +448 -433
- package/dist/abi/defi-wrapper/StvStETHPool.js.map +1 -1
- package/dist/abi/defi-wrapper/WithdrawalQueue.d.ts +309 -175
- package/dist/abi/defi-wrapper/WithdrawalQueue.js +381 -206
- package/dist/abi/defi-wrapper/WithdrawalQueue.js.map +1 -1
- package/dist/abi/defi-wrapper/index.d.ts +0 -1
- package/dist/abi/defi-wrapper/index.js +0 -1
- package/dist/abi/defi-wrapper/index.js.map +1 -1
- package/dist/abi/index.d.ts +1 -0
- package/dist/abi/index.js +1 -0
- package/dist/abi/index.js.map +1 -1
- package/dist/configs/constants.d.ts +44 -2
- package/dist/configs/constants.js +2 -2
- package/dist/configs/constants.js.map +1 -1
- package/dist/configs/deployed.d.ts +2 -2
- package/dist/configs/deployed.js +48 -6
- package/dist/configs/deployed.js.map +1 -1
- package/dist/configs/utils.d.ts +1 -0
- package/dist/configs/utils.js +8 -0
- package/dist/configs/utils.js.map +1 -1
- package/dist/contracts/dashboard-impl.d.ts +2 -2
- package/dist/contracts/dashboard-impl.js +3 -2
- package/dist/contracts/dashboard-impl.js.map +1 -1
- package/dist/contracts/dashboard.d.ts +2 -2
- package/dist/contracts/dashboard.js +3 -2
- package/dist/contracts/dashboard.js.map +1 -1
- package/dist/contracts/defi-wrapper/distributor.d.ts +1 -1
- package/dist/contracts/defi-wrapper/distributor.js +3 -2
- package/dist/contracts/defi-wrapper/distributor.js.map +1 -1
- package/dist/contracts/defi-wrapper/factory.d.ts +1 -1
- package/dist/contracts/defi-wrapper/factory.js +3 -2
- package/dist/contracts/defi-wrapper/factory.js.map +1 -1
- package/dist/contracts/defi-wrapper/index.d.ts +0 -1
- package/dist/contracts/defi-wrapper/index.js +0 -1
- package/dist/contracts/defi-wrapper/index.js.map +1 -1
- package/dist/contracts/defi-wrapper/stv-pool.d.ts +2 -2
- package/dist/contracts/defi-wrapper/stv-pool.js +3 -2
- package/dist/contracts/defi-wrapper/stv-pool.js.map +1 -1
- package/dist/contracts/defi-wrapper/stv-steth-pool.d.ts +1 -1
- package/dist/contracts/defi-wrapper/stv-steth-pool.js +3 -2
- package/dist/contracts/defi-wrapper/stv-steth-pool.js.map +1 -1
- package/dist/contracts/defi-wrapper/withdrawal-queue.d.ts +1 -1
- package/dist/contracts/defi-wrapper/withdrawal-queue.js +3 -2
- package/dist/contracts/defi-wrapper/withdrawal-queue.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/lazy-oracle.js +3 -2
- package/dist/contracts/lazy-oracle.js.map +1 -1
- package/dist/contracts/locator.d.ts +3 -9655
- package/dist/contracts/locator.js +4 -3
- package/dist/contracts/locator.js.map +1 -1
- package/dist/contracts/operator-grid.d.ts +1 -1
- package/dist/contracts/operator-grid.js +3 -2
- package/dist/contracts/operator-grid.js.map +1 -1
- package/dist/contracts/pdg.js +3 -2
- package/dist/contracts/pdg.js.map +1 -1
- package/dist/contracts/steth.d.ts +54 -54
- package/dist/contracts/steth.js +3 -2
- package/dist/contracts/steth.js.map +1 -1
- package/dist/contracts/validator-consolidation-requests.d.ts +5 -0
- package/dist/contracts/validator-consolidation-requests.js +13 -0
- package/dist/contracts/validator-consolidation-requests.js.map +1 -0
- package/dist/contracts/vault-factory.d.ts +3 -28346
- package/dist/contracts/vault-factory.js +4 -3
- package/dist/contracts/vault-factory.js.map +1 -1
- package/dist/contracts/vault-hub.js +3 -2
- package/dist/contracts/vault-hub.js.map +1 -1
- package/dist/contracts/vault-viewer.d.ts +3 -9661
- package/dist/contracts/vault-viewer.js +9 -7
- package/dist/contracts/vault-viewer.js.map +1 -1
- package/dist/contracts/vault.d.ts +2 -2
- package/dist/contracts/vault.js +3 -2
- package/dist/contracts/vault.js.map +1 -1
- package/dist/contracts/wsteth.d.ts +3 -24690
- package/dist/contracts/wsteth.js +4 -3
- package/dist/contracts/wsteth.js.map +1 -1
- package/dist/features/consolidation.d.ts +18 -0
- package/dist/features/consolidation.js +199 -0
- package/dist/features/consolidation.js.map +1 -0
- package/dist/features/defi-wrapper/create-vault.d.ts +17 -0
- package/dist/features/defi-wrapper/create-vault.js +137 -0
- package/dist/features/defi-wrapper/create-vault.js.map +1 -0
- package/dist/features/defi-wrapper/defi-wrapper-factory.d.ts +112 -0
- package/dist/features/defi-wrapper/defi-wrapper-factory.js +228 -0
- package/dist/features/defi-wrapper/defi-wrapper-factory.js.map +1 -0
- package/dist/features/defi-wrapper/index.d.ts +3 -0
- package/dist/features/defi-wrapper/index.js +4 -0
- package/dist/features/defi-wrapper/index.js.map +1 -0
- package/dist/features/defi-wrapper/pool-info.d.ts +35 -0
- package/dist/features/defi-wrapper/pool-info.js +97 -0
- package/dist/features/defi-wrapper/pool-info.js.map +1 -0
- package/dist/features/deposits/check-bls-deposits.js +2 -2
- package/dist/features/deposits/check-bls-deposits.js.map +1 -1
- package/dist/features/deposits/index.d.ts +1 -0
- package/dist/features/deposits/index.js +1 -0
- package/dist/features/deposits/index.js.map +1 -1
- package/dist/features/deposits/make-pdg-proof.js +1 -1
- package/dist/features/deposits/make-pdg-proof.js.map +1 -1
- package/dist/features/deposits/no-pdg.d.ts +1 -1
- package/dist/features/deposits/no-pdg.js +6 -3
- package/dist/features/deposits/no-pdg.js.map +1 -1
- package/dist/features/deposits/pdg.d.ts +2 -0
- package/dist/features/deposits/pdg.js +18 -0
- package/dist/features/deposits/pdg.js.map +1 -0
- package/dist/features/dev-tools/impersonate.d.ts +14 -0
- package/dist/features/dev-tools/impersonate.js +64 -0
- package/dist/features/dev-tools/impersonate.js.map +1 -0
- package/dist/features/dev-tools/index.d.ts +1 -0
- package/dist/features/dev-tools/index.js +2 -0
- package/dist/features/dev-tools/index.js.map +1 -0
- package/dist/features/index.d.ts +4 -1
- package/dist/features/index.js +4 -1
- package/dist/features/index.js.map +1 -1
- package/dist/features/metrics.d.ts +4 -0
- package/dist/features/metrics.js +48 -0
- package/dist/features/metrics.js.map +1 -0
- package/dist/features/pdg.js +4 -0
- package/dist/features/pdg.js.map +1 -1
- package/dist/features/utils/get-boolean.d.ts +1 -0
- package/dist/features/utils/get-boolean.js +13 -0
- package/dist/features/utils/get-boolean.js.map +1 -0
- package/dist/features/utils/index.d.ts +1 -0
- package/dist/features/utils/index.js +1 -0
- package/dist/features/utils/index.js.map +1 -1
- package/dist/features/utils/quarantine.js +2 -0
- package/dist/features/utils/quarantine.js.map +1 -1
- package/dist/features/utils/report-fresh.js +2 -3
- package/dist/features/utils/report-fresh.js.map +1 -1
- package/dist/features/vault-factory.js +2 -2
- package/dist/features/vault-factory.js.map +1 -1
- package/dist/features/vault-operations/create-vault.d.ts +4 -2
- package/dist/features/vault-operations/create-vault.js +11 -3
- package/dist/features/vault-operations/create-vault.js.map +1 -1
- package/dist/features/vault-operations/dashboard-by-vault.js +4 -4
- package/dist/features/vault-operations/dashboard-by-vault.js.map +1 -1
- package/dist/features/vault-operations/vault-info.js +1 -1
- package/dist/features/vault-operations/vault-info.js.map +1 -1
- package/dist/features/vault-operations/vault-overview.js +1 -1
- package/dist/features/vault-operations/vault-overview.js.map +1 -1
- package/dist/features/vault-operations/vault-roles.js +3 -0
- package/dist/features/vault-operations/vault-roles.js.map +1 -1
- package/dist/features/vault-operations/vaults-by-role.js +29 -10
- package/dist/features/vault-operations/vaults-by-role.js.map +1 -1
- package/dist/features/vault.js +4 -2
- package/dist/features/vault.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/programs/account/read.js +1 -1
- package/dist/programs/account/read.js.map +1 -1
- package/dist/programs/account/write.js +14 -0
- package/dist/programs/account/write.js.map +1 -1
- package/dist/programs/contracts/dashboard/read.js +7 -7
- package/dist/programs/contracts/dashboard/read.js.map +1 -1
- package/dist/programs/contracts/dashboard/write.js +42 -42
- package/dist/programs/contracts/dashboard/write.js.map +1 -1
- package/dist/programs/contracts/hub/config.js +0 -10
- package/dist/programs/contracts/hub/config.js.map +1 -1
- package/dist/programs/contracts/hub/read.js +63 -2
- package/dist/programs/contracts/hub/read.js.map +1 -1
- package/dist/programs/contracts/hub/write.js +1 -1
- package/dist/programs/contracts/hub/write.js.map +1 -1
- package/dist/programs/contracts/pdg/read.js +2 -1
- package/dist/programs/contracts/pdg/read.js.map +1 -1
- package/dist/programs/contracts/pdg/write.js +37 -3
- package/dist/programs/contracts/pdg/write.js.map +1 -1
- package/dist/programs/contracts/vault/write.js +16 -16
- package/dist/programs/contracts/vault/write.js.map +1 -1
- package/dist/programs/contracts/vault-factory/write.js +2 -2
- package/dist/programs/contracts/vault-factory/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/distributor/read.js +1 -1
- package/dist/programs/defi-wrapper/contracts/distributor/read.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/distributor/write.js +3 -3
- package/dist/programs/defi-wrapper/contracts/distributor/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/factory/read.js +2 -8
- package/dist/programs/defi-wrapper/contracts/factory/read.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/factory/write.js +90 -273
- package/dist/programs/defi-wrapper/contracts/factory/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/index.d.ts +0 -1
- package/dist/programs/defi-wrapper/contracts/index.js +0 -1
- package/dist/programs/defi-wrapper/contracts/index.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/stv-pool/config.js +22 -32
- package/dist/programs/defi-wrapper/contracts/stv-pool/config.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/stv-pool/read.js +17 -24
- package/dist/programs/defi-wrapper/contracts/stv-pool/read.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/stv-pool/write.js +25 -174
- package/dist/programs/defi-wrapper/contracts/stv-pool/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js +0 -90
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js +16 -23
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js +34 -231
- package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js +1 -91
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js +8 -27
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js.map +1 -1
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js +55 -24
- package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js.map +1 -1
- package/dist/programs/defi-wrapper/index.d.ts +1 -0
- package/dist/programs/defi-wrapper/index.js +1 -0
- package/dist/programs/defi-wrapper/index.js.map +1 -1
- package/dist/programs/defi-wrapper/use-cases/health/index.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/health/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/health/main.js +6 -0
- package/dist/programs/defi-wrapper/use-cases/health/main.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/health/read.js +338 -0
- package/dist/programs/defi-wrapper/use-cases/health/read.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/health/utils.d.ts +56 -0
- package/dist/programs/defi-wrapper/use-cases/health/utils.js +389 -0
- package/dist/programs/defi-wrapper/use-cases/health/utils.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/health/write.js +254 -0
- package/dist/programs/defi-wrapper/use-cases/health/write.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/use-cases/index.js +4 -0
- package/dist/programs/defi-wrapper/use-cases/index.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/main.js +6 -0
- package/dist/programs/defi-wrapper/use-cases/main.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/create-pool.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/create-pool.js +143 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/create-pool.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/index.d.ts +3 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/index.js +5 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/index.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/main.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/main.js +6 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/main.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.js +130 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.js.map +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.d.ts +1 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.js +13 -0
- package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.js.map +1 -0
- package/dist/programs/dev-tools/anvil/index.d.ts +2 -0
- package/dist/programs/dev-tools/anvil/index.js +3 -0
- package/dist/programs/dev-tools/anvil/index.js.map +1 -0
- package/dist/programs/dev-tools/anvil/main.d.ts +1 -0
- package/dist/programs/dev-tools/anvil/main.js +5 -0
- package/dist/programs/dev-tools/anvil/main.js.map +1 -0
- package/dist/programs/dev-tools/anvil/write.d.ts +1 -0
- package/dist/programs/dev-tools/anvil/write.js +122 -0
- package/dist/programs/dev-tools/anvil/write.js.map +1 -0
- package/dist/programs/dev-tools/defi-wrapper/index.d.ts +2 -0
- package/dist/programs/dev-tools/defi-wrapper/index.js +3 -0
- package/dist/programs/dev-tools/defi-wrapper/index.js.map +1 -0
- package/dist/programs/dev-tools/defi-wrapper/main.d.ts +1 -0
- package/dist/programs/dev-tools/defi-wrapper/main.js +6 -0
- package/dist/programs/dev-tools/defi-wrapper/main.js.map +1 -0
- package/dist/programs/dev-tools/defi-wrapper/write.d.ts +1 -0
- package/dist/programs/dev-tools/defi-wrapper/write.js +77 -0
- package/dist/programs/dev-tools/defi-wrapper/write.js.map +1 -0
- package/dist/programs/dev-tools/index.d.ts +3 -0
- package/dist/programs/dev-tools/index.js +4 -0
- package/dist/programs/dev-tools/index.js.map +1 -0
- package/dist/programs/dev-tools/main.d.ts +1 -0
- package/dist/programs/dev-tools/main.js +6 -0
- package/dist/programs/dev-tools/main.js.map +1 -0
- package/dist/programs/index.d.ts +1 -0
- package/dist/programs/index.js +1 -0
- package/dist/programs/index.js.map +1 -1
- package/dist/programs/pdg-helpers.js +19 -15
- package/dist/programs/pdg-helpers.js.map +1 -1
- package/dist/programs/use-cases/consolidation/index.d.ts +2 -0
- package/dist/programs/use-cases/consolidation/index.js +3 -0
- package/dist/programs/use-cases/consolidation/index.js.map +1 -0
- package/dist/programs/use-cases/consolidation/main.d.ts +1 -0
- package/dist/programs/use-cases/consolidation/main.js +5 -0
- package/dist/programs/use-cases/consolidation/main.js.map +1 -0
- package/dist/programs/use-cases/consolidation/write.d.ts +1 -0
- package/dist/programs/use-cases/consolidation/write.js +78 -0
- package/dist/programs/use-cases/consolidation/write.js.map +1 -0
- package/dist/programs/use-cases/deposits/read.js +4 -0
- package/dist/programs/use-cases/deposits/read.js.map +1 -1
- package/dist/programs/use-cases/deposits/write.js +41 -11
- package/dist/programs/use-cases/deposits/write.js.map +1 -1
- package/dist/programs/use-cases/index.d.ts +1 -0
- package/dist/programs/use-cases/index.js +1 -0
- package/dist/programs/use-cases/index.js.map +1 -1
- package/dist/programs/use-cases/metrics/read.js +9 -20
- package/dist/programs/use-cases/metrics/read.js.map +1 -1
- package/dist/programs/use-cases/vault-operations/create-vault.js +2 -2
- package/dist/programs/use-cases/vault-operations/create-vault.js.map +1 -1
- package/dist/providers/wallet.d.ts +14539 -63
- package/dist/providers/wallet.js +14 -4
- package/dist/providers/wallet.js.map +1 -1
- package/dist/tests/utils/bigInt.test.d.ts +1 -0
- package/dist/tests/utils/bigInt.test.js +61 -0
- package/dist/tests/utils/bigInt.test.js.map +1 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/utils/arguments.d.ts +4 -0
- package/dist/utils/arguments.js +40 -1
- package/dist/utils/arguments.js.map +1 -1
- package/dist/utils/bigInt.d.ts +2 -0
- package/dist/utils/bigInt.js +3 -0
- package/dist/utils/bigInt.js.map +1 -0
- package/dist/utils/bls.d.ts +2 -2
- package/dist/utils/bls.js +8 -7
- package/dist/utils/bls.js.map +1 -1
- package/dist/utils/cache.d.ts +30 -0
- package/dist/utils/cache.js +140 -3
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/calculate-overview-v2.js +1 -2
- package/dist/utils/calculate-overview-v2.js.map +1 -1
- package/dist/utils/calculate-overview.js +1 -2
- package/dist/utils/calculate-overview.js.map +1 -1
- package/dist/utils/charts/blessed/charts-apr.js +8 -18
- package/dist/utils/charts/blessed/charts-apr.js.map +1 -1
- package/dist/utils/charts/blessed/charts-rewards.js +7 -17
- package/dist/utils/charts/blessed/charts-rewards.js.map +1 -1
- package/dist/utils/charts/blessed/datasets/prepare-metrics.d.ts +5 -5
- package/dist/utils/charts/blessed/datasets/prepare-metrics.js +11 -11
- package/dist/utils/charts/blessed/datasets/prepare-metrics.js.map +1 -1
- package/dist/utils/charts/simple/simple-charts.js +8 -18
- package/dist/utils/charts/simple/simple-charts.js.map +1 -1
- package/dist/utils/commands/confirmations.js +1 -1
- package/dist/utils/commands/confirmations.js.map +1 -1
- package/dist/utils/commands/report.d.ts +1 -1
- package/dist/utils/commands/report.js +3 -2
- package/dist/utils/commands/report.js.map +1 -1
- package/dist/utils/consolidation/checks.d.ts +7 -0
- package/dist/utils/consolidation/checks.js +40 -0
- package/dist/utils/consolidation/checks.js.map +1 -0
- package/dist/utils/consolidation/confirms.d.ts +4 -0
- package/dist/utils/consolidation/confirms.js +41 -0
- package/dist/utils/consolidation/confirms.js.map +1 -0
- package/dist/utils/consolidation/index.d.ts +6 -0
- package/dist/utils/consolidation/index.js +7 -0
- package/dist/utils/consolidation/index.js.map +1 -0
- package/dist/utils/consolidation/logs.d.ts +3 -0
- package/dist/utils/consolidation/logs.js +41 -0
- package/dist/utils/consolidation/logs.js.map +1 -0
- package/dist/utils/consolidation/pubkeys.d.ts +8 -0
- package/dist/utils/consolidation/pubkeys.js +40 -0
- package/dist/utils/consolidation/pubkeys.js.map +1 -0
- package/dist/utils/consolidation/types.d.ts +11 -0
- package/dist/utils/consolidation/types.js +2 -0
- package/dist/utils/consolidation/types.js.map +1 -0
- package/dist/utils/consolidation/validator-info.d.ts +4 -0
- package/dist/utils/consolidation/validator-info.js +34 -0
- package/dist/utils/consolidation/validator-info.js.map +1 -0
- package/dist/utils/consolidation/validators-checks.d.ts +10 -0
- package/dist/utils/consolidation/validators-checks.js +58 -0
- package/dist/utils/consolidation/validators-checks.js.map +1 -0
- package/dist/utils/fetchCL.d.ts +35 -14
- package/dist/utils/fetchCL.js +78 -5
- package/dist/utils/fetchCL.js.map +1 -1
- package/dist/utils/health/health-utils.d.ts +54 -54
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/read-programs-by-abi.d.ts +1 -1
- package/dist/utils/read-programs-by-abi.js +4 -18
- package/dist/utils/read-programs-by-abi.js.map +1 -1
- package/dist/utils/report/report.js +1 -1
- package/dist/utils/report/report.js.map +1 -1
- package/dist/utils/report/statistic-data.js +3 -3
- package/dist/utils/report/statistic-data.js.map +1 -1
- package/dist/utils/statistic/report-statistic.d.ts +6 -5
- package/dist/utils/statistic/report-statistic.js +15 -16
- package/dist/utils/statistic/report-statistic.js.map +1 -1
- package/dist/utils/transactions/tx-private-key.js +14 -9
- package/dist/utils/transactions/tx-private-key.js.map +1 -1
- package/dist/utils/transactions/tx-wc.d.ts +5 -3
- package/dist/utils/transactions/tx-wc.js +21 -10
- package/dist/utils/transactions/tx-wc.js.map +1 -1
- package/dist/utils/transactions/types.d.ts +4 -2
- package/dist/utils/wallet-connect.js +3 -3
- package/dist/utils/wallet-connect.js.map +1 -1
- package/dist/version/index.js +1 -1
- package/package.json +2 -2
- package/dist/abi/defi-wrapper/StvStrategyPool.d.ts +0 -1769
- package/dist/abi/defi-wrapper/StvStrategyPool.js +0 -2319
- package/dist/abi/defi-wrapper/StvStrategyPool.js.map +0 -1
- package/dist/contracts/defi-wrapper/stv-strategy-pool.d.ts +0 -4
- package/dist/contracts/defi-wrapper/stv-strategy-pool.js +0 -11
- package/dist/contracts/defi-wrapper/stv-strategy-pool.js.map +0 -1
- package/dist/features/defi-wrapper-factory.d.ts +0 -18
- package/dist/features/defi-wrapper-factory.js +0 -28
- package/dist/features/defi-wrapper-factory.js.map +0 -1
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.d.ts +0 -3
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.js +0 -214
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/config.js.map +0 -1
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/index.js.map +0 -1
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.d.ts +0 -1
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.js +0 -6
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/main.js.map +0 -1
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.js +0 -77
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/read.js.map +0 -1
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.js +0 -370
- package/dist/programs/defi-wrapper/contracts/stv-strategy-pool/write.js.map +0 -1
- /package/dist/programs/defi-wrapper/{contracts/stv-strategy-pool → use-cases/health}/index.d.ts +0 -0
- /package/dist/programs/defi-wrapper/{contracts/stv-strategy-pool → use-cases/health}/index.js +0 -0
- /package/dist/programs/defi-wrapper/{contracts/stv-strategy-pool → use-cases/health}/read.d.ts +0 -0
- /package/dist/programs/defi-wrapper/{contracts/stv-strategy-pool → use-cases/health}/write.d.ts +0 -0
package/dist/features/vault.js
CHANGED
|
@@ -3,8 +3,10 @@ import { printError, showSpinner, logResult, isContractAddress } from '../utils/
|
|
|
3
3
|
import { getStakingVaultContract } from '../contracts/index.js';
|
|
4
4
|
import { getPublicClient } from '../providers/index.js';
|
|
5
5
|
export const getVaultBaseInfo = async (address) => {
|
|
6
|
-
const contract =
|
|
7
|
-
|
|
6
|
+
const [contract, publicClient] = await Promise.all([
|
|
7
|
+
getStakingVaultContract(address),
|
|
8
|
+
getPublicClient(),
|
|
9
|
+
]);
|
|
8
10
|
const hideSpinner = showSpinner();
|
|
9
11
|
try {
|
|
10
12
|
const DEPOSIT_CONTRACT = await contract.read.DEPOSIT_CONTRACT();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../features/vault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,MAAM,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,OAAgB,EAAE,EAAE;IACzD,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../features/vault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,MAAM,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,OAAgB,EAAE,EAAE;IACzD,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACjD,uBAAuB,CAAC,OAAO,CAAC;QAChC,eAAe,EAAE;KAClB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;YACzB,kBAAkB;YAClB,OAAO;YACP,OAAO,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM;YACtC,gBAAgB,EAAE,GAAG,WAAW,CAAC,gBAAgB,CAAC,MAAM;YACxD,aAAa,EAAE,GAAG,WAAW,CAAC,aAAa,CAAC,MAAM;YAClD,eAAe;YACf,qBAAqB;SACtB,CAAC;QAEF,SAAS,CAAC;YACR,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAClE,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,EAAE,CAAC;QACd,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC,CAAC;IAClD,CAAC;AACH,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
|
+
import { getChain } from './configs/index.js';
|
|
2
3
|
import { program } from './command/index.js';
|
|
3
|
-
import { logError } from './utils/logging/console.js';
|
|
4
|
+
import { logError, logInfo } from './utils/logging/console.js';
|
|
4
5
|
import { withInterruptHandling } from './utils/interrupt-handler.js';
|
|
5
6
|
import './programs/index.js';
|
|
6
7
|
export * from './utils/index.js';
|
|
7
8
|
const showTestnetWarning = () => {
|
|
8
|
-
console.info('\n
|
|
9
|
+
console.info('\n🎉🎉 HOODI V3 is officially launched! 🎉🎉');
|
|
9
10
|
console.info('🌐 Web UI is available at: https://stvaults-hoodi.testnet.fi/vaults');
|
|
10
11
|
console.info('📄 Contracts info: https://docs.lido.fi/deployed-contracts/hoodi');
|
|
11
12
|
console.info('📖 stVaults Doc Center: https://docs.lido.fi/run-on-lido/stvaults');
|
|
@@ -19,6 +20,10 @@ program.addHelpText('afterAll', () => {
|
|
|
19
20
|
});
|
|
20
21
|
// Add interrupt handling to the CLI
|
|
21
22
|
const runCLI = withInterruptHandling(async () => {
|
|
23
|
+
const chain = await getChain();
|
|
24
|
+
logInfo(`${'-'.repeat(100)}`);
|
|
25
|
+
logInfo(`Using chain: Name: ${chain.name}, Chain ID: ${chain.id}`);
|
|
26
|
+
logInfo(`${'-'.repeat(100)}`);
|
|
22
27
|
await program.parseAsync(process.argv);
|
|
23
28
|
});
|
|
24
29
|
runCLI()
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,qBAAqB,CAAC;AAE7B,cAAc,kBAAkB,CAAC;AAEjC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;IAC/D,OAAO,CAAC,IAAI,CACV,qEAAqE,CACtE,CAAC;IACF,OAAO,CAAC,IAAI,CACV,kEAAkE,CACnE,CAAC;IACF,OAAO,CAAC,IAAI,CACV,mEAAmE,CACpE,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;IACnE,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE;IACnC,kBAAkB,EAAE,CAAC;IACrB,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC;AAEH,oCAAoC;AACpC,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,IAAI,EAAE;IAC9C,MAAM,KAAK,GAAG,MAAM,QAAQ,EAAE,CAAC;IAC/B,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC9B,OAAO,CAAC,sBAAsB,KAAK,CAAC,IAAI,eAAe,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AAEH,MAAM,EAAE;KACL,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACf,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;KACD,OAAO,CAAC,GAAG,EAAE;IACZ,kBAAkB,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ accountRead
|
|
|
18
18
|
.description('general account info.')
|
|
19
19
|
.argument('[address]', 'wallet address to check (optional)', stringToAddress)
|
|
20
20
|
.action(async (providedAddress) => {
|
|
21
|
-
const publicClient = getPublicClient();
|
|
21
|
+
const publicClient = await getPublicClient();
|
|
22
22
|
let address;
|
|
23
23
|
if (providedAddress) {
|
|
24
24
|
// Use provided address
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../programs/account/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM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,CAAC,CAAC,CAAC;AAC9E,CAAC,CAAC,CAAC;AAEL,WAAW;KACR,OAAO,CAAC,sBAAsB,CAAC;KAC/B,WAAW,CAAC,qCAAqC,CAAC;KAClD,QAAQ,CAAC,WAAW,EAAE,8BAA8B,EAAE,eAAe,CAAC;KACtE,MAAM,CAAC,KAAK,EAAE,OAAgB,EAAE,EAAE;IACjC,MAAM,cAAc,GAAG,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC;IACpD,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAC;IAEjD,MAAM,cAAc,CAAC,cAAc,EAAE,WAAW,EAAE;QAChD,cAAc;QACd,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { formatEther } from 'viem';
|
|
2
|
+
import { mainnet } from 'viem/chains';
|
|
2
3
|
import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
|
|
3
4
|
import { Option } from 'commander';
|
|
4
5
|
import { Keystore } from 'ox';
|
|
5
6
|
import { getStethContract, getWstethContract } from '../../contracts/index.js';
|
|
7
|
+
import { getChain } from '../../configs/index.js';
|
|
6
8
|
import { getCommandsJson, logInfo, callWriteMethodWithReceipt, stringToAddress, confirmOperation, etherToWei, } from '../../utils/index.js';
|
|
7
9
|
import { account } from './main.js';
|
|
8
10
|
const accountWrite = account
|
|
@@ -18,6 +20,12 @@ accountWrite
|
|
|
18
20
|
.command('generate-key')
|
|
19
21
|
.description('generate a new key. Disclaimer: this command is not recommended for production use.')
|
|
20
22
|
.action(async () => {
|
|
23
|
+
const chainId = (await getChain()).id;
|
|
24
|
+
const isMainnet = chainId === mainnet.id;
|
|
25
|
+
if (isMainnet) {
|
|
26
|
+
logInfo('⚠️⚠️ This command is not recommended for production use. ⚠️⚠️');
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
21
29
|
const privateKey = generatePrivateKey();
|
|
22
30
|
logInfo(`Private key: ${privateKey}`);
|
|
23
31
|
});
|
|
@@ -26,6 +34,12 @@ accountWrite
|
|
|
26
34
|
.description('generate a new encrypted account')
|
|
27
35
|
.argument('<password>', 'password for the encrypted account')
|
|
28
36
|
.action(async (password) => {
|
|
37
|
+
const chainId = (await getChain()).id;
|
|
38
|
+
const isMainnet = chainId === mainnet.id;
|
|
39
|
+
if (isMainnet) {
|
|
40
|
+
logInfo('⚠️⚠️ This command is not recommended for production use. ⚠️⚠️');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
29
43
|
const randomPrivateKey = generatePrivateKey();
|
|
30
44
|
const account = privateKeyToAccount(randomPrivateKey);
|
|
31
45
|
const [key, opts] = Keystore.scrypt({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../programs/account/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,eAAe,EACf,OAAO,EACP,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,UAAU,GACX,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,YAAY,GAAG,OAAO;KACzB,OAAO,CAAC,OAAO,CAAC;KAChB,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;KACd,WAAW,CAAC,wBAAwB,CAAC,CAAC;AAEzC,YAAY,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAChD,YAAY,CAAC,EAAE,CAAC,kBAAkB,EAAE;IAClC,OAAO,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AAW,CAAC,MAAM,CAAC,cAAc,OAAO,GAAG,CACtF,CAAC;IACF,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,0BAA0B,CAAC;QAC/B,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,YAAY;KACT,OAAO,CAAC,kBAAkB,CAAC;KAC3B,WAAW,CAAC,mCAAmC,CAAC;KAChD,QAAQ,CAAC,WAAW,EAAE,8BAA8B,EAAE,eAAe,CAAC;KACtE,QAAQ,CAAC,UAAU,EAAE,uCAAuC,EAAE,UAAU,CAAC;KACzE,MAAM,CAAC,KAAK,EAAE,OAAgB,EAAE,MAAc,EAAE,EAAE;IACjD,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAC;IAEjD,MAAM,OAAO,GAAG,MAAM,gBAAgB,CACpC,0CAA0C,WAAW,CAAC,MAAM,CAAC,eAAe,OAAO,GAAG,CACvF,CAAC;IACF,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,0BAA0B,CAAC;QAC/B,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ dashboardRead
|
|
|
19
19
|
.description('get dashboard base info')
|
|
20
20
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
21
21
|
.action(async (address) => {
|
|
22
|
-
const contract = getDashboardContract(address);
|
|
22
|
+
const contract = await getDashboardContract(address);
|
|
23
23
|
await getDashboardBaseInfo(contract);
|
|
24
24
|
});
|
|
25
25
|
dashboardRead
|
|
@@ -27,7 +27,7 @@ dashboardRead
|
|
|
27
27
|
.description('get dashboard overview')
|
|
28
28
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
29
29
|
.action(async (address) => {
|
|
30
|
-
const contract = getDashboardContract(address);
|
|
30
|
+
const contract = await getDashboardContract(address);
|
|
31
31
|
await getDashboardOverview(contract);
|
|
32
32
|
});
|
|
33
33
|
dashboardRead
|
|
@@ -35,7 +35,7 @@ dashboardRead
|
|
|
35
35
|
.description('get dashboard roles')
|
|
36
36
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
37
37
|
.action(async (address) => {
|
|
38
|
-
const contract = getDashboardContract(address);
|
|
38
|
+
const contract = await getDashboardContract(address);
|
|
39
39
|
await getDashboardRoles(contract);
|
|
40
40
|
});
|
|
41
41
|
dashboardRead
|
|
@@ -43,7 +43,7 @@ dashboardRead
|
|
|
43
43
|
.description('get vault health info')
|
|
44
44
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
45
45
|
.action(async (address) => {
|
|
46
|
-
const contract = getDashboardContract(address);
|
|
46
|
+
const contract = await getDashboardContract(address);
|
|
47
47
|
await getDashboardHealth(contract);
|
|
48
48
|
});
|
|
49
49
|
dashboardRead
|
|
@@ -63,7 +63,7 @@ dashboardRead
|
|
|
63
63
|
.description('get vault address by dashboard')
|
|
64
64
|
.argument('<dashboard>', 'dashboard address', stringToAddress)
|
|
65
65
|
.action(async (dashboard) => {
|
|
66
|
-
const dashboardContract = getDashboardContract(dashboard);
|
|
66
|
+
const dashboardContract = await getDashboardContract(dashboard);
|
|
67
67
|
const vault = await callReadMethodSilent(dashboardContract, 'stakingVault');
|
|
68
68
|
logResult({
|
|
69
69
|
data: [['Vault Address', vault]],
|
|
@@ -74,7 +74,7 @@ dashboardRead
|
|
|
74
74
|
.description('get pending confirmations')
|
|
75
75
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
76
76
|
.action(async (address) => {
|
|
77
|
-
const contract = getDashboardContract(address);
|
|
77
|
+
const contract = await getDashboardContract(address);
|
|
78
78
|
const confirmations = await getConfirmationsInfo(contract, contract.abi);
|
|
79
79
|
if (!confirmations)
|
|
80
80
|
return console.error('No confirmations found');
|
|
@@ -106,7 +106,7 @@ dashboardRead
|
|
|
106
106
|
.description('get the roles that can:change the confirm expiry, set the node operator fee, set a new owner of the StakingVault')
|
|
107
107
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
108
108
|
.action(async (address) => {
|
|
109
|
-
const contract = getDashboardContract(address);
|
|
109
|
+
const contract = await getDashboardContract(address);
|
|
110
110
|
const confirmingRoles = await callReadMethodSilent(contract, 'confirmingRoles');
|
|
111
111
|
const confirmingRolesNames = [
|
|
112
112
|
'DEFAULT_ADMIN_ROLE',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../programs/contracts/dashboard/read.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,GAErB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,aAAa,GAAG,SAAS;KAC5B,OAAO,CAAC,MAAM,CAAC;KACf,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,eAAe,CAAC,CAAC;AAEhC,aAAa,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AACjD,aAAa,CAAC,EAAE,CAAC,kBAAkB,EAAE;IACnC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAA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ClB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,iBAAiB,CAClB,CAAC"}
|
|
@@ -20,7 +20,7 @@ dashboardWrite
|
|
|
20
20
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
21
21
|
.argument('<newOwner>', 'address of the new owner', stringToAddress)
|
|
22
22
|
.action(async (address, newOwner) => {
|
|
23
|
-
const contract = getDashboardContract(address);
|
|
23
|
+
const contract = await getDashboardContract(address);
|
|
24
24
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
25
25
|
const confirm = await confirmOperation(`Are you sure you want to transfer ownership of the staking vault ${vault} to ${newOwner}?`);
|
|
26
26
|
if (!confirm)
|
|
@@ -36,7 +36,7 @@ dashboardWrite
|
|
|
36
36
|
.description('disconnects the staking vault from the vault hub')
|
|
37
37
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
38
38
|
.action(async (address) => {
|
|
39
|
-
const contract = getDashboardContract(address);
|
|
39
|
+
const contract = await getDashboardContract(address);
|
|
40
40
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
41
41
|
const confirm = await confirmOperation(`Are you sure you want to disconnect the staking vault ${vault}?`);
|
|
42
42
|
if (!confirm)
|
|
@@ -56,7 +56,7 @@ dashboardWrite
|
|
|
56
56
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
57
57
|
.argument('<ether>', 'amount of ether to be funded (in ETH)')
|
|
58
58
|
.action(async (address, ether) => {
|
|
59
|
-
const contract = getDashboardContract(address);
|
|
59
|
+
const contract = await getDashboardContract(address);
|
|
60
60
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
61
61
|
const confirm = await confirmOperation(`Are you sure you want to fund the staking vault ${vault} with ${ether} ether?`);
|
|
62
62
|
if (!confirm)
|
|
@@ -75,7 +75,7 @@ dashboardWrite
|
|
|
75
75
|
.argument('<recipient>', 'address of the recipient', stringToAddress)
|
|
76
76
|
.argument('<eth>', 'amount of ether to withdraw (in ETH)')
|
|
77
77
|
.action(async (address, recipient, ether) => {
|
|
78
|
-
const contract = getDashboardContract(address);
|
|
78
|
+
const contract = await getDashboardContract(address);
|
|
79
79
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
80
80
|
const confirm = await confirmOperation(`Are you sure you want to withdraw ${ether} from the staking vault ${vault} to ${recipient}?`);
|
|
81
81
|
if (!confirm)
|
|
@@ -95,7 +95,7 @@ dashboardWrite
|
|
|
95
95
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
96
96
|
.argument('<validatorPubKey>', 'public key of the validator to exit')
|
|
97
97
|
.action(async (address, validatorPubKey) => {
|
|
98
|
-
const contract = getDashboardContract(address);
|
|
98
|
+
const contract = await getDashboardContract(address);
|
|
99
99
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
100
100
|
const confirm = await confirmOperation(`Are you sure you want to exit the validator ${validatorPubKey} from the staking vault ${vault}?`);
|
|
101
101
|
if (!confirm)
|
|
@@ -115,9 +115,9 @@ dashboardWrite
|
|
|
115
115
|
.argument('<recipient>', 'address of the recipient', stringToAddress)
|
|
116
116
|
.action(async (address, pubkeys, amounts, recipient) => {
|
|
117
117
|
const mergedPubkeys = pubkeys.join('');
|
|
118
|
-
const contract = getDashboardContract(address);
|
|
118
|
+
const contract = await getDashboardContract(address);
|
|
119
119
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
120
|
-
const vaultContract = getStakingVaultContract(vault);
|
|
120
|
+
const vaultContract = await getStakingVaultContract(vault);
|
|
121
121
|
const fee = await callReadMethod(vaultContract, 'calculateValidatorWithdrawalFee', [BigInt(amounts.length)]);
|
|
122
122
|
const confirmationMessage = `Are you sure you want to trigger the withdrawal of the validators
|
|
123
123
|
${pubkeys.join(', ')}
|
|
@@ -142,7 +142,7 @@ dashboardWrite
|
|
|
142
142
|
.argument('<recipient>', 'address of the recipient', stringToAddress)
|
|
143
143
|
.argument('<amountOfShares>', 'amount of shares to mint (in Shares)')
|
|
144
144
|
.action(async (address, recipient, amountOfShares) => {
|
|
145
|
-
const contract = getDashboardContract(address);
|
|
145
|
+
const contract = await getDashboardContract(address);
|
|
146
146
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
147
147
|
await mintShares(contract, recipient, parseEther(amountOfShares), vault, 'mintShares');
|
|
148
148
|
});
|
|
@@ -153,7 +153,7 @@ dashboardWrite
|
|
|
153
153
|
.argument('<recipient>', 'address of the recipient', stringToAddress)
|
|
154
154
|
.argument('<amountOfSteth>', 'amount of stETH to mint')
|
|
155
155
|
.action(async (address, recipient, amountOfSteth) => {
|
|
156
|
-
const contract = getDashboardContract(address);
|
|
156
|
+
const contract = await getDashboardContract(address);
|
|
157
157
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
158
158
|
await mintSteth(contract, recipient, parseEther(amountOfSteth), vault);
|
|
159
159
|
});
|
|
@@ -164,7 +164,7 @@ dashboardWrite
|
|
|
164
164
|
.argument('<recipient>', 'address of the recipient', stringToAddress)
|
|
165
165
|
.argument('<amountOfWsteth>', 'amount of wstETH to mint')
|
|
166
166
|
.action(async (address, recipient, amountOfWsteth) => {
|
|
167
|
-
const contract = getDashboardContract(address);
|
|
167
|
+
const contract = await getDashboardContract(address);
|
|
168
168
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
169
169
|
await mintShares(contract, recipient, parseEther(amountOfWsteth), vault, 'mintWstETH');
|
|
170
170
|
});
|
|
@@ -175,7 +175,7 @@ dashboardWrite
|
|
|
175
175
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
176
176
|
.argument('<amountOfShares>', 'amount of shares to burn (in Shares)')
|
|
177
177
|
.action(async (address, amountOfShares) => {
|
|
178
|
-
const contract = getDashboardContract(address);
|
|
178
|
+
const contract = await getDashboardContract(address);
|
|
179
179
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
180
180
|
await burnShares(contract, parseEther(amountOfShares), vault, 'burnShares');
|
|
181
181
|
});
|
|
@@ -185,7 +185,7 @@ dashboardWrite
|
|
|
185
185
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
186
186
|
.argument('<amountOfShares>', 'amount of shares to burn (in stETH)')
|
|
187
187
|
.action(async (address, amountOfShares) => {
|
|
188
|
-
const contract = getDashboardContract(address);
|
|
188
|
+
const contract = await getDashboardContract(address);
|
|
189
189
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
190
190
|
await burnSteth(contract, parseEther(amountOfShares), vault);
|
|
191
191
|
});
|
|
@@ -195,7 +195,7 @@ dashboardWrite
|
|
|
195
195
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
196
196
|
.argument('<tokens>', 'amount of wstETH tokens to burn (in wstETH)')
|
|
197
197
|
.action(async (address, tokens) => {
|
|
198
|
-
const contract = getDashboardContract(address);
|
|
198
|
+
const contract = await getDashboardContract(address);
|
|
199
199
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
200
200
|
await burnShares(contract, parseEther(tokens), vault, 'burnWstETH');
|
|
201
201
|
});
|
|
@@ -205,7 +205,7 @@ dashboardWrite
|
|
|
205
205
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
206
206
|
.argument('<ether>', 'amount of ether to rebalance (in ETH)', etherToWei)
|
|
207
207
|
.action(async (address, ether) => {
|
|
208
|
-
const contract = getDashboardContract(address);
|
|
208
|
+
const contract = await getDashboardContract(address);
|
|
209
209
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
210
210
|
const confirm = await confirmOperation(`Are you sure you want to rebalance the vault ${vault} with ${formatEther(ether)} ether by transferring?`);
|
|
211
211
|
if (!confirm)
|
|
@@ -223,7 +223,7 @@ dashboardWrite
|
|
|
223
223
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
224
224
|
.argument('<shares>', 'amount of shares to rebalance (in shares)', etherToWei)
|
|
225
225
|
.action(async (address, shares) => {
|
|
226
|
-
const contract = getDashboardContract(address);
|
|
226
|
+
const contract = await getDashboardContract(address);
|
|
227
227
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
228
228
|
const confirm = await confirmOperation(`Are you sure you want to rebalance the vault ${vault} with ${formatEther(shares)} shares?`);
|
|
229
229
|
if (!confirm)
|
|
@@ -242,7 +242,7 @@ dashboardWrite
|
|
|
242
242
|
.argument('<amount>', 'amount of tokens or ether to recover (in ETH)', etherToWei)
|
|
243
243
|
.argument('<recipient>', 'address of the recovery recipient', stringToAddress)
|
|
244
244
|
.action(async (address, token, amount, recipient) => {
|
|
245
|
-
const contract = getDashboardContract(address);
|
|
245
|
+
const contract = await getDashboardContract(address);
|
|
246
246
|
const confirm = await confirmOperation(`Are you sure you want to recover the token ${token} with amount ${formatEther(amount)} from the dashboard contract ${address} to ${recipient}?`);
|
|
247
247
|
if (!confirm)
|
|
248
248
|
return;
|
|
@@ -260,7 +260,7 @@ dashboardWrite
|
|
|
260
260
|
.argument('<amount>', 'amount of tokens or ether to recover (in ETH)', etherToWei)
|
|
261
261
|
.argument('<recipient>', 'address of the recovery recipient', stringToAddress)
|
|
262
262
|
.action(async (address, token, amount, recipient) => {
|
|
263
|
-
const contract = getDashboardContract(address);
|
|
263
|
+
const contract = await getDashboardContract(address);
|
|
264
264
|
const confirm = await confirmOperation(`Are you sure you want to recover the token ${token} with amount ${formatEther(amount)} from the dashboard contract ${address} to ${recipient}?`);
|
|
265
265
|
if (!confirm)
|
|
266
266
|
return;
|
|
@@ -275,7 +275,7 @@ dashboardWrite
|
|
|
275
275
|
.description('Pauses beacon chain deposits on the staking vault.')
|
|
276
276
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
277
277
|
.action(async (address) => {
|
|
278
|
-
const contract = getDashboardContract(address);
|
|
278
|
+
const contract = await getDashboardContract(address);
|
|
279
279
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
280
280
|
const confirm = await confirmOperation(`Are you sure you want to pause beacon chain deposits on the staking vault ${vault}?`);
|
|
281
281
|
if (!confirm)
|
|
@@ -291,7 +291,7 @@ dashboardWrite
|
|
|
291
291
|
.description('resumes deposits to beacon chain')
|
|
292
292
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
293
293
|
.action(async (address) => {
|
|
294
|
-
const contract = getDashboardContract(address);
|
|
294
|
+
const contract = await getDashboardContract(address);
|
|
295
295
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
296
296
|
const confirm = await confirmOperation(`Are you sure you want to resume beacon chain deposits on the staking vault ${vault}?`);
|
|
297
297
|
if (!confirm)
|
|
@@ -315,7 +315,7 @@ dashboardWrite
|
|
|
315
315
|
{second role assignment}
|
|
316
316
|
...]`)
|
|
317
317
|
.action(async (address, roleAssignment) => {
|
|
318
|
-
const contract = getDashboardContract(address);
|
|
318
|
+
const contract = await getDashboardContract(address);
|
|
319
319
|
if (!Array.isArray(roleAssignment)) {
|
|
320
320
|
throw new Error('the 2nd argument should be an array of role assignments');
|
|
321
321
|
}
|
|
@@ -342,7 +342,7 @@ dashboardWrite
|
|
|
342
342
|
{second role assignment}
|
|
343
343
|
...]`)
|
|
344
344
|
.action(async (address, roleAssignment) => {
|
|
345
|
-
const contract = getDashboardContract(address);
|
|
345
|
+
const contract = await getDashboardContract(address);
|
|
346
346
|
if (!Array.isArray(roleAssignment)) {
|
|
347
347
|
throw new Error('the 2nd argument should be an array of role assignments');
|
|
348
348
|
}
|
|
@@ -373,9 +373,9 @@ dashboardWrite
|
|
|
373
373
|
{second deposit}
|
|
374
374
|
...]'`)
|
|
375
375
|
.action(async (address, deposits, { blsCheck }) => {
|
|
376
|
-
const contract = getDashboardContract(address);
|
|
376
|
+
const contract = await getDashboardContract(address);
|
|
377
377
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
378
|
-
const vaultContract = getStakingVaultContract(vault);
|
|
378
|
+
const vaultContract = await getStakingVaultContract(vault);
|
|
379
379
|
const confirm = await confirmOperation(`Are you sure you want to unguaranteed deposit ${deposits.length} deposits to the beacon chain in the staking vault ${vault}?
|
|
380
380
|
Pubkeys: ${deposits.map((i) => i.pubkey).join(', ')}`);
|
|
381
381
|
if (!confirm)
|
|
@@ -395,9 +395,9 @@ dashboardWrite
|
|
|
395
395
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
396
396
|
.argument('<validatorIndex...>', 'index of the validator to prove')
|
|
397
397
|
.action(async (address, validatorIndexes) => {
|
|
398
|
-
const contract = getDashboardContract(address);
|
|
398
|
+
const contract = await getDashboardContract(address);
|
|
399
399
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
400
|
-
const vaultContract = getStakingVaultContract(vault);
|
|
400
|
+
const vaultContract = await getStakingVaultContract(vault);
|
|
401
401
|
const pdgContract = await callReadMethodSilent(vaultContract, 'depositor');
|
|
402
402
|
const payload = [];
|
|
403
403
|
const pdgPolicy = await callReadMethodSilent(contract, 'pdgPolicy');
|
|
@@ -440,7 +440,7 @@ dashboardWrite
|
|
|
440
440
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
441
441
|
.argument('<newOwner>', 'new owner address', stringToAddress)
|
|
442
442
|
.action(async (address, newOwner) => {
|
|
443
|
-
const contract = getDashboardContract(address);
|
|
443
|
+
const contract = await getDashboardContract(address);
|
|
444
444
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
445
445
|
const confirm = await confirmOperation(`Are you sure you want to abandon the dashboard ${address} (vault: ${vault})?`);
|
|
446
446
|
if (!confirm)
|
|
@@ -458,7 +458,7 @@ dashboardWrite
|
|
|
458
458
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
459
459
|
.addHelpText('after', `Reverts if settledGrowth is not corrected after the vault is disconnected`)
|
|
460
460
|
.action(async (address) => {
|
|
461
|
-
const contract = getDashboardContract(address);
|
|
461
|
+
const contract = await getDashboardContract(address);
|
|
462
462
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
463
463
|
const currentSettledGrowth = await callReadMethodSilent(contract, 'settledGrowth');
|
|
464
464
|
const confirm = await confirmOperation(`Are you sure you want to connect the dashboard ${address} (vault: ${vault}) to VaultHub?
|
|
@@ -478,7 +478,7 @@ dashboardWrite
|
|
|
478
478
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
479
479
|
.addHelpText('after', `Reverts if settledGrowth is not corrected after the vault is disconnected`)
|
|
480
480
|
.action(async (address) => {
|
|
481
|
-
const contract = getDashboardContract(address);
|
|
481
|
+
const contract = await getDashboardContract(address);
|
|
482
482
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
483
483
|
const currentSettledGrowth = await callReadMethodSilent(contract, 'settledGrowth');
|
|
484
484
|
const confirm = await confirmOperation(`Are you sure you want to reconnect the dashboard ${address} (vault: ${vault}) to VaultHub?
|
|
@@ -501,7 +501,7 @@ dashboardWrite
|
|
|
501
501
|
.option('-f, --fund', 'optional fund the vault with 1 ETH', false)
|
|
502
502
|
.addHelpText('after', `Reverts if settledGrowth is not corrected after the vault is disconnected`)
|
|
503
503
|
.action(async (address, tier, requestedShareLimit, { fund }) => {
|
|
504
|
-
const contract = getDashboardContract(address);
|
|
504
|
+
const contract = await getDashboardContract(address);
|
|
505
505
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
506
506
|
const currentSettledGrowth = await callReadMethodSilent(contract, 'settledGrowth');
|
|
507
507
|
const confirm = await confirmOperation(`Are you sure you want to change the tier of the vault ${vault} to ${tier} and connect to VaultHub?
|
|
@@ -526,7 +526,7 @@ dashboardWrite
|
|
|
526
526
|
1: ALLOW_PROVE
|
|
527
527
|
2: ALLOW_DEPOSIT_AND_PROVE`)
|
|
528
528
|
.action(async (address, policy) => {
|
|
529
|
-
const contract = getDashboardContract(address);
|
|
529
|
+
const contract = await getDashboardContract(address);
|
|
530
530
|
const PDG_POLICY = {
|
|
531
531
|
0: 'STRICT',
|
|
532
532
|
1: 'ALLOW_PROVE',
|
|
@@ -548,7 +548,7 @@ dashboardWrite
|
|
|
548
548
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
549
549
|
.argument('<recipient>', 'address of the new node operator fee recipient', stringToAddress)
|
|
550
550
|
.action(async (address, recipient) => {
|
|
551
|
-
const contract = getDashboardContract(address);
|
|
551
|
+
const contract = await getDashboardContract(address);
|
|
552
552
|
const confirm = await confirmOperation(`Are you sure you want to set the node operator fee recipient to ${recipient}?`);
|
|
553
553
|
if (!confirm)
|
|
554
554
|
return;
|
|
@@ -563,7 +563,7 @@ dashboardWrite
|
|
|
563
563
|
.description('Confirms a proposal')
|
|
564
564
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
565
565
|
.action(async (address) => {
|
|
566
|
-
const contract = getDashboardContract(address);
|
|
566
|
+
const contract = await getDashboardContract(address);
|
|
567
567
|
const vault = await callReadMethodSilent(contract, 'stakingVault');
|
|
568
568
|
const operatorGridContract = await getOperatorGridContract();
|
|
569
569
|
const log = await confirmProposal({
|
|
@@ -591,7 +591,7 @@ dashboardWrite
|
|
|
591
591
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
592
592
|
.argument('<expiry>', 'expiry in seconds', stringToBigInt)
|
|
593
593
|
.action(async (address, expiry) => {
|
|
594
|
-
const contract = getDashboardContract(address);
|
|
594
|
+
const contract = await getDashboardContract(address);
|
|
595
595
|
const hours = Number(expiry) / 3600;
|
|
596
596
|
const confirm = await confirmOperation(`Are you sure you want to set the confirm expiry to ${expiry} seconds (${hours} hours)?`);
|
|
597
597
|
if (!confirm)
|
|
@@ -608,7 +608,7 @@ dashboardWrite
|
|
|
608
608
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
609
609
|
.argument('<fee>', 'the new node operator fee rate in basis points', stringToBigInt)
|
|
610
610
|
.action(async (address, fee) => {
|
|
611
|
-
const contract = getDashboardContract(address);
|
|
611
|
+
const contract = await getDashboardContract(address);
|
|
612
612
|
const percentage = formatBP(fee);
|
|
613
613
|
const confirm = await confirmOperation(`Are you sure you want to set the node operator fee ${fee} in basis points (${percentage})?`);
|
|
614
614
|
if (!confirm)
|
|
@@ -624,7 +624,7 @@ dashboardWrite
|
|
|
624
624
|
.description('transfers the node-operator`s accrued fee (if any) to nodeOperatorFeeRecipient')
|
|
625
625
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
626
626
|
.action(async (address) => {
|
|
627
|
-
const contract = getDashboardContract(address);
|
|
627
|
+
const contract = await getDashboardContract(address);
|
|
628
628
|
const nodeOperatorFeeRecipient = await callReadMethodSilent(contract, 'feeRecipient');
|
|
629
629
|
const confirm = await confirmOperation(`Are you sure you want to transfer the node operator fee to ${nodeOperatorFeeRecipient}?`);
|
|
630
630
|
if (!confirm)
|
|
@@ -643,7 +643,7 @@ dashboardWrite
|
|
|
643
643
|
.argument('<tierId>', 'tier id', stringToBigInt)
|
|
644
644
|
.argument('<requestedShareLimit>', 'requested share limit (in shares)', etherToWei)
|
|
645
645
|
.action(async (address, tierId, requestedShareLimit) => {
|
|
646
|
-
const contract = getDashboardContract(address);
|
|
646
|
+
const contract = await getDashboardContract(address);
|
|
647
647
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
648
648
|
const confirm = await confirmOperation(`Are you sure you want to change the current tier to tier ID ${tierId} for vault ${vault} with share limit ${formatEther(requestedShareLimit)} shares?`);
|
|
649
649
|
if (!confirm)
|
|
@@ -664,7 +664,7 @@ dashboardWrite
|
|
|
664
664
|
- First call returns false (pending), second call with both confirmations completes the sync
|
|
665
665
|
- Confirmations expire after the configured period (default: 1 day)`)
|
|
666
666
|
.action(async (address) => {
|
|
667
|
-
const contract = getDashboardContract(address);
|
|
667
|
+
const contract = await getDashboardContract(address);
|
|
668
668
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
669
669
|
const confirm = await confirmOperation(`Are you sure you want to sync the tier of the vault ${vault}?`);
|
|
670
670
|
if (!confirm)
|
|
@@ -682,7 +682,7 @@ dashboardWrite
|
|
|
682
682
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
683
683
|
.argument('<shareLimit>', 'share limit', etherToWei)
|
|
684
684
|
.action(async (address, shareLimit) => {
|
|
685
|
-
const contract = getDashboardContract(address);
|
|
685
|
+
const contract = await getDashboardContract(address);
|
|
686
686
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
687
687
|
const confirm = await confirmOperation(`Are you sure you want to request a change of share limit on the OperatorGrid for the vault ${vault} to ${formatEther(shareLimit)}?`);
|
|
688
688
|
if (!confirm)
|
|
@@ -698,7 +698,7 @@ dashboardWrite
|
|
|
698
698
|
.description('Disburses an abnormally high fee as `DEFAULT_ADMIN_ROLE`. Before calling this function, the caller must ensure that the high fee is expected, and the settled growth (used as baseline for fee) is set correctly.')
|
|
699
699
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
700
700
|
.action(async (address) => {
|
|
701
|
-
const contract = getDashboardContract(address);
|
|
701
|
+
const contract = await getDashboardContract(address);
|
|
702
702
|
const confirm = await confirmOperation('Are you sure you want to disburse an abnormally high fee as `DEFAULT_ADMIN_ROLE`?');
|
|
703
703
|
if (!confirm)
|
|
704
704
|
return;
|
|
@@ -712,9 +712,9 @@ dashboardWrite
|
|
|
712
712
|
.command('correct-settled-growth')
|
|
713
713
|
.description('Manually corrects the settled growth value with dual confirmation.')
|
|
714
714
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
715
|
-
.argument('<newSettledGrowth>', 'new settled growth', etherToWei)
|
|
715
|
+
.argument('<newSettledGrowth>', 'new settled growth (in ETH)', etherToWei)
|
|
716
716
|
.action(async (address, newSettledGrowth) => {
|
|
717
|
-
const contract = getDashboardContract(address);
|
|
717
|
+
const contract = await getDashboardContract(address);
|
|
718
718
|
const currentSettledGrowth = await callReadMethodSilent(contract, 'settledGrowth');
|
|
719
719
|
const confirm = await confirmOperation(`Are you sure you want to correct the settled growth to ${newSettledGrowth}?
|
|
720
720
|
Current settled growth: ${formatEther(currentSettledGrowth)}`);
|
|
@@ -732,7 +732,7 @@ dashboardWrite
|
|
|
732
732
|
.description('Recovers the previously collected fees to the feeRecipient address')
|
|
733
733
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
734
734
|
.action(async (address) => {
|
|
735
|
-
const contract = getDashboardContract(address);
|
|
735
|
+
const contract = await getDashboardContract(address);
|
|
736
736
|
const feeLeftover = await callReadMethodSilent(contract, 'feeLeftover');
|
|
737
737
|
const confirm = await confirmOperation(`Are you sure you want to recover the fee leftover from the dashboard contract ${address}?
|
|
738
738
|
Fee leftover: ${formatEther(feeLeftover)}`);
|