@lidofinance/lsv-cli 1.1.0 → 1.3.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/README.md +58 -0
- package/dist/abi/Dashboard.d.ts +291 -3
- package/dist/abi/Dashboard.js +10 -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/PredepositGuarantee.d.ts +357 -88
- package/dist/abi/PredepositGuarantee.js +31 -28
- package/dist/abi/PredepositGuarantee.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 +8 -14
- package/dist/abi/VaultViewer.js +10 -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/command/index.js +1 -0
- package/dist/command/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 +67 -6
- package/dist/configs/deployed.js.map +1 -1
- package/dist/configs/index.d.ts +4 -3
- package/dist/configs/index.js +4 -3
- package/dist/configs/index.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 +111 -0
- package/dist/features/defi-wrapper/defi-wrapper-factory.js +231 -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 +2 -0
- package/dist/features/deposits/index.js +2 -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/deposits/validators.d.ts +12 -0
- package/dist/features/deposits/validators.js +31 -0
- package/dist/features/deposits/validators.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 +5 -1
- package/dist/features/index.js +5 -1
- package/dist/features/index.js.map +1 -1
- package/dist/features/lazy-oracle.js +2 -2
- package/dist/features/lazy-oracle.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/mint-burn/allowance.d.ts +7 -1
- package/dist/features/mint-burn/allowance.js +8 -9
- package/dist/features/mint-burn/allowance.js.map +1 -1
- package/dist/features/mint-burn/burn-shares.d.ts +2 -1
- package/dist/features/mint-burn/burn-shares.js +4 -3
- package/dist/features/mint-burn/burn-shares.js.map +1 -1
- package/dist/features/mint-burn/burn-steth.d.ts +2 -1
- package/dist/features/mint-burn/burn-steth.js +4 -3
- package/dist/features/mint-burn/burn-steth.js.map +1 -1
- package/dist/features/mint-burn/mint-shares.js +4 -6
- package/dist/features/mint-burn/mint-shares.js.map +1 -1
- package/dist/features/mint-burn/mint-steth.js +4 -6
- package/dist/features/mint-burn/mint-steth.js.map +1 -1
- package/dist/features/pdg.js +4 -0
- package/dist/features/pdg.js.map +1 -1
- package/dist/features/utils/connection.d.ts +2 -0
- package/dist/features/utils/connection.js +14 -0
- package/dist/features/utils/connection.js.map +1 -0
- 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 +2 -0
- package/dist/features/utils/index.js +2 -0
- package/dist/features/utils/index.js.map +1 -1
- package/dist/features/utils/liability-shares.js +2 -1
- package/dist/features/utils/liability-shares.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.d.ts +11 -1
- package/dist/features/utils/report-fresh.js +17 -15
- package/dist/features/utils/report-fresh.js.map +1 -1
- package/dist/features/vault-factory.d.ts +13 -14
- package/dist/features/vault-factory.js +32 -10
- package/dist/features/vault-factory.js.map +1 -1
- package/dist/features/vault-operations/connect-vault.d.ts +4 -0
- package/dist/features/vault-operations/connect-vault.js +21 -0
- package/dist/features/vault-operations/connect-vault.js.map +1 -0
- package/dist/features/vault-operations/create-vault.d.ts +4 -2
- package/dist/features/vault-operations/create-vault.js +17 -7
- package/dist/features/vault-operations/create-vault.js.map +1 -1
- package/dist/features/vault-operations/dashboard-by-vault.js +21 -8
- package/dist/features/vault-operations/dashboard-by-vault.js.map +1 -1
- package/dist/features/vault-operations/index.d.ts +2 -0
- package/dist/features/vault-operations/index.js +2 -0
- package/dist/features/vault-operations/index.js.map +1 -1
- package/dist/features/vault-operations/roles.d.ts +5 -0
- package/dist/features/vault-operations/roles.js +65 -0
- package/dist/features/vault-operations/roles.js.map +1 -0
- package/dist/features/vault-operations/vault-info.js +10 -4
- package/dist/features/vault-operations/vault-info.js.map +1 -1
- package/dist/features/vault-operations/vault-overview.js +6 -8
- package/dist/features/vault-operations/vault-overview.js.map +1 -1
- package/dist/features/vault-operations/vault-roles.js +4 -1
- 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/features/with-report.d.ts +6 -0
- package/dist/features/with-report.js +18 -0
- package/dist/features/with-report.js.map +1 -0
- package/dist/index.js +38 -11
- 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 +80 -61
- 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 +6 -2
- package/dist/programs/contracts/hub/write.js.map +1 -1
- package/dist/programs/contracts/operator-grid/write.js +1 -1
- package/dist/programs/contracts/operator-grid/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 +39 -25
- 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 +91 -276
- 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 +180 -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 +32 -24
- 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 +65 -29
- package/dist/programs/use-cases/vault-operations/create-vault.js.map +1 -1
- package/dist/programs/use-cases/vault-operations/write.js +124 -26
- package/dist/programs/use-cases/vault-operations/write.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/integration/deposits.test.d.ts +1 -0
- package/dist/tests/integration/deposits.test.js +67 -0
- package/dist/tests/integration/deposits.test.js.map +1 -0
- package/dist/tests/integration/globalSetup.d.ts +1 -0
- package/dist/tests/integration/globalSetup.js +55 -0
- package/dist/tests/integration/globalSetup.js.map +1 -0
- package/dist/tests/integration/helpers/index.d.ts +3 -0
- package/dist/tests/integration/helpers/index.js +4 -0
- package/dist/tests/integration/helpers/index.js.map +1 -0
- package/dist/tests/integration/helpers/test-assertions.d.ts +32 -0
- package/dist/tests/integration/helpers/test-assertions.js +92 -0
- package/dist/tests/integration/helpers/test-assertions.js.map +1 -0
- package/dist/tests/integration/helpers/test-client.d.ts +14530 -0
- package/dist/tests/integration/helpers/test-client.js +73 -0
- package/dist/tests/integration/helpers/test-client.js.map +1 -0
- package/dist/tests/integration/helpers/test-config.d.ts +14 -0
- package/dist/tests/integration/helpers/test-config.js +62 -0
- package/dist/tests/integration/helpers/test-config.js.map +1 -0
- package/dist/tests/integration/helpers/test-setup.d.ts +12 -0
- package/dist/tests/integration/helpers/test-setup.js +40 -0
- package/dist/tests/integration/helpers/test-setup.js.map +1 -0
- package/dist/tests/integration/lazy-oracle.test.d.ts +1 -0
- package/dist/tests/integration/lazy-oracle.test.js +31 -0
- package/dist/tests/integration/lazy-oracle.test.js.map +1 -0
- package/dist/tests/integration/metrics.test.d.ts +1 -0
- package/dist/tests/integration/metrics.test.js +95 -0
- package/dist/tests/integration/metrics.test.js.map +1 -0
- package/dist/tests/integration/mint-burn.test.d.ts +1 -0
- package/dist/tests/integration/mint-burn.test.js +149 -0
- package/dist/tests/integration/mint-burn.test.js.map +1 -0
- package/dist/tests/integration/operator-grid.test.d.ts +1 -0
- package/dist/tests/integration/operator-grid.test.js +41 -0
- package/dist/tests/integration/operator-grid.test.js.map +1 -0
- package/dist/tests/integration/pdg.test.d.ts +1 -0
- package/dist/tests/integration/pdg.test.js +47 -0
- package/dist/tests/integration/pdg.test.js.map +1 -0
- package/dist/tests/integration/utils.test.d.ts +1 -0
- package/dist/tests/integration/utils.test.js +70 -0
- package/dist/tests/integration/utils.test.js.map +1 -0
- package/dist/tests/integration/vault-factory.test.d.ts +1 -0
- package/dist/tests/integration/vault-factory.test.js +29 -0
- package/dist/tests/integration/vault-factory.test.js.map +1 -0
- package/dist/tests/integration/vault-hub.test.d.ts +1 -0
- package/dist/tests/integration/vault-hub.test.js +71 -0
- package/dist/tests/integration/vault-hub.test.js.map +1 -0
- package/dist/tests/integration/vault-operations.test.d.ts +1 -0
- package/dist/tests/integration/vault-operations.test.js +151 -0
- package/dist/tests/integration/vault-operations.test.js.map +1 -0
- package/dist/tests/integration/vault-roles.test.d.ts +1 -0
- package/dist/tests/integration/vault-roles.test.js +44 -0
- package/dist/tests/integration/vault-roles.test.js.map +1 -0
- package/dist/tests/integration/vault.test.d.ts +1 -0
- package/dist/tests/integration/vault.test.js +44 -0
- package/dist/tests/integration/vault.test.js.map +1 -0
- package/dist/tests/utils/arguments.test.js +85 -4
- package/dist/tests/utils/arguments.test.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/tests/utils/calculate-health.test.d.ts +1 -0
- package/dist/tests/utils/calculate-health.test.js +140 -0
- package/dist/tests/utils/calculate-health.test.js.map +1 -0
- package/dist/tests/utils/calculate-overview-v2.test.d.ts +1 -0
- package/dist/tests/utils/calculate-overview-v2.test.js +181 -0
- package/dist/tests/utils/calculate-overview-v2.test.js.map +1 -0
- package/dist/tests/utils/calculate-overview.test.js +2 -1
- package/dist/tests/utils/calculate-overview.test.js.map +1 -1
- package/dist/tests/utils/csv-file.test.d.ts +1 -0
- package/dist/tests/utils/csv-file.test.js +111 -0
- package/dist/tests/utils/csv-file.test.js.map +1 -0
- package/dist/tests/utils/data-validators.test.js +1 -1
- package/dist/tests/utils/data-validators.test.js.map +1 -1
- package/dist/tests/utils/error-handler.test.js +7 -16
- package/dist/tests/utils/error-handler.test.js.map +1 -1
- package/dist/tests/utils/get-commands.test.js +1 -1
- package/dist/tests/utils/get-commands.test.js.map +1 -1
- package/dist/tests/utils/get-deposit-data-root.test.js +1 -2
- package/dist/tests/utils/get-deposit-data-root.test.js.map +1 -1
- package/dist/tests/utils/get-value.test.js +1 -1
- package/dist/tests/utils/get-value.test.js.map +1 -1
- package/dist/tests/utils/health.test.js +1 -1
- package/dist/tests/utils/health.test.js.map +1 -1
- package/dist/tests/utils/interrupt-handler.test.js +2 -5
- package/dist/tests/utils/interrupt-handler.test.js.map +1 -1
- package/dist/tests/utils/ipfs.test.js +37 -24
- package/dist/tests/utils/ipfs.test.js.map +1 -1
- package/dist/tests/utils/lido-apr.test.d.ts +1 -0
- package/dist/tests/utils/lido-apr.test.js +95 -0
- package/dist/tests/utils/lido-apr.test.js.map +1 -0
- package/dist/tests/utils/logging.test.js +135 -15
- package/dist/tests/utils/logging.test.js.map +1 -1
- package/dist/tests/utils/merkle-utils.test.d.ts +1 -0
- package/dist/tests/utils/merkle-utils.test.js +231 -0
- package/dist/tests/utils/merkle-utils.test.js.map +1 -0
- package/dist/tests/utils/rebase-rewards.test.d.ts +1 -0
- package/dist/tests/utils/rebase-rewards.test.js +114 -0
- package/dist/tests/utils/rebase-rewards.test.js.map +1 -0
- package/dist/tests/utils/resove-path.test.js +1 -1
- package/dist/tests/utils/resove-path.test.js.map +1 -1
- package/dist/tests/utils/sleep.test.js +5 -5
- package/dist/tests/utils/sleep.test.js.map +1 -1
- package/dist/tests/utils/snake-to-camel.test.d.ts +1 -0
- package/dist/tests/utils/snake-to-camel.test.js +37 -0
- package/dist/tests/utils/snake-to-camel.test.js.map +1 -0
- package/dist/tests/utils/timestamp.test.d.ts +1 -0
- package/dist/tests/utils/timestamp.test.js +51 -0
- package/dist/tests/utils/timestamp.test.js.map +1 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/utils/arguments.d.ts +6 -1
- package/dist/utils/arguments.js +46 -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.d.ts +1 -2
- package/dist/utils/calculate-overview-v2.js +4 -8
- package/dist/utils/calculate-overview-v2.js.map +1 -1
- package/dist/utils/calculate-overview.d.ts +1 -0
- package/dist/utils/calculate-overview.js +2 -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 +6 -1
- package/dist/utils/commands/report.js +6 -4
- 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 +43 -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 +42 -0
- package/dist/utils/consolidation/pubkeys.js.map +1 -0
- package/dist/utils/consolidation/types.d.ts +12 -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 +36 -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/error-handler.js +2 -9
- package/dist/utils/error-handler.js.map +1 -1
- 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/interrupt-handler.js +8 -2
- package/dist/utils/interrupt-handler.js.map +1 -1
- package/dist/utils/logging/console.js +41 -3
- package/dist/utils/logging/console.js.map +1 -1
- package/dist/utils/prompts/mint-burn/confirm-mint.js +1 -0
- package/dist/utils/prompts/mint-burn/confirm-mint.js.map +1 -1
- package/dist/utils/prompts/operations.js +4 -1
- package/dist/utils/prompts/operations.js.map +1 -1
- package/dist/utils/proof/create-proof.d.ts +5 -0
- package/dist/utils/proof/create-proof.js +5 -0
- package/dist/utils/proof/create-proof.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.d.ts +4 -0
- package/dist/utils/transactions/tx-private-key.js +65 -32
- package/dist/utils/transactions/tx-private-key.js.map +1 -1
- package/dist/utils/transactions/tx-wc.d.ts +6 -3
- package/dist/utils/transactions/tx-wc.js +28 -26
- package/dist/utils/transactions/tx-wc.js.map +1 -1
- package/dist/utils/transactions/types.d.ts +5 -2
- package/dist/utils/transactions/utils.d.ts +3 -0
- package/dist/utils/transactions/utils.js +33 -0
- package/dist/utils/transactions/utils.js.map +1 -0
- package/dist/utils/wallet-connect.js +6 -4
- package/dist/utils/wallet-connect.js.map +1 -1
- package/dist/version/index.js +1 -1
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +29 -0
- package/dist/vitest.config.js.map +1 -0
- package/dist/vitest.integration.config.d.ts +2 -0
- package/dist/vitest.integration.config.js +39 -0
- package/dist/vitest.integration.config.js.map +1 -0
- package/package.json +15 -10
- 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
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createTestClient, http, publicActions, walletActions, createWalletClient, parseEther, } from 'viem';
|
|
2
|
+
import { logInfo, callReadMethodSilent } from '../../utils/index.js';
|
|
3
|
+
import { getChain, getElUrl } from '../../configs/index.js';
|
|
4
|
+
export const grantRoleFromImpersonatedAccount = async ({ currentAccount, contract, impersonateAccount, role, roleName, }) => {
|
|
5
|
+
const testClient = createTestClient({
|
|
6
|
+
chain: await getChain(),
|
|
7
|
+
mode: 'anvil',
|
|
8
|
+
transport: http(getElUrl()),
|
|
9
|
+
})
|
|
10
|
+
.extend(publicActions)
|
|
11
|
+
.extend(walletActions);
|
|
12
|
+
await testClient.impersonateAccount({
|
|
13
|
+
address: impersonateAccount,
|
|
14
|
+
});
|
|
15
|
+
await testClient.setBalance({
|
|
16
|
+
address: impersonateAccount,
|
|
17
|
+
value: parseEther('10'),
|
|
18
|
+
});
|
|
19
|
+
const walletClient = createWalletClient({
|
|
20
|
+
account: impersonateAccount,
|
|
21
|
+
chain: await getChain(),
|
|
22
|
+
transport: http(getElUrl()),
|
|
23
|
+
});
|
|
24
|
+
logInfo(`Granting ${roleName} to account...`);
|
|
25
|
+
await walletClient.writeContract({
|
|
26
|
+
address: contract.address,
|
|
27
|
+
abi: contract.abi,
|
|
28
|
+
functionName: 'grantRole',
|
|
29
|
+
args: [role, currentAccount],
|
|
30
|
+
});
|
|
31
|
+
const roleMembersAfter = await callReadMethodSilent(contract, 'getRoleMembers', [role]);
|
|
32
|
+
logInfo('Role members after granting: ', roleMembersAfter);
|
|
33
|
+
if (!roleMembersAfter.includes(currentAccount)) {
|
|
34
|
+
logInfo(`Address ${currentAccount} does not have the ${roleName} role`);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
logInfo(`${roleName} granted successfully`);
|
|
38
|
+
};
|
|
39
|
+
export const callMethodFromImpersonatedAccount = async ({ contract, functionName, args, impersonateAccount, }) => {
|
|
40
|
+
const testClient = createTestClient({
|
|
41
|
+
chain: await getChain(),
|
|
42
|
+
mode: 'anvil',
|
|
43
|
+
transport: http(getElUrl()),
|
|
44
|
+
})
|
|
45
|
+
.extend(publicActions)
|
|
46
|
+
.extend(walletActions);
|
|
47
|
+
await testClient.impersonateAccount({
|
|
48
|
+
address: impersonateAccount,
|
|
49
|
+
});
|
|
50
|
+
const walletClient = createWalletClient({
|
|
51
|
+
account: impersonateAccount,
|
|
52
|
+
chain: await getChain(),
|
|
53
|
+
transport: http(getElUrl()),
|
|
54
|
+
});
|
|
55
|
+
logInfo(`Calling ${functionName} with args ${args}...`);
|
|
56
|
+
await walletClient.writeContract({
|
|
57
|
+
address: contract.address,
|
|
58
|
+
abi: contract.abi,
|
|
59
|
+
functionName: functionName,
|
|
60
|
+
args: args,
|
|
61
|
+
});
|
|
62
|
+
logInfo(`${functionName} called successfully`);
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=impersonate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impersonate.js","sourceRoot":"","sources":["../../../features/dev-tools/impersonate.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,IAAI,EACJ,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,EAAE,EACrD,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,IAAI,EACJ,QAAQ,GAOT,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,gBAAgB,CAAC;QAClC,KAAK,EAAE,MAAM,QAAQ,EAAE;QACvB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;KAC5B,CAAC;SACC,MAAM,CAAC,aAAa,CAAC;SACrB,MAAM,CAAC,aAAa,CAAC,CAAC;IAEzB,MAAM,UAAU,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,kBAAkB;KAC5B,CAAC,CAAC;IACH,MAAM,UAAU,CAAC,UAAU,CAAC;QAC1B,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC;KACxB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACtC,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE,MAAM,QAAQ,EAAE;QACvB,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;KAC5B,CAAC,CAAC;IAEH,OAAO,CAAC,YAAY,QAAQ,gBAAgB,CAAC,CAAC;IAE9C,MAAM,YAAY,CAAC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MAAM,YAAY,CAAC,aAAa,CAAC;QAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,YAAY,EAAE,YAAY;QAC1B,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,YAAY,sBAAsB,CAAC,CAAC;AACjD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './impersonate.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../features/dev-tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
package/dist/features/index.d.ts
CHANGED
|
@@ -8,5 +8,9 @@ export * from './vault-operations/index.js';
|
|
|
8
8
|
export * from './utils/index.js';
|
|
9
9
|
export * from './mint-burn/index.js';
|
|
10
10
|
export * from './deposits/index.js';
|
|
11
|
+
export * from './consolidation.js';
|
|
11
12
|
export * from './lazy-oracle.js';
|
|
12
|
-
export * from './defi-wrapper
|
|
13
|
+
export * from './defi-wrapper/index.js';
|
|
14
|
+
export * from './dev-tools/index.js';
|
|
15
|
+
export * from './metrics.js';
|
|
16
|
+
export * from './with-report.js';
|
package/dist/features/index.js
CHANGED
|
@@ -8,6 +8,10 @@ export * from './vault-operations/index.js';
|
|
|
8
8
|
export * from './utils/index.js';
|
|
9
9
|
export * from './mint-burn/index.js';
|
|
10
10
|
export * from './deposits/index.js';
|
|
11
|
+
export * from './consolidation.js';
|
|
11
12
|
export * from './lazy-oracle.js';
|
|
12
|
-
export * from './defi-wrapper
|
|
13
|
+
export * from './defi-wrapper/index.js';
|
|
14
|
+
export * from './dev-tools/index.js';
|
|
15
|
+
export * from './metrics.js';
|
|
16
|
+
export * from './with-report.js';
|
|
13
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../features/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../features/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatEther } from 'viem';
|
|
2
|
-
import { printError, showSpinner, logResult } from '../utils/index.js';
|
|
2
|
+
import { printError, showSpinner, logResult, formatTimestamp } from '../utils/index.js';
|
|
3
3
|
import { getLazyOracleContract } from '../contracts/index.js';
|
|
4
4
|
export const getLazyOracleBaseInfo = async () => {
|
|
5
5
|
const hideSpinner = showSpinner();
|
|
@@ -25,7 +25,7 @@ export const getLazyOracleBaseInfo = async () => {
|
|
|
25
25
|
MAX_QUARANTINE_PERIOD: `${MAX_QUARANTINE_PERIOD} (${Number(MAX_QUARANTINE_PERIOD) / 3600} hours)`,
|
|
26
26
|
MAX_REWARD_RATIO,
|
|
27
27
|
MAX_LIDO_FEE_RATE_PER_SECOND,
|
|
28
|
-
latestReportTimestamp: `${latestReportTimestamp} (${
|
|
28
|
+
latestReportTimestamp: `${latestReportTimestamp} (${formatTimestamp(Number(latestReportTimestamp))})`,
|
|
29
29
|
quarantinePeriod: `${quarantinePeriod} (${Number(quarantinePeriod) / 3600} hours)`,
|
|
30
30
|
maxRewardRatioBP: `${maxRewardRatioBP} (${Number(maxRewardRatioBP) / 100} %)`,
|
|
31
31
|
maxLidoFeeRatePerSecond: `${maxLidoFeeRatePerSecond} (${formatEther(maxLidoFeeRatePerSecond)} ETH/s)`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-oracle.js","sourceRoot":"","sources":["../../features/lazy-oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"lazy-oracle.js","sourceRoot":"","sources":["../../features/lazy-oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,IAAI,EAAE;IAC9C,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,qBAAqB,EAAE,CAAC;QAE/C,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QACxD,MAAM,kBAAkB,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACpE,MA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tG,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DashboardContract } from '../contracts/index.js';
|
|
2
|
+
export declare const getNodeOperatorFeeRatesByBlockNumbers: (vaultAddress: string, blockNumbers: number[], dashboardContract: DashboardContract) => Promise<bigint[]>;
|
|
3
|
+
export declare const getSettledGrowthsByBlockNumbers: (vaultAddress: string, blockNumbers: number[], dashboardContract: DashboardContract) => Promise<bigint[]>;
|
|
4
|
+
export declare const getNodeOperatorAccruedFeeByBlockNumbers: (vaultAddress: string, blockNumbers: number[], dashboardContract: DashboardContract) => Promise<bigint[]>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { callReadMethodSilent, cache } from '../utils/index.js';
|
|
2
|
+
export const getNodeOperatorFeeRatesByBlockNumbers = async (vaultAddress, blockNumbers, dashboardContract) => {
|
|
3
|
+
// Get nodeOperatorFeeBP for each report block with caching
|
|
4
|
+
const nodeOperatorFeeBPs = [];
|
|
5
|
+
for (const blockNumber of blockNumbers) {
|
|
6
|
+
let fee = await cache.getNodeOperatorFeeRate(vaultAddress, blockNumber);
|
|
7
|
+
if (fee === null) {
|
|
8
|
+
const feeRate = await callReadMethodSilent(dashboardContract, 'feeRate', {
|
|
9
|
+
blockNumber: BigInt(blockNumber),
|
|
10
|
+
});
|
|
11
|
+
fee = BigInt(feeRate);
|
|
12
|
+
await cache.setNodeOperatorFeeRate(vaultAddress, blockNumber, fee);
|
|
13
|
+
}
|
|
14
|
+
nodeOperatorFeeBPs.push(fee);
|
|
15
|
+
}
|
|
16
|
+
return nodeOperatorFeeBPs;
|
|
17
|
+
};
|
|
18
|
+
export const getSettledGrowthsByBlockNumbers = async (vaultAddress, blockNumbers, dashboardContract) => {
|
|
19
|
+
// Get settled growth for each report block with caching
|
|
20
|
+
const settledGrowths = [];
|
|
21
|
+
for (const blockNumber of blockNumbers) {
|
|
22
|
+
let settledGrowth = await cache.getSettledGrowth(vaultAddress, blockNumber);
|
|
23
|
+
if (settledGrowth === null) {
|
|
24
|
+
settledGrowth = await callReadMethodSilent(dashboardContract, 'settledGrowth', {
|
|
25
|
+
blockNumber: BigInt(blockNumber),
|
|
26
|
+
});
|
|
27
|
+
await cache.setSettledGrowth(vaultAddress, blockNumber, settledGrowth);
|
|
28
|
+
}
|
|
29
|
+
settledGrowths.push(settledGrowth);
|
|
30
|
+
}
|
|
31
|
+
return settledGrowths;
|
|
32
|
+
};
|
|
33
|
+
export const getNodeOperatorAccruedFeeByBlockNumbers = async (vaultAddress, blockNumbers, dashboardContract) => {
|
|
34
|
+
// Get node operator accrued fee for each report block with caching
|
|
35
|
+
const nodeOperatorAccruedFees = [];
|
|
36
|
+
for (const blockNumber of blockNumbers) {
|
|
37
|
+
let nodeOperatorAccruedFee = await cache.getNodeOperatorAccruedFee(vaultAddress, blockNumber);
|
|
38
|
+
if (nodeOperatorAccruedFee === null) {
|
|
39
|
+
nodeOperatorAccruedFee = await callReadMethodSilent(dashboardContract, 'accruedFee', {
|
|
40
|
+
blockNumber: BigInt(blockNumber),
|
|
41
|
+
});
|
|
42
|
+
await cache.setNodeOperatorAccruedFee(vaultAddress, blockNumber, nodeOperatorAccruedFee);
|
|
43
|
+
}
|
|
44
|
+
nodeOperatorAccruedFees.push(nodeOperatorAccruedFee);
|
|
45
|
+
}
|
|
46
|
+
return nodeOperatorAccruedFees;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 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,eAAe,EACf;gBACE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;aACjC,CACF,CAAC;YACF,MAAM,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;QACzE,CAAC;QAED,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,KAAK,EAC1D,YAAoB,EACpB,YAAsB,EACtB,iBAAoC,EACpC,EAAE;IACF,mEAAmE;IACnE,MAAM,uBAAuB,GAAa,EAAE,CAAC;IAC7C,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,IAAI,sBAAsB,GAAG,MAAM,KAAK,CAAC,yBAAyB,CAChE,YAAY,EACZ,WAAW,CACZ,CAAC;QACF,IAAI,sBAAsB,KAAK,IAAI,EAAE,CAAC;YACpC,sBAAsB,GAAG,MAAM,oBAAoB,CACjD,iBAAiB,EACjB,YAAY,EACZ;gBACE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;aACjC,CACF,CAAC;YACF,MAAM,KAAK,CAAC,yBAAyB,CACnC,YAAY,EACZ,WAAW,EACX,sBAAsB,CACvB,CAAC;QACJ,CAAC;QAED,uBAAuB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { Hex, TransactionReceipt } from 'viem';
|
|
1
2
|
import { DashboardContract } from '../../contracts/index.js';
|
|
2
|
-
|
|
3
|
+
import { PopulatedTx } from '../../utils/index.js';
|
|
4
|
+
export declare const checkAllowance: (contract: DashboardContract, amount: bigint, token: "steth" | "wsteth" | "shares", populateTx?: boolean) => Promise<{
|
|
5
|
+
receipt?: TransactionReceipt;
|
|
6
|
+
tx?: Hex;
|
|
7
|
+
data?: PopulatedTx;
|
|
8
|
+
} | void>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { formatEther } from 'viem';
|
|
2
2
|
import { getStethContract, getWstethContract, } from '../../contracts/index.js';
|
|
3
3
|
import { getAccount } from '../../providers/index.js';
|
|
4
|
-
import {
|
|
5
|
-
export const checkAllowance = async (contract, amount, token) => {
|
|
4
|
+
import { callReadMethodSilent, callWriteMethodWithReceipt, confirmOperation, logInfo, } from '../../utils/index.js';
|
|
5
|
+
export const checkAllowance = async (contract, amount, token, populateTx) => {
|
|
6
6
|
const accountAddress = (await getAccount()).address;
|
|
7
7
|
const isShares = token === 'shares';
|
|
8
8
|
let currentAmount = amount;
|
|
9
9
|
if (token === 'steth' || isShares) {
|
|
10
10
|
const stethContract = await getStethContract();
|
|
11
|
-
const allowance = await
|
|
11
|
+
const allowance = await callReadMethodSilent(stethContract, 'allowance', [
|
|
12
12
|
accountAddress,
|
|
13
13
|
contract.address,
|
|
14
14
|
]);
|
|
@@ -20,28 +20,27 @@ export const checkAllowance = async (contract, amount, token) => {
|
|
|
20
20
|
const confirm = await confirmOperation(`Do you want to set allowance for ${formatEther(amount)} ${token} (${formatEther(currentAmount)} stETH) to ${contract.address} (Dashboard contract)? Current allowance: ${formatEther(allowance)} stETH`);
|
|
21
21
|
if (!confirm)
|
|
22
22
|
throw new Error('Allowance not set');
|
|
23
|
-
await callWriteMethodWithReceipt({
|
|
23
|
+
return await callWriteMethodWithReceipt({
|
|
24
24
|
contract: stethContract,
|
|
25
25
|
methodName: 'approve',
|
|
26
26
|
payload: [contract.address, currentAmount],
|
|
27
|
+
populateTx,
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
else {
|
|
31
32
|
const wstethContract = await getWstethContract();
|
|
32
|
-
const wstethAllowance = await
|
|
33
|
-
accountAddress,
|
|
34
|
-
accountAddress,
|
|
35
|
-
]);
|
|
33
|
+
const wstethAllowance = await callReadMethodSilent(wstethContract, 'allowance', [accountAddress, contract.address]);
|
|
36
34
|
if (wstethAllowance < amount) {
|
|
37
35
|
logInfo('Insufficient allowance');
|
|
38
36
|
const confirm = await confirmOperation(`Do you want to set allowance for ${formatEther(amount)} ${token} to ${contract.address} (Dashboard contract)? Current allowance: ${formatEther(wstethAllowance)} wstETH`);
|
|
39
37
|
if (!confirm)
|
|
40
38
|
throw new Error('Allowance not set');
|
|
41
|
-
await callWriteMethodWithReceipt({
|
|
39
|
+
return await callWriteMethodWithReceipt({
|
|
42
40
|
contract: wstethContract,
|
|
43
41
|
methodName: 'approve',
|
|
44
42
|
payload: [contract.address, amount],
|
|
43
|
+
populateTx,
|
|
45
44
|
});
|
|
46
45
|
}
|
|
47
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowance.js","sourceRoot":"","sources":["../../../features/mint-burn/allowance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"allowance.js","sourceRoot":"","sources":["../../../features/mint-burn/allowance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,MAAM,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAEhB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EAChB,OAAO,GAER,MAAM,OAAO,CAAC;AAEf,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,QAA2B,EAC3B,MAAc,EACd,KAAoC,EACpC,UAAoB,EAKZ,EAAE;IACV,MAAM,cAAc,GAAG,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC;IACpD,MAAM,QAAQ,GAAG,KAAK,KAAK,QAAQ,CAAC;IACpC,IAAI,aAAa,GAAG,MAAM,CAAC;IAE3B,IAAI,KAAK,KAAK,OAAO,IAAI,QAAQ,EAAE,CAAC;Q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OAAO,6CAA6C,WAAW,CAAC,eAAe,CAAC,SAAS,CAC1K,CAAC;YACF,IAAI,CAAC,OAAO;gBAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YAEnD,OAAO,MAAM,0BAA0B,CAAC;gBACtC,QAAQ,EAAE,cAAc;gBACxB,UAAU,EAAE,SAAS;gBACrB,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBACnC,UAAU;aACX,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
2
|
import { DashboardContract } from '../../contracts/index.js';
|
|
3
|
-
|
|
3
|
+
import { PopulatedTx } from '../../utils/index.js';
|
|
4
|
+
export declare const burnShares: (contract: DashboardContract, amountOfShares: bigint, vault: Address, method: "burnShares" | "burnWstETH", populatedAllowance?: PopulatedTx) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmBurn,
|
|
1
|
+
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmBurn, callWriteMethodWithCalls, } from '../../utils/index.js';
|
|
2
2
|
import { checkLiabilityShares } from '../index.js';
|
|
3
|
-
export const burnShares = async (contract, amountOfShares, vault, method) => {
|
|
3
|
+
export const burnShares = async (contract, amountOfShares, vault, method, populatedAllowance) => {
|
|
4
4
|
const type = method === 'burnShares' ? 'shares' : 'wstETH';
|
|
5
5
|
const isLiabilitySharesOk = await checkLiabilityShares(contract, amountOfShares);
|
|
6
6
|
if (!isLiabilitySharesOk)
|
|
@@ -24,10 +24,11 @@ export const burnShares = async (contract, amountOfShares, vault, method) => {
|
|
|
24
24
|
});
|
|
25
25
|
if (!confirm)
|
|
26
26
|
return;
|
|
27
|
-
await
|
|
27
|
+
await callWriteMethodWithCalls({
|
|
28
28
|
contract,
|
|
29
29
|
methodName: method,
|
|
30
30
|
payload: [amountOfShares],
|
|
31
|
+
calls: [...(populatedAllowance ? [populatedAllowance] : [])],
|
|
31
32
|
});
|
|
32
33
|
};
|
|
33
34
|
//# sourceMappingURL=burn-shares.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burn-shares.js","sourceRoot":"","sources":["../../../features/mint-burn/burn-shares.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,
|
|
1
|
+
{"version":3,"file":"burn-shares.js","sourceRoot":"","sources":["../../../features/mint-burn/burn-shares.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,EAEX,wBAAwB,GACzB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,QAA2B,EAC3B,cAAsB,EACtB,KAAc,EACd,MAAmC,EACnC,kBAAgC,EAChC,EAAE;IACF,MAAM,IAAI,GAAG,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE3D,MAAM,mBAAmB,GAAG,MAAM,oBAAoB,CACpD,QAAQ,EACR,cAAc,CACf,CAAC;IACF,IAAI,CAAC,mBAAmB;QAAE,OAAO;IAEjC,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,MAAM,EACJ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,EACf,eAAe,EACf,yBAAyB,GAC1B,GAAG,MAAM,wCAAwC,CAChD,QAAQ,EACR,cAAc,EACd,MAAM,CACP,CAAC;IACF,WAAW,EAAE,CAAC;IAEd,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC;QAChC,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,cAAc;QAC5B,sBAAsB,EAAE,eAAe;QACvC,kBAAkB,EAAE,kBAAkB;QACtC,4BAA4B,EAAE,4BAA4B;QAC1D,sBAAsB,EAAE,eAAe;QACvC,gCAAgC,EAAE,yBAAyB;QAC3D,cAAc,EAAE,cAAc,CAAC,WAAW;QAC1C,kBAAkB,EAAE,kBAAkB,CAAC,WAAW;QAClD,YAAY,EAAE,cAAc,CAAC,SAAS;QACtC,gBAAgB,EAAE,kBAAkB,CAAC,SAAS;QAC9C,IAAI;KACL,CAAC,CAAC;IACH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,wBAAwB,CAAC;QAC7B,QAAQ;QACR,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,KAAK,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC7D,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
2
|
import { DashboardContract } from '../../contracts/index.js';
|
|
3
|
-
|
|
3
|
+
import { PopulatedTx } from '../../utils/index.js';
|
|
4
|
+
export declare const burnSteth: (contract: DashboardContract, amountOfSteth: bigint, vault: Address, populatedAllowance?: PopulatedTx) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getStethContract } from '../../contracts/index.js';
|
|
2
|
-
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmBurn,
|
|
2
|
+
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmBurn, callReadMethodSilent, callWriteMethodWithCalls, } from '../../utils/index.js';
|
|
3
3
|
import { checkLiabilityShares } from '../index.js';
|
|
4
|
-
export const burnSteth = async (contract, amountOfSteth, vault) => {
|
|
4
|
+
export const burnSteth = async (contract, amountOfSteth, vault, populatedAllowance) => {
|
|
5
5
|
const stethContract = await getStethContract();
|
|
6
6
|
const amountOfShares = await callReadMethodSilent(stethContract, 'getSharesByPooledEth', [amountOfSteth]);
|
|
7
7
|
const isLiabilitySharesOk = await checkLiabilityShares(contract, amountOfShares);
|
|
@@ -26,10 +26,11 @@ export const burnSteth = async (contract, amountOfSteth, vault) => {
|
|
|
26
26
|
});
|
|
27
27
|
if (!confirm)
|
|
28
28
|
return;
|
|
29
|
-
await
|
|
29
|
+
await callWriteMethodWithCalls({
|
|
30
30
|
contract,
|
|
31
31
|
methodName: 'burnStETH',
|
|
32
32
|
payload: [amountOfSteth],
|
|
33
|
+
calls: [...(populatedAllowance ? [populatedAllowance] : [])],
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
36
|
//# sourceMappingURL=burn-steth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burn-steth.js","sourceRoot":"","sources":["../../../features/mint-burn/burn-steth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"burn-steth.js","sourceRoot":"","sources":["../../../features/mint-burn/burn-steth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,EACX,oBAAoB,EAEpB,wBAAwB,GACzB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,QAA2B,EAC3B,aAAqB,EACrB,KAAc,EACd,kBAAgC,EAChC,EAAE;IACF,MAAM,aAAa,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,oBAAoB,CAC/C,aAAa,EACb,sBAAsB,EACtB,CAAC,aAAa,CAAC,CAChB,CAAC;IAEF,MAAM,mBAAmB,GAAG,MAAM,oBAAoB,CACpD,QAAQ,EACR,cAAc,CACf,CAAC;IACF,IAAI,CAAC,mBAAmB;QAAE,OAAO;IAEjC,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,MAAM,EACJ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,EACf,eAAe,EACf,yBAAyB,GAC1B,GAAG,MAAM,wCAAwC,CAChD,QAAQ,EACR,cAAc,EACd,MAAM,CACP,CAAC;IACF,WAAW,EAAE,CAAC;IAEd,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC;QAChC,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,aAAa;QAC3B,sBAAsB,EAAE,eAAe;QACvC,kBAAkB,EAAE,kBAAkB;QACtC,4BAA4B,EAAE,4BAA4B;QAC1D,sBAAsB,EAAE,eAAe;QACvC,gCAAgC,EAAE,yBAAyB;QAC3D,cAAc,EAAE,cAAc,CAAC,WAAW;QAC1C,kBAAkB,EAAE,kBAAkB,CAAC,WAAW;QAClD,YAAY,EAAE,cAAc,CAAC,SAAS;QACtC,gBAAgB,EAAE,kBAAkB,CAAC,SAAS;QAC9C,IAAI,EAAE,OAAO;KACd,CAAC,CAAC;IACH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,wBAAwB,CAAC;QAC7B,QAAQ;QACR,UAAU,EAAE,WAAW;QACvB,OAAO,EAAE,CAAC,aAAa,CAAC;QACxB,KAAK,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC7D,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmMint,
|
|
2
|
-
import {
|
|
1
|
+
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmMint, } from '../../utils/index.js';
|
|
2
|
+
import { callWriteMethodsWithReportFresh, checkMintingCapacity, } from '../index.js';
|
|
3
3
|
export const mintShares = async (contract, recipient, amountOfShares, vault, method) => {
|
|
4
4
|
const type = method === 'mintShares' ? 'shares' : 'wstETH';
|
|
5
|
-
const isReportFresh = await checkIsReportFresh(vault);
|
|
6
|
-
if (!isReportFresh)
|
|
7
|
-
return;
|
|
8
5
|
const isMintingCapacityOk = await checkMintingCapacity(contract, amountOfShares);
|
|
9
6
|
if (!isMintingCapacityOk)
|
|
10
7
|
return;
|
|
@@ -28,7 +25,8 @@ export const mintShares = async (contract, recipient, amountOfShares, vault, met
|
|
|
28
25
|
});
|
|
29
26
|
if (!confirm)
|
|
30
27
|
return;
|
|
31
|
-
await
|
|
28
|
+
await callWriteMethodsWithReportFresh({
|
|
29
|
+
vault,
|
|
32
30
|
contract,
|
|
33
31
|
methodName: method,
|
|
34
32
|
payload: [recipient, amountOfShares],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mint-shares.js","sourceRoot":"","sources":["../../../features/mint-burn/mint-shares.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,
|
|
1
|
+
{"version":3,"file":"mint-shares.js","sourceRoot":"","sources":["../../../features/mint-burn/mint-shares.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,GACZ,MAAM,OAAO,CAAC;AACf,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAElB,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,QAA2B,EAC3B,SAAkB,EAClB,cAAsB,EACtB,KAAc,EACd,MAAmC,EACnC,EAAE;IACF,MAAM,IAAI,GAAG,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE3D,MAAM,mBAAmB,GAAG,MAAM,oBAAoB,CACpD,QAAQ,EACR,cAAc,CACf,CAAC;IACF,IAAI,CAAC,mBAAmB;QAAE,OAAO;IAEjC,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,MAAM,EACJ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,EACf,yBAAyB,EACzB,eAAe,GAChB,GAAG,MAAM,wCAAwC,CAChD,QAAQ,EACR,cAAc,EACd,MAAM,CACP,CAAC;IACF,WAAW,EAAE,CAAC;IAEd,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC;QAChC,YAAY,EAAE,KAAK;QACnB,SAAS;QACT,YAAY,EAAE,cAAc;QAC5B,sBAAsB,EAAE,eAAe;QACvC,kBAAkB,EAAE,kBAAkB;QACtC,4BAA4B,EAAE,4BAA4B;QAC1D,sBAAsB,EAAE,eAAe;QACvC,gCAAgC,EAAE,yBAAyB;QAC3D,cAAc,EAAE,cAAc,CAAC,WAAW;QAC1C,kBAAkB,EAAE,kBAAkB,CAAC,WAAW;QAClD,YAAY,EAAE,cAAc,CAAC,SAAS;QACtC,gBAAgB,EAAE,kBAAkB,CAAC,SAAS;QAC9C,IAAI;KACL,CAAC,CAAC;IACH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,+BAA+B,CAAC;QACpC,KAAK;QACL,QAAQ;QACR,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC;KACrC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { getStethContract } from '../../contracts/index.js';
|
|
2
|
-
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmMint,
|
|
3
|
-
import {
|
|
2
|
+
import { fetchAndCalculateVaultHealthWithNewValue, showSpinner, confirmMint, callReadMethodSilent, } from '../../utils/index.js';
|
|
3
|
+
import { callWriteMethodsWithReportFresh, checkMintingCapacity, } from '../index.js';
|
|
4
4
|
export const mintSteth = async (contract, recipient, amountOfSteth, vault) => {
|
|
5
5
|
const stethContract = await getStethContract();
|
|
6
6
|
const amountOfShares = await callReadMethodSilent(stethContract, 'getSharesByPooledEth', [amountOfSteth]);
|
|
7
|
-
const isReportFresh = await checkIsReportFresh(vault);
|
|
8
|
-
if (!isReportFresh)
|
|
9
|
-
return;
|
|
10
7
|
const isMintingCapacityOk = await checkMintingCapacity(contract, amountOfShares);
|
|
11
8
|
if (!isMintingCapacityOk)
|
|
12
9
|
return;
|
|
@@ -30,7 +27,8 @@ export const mintSteth = async (contract, recipient, amountOfSteth, vault) => {
|
|
|
30
27
|
});
|
|
31
28
|
if (!confirm)
|
|
32
29
|
return;
|
|
33
|
-
await
|
|
30
|
+
await callWriteMethodsWithReportFresh({
|
|
31
|
+
vault,
|
|
34
32
|
contract,
|
|
35
33
|
methodName: 'mintStETH',
|
|
36
34
|
payload: [recipient, amountOfSteth],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mint-steth.js","sourceRoot":"","sources":["../../../features/mint-burn/mint-steth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"mint-steth.js","sourceRoot":"","sources":["../../../features/mint-burn/mint-steth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,wCAAwC,EACxC,WAAW,EACX,WAAW,EACX,oBAAoB,GACrB,MAAM,OAAO,CAAC;AACf,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAElB,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,QAA2B,EAC3B,SAAkB,EAClB,aAAqB,EACrB,KAAc,EACd,EAAE;IACF,MAAM,aAAa,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,oBAAoB,CAC/C,aAAa,EACb,sBAAsB,EACtB,CAAC,aAAa,CAAC,CAChB,CAAC;IAEF,MAAM,mBAAmB,GAAG,MAAM,oBAAoB,CACpD,QAAQ,EACR,cAAc,CACf,CAAC;IACF,IAAI,CAAC,mBAAmB;QAAE,OAAO;IAEjC,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,MAAM,EACJ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,EACf,yBAAyB,EACzB,eAAe,GAChB,GAAG,MAAM,wCAAwC,CAChD,QAAQ,EACR,cAAc,EACd,MAAM,CACP,CAAC;IACF,WAAW,EAAE,CAAC;IAEd,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC;QAChC,YAAY,EAAE,KAAK;QACnB,SAAS;QACT,YAAY,EAAE,cAAc;QAC5B,sBAAsB,EAAE,eAAe;QACvC,kBAAkB,EAAE,kBAAkB;QACtC,4BAA4B,EAAE,4BAA4B;QAC1D,sBAAsB,EAAE,eAAe;QACvC,gCAAgC,EAAE,yBAAyB;QAC3D,cAAc,EAAE,cAAc,CAAC,WAAW;QAC1C,kBAAkB,EAAE,kBAAkB,CAAC,WAAW;QAClD,YAAY,EAAE,cAAc,CAAC,SAAS;QACtC,gBAAgB,EAAE,kBAAkB,CAAC,SAAS;QAC9C,IAAI,EAAE,OAAO;KACd,CAAC,CAAC;IACH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,+BAA+B,CAAC;QACpC,KAAK;QACL,QAAQ;QACR,UAAU,EAAE,WAAW;QACvB,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;KACpC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/dist/features/pdg.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { printError, showSpinner, logResult, callReadMethodSilent, toHex, } from '../utils/index.js';
|
|
2
2
|
import { getPredepositGuaranteeContract } from '../contracts/index.js';
|
|
3
|
+
import { checkPdgIsPaused } from './deposits/pdg.js';
|
|
3
4
|
export const VALIDATOR_STAGES = {
|
|
4
5
|
0: 'NONE',
|
|
5
6
|
1: 'PREDEPOSITED',
|
|
@@ -50,6 +51,7 @@ export const getPdgBaseInfo = async () => {
|
|
|
50
51
|
logResult({
|
|
51
52
|
data: Object.entries(payload).map(([key, value]) => [key, value]),
|
|
52
53
|
});
|
|
54
|
+
await checkPdgIsPaused(contract);
|
|
53
55
|
}
|
|
54
56
|
catch (err) {
|
|
55
57
|
hideSpinner();
|
|
@@ -83,6 +85,7 @@ export const getPdgRoles = async () => {
|
|
|
83
85
|
head: ['Role', 'Keccak', 'Members'],
|
|
84
86
|
},
|
|
85
87
|
});
|
|
88
|
+
await checkPdgIsPaused(contract);
|
|
86
89
|
}
|
|
87
90
|
catch (err) {
|
|
88
91
|
hideSpinner();
|
|
@@ -105,6 +108,7 @@ export const getValidatorStatus = async (validatorPubkey) => {
|
|
|
105
108
|
['Node operator', nodeOperator],
|
|
106
109
|
],
|
|
107
110
|
});
|
|
111
|
+
await checkPdgIsPaused(contract);
|
|
108
112
|
}
|
|
109
113
|
catch (err) {
|
|
110
114
|
hideSpinner();
|
package/dist/features/pdg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdg.js","sourceRoot":"","sources":["../../features/pdg.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pdg.js","sourceRoot":"","sources":["../../features/pdg.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,cAAc;IACjB,CAAC,EAAE,QAAQ;IACX,CA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AC,KAAsC,CAAC,CAAC;QAC3D,SAAS,CAAC;YACR,IAAI,EAAE;gBACJ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACxC,CAAC,OAAO,EAAE,GAAG,cAAc,KAAK,KAAK,GAAG,CAAC;gBACzC,CAAC,eAAe,EAAE,YAAY,CAAC;gBAC/B,CAAC,eAAe,EAAE,YAAY,CAAC;aAChC;SACF,CAAC,CAAC;QAEH,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,EAAE,CAAC;QACd,UAAU,CAAC,GAAG,EAAE,qCAAqC,CAAC,CAAC;IACzD,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getVaultHubContract } from '../../contracts/index.js';
|
|
2
|
+
import { callReadMethodSilent, logInfo } from '../../utils/index.js';
|
|
3
|
+
export const checkIsDisconnected = async (vault) => {
|
|
4
|
+
const vaultHubContract = await getVaultHubContract();
|
|
5
|
+
const connection = await callReadMethodSilent(vaultHubContract, 'vaultConnection', [vault]);
|
|
6
|
+
const isDisconnected = connection.owner === '0x0000000000000000000000000000000000000000' ||
|
|
7
|
+
connection.vaultIndex === 0n;
|
|
8
|
+
if (isDisconnected) {
|
|
9
|
+
logInfo('⚠️ The vault is not connected to VaultHub ⚠️');
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../features/utils/connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAE,KAAc,EAAE,EAAE;IAC1D,MAAM,gBAAgB,GAAG,MAAM,mBAAmB,EAAE,CAAC;IACrD,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAC3C,gBAAgB,EAChB,iBAAiB,EACjB,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,MAAM,cAAc,GAClB,UAAU,CAAC,KAAK,KAAK,4CAA4C;QACjE,UAAU,CAAC,UAAU,KAAK,EAAE,CAAC;IAE/B,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CAAC,gDAAgD,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getBoolean: (flag: boolean | undefined, name: string) => Promise<boolean>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { confirmOperation } from '../../utils/index.js';
|
|
2
|
+
export const getBoolean = async (flag, name) => {
|
|
3
|
+
// if user provided a flag we ask for confirmation
|
|
4
|
+
if (typeof flag === 'boolean') {
|
|
5
|
+
const confirmOption = await confirmOperation(`Do you want to set ${name} to ${flag}?`);
|
|
6
|
+
if (confirmOption)
|
|
7
|
+
return flag;
|
|
8
|
+
// if user does not confirm option we prompt for value
|
|
9
|
+
}
|
|
10
|
+
const confirm = await confirmOperation(`Do you want to enable ${name}?`);
|
|
11
|
+
return confirm;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=get-boolean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-boolean.js","sourceRoot":"","sources":["../../../features/utils/get-boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,IAAyB,EAAE,IAAY,EAAE,EAAE;IAC1E,kDAAkD;IAClD,IAAI,OAAO,IAAI,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAC1C,sBAAsB,IAAI,OAAO,IAAI,GAAG,CACzC,CAAC;QACF,IAAI,aAAa;YAAE,OAAO,IAAI,CAAC;QAC/B,sDAAsD;IACxD,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC,yBAAyB,IAAI,GAAG,CAAC,CAAC;IACzE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../features/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../features/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { formatEther } from 'viem';
|
|
1
2
|
import { callReadMethodSilent, logError } from '../../utils/index.js';
|
|
2
3
|
export const checkLiabilityShares = async (contract, amountOfShares) => {
|
|
3
4
|
const liabilityShares = await callReadMethodSilent(contract, 'liabilityShares');
|
|
4
5
|
if (amountOfShares > liabilityShares) {
|
|
5
|
-
logError(
|
|
6
|
+
logError(`Cannot burn more shares than the liability shares (Liability shares: ${formatEther(liabilityShares)}, Amount of shares to burn: ${formatEther(amountOfShares)})`);
|
|
6
7
|
return false;
|
|
7
8
|
}
|
|
8
9
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liability-shares.js","sourceRoot":"","sources":["../../../features/utils/liability-shares.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"liability-shares.js","sourceRoot":"","sources":["../../../features/utils/liability-shares.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAA2B,EAC3B,cAAsB,EACtB,EAAE;IACF,MAAM,eAAe,GAAG,MAAM,oBAAoB,CAChD,QAAQ,EACR,iBAAiB,CAClB,CAAC;IAEF,IAAI,cAAc,GAAG,eAAe,EAAE,CAAC;QACrC,QAAQ,CACN,wEAAwE,WAAW,CAAC,eAAe,CAAC,+BAA+B,WAAW,CAAC,cAAc,CAAC,GAAG,CAClK,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -16,6 +16,7 @@ export const checkQuarantine = async (vault) => {
|
|
|
16
16
|
const quarantineLeftSeconds = quarantine.endTimestamp - quarantine.startTimestamp;
|
|
17
17
|
const quarantineLeftHours = Math.floor((Number(quarantineLeftSeconds) * 1000) / (1000 * 60 * 60));
|
|
18
18
|
const pendingTotalValueIncrease = formatEther(quarantine.pendingTotalValueIncrease);
|
|
19
|
+
const totalValueRemainder = formatEther(quarantine.totalValueRemainder);
|
|
19
20
|
logInfo('⚠️ Warning: Part of the vault capital on CL is in quarantine');
|
|
20
21
|
logInfo(`${pendingTotalValueIncrease} ETH will be added to the vault at ${endTimestamp} (after ${quarantineLeftHours} hours)`);
|
|
21
22
|
logTable({
|
|
@@ -23,6 +24,7 @@ export const checkQuarantine = async (vault) => {
|
|
|
23
24
|
['Vault', vault],
|
|
24
25
|
['Quarantine status', quarantine.isActive ? 'Active' : 'Inactive'],
|
|
25
26
|
['Pending total value increase, ETH', pendingTotalValueIncrease],
|
|
27
|
+
['Total value remainder, ETH', totalValueRemainder],
|
|
26
28
|
['Start timestamp', `${quarantine.startTimestamp} (${startTimestamp})`],
|
|
27
29
|
['End timestamp', `${quarantine.endTimestamp} (${endTimestamp})`],
|
|
28
30
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quarantine.js","sourceRoot":"","sources":["../../../features/utils/quarantine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,MAAM,MAAM,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,gBAAgB,GACjB,MAAM,OAAO,CAAC;AAEf,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,KAAc,EAAE,EAAE;IACtD,MAAM,kBAAkB,GAAG,MAAM,qBAAqB,EAAE,CAAC;IAEzD,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAC3C,kBAAkB,EAClB,iBAAiB,EACjB,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,IAAI,CAAC,UAAU,CAAC,QAAQ;QACtB,OAAO;YACL,UAAU;YACV,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,IAAI;SAChB,CAAC;IAEJ,MAAM,cAAc,GAAG,IAAI,IAAI,CAC7B,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CACzC,CAAC,cAAc,EAAE,CAAC;IACnB,MAAM,YAAY,GAAG,IAAI,IAAI,CAC3B,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CACvC,CAAC,cAAc,EAAE,CAAC;IACnB,MAAM,qBAAqB,GACzB,UAAU,CAAC,YAAY,GAAG,UAAU,CAAC,cAAc,CAAC;IACtD,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CACpC,CAAC,MAAM,CAAC,qBAAqB,C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