@lidofinance/lsv-cli 1.0.0-alpha.61 → 1.0.0-alpha.62
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 +1 -1
- package/dist/abi/Dashboard.d.ts +706 -445
- package/dist/abi/Dashboard.js +331 -300
- package/dist/abi/Dashboard.js.map +1 -1
- package/dist/abi/LazyOracle.d.ts +278 -27
- package/dist/abi/LazyOracle.js +352 -27
- package/dist/abi/LazyOracle.js.map +1 -1
- package/dist/abi/LidoLocator.d.ts +28 -0
- package/dist/abi/LidoLocator.js +36 -0
- package/dist/abi/LidoLocator.js.map +1 -1
- package/dist/abi/OperatorGrid.d.ts +166 -1
- package/dist/abi/OperatorGrid.js +174 -1
- package/dist/abi/OperatorGrid.js.map +1 -1
- package/dist/abi/PredepositGuarantee.d.ts +181 -139
- package/dist/abi/PredepositGuarantee.js +191 -166
- package/dist/abi/PredepositGuarantee.js.map +1 -1
- package/dist/abi/StEth.d.ts +1 -1
- package/dist/abi/StEth.js +1 -1
- package/dist/abi/StEth.js.map +1 -1
- package/dist/abi/StakingVault.d.ts +184 -32
- package/dist/abi/StakingVault.js +203 -37
- package/dist/abi/StakingVault.js.map +1 -1
- package/dist/abi/VaultFactory.d.ts +470 -72
- package/dist/abi/VaultFactory.js +24 -1
- package/dist/abi/VaultFactory.js.map +1 -1
- package/dist/abi/VaultHub.d.ts +416 -420
- package/dist/abi/VaultHub.js +349 -398
- package/dist/abi/VaultHub.js.map +1 -1
- package/dist/abi/VaultViewer.d.ts +74 -42
- package/dist/abi/VaultViewer.js +82 -42
- package/dist/abi/VaultViewer.js.map +1 -1
- package/dist/abi/index.d.ts +0 -2
- package/dist/abi/index.js +0 -2
- package/dist/abi/index.js.map +1 -1
- package/dist/contracts/index.d.ts +0 -1
- package/dist/contracts/index.js +0 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/locator.d.ts +1428 -12
- package/dist/contracts/steth.d.ts +74 -74
- package/dist/contracts/vault-factory.d.ts +15731 -5838
- package/dist/contracts/vault-viewer.d.ts +1360 -768
- package/dist/contracts/vault-viewer.js +1 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.js +1 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/lazy-oracle.d.ts +1 -0
- package/dist/features/lazy-oracle.js +42 -0
- package/dist/features/lazy-oracle.js.map +1 -0
- package/dist/features/vault-hub.js +0 -4
- package/dist/features/vault-hub.js.map +1 -1
- package/dist/features/vault-operations/dashboard-by-vault.d.ts +2 -1
- package/dist/features/vault-operations/dashboard-by-vault.js +3 -1
- package/dist/features/vault-operations/dashboard-by-vault.js.map +1 -1
- package/dist/features/vault-operations/vault-health.js +2 -2
- package/dist/features/vault-operations/vault-health.js.map +1 -1
- package/dist/features/vault-operations/vault-info.js +29 -32
- package/dist/features/vault-operations/vault-info.js.map +1 -1
- package/dist/features/vault-operations/vault-overview.js +35 -28
- package/dist/features/vault-operations/vault-overview.js.map +1 -1
- package/dist/features/vault-operations/vault-roles.d.ts +1 -1
- package/dist/features/vault-operations/vault-roles.js +6 -6
- package/dist/features/vault-operations/vault-roles.js.map +1 -1
- package/dist/features/vault.js +4 -2
- package/dist/features/vault.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/programs/contracts/dashboard/config.js +49 -40
- package/dist/programs/contracts/dashboard/config.js.map +1 -1
- package/dist/programs/contracts/dashboard/read.js +38 -3
- package/dist/programs/contracts/dashboard/read.js.map +1 -1
- package/dist/programs/contracts/dashboard/write.js +121 -84
- package/dist/programs/contracts/dashboard/write.js.map +1 -1
- package/dist/programs/contracts/hub/config.js +7 -17
- package/dist/programs/contracts/hub/config.js.map +1 -1
- package/dist/programs/contracts/hub/write.js +7 -69
- package/dist/programs/contracts/hub/write.js.map +1 -1
- package/dist/programs/contracts/lazy-oracle/config.js +5 -0
- package/dist/programs/contracts/lazy-oracle/config.js.map +1 -1
- package/dist/programs/contracts/lazy-oracle/read.js +7 -0
- package/dist/programs/contracts/lazy-oracle/read.js.map +1 -1
- package/dist/programs/contracts/operator-grid/config.js +21 -10
- package/dist/programs/contracts/operator-grid/config.js.map +1 -1
- package/dist/programs/contracts/operator-grid/read.js +21 -1
- package/dist/programs/contracts/operator-grid/read.js.map +1 -1
- package/dist/programs/contracts/operator-grid/write.js +48 -6
- package/dist/programs/contracts/operator-grid/write.js.map +1 -1
- package/dist/programs/contracts/pdg/config.js +9 -2
- package/dist/programs/contracts/pdg/config.js.map +1 -1
- package/dist/programs/contracts/pdg/read.js +16 -1
- package/dist/programs/contracts/pdg/read.js.map +1 -1
- package/dist/programs/contracts/pdg/write.js +26 -89
- package/dist/programs/contracts/pdg/write.js.map +1 -1
- package/dist/programs/contracts/vault/config.js +12 -0
- package/dist/programs/contracts/vault/config.js.map +1 -1
- package/dist/programs/contracts/vault/write.js +84 -20
- package/dist/programs/contracts/vault/write.js.map +1 -1
- package/dist/programs/use-cases/deposits/read.js +19 -2
- package/dist/programs/use-cases/deposits/read.js.map +1 -1
- package/dist/programs/use-cases/deposits/write.js +22 -32
- package/dist/programs/use-cases/deposits/write.js.map +1 -1
- package/dist/programs/use-cases/metrics/read.js +7 -6
- package/dist/programs/use-cases/metrics/read.js.map +1 -1
- package/dist/programs/use-cases/report/read.js +14 -7
- package/dist/programs/use-cases/report/read.js.map +1 -1
- package/dist/programs/use-cases/report/write.js +4 -2
- package/dist/programs/use-cases/report/write.js.map +1 -1
- package/dist/programs/use-cases/vault-operations/create-vault.js +6 -2
- package/dist/programs/use-cases/vault-operations/create-vault.js.map +1 -1
- package/dist/programs/use-cases/vault-operations/write.js +98 -8
- package/dist/programs/use-cases/vault-operations/write.js.map +1 -1
- package/dist/providers/wallet.d.ts +60 -60
- package/dist/tests/utils/calculate-overview.test.js +1 -1
- package/dist/tests/utils/calculate-overview.test.js.map +1 -1
- package/dist/tests/utils/health.test.js +2 -2
- package/dist/tests/utils/health.test.js.map +1 -1
- package/dist/types/common.d.ts +4 -0
- package/dist/utils/arguments.d.ts +3 -1
- package/dist/utils/arguments.js +39 -0
- package/dist/utils/arguments.js.map +1 -1
- package/dist/utils/calculate-overview-v2.d.ts +4 -2
- package/dist/utils/calculate-overview-v2.js +5 -8
- package/dist/utils/calculate-overview-v2.js.map +1 -1
- package/dist/utils/calculate-overview.d.ts +1 -1
- 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 +2 -1
- package/dist/utils/charts/blessed/charts-apr.js.map +1 -1
- package/dist/utils/charts/blessed/charts-rewards.js +2 -1
- package/dist/utils/charts/blessed/charts-rewards.js.map +1 -1
- package/dist/utils/charts/overview.d.ts +1 -1
- package/dist/utils/charts/overview.js +1 -1
- package/dist/utils/charts/overview.js.map +1 -1
- package/dist/utils/charts/simple/simple-charts.js +2 -1
- package/dist/utils/charts/simple/simple-charts.js.map +1 -1
- package/dist/utils/commands/confirmations.d.ts +7 -3
- package/dist/utils/commands/confirmations.js +39 -29
- package/dist/utils/commands/confirmations.js.map +1 -1
- package/dist/utils/commands/report.js +2 -1
- package/dist/utils/commands/report.js.map +1 -1
- package/dist/utils/health/calculate-health.d.ts +1 -1
- package/dist/utils/health/calculate-health.js +2 -2
- package/dist/utils/health/calculate-health.js.map +1 -1
- package/dist/utils/health/health-utils.d.ts +77 -77
- package/dist/utils/health/health-utils.js +11 -10
- package/dist/utils/health/health-utils.js.map +1 -1
- package/dist/utils/report/report.js +1 -0
- package/dist/utils/report/report.js.map +1 -1
- package/dist/utils/report/statistic-data.js +2 -2
- package/dist/utils/report/statistic-data.js.map +1 -1
- package/dist/utils/report/types.d.ts +10 -2
- package/dist/utils/statistic/report-statistic.js +13 -14
- package/dist/utils/statistic/report-statistic.js.map +1 -1
- package/dist/utils/transactions/tx-wc.js +15 -2
- package/dist/utils/transactions/tx-wc.js.map +1 -1
- package/dist/utils/wallet-connect.d.ts +40 -40
- package/dist/version/index.js +1 -1
- package/package.json +12 -2
- package/dist/abi/TokenManager.d.ts +0 -577
- package/dist/abi/TokenManager.js +0 -756
- package/dist/abi/TokenManager.js.map +0 -1
- package/dist/abi/Voting.d.ts +0 -676
- package/dist/abi/Voting.js +0 -884
- package/dist/abi/Voting.js.map +0 -1
- package/dist/contracts/token-manager.d.ts +0 -3
- package/dist/contracts/token-manager.js +0 -13
- package/dist/contracts/token-manager.js.map +0 -1
|
@@ -16,18 +16,6 @@ export const readCommandConfig = {
|
|
|
16
16
|
name: 'total-value',
|
|
17
17
|
description: 'get the total value of the vault in ether',
|
|
18
18
|
},
|
|
19
|
-
infraFeeBP: {
|
|
20
|
-
name: 'infra-fee',
|
|
21
|
-
description: 'get infra fee basis points.',
|
|
22
|
-
},
|
|
23
|
-
liquidityFeeBP: {
|
|
24
|
-
name: 'liquidity-fee',
|
|
25
|
-
description: 'get liquidity fee basis points',
|
|
26
|
-
},
|
|
27
|
-
reservationFeeBP: {
|
|
28
|
-
name: 'reservation-fee',
|
|
29
|
-
description: 'get reservation fee basis points',
|
|
30
|
-
},
|
|
31
19
|
totalMintingCapacityShares: {
|
|
32
20
|
name: 'total-minting-capacity',
|
|
33
21
|
description: 'get the overall capacity for stETH shares that can be minted by the vault',
|
|
@@ -40,18 +28,6 @@ export const readCommandConfig = {
|
|
|
40
28
|
name: 'liability-shares',
|
|
41
29
|
description: 'get the number of stETHshares minted',
|
|
42
30
|
},
|
|
43
|
-
shareLimit: {
|
|
44
|
-
name: 's-limit',
|
|
45
|
-
description: 'get the stETH share limit of the vault',
|
|
46
|
-
},
|
|
47
|
-
reserveRatioBP: {
|
|
48
|
-
name: 'reserve-ratio',
|
|
49
|
-
description: 'get reserve ratio in basis points',
|
|
50
|
-
},
|
|
51
|
-
forcedRebalanceThresholdBP: {
|
|
52
|
-
name: 'force-rebalance-threshold',
|
|
53
|
-
description: 'get the rebalance threshold of the vault in basis points',
|
|
54
|
-
},
|
|
55
31
|
remainingMintingCapacityShares: {
|
|
56
32
|
name: 'remaining-minting-capacity',
|
|
57
33
|
description: 'get the remaining capacity for stETH shares that can be minted by the vault if additional ether is funded',
|
|
@@ -71,22 +47,14 @@ export const readCommandConfig = {
|
|
|
71
47
|
name: 'has-role',
|
|
72
48
|
description: 'get has role by role and account',
|
|
73
49
|
},
|
|
74
|
-
|
|
75
|
-
name: 'no-
|
|
76
|
-
description: 'get the node operator`s
|
|
77
|
-
},
|
|
78
|
-
feePeriodStartReport: {
|
|
79
|
-
name: 'no-fee-report',
|
|
80
|
-
description: 'get last report for which node operator fee was disbursed. Updated on each disbursement',
|
|
50
|
+
accruedFee: {
|
|
51
|
+
name: 'no-accrued-fee',
|
|
52
|
+
description: 'get the node operator`s accrued fee',
|
|
81
53
|
},
|
|
82
|
-
|
|
54
|
+
feeRate: {
|
|
83
55
|
name: 'no-fee-rate',
|
|
84
56
|
description: 'get node operator fee rate in basis points',
|
|
85
57
|
},
|
|
86
|
-
rewardsAdjustment: {
|
|
87
|
-
name: 'rewards-adjustment',
|
|
88
|
-
description: 'get rewards offset that excludes side deposits and consolidations',
|
|
89
|
-
},
|
|
90
58
|
confirmation: {
|
|
91
59
|
name: 'confirmation',
|
|
92
60
|
description: 'get the confirmation expiry for a given call data and confirmer',
|
|
@@ -95,10 +63,6 @@ export const readCommandConfig = {
|
|
|
95
63
|
name: 'get-confirm-expiry',
|
|
96
64
|
description: 'get the confirmation expiry',
|
|
97
65
|
},
|
|
98
|
-
MANUAL_REWARDS_ADJUSTMENT_LIMIT: {
|
|
99
|
-
name: 'manual-rewards-adjustment-limit',
|
|
100
|
-
description: 'get the maximum value that can be set via manual adjustment',
|
|
101
|
-
},
|
|
102
66
|
MAX_CONFIRM_EXPIRY: {
|
|
103
67
|
name: 'MAX_CONFIRM_EXPIRY',
|
|
104
68
|
description: 'get the max confirm expiry',
|
|
@@ -111,5 +75,50 @@ export const readCommandConfig = {
|
|
|
111
75
|
name: 'supports-interface',
|
|
112
76
|
description: 'get supports interface by id',
|
|
113
77
|
},
|
|
78
|
+
healthShortfallShares: {
|
|
79
|
+
name: 'health-shortfall-shares',
|
|
80
|
+
description: 'get the amount of shares to rebalance to restore vault healthiness or to cover redemptions',
|
|
81
|
+
},
|
|
82
|
+
minimalReserve: {
|
|
83
|
+
name: 'minimal-reserve',
|
|
84
|
+
description: 'get the amount of ether that is locked on the vault only as a reserve',
|
|
85
|
+
},
|
|
86
|
+
obligations: {
|
|
87
|
+
name: 'obligations',
|
|
88
|
+
description: 'get the amount of shares to burn to restore vault healthiness or to cover redemptions and the amount of outstanding Lido fees',
|
|
89
|
+
},
|
|
90
|
+
feeRecipient: {
|
|
91
|
+
name: 'node-operator-fee-recipient',
|
|
92
|
+
description: 'get the address of the node operator fee recipient',
|
|
93
|
+
},
|
|
94
|
+
maxLockableValue: {
|
|
95
|
+
name: 'max-lockable-value',
|
|
96
|
+
description: 'get the max total lockable amount of ether for the vault (excluding the Lido and node operator fees)',
|
|
97
|
+
},
|
|
98
|
+
latestReport: {
|
|
99
|
+
name: 'latest-report',
|
|
100
|
+
aliases: ['lr'],
|
|
101
|
+
description: 'get the latest report data containing the total value and in-out delta',
|
|
102
|
+
},
|
|
103
|
+
settledGrowth: {
|
|
104
|
+
name: 'settled-growth',
|
|
105
|
+
description: 'get settled growth of the vault not subject to fees',
|
|
106
|
+
},
|
|
107
|
+
pdgPolicy: {
|
|
108
|
+
name: 'pdg-policy',
|
|
109
|
+
description: 'get the current active PDG policy set by `DEFAULT_ADMIN_ROLE`',
|
|
110
|
+
},
|
|
111
|
+
latestCorrectionTimestamp: {
|
|
112
|
+
name: 'latest-correction-timestamp',
|
|
113
|
+
description: 'get the timestamp of the most recent settled growth correction',
|
|
114
|
+
},
|
|
115
|
+
isApprovedToConnect: {
|
|
116
|
+
name: 'is-approved-to-connect',
|
|
117
|
+
description: 'get the flag indicating whether the vault is approved by the node operator to connect to VaultHub',
|
|
118
|
+
},
|
|
119
|
+
obligationsShortfallValue: {
|
|
120
|
+
name: 'obligations-shortfall-value',
|
|
121
|
+
description: 'get the amount of ether required to cover obligations shortfall of the vault',
|
|
122
|
+
},
|
|
114
123
|
};
|
|
115
124
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../programs/contracts/dashboard/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAC5B;IACE,iBAAiB,EAAE;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,kEAAkE;KACrE;IACD,eAAe,EAAE;QACf,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,sBAAsB;KACpC;IACD,SAAS,EAAE;QACT,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,sBAAsB;KACpC;IACD,UAAU,EAAE;QACV,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,2CAA2C;KACzD;IACD,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../programs/contracts/dashboard/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAC5B;IACE,iBAAiB,EAAE;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,kEAAkE;KACrE;IACD,eAAe,EAAE;QACf,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,sBAAsB;KACpC;IACD,SAAS,EAAE;QACT,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,sBAAsB;KACpC;IACD,UAAU,EAAE;QACV,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,2CAA2C;KACzD;IACD,0BAA0B,EAAE;QAC1B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,2EAA2E;KAC9E;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,2BAA2B;KACzC;IACD,eAAe,EAAE;QACf,IAAI,EAA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AClE;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,sGAAsG;KACzG;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,CAAC,IAAI,CAAC;QACf,WAAW,EACT,wEAAwE;KAC3E;IACD,aAAa,EAAE;QACb,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,qDAAqD;KACnE;IACD,SAAS,EAAE;QACT,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,+DAA+D;KAClE;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE,6BAA6B;QACnC,WAAW,EACT,gEAAgE;KACnE;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,mGAAmG;KACtG;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE,6BAA6B;QACnC,WAAW,EACT,8EAA8E;KACjF;CACF,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Option } from 'commander';
|
|
|
2
2
|
import { DashboardAbi } from '../../../abi/index.js';
|
|
3
3
|
import { getDashboardBaseInfo, getDashboardRoles, getDashboardHealth, getDashboardOverview, } from '../../../features/index.js';
|
|
4
4
|
import { getDashboardContract, getVaultHubContract } from '../../../contracts/index.js';
|
|
5
|
-
import { generateReadCommands, logResult, logInfo, getCommandsJson, stringToAddress, callReadMethodSilent, getConfirmationsInfo, } from '../../../utils/index.js';
|
|
5
|
+
import { generateReadCommands, logResult, logInfo, getCommandsJson, stringToAddress, callReadMethodSilent, getConfirmationsInfo, logTable, } from '../../../utils/index.js';
|
|
6
6
|
import { dashboard } from './main.js';
|
|
7
7
|
import { readCommandConfig } from './config.js';
|
|
8
8
|
const dashboardRead = dashboard
|
|
@@ -58,17 +58,52 @@ dashboardRead
|
|
|
58
58
|
data: [['Dashboard Address', vaultConnection.owner]],
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
|
+
dashboardRead
|
|
62
|
+
.command('vault-by-dashboard')
|
|
63
|
+
.description('get vault address by dashboard')
|
|
64
|
+
.argument('<dashboard>', 'dashboard address', stringToAddress)
|
|
65
|
+
.action(async (dashboard) => {
|
|
66
|
+
const dashboardContract = getDashboardContract(dashboard);
|
|
67
|
+
const vault = await callReadMethodSilent(dashboardContract, 'stakingVault');
|
|
68
|
+
logResult({
|
|
69
|
+
data: [['Vault Address', vault]],
|
|
70
|
+
});
|
|
71
|
+
});
|
|
61
72
|
dashboardRead
|
|
62
73
|
.command('confirmations-log')
|
|
63
74
|
.description('get pending confirmations')
|
|
64
75
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
65
76
|
.action(async (address) => {
|
|
66
77
|
const contract = getDashboardContract(address);
|
|
67
|
-
await getConfirmationsInfo(contract, contract.abi);
|
|
78
|
+
const confirmations = await getConfirmationsInfo(contract, contract.abi);
|
|
79
|
+
if (!confirmations)
|
|
80
|
+
return console.error('No confirmations found');
|
|
81
|
+
logResult({});
|
|
82
|
+
Object.entries(confirmations).forEach(([data, { member, role, expiryTimestamp, expiryDate, decodedData }], idx) => {
|
|
83
|
+
console.info(`\nEvent ${idx + 1}`);
|
|
84
|
+
logTable({
|
|
85
|
+
data: [
|
|
86
|
+
['Member', member],
|
|
87
|
+
['Role', role],
|
|
88
|
+
[
|
|
89
|
+
'Expiry Timestamp',
|
|
90
|
+
`${expiryTimestamp.toString()} (${expiryDate})`,
|
|
91
|
+
],
|
|
92
|
+
['Data', data],
|
|
93
|
+
],
|
|
94
|
+
});
|
|
95
|
+
console.info('Decoded data:');
|
|
96
|
+
logTable({
|
|
97
|
+
data: [
|
|
98
|
+
['Function', decodedData.functionName],
|
|
99
|
+
['Argument', decodedData.args[0]],
|
|
100
|
+
],
|
|
101
|
+
});
|
|
102
|
+
});
|
|
68
103
|
});
|
|
69
104
|
dashboardRead
|
|
70
105
|
.command('confirming-roles')
|
|
71
|
-
.description('get
|
|
106
|
+
.description('get the roles that can:change the confirm expiry, set the node operator fee, set a new owner of the StakingVault')
|
|
72
107
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
73
108
|
.action(async (address) => {
|
|
74
109
|
const contract = getDashboardContract(address);
|
|
@@ -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,
|
|
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,CAA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,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACxE,MAAM,EAAE;YACN,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;SACpC;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,oBAAoB,CAClB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,iBAAiB,CAClB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { parseEther, formatEther } from 'viem';
|
|
2
2
|
import { Option } from 'commander';
|
|
3
|
-
import {
|
|
4
|
-
import { getDashboardContract, getStakingVaultContract } from '../../../contracts/index.js';
|
|
3
|
+
import { getDashboardContract, getOperatorGridContract, getStakingVaultContract, } from '../../../contracts/index.js';
|
|
5
4
|
import { mintShares, burnShares, mintSteth, burnSteth, checkIsReportFresh, } from '../../../features/index.js';
|
|
6
|
-
import { callReadMethod, callWriteMethodWithReceipt, jsonToRoleAssignment, confirmOperation, stringToBigInt, parseDepositArray, logInfo, getCommandsJson, stringToAddress, createPDGProof, confirmProposal, formatBP, callReadMethodSilent, showSpinner, stringToBigIntArrayWei, stringToHexArray, etherToWei, } from '../../../utils/index.js';
|
|
5
|
+
import { callReadMethod, callWriteMethodWithReceipt, jsonToRoleAssignment, confirmOperation, stringToBigInt, parseDepositArray, logInfo, getCommandsJson, stringToAddress, createPDGProof, confirmProposal, formatBP, callReadMethodSilent, showSpinner, stringToBigIntArrayWei, stringToHexArray, etherToWei, stringToNumber, } from '../../../utils/index.js';
|
|
7
6
|
import { dashboard } from './main.js';
|
|
8
7
|
const dashboardWrite = dashboard
|
|
9
8
|
.command('write')
|
|
@@ -124,10 +123,11 @@ dashboardWrite
|
|
|
124
123
|
const confirm = await confirmOperation(confirmationMessage);
|
|
125
124
|
if (!confirm)
|
|
126
125
|
return;
|
|
126
|
+
const gweiAmounts = amounts.map((amount) => parseEther(formatEther(amount), 'gwei'));
|
|
127
127
|
await callWriteMethodWithReceipt({
|
|
128
128
|
contract,
|
|
129
129
|
methodName: 'triggerValidatorWithdrawals',
|
|
130
|
-
payload: [mergedPubkeys,
|
|
130
|
+
payload: [mergedPubkeys, gweiAmounts, recipient],
|
|
131
131
|
value: fee,
|
|
132
132
|
});
|
|
133
133
|
});
|
|
@@ -204,13 +204,14 @@ dashboardWrite
|
|
|
204
204
|
.action(async (address, ether) => {
|
|
205
205
|
const contract = getDashboardContract(address);
|
|
206
206
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
207
|
-
const confirm = await confirmOperation(`Are you sure you want to rebalance the vault ${vault} with ${formatEther(ether)} ether?`);
|
|
207
|
+
const confirm = await confirmOperation(`Are you sure you want to rebalance the vault ${vault} with ${formatEther(ether)} ether by transferring?`);
|
|
208
208
|
if (!confirm)
|
|
209
209
|
return;
|
|
210
210
|
await callWriteMethodWithReceipt({
|
|
211
211
|
contract,
|
|
212
212
|
methodName: 'rebalanceVaultWithEther',
|
|
213
213
|
payload: [ether],
|
|
214
|
+
value: ether,
|
|
214
215
|
});
|
|
215
216
|
});
|
|
216
217
|
dashboardWrite
|
|
@@ -232,38 +233,38 @@ dashboardWrite
|
|
|
232
233
|
});
|
|
233
234
|
dashboardWrite
|
|
234
235
|
.command('recover-erc20')
|
|
235
|
-
.description('recovers ERC20 tokens or ether from the dashboard contract to
|
|
236
|
+
.description('recovers ERC20 tokens or ether from the dashboard contract to the recipient')
|
|
236
237
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
237
|
-
.argument('<token>', '
|
|
238
|
-
.argument('<
|
|
239
|
-
.argument('<
|
|
240
|
-
.action(async (address, token,
|
|
238
|
+
.argument('<token>', 'address of the token to recover or 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee for ether (EIP-7528)', stringToAddress)
|
|
239
|
+
.argument('<amount>', 'amount of tokens or ether to recover (in ETH)', etherToWei)
|
|
240
|
+
.argument('<recipient>', 'address of the recovery recipient', stringToAddress)
|
|
241
|
+
.action(async (address, token, amount, recipient) => {
|
|
241
242
|
const contract = getDashboardContract(address);
|
|
242
|
-
const confirm = await confirmOperation(`Are you sure you want to recover ${
|
|
243
|
+
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}?`);
|
|
243
244
|
if (!confirm)
|
|
244
245
|
return;
|
|
245
246
|
await callWriteMethodWithReceipt({
|
|
246
247
|
contract,
|
|
247
248
|
methodName: 'recoverERC20',
|
|
248
|
-
payload: [token, recipient,
|
|
249
|
+
payload: [token, recipient, amount],
|
|
249
250
|
});
|
|
250
251
|
});
|
|
251
252
|
dashboardWrite
|
|
252
|
-
.command('
|
|
253
|
-
.description('
|
|
253
|
+
.command('collect-erc20-from-vault')
|
|
254
|
+
.description('collects ERC20 tokens from vault contract balance to the recipient')
|
|
254
255
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
255
|
-
.argument('<token>', '
|
|
256
|
-
.argument('<
|
|
257
|
-
.argument('<recipient>', '
|
|
258
|
-
.action(async (address, token,
|
|
256
|
+
.argument('<token>', 'address of the token to recover or 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee for ether (EIP-7528)', stringToAddress)
|
|
257
|
+
.argument('<amount>', 'amount of tokens or ether to recover (in ETH)', etherToWei)
|
|
258
|
+
.argument('<recipient>', 'address of the recovery recipient', stringToAddress)
|
|
259
|
+
.action(async (address, token, amount, recipient) => {
|
|
259
260
|
const contract = getDashboardContract(address);
|
|
260
|
-
const confirm = await confirmOperation(`Are you sure you want to recover the token ${token} with
|
|
261
|
+
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}?`);
|
|
261
262
|
if (!confirm)
|
|
262
263
|
return;
|
|
263
264
|
await callWriteMethodWithReceipt({
|
|
264
265
|
contract,
|
|
265
|
-
methodName: '
|
|
266
|
-
payload: [token,
|
|
266
|
+
methodName: 'collectERC20FromVault',
|
|
267
|
+
payload: [token, recipient, amount],
|
|
267
268
|
});
|
|
268
269
|
});
|
|
269
270
|
dashboardWrite
|
|
@@ -284,7 +285,7 @@ dashboardWrite
|
|
|
284
285
|
});
|
|
285
286
|
dashboardWrite
|
|
286
287
|
.command('deposit-resume')
|
|
287
|
-
.description('
|
|
288
|
+
.description('resumes deposits to beacon chain')
|
|
288
289
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
289
290
|
.action(async (address) => {
|
|
290
291
|
const contract = getDashboardContract(address);
|
|
@@ -300,7 +301,7 @@ dashboardWrite
|
|
|
300
301
|
});
|
|
301
302
|
dashboardWrite
|
|
302
303
|
.command('role-grant')
|
|
303
|
-
.description('
|
|
304
|
+
.description('mass-grants multiple roles to multiple accounts.')
|
|
304
305
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
305
306
|
.argument('<roleAssignmentJSON>', 'JSON array of role assignments', jsonToRoleAssignment)
|
|
306
307
|
.addHelpText('after', `Role assignment format:
|
|
@@ -327,7 +328,7 @@ dashboardWrite
|
|
|
327
328
|
});
|
|
328
329
|
dashboardWrite
|
|
329
330
|
.command('role-revoke')
|
|
330
|
-
.description('
|
|
331
|
+
.description('mass-revokes multiple roles from multiple accounts')
|
|
331
332
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
332
333
|
.argument('<roleAssignmentJSON>', 'JSON array of role assignments', jsonToRoleAssignment)
|
|
333
334
|
.addHelpText('after', `Role assignment format:
|
|
@@ -352,28 +353,10 @@ dashboardWrite
|
|
|
352
353
|
payload: [roleAssignment],
|
|
353
354
|
});
|
|
354
355
|
});
|
|
355
|
-
dashboardWrite
|
|
356
|
-
.command('compensate-disproven-predeposit')
|
|
357
|
-
.alias('compensate')
|
|
358
|
-
.description('Compensates ether of disproven validator`s predeposit from PDG to the recipient')
|
|
359
|
-
.argument('<address>', 'dashboard address', stringToAddress)
|
|
360
|
-
.argument('<pubkey>', 'validator that was proven invalid in PDG')
|
|
361
|
-
.argument('<recipient>', 'address to receive the `PDG.PREDEPOSIT_AMOUNT`', stringToAddress)
|
|
362
|
-
.action(async (address, pubkey, recipient) => {
|
|
363
|
-
const contract = getDashboardContract(address);
|
|
364
|
-
const confirm = await confirmOperation(`Are you sure you want to compensate the disproven predeposit from the Predeposit Guarantee contract ${contract} with validator public key ${pubkey} to ${recipient}?`);
|
|
365
|
-
if (!confirm)
|
|
366
|
-
return;
|
|
367
|
-
await callWriteMethodWithReceipt({
|
|
368
|
-
contract,
|
|
369
|
-
methodName: 'compensateDisprovenPredepositFromPDG',
|
|
370
|
-
payload: [pubkey, recipient],
|
|
371
|
-
});
|
|
372
|
-
});
|
|
373
356
|
dashboardWrite
|
|
374
357
|
.command('unguaranteed-deposit-to-beacon-chain')
|
|
375
358
|
.alias('unguaranteed-deposit')
|
|
376
|
-
.description('
|
|
359
|
+
.description('withdraws ether from vault and deposits directly to provided validators bypassing the default PDG process')
|
|
377
360
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
378
361
|
.argument('<deposits>', 'array of IStakingVault.Deposit structs containing deposit data', parseDepositArray)
|
|
379
362
|
.addHelpText('after', `Deposit format:
|
|
@@ -401,23 +384,19 @@ dashboardWrite
|
|
|
401
384
|
dashboardWrite
|
|
402
385
|
.command('prove-unknown-validators-to-pdg')
|
|
403
386
|
.alias('prove-unknown-validators')
|
|
404
|
-
.description('
|
|
387
|
+
.description('proves validators with correct vault WC if they are unknown to PDG')
|
|
405
388
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
406
389
|
.argument('<validatorIndex...>', 'index of the validator to prove')
|
|
407
390
|
.action(async (address, validatorIndexes) => {
|
|
408
|
-
const account = await getAccount();
|
|
409
391
|
const contract = getDashboardContract(address);
|
|
410
392
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
411
393
|
const vaultContract = getStakingVaultContract(vault);
|
|
412
394
|
const pdgContract = await callReadMethodSilent(vaultContract, 'depositor');
|
|
413
395
|
const payload = [];
|
|
414
|
-
const
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
]);
|
|
419
|
-
if (!hasRole) {
|
|
420
|
-
throw new Error(`You do not have role (PDG_PROVE_VALIDATOR_ROLE - ${PDG_PROVE_VALIDATOR_ROLE}) to prove validators to PDG`);
|
|
396
|
+
const pdgPolicy = await callReadMethodSilent(contract, 'pdgPolicy');
|
|
397
|
+
const isAllowed = pdgPolicy === 2;
|
|
398
|
+
if (!isAllowed) {
|
|
399
|
+
throw new Error(`Dashboard PDG policy is not set to allow proving unknown validators to PDG`);
|
|
421
400
|
}
|
|
422
401
|
for (const validatorIndex of validatorIndexes) {
|
|
423
402
|
const hideSpinner = showSpinner({
|
|
@@ -506,7 +485,8 @@ dashboardWrite
|
|
|
506
485
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
507
486
|
.argument('<tier>', 'tier to change to', stringToBigInt)
|
|
508
487
|
.argument('<requestedShareLimit>', 'requested new share limit for the vault (in shares)', etherToWei)
|
|
509
|
-
.
|
|
488
|
+
.option('-f, --fund', 'optional fund the vault with 1 ETH', false)
|
|
489
|
+
.action(async (address, tier, requestedShareLimit, { fund }) => {
|
|
510
490
|
const contract = getDashboardContract(address);
|
|
511
491
|
const vault = await callReadMethod(contract, 'stakingVault');
|
|
512
492
|
const confirm = await confirmOperation(`Are you sure you want to change the tier of the vault ${vault} to ${tier} and connect to VaultHub?
|
|
@@ -517,40 +497,28 @@ dashboardWrite
|
|
|
517
497
|
contract,
|
|
518
498
|
methodName: 'connectAndAcceptTier',
|
|
519
499
|
payload: [tier, requestedShareLimit],
|
|
500
|
+
value: fund ? parseEther('1') : undefined,
|
|
520
501
|
});
|
|
521
502
|
});
|
|
522
503
|
dashboardWrite
|
|
523
|
-
.command('
|
|
524
|
-
.description('
|
|
525
|
-
.argument('<address>', 'dashboard address', stringToAddress)
|
|
526
|
-
.argument('<amount>', 'amount to increase the rewards adjustment by (in ETH)', etherToWei)
|
|
527
|
-
.action(async (address, amount) => {
|
|
528
|
-
const contract = getDashboardContract(address);
|
|
529
|
-
const confirm = await confirmOperation(`Are you sure you want to increase the rewards adjustment by ${formatEther(amount)} ETH?`);
|
|
530
|
-
if (!confirm)
|
|
531
|
-
return;
|
|
532
|
-
await callWriteMethodWithReceipt({
|
|
533
|
-
contract,
|
|
534
|
-
methodName: 'increaseRewardsAdjustment',
|
|
535
|
-
payload: [amount],
|
|
536
|
-
});
|
|
537
|
-
});
|
|
538
|
-
dashboardWrite
|
|
539
|
-
.command('set-rewards-adjustment')
|
|
540
|
-
.description('set `rewardsAdjustment` to a new proposed value if `confirmingRoles()` agree')
|
|
504
|
+
.command('set-pdg-policy')
|
|
505
|
+
.description('set the PDG policy')
|
|
541
506
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
542
|
-
.argument('<
|
|
543
|
-
.action(async (address,
|
|
507
|
+
.argument('<policy>', 'policy to set the PDG policy to', stringToNumber)
|
|
508
|
+
.action(async (address, policy) => {
|
|
544
509
|
const contract = getDashboardContract(address);
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
|
|
510
|
+
const PDG_POLICY = {
|
|
511
|
+
0: 'STRICT',
|
|
512
|
+
1: 'ALLOW_PROVE',
|
|
513
|
+
2: 'ALLOW_DEPOSIT_AND_PROVE',
|
|
514
|
+
};
|
|
515
|
+
const confirm = await confirmOperation(`Are you sure you want to set the PDG policy to ${policy} (${PDG_POLICY[policy]})?`);
|
|
548
516
|
if (!confirm)
|
|
549
517
|
return;
|
|
550
518
|
await callWriteMethodWithReceipt({
|
|
551
519
|
contract,
|
|
552
|
-
methodName: '
|
|
553
|
-
payload: [
|
|
520
|
+
methodName: 'setPDGPolicy',
|
|
521
|
+
payload: [policy],
|
|
554
522
|
});
|
|
555
523
|
});
|
|
556
524
|
dashboardWrite
|
|
@@ -566,7 +534,7 @@ dashboardWrite
|
|
|
566
534
|
return;
|
|
567
535
|
await callWriteMethodWithReceipt({
|
|
568
536
|
contract,
|
|
569
|
-
methodName: '
|
|
537
|
+
methodName: 'setFeeRecipient',
|
|
570
538
|
payload: [recipient],
|
|
571
539
|
});
|
|
572
540
|
});
|
|
@@ -576,13 +544,25 @@ dashboardWrite
|
|
|
576
544
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
577
545
|
.action(async (address) => {
|
|
578
546
|
const contract = getDashboardContract(address);
|
|
579
|
-
const
|
|
547
|
+
const vault = await callReadMethodSilent(contract, 'stakingVault');
|
|
548
|
+
const operatorGridContract = await getOperatorGridContract();
|
|
549
|
+
const log = await confirmProposal({
|
|
550
|
+
contract: contract,
|
|
551
|
+
vault,
|
|
552
|
+
additionalContracts: [operatorGridContract],
|
|
553
|
+
});
|
|
580
554
|
if (!log)
|
|
581
555
|
return;
|
|
556
|
+
const isChangeTier = log.decodedData.functionName === 'changeTier';
|
|
557
|
+
// ChangeTier event from OperatorGrid has 3 args (vault, tierId, shareLimit), but we need only 2 (tierId, shareLimit)
|
|
558
|
+
let args = log.decodedData.args;
|
|
559
|
+
if (isChangeTier && args && args.length === 3) {
|
|
560
|
+
args = [args[1], args[2]];
|
|
561
|
+
}
|
|
582
562
|
await callWriteMethodWithReceipt({
|
|
583
563
|
contract,
|
|
584
564
|
methodName: log.decodedData.functionName,
|
|
585
|
-
payload:
|
|
565
|
+
payload: args,
|
|
586
566
|
});
|
|
587
567
|
});
|
|
588
568
|
dashboardWrite
|
|
@@ -615,7 +595,7 @@ dashboardWrite
|
|
|
615
595
|
return;
|
|
616
596
|
await callWriteMethodWithReceipt({
|
|
617
597
|
contract,
|
|
618
|
-
methodName: '
|
|
598
|
+
methodName: 'setFeeRate',
|
|
619
599
|
payload: [fee],
|
|
620
600
|
});
|
|
621
601
|
});
|
|
@@ -625,14 +605,71 @@ dashboardWrite
|
|
|
625
605
|
.argument('<address>', 'dashboard address', stringToAddress)
|
|
626
606
|
.action(async (address) => {
|
|
627
607
|
const contract = getDashboardContract(address);
|
|
628
|
-
const nodeOperatorFeeRecipient = await callReadMethodSilent(contract, '
|
|
608
|
+
const nodeOperatorFeeRecipient = await callReadMethodSilent(contract, 'feeRecipient');
|
|
629
609
|
const confirm = await confirmOperation(`Are you sure you want to transfer the node operator fee to ${nodeOperatorFeeRecipient}?`);
|
|
630
610
|
if (!confirm)
|
|
631
611
|
return;
|
|
632
612
|
await callWriteMethodWithReceipt({
|
|
633
613
|
contract,
|
|
634
|
-
methodName: '
|
|
614
|
+
methodName: 'disburseFee',
|
|
615
|
+
payload: [],
|
|
616
|
+
});
|
|
617
|
+
});
|
|
618
|
+
dashboardWrite
|
|
619
|
+
.command('change-tier')
|
|
620
|
+
.alias('ct')
|
|
621
|
+
.description('vault tier change with multi-role confirmation')
|
|
622
|
+
.argument('<address>', 'dashboard address', stringToAddress)
|
|
623
|
+
.argument('<tierId>', 'tier id', stringToBigInt)
|
|
624
|
+
.argument('<requestedShareLimit>', 'requested share limit (in shares)', etherToWei)
|
|
625
|
+
.action(async (address, tierId, requestedShareLimit) => {
|
|
626
|
+
const contract = getDashboardContract(address);
|
|
627
|
+
const vault = await callReadMethod(contract, 'stakingVault');
|
|
628
|
+
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?`);
|
|
629
|
+
if (!confirm)
|
|
630
|
+
return;
|
|
631
|
+
await callWriteMethodWithReceipt({
|
|
632
|
+
contract,
|
|
633
|
+
methodName: 'changeTier',
|
|
634
|
+
payload: [tierId, requestedShareLimit],
|
|
635
|
+
});
|
|
636
|
+
});
|
|
637
|
+
dashboardWrite
|
|
638
|
+
.command('sync-tier')
|
|
639
|
+
.alias('st')
|
|
640
|
+
.description('requests a sync of tier on the OperatorGrid')
|
|
641
|
+
.argument('<address>', 'dashboard address', stringToAddress)
|
|
642
|
+
.addHelpText('after', `Tier sync confirmation logic:
|
|
643
|
+
- Both vault owner (via this function) AND node operator confirmations are required
|
|
644
|
+
- First call returns false (pending), second call with both confirmations completes the sync
|
|
645
|
+
- Confirmations expire after the configured period (default: 1 day)`)
|
|
646
|
+
.action(async (address) => {
|
|
647
|
+
const contract = getDashboardContract(address);
|
|
648
|
+
const vault = await callReadMethod(contract, 'stakingVault');
|
|
649
|
+
const confirm = await confirmOperation(`Are you sure you want to sync the tier of the vault ${vault}?`);
|
|
650
|
+
if (!confirm)
|
|
651
|
+
return;
|
|
652
|
+
await callWriteMethodWithReceipt({
|
|
653
|
+
contract,
|
|
654
|
+
methodName: 'syncTier',
|
|
635
655
|
payload: [],
|
|
636
656
|
});
|
|
637
657
|
});
|
|
658
|
+
dashboardWrite
|
|
659
|
+
.command('update-share-limit')
|
|
660
|
+
.description('requests a change of share limit on the OperatorGrid')
|
|
661
|
+
.argument('<address>', 'dashboard address', stringToAddress)
|
|
662
|
+
.argument('<shareLimit>', 'share limit', stringToBigInt)
|
|
663
|
+
.action(async (address, shareLimit) => {
|
|
664
|
+
const contract = getDashboardContract(address);
|
|
665
|
+
const vault = await callReadMethod(contract, 'stakingVault');
|
|
666
|
+
const confirm = await confirmOperation(`Are you sure you want to request a change of share limit on the OperatorGrid for the vault ${vault} to ${shareLimit}?`);
|
|
667
|
+
if (!confirm)
|
|
668
|
+
return;
|
|
669
|
+
await callWriteMethodWithReceipt({
|
|
670
|
+
contract,
|
|
671
|
+
methodName: 'updateShareLimit',
|
|
672
|
+
payload: [shareLimit],
|
|
673
|
+
});
|
|
674
|
+
});
|
|
638
675
|
//# sourceMappingURL=write.js.map
|